• R/O
  • HTTP
  • SSH
  • HTTPS

Liste der Commits

Tags
Keine Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

external/gbm_gralloc


RSS
Rev. Zeit Autor
3f7e566 nougat-x86 oreo-x86 2017-10-05 15:57:42 Chih-Wei Huang

Merge remote-tracking branch 'origin/master' into nougat-x86

c1bdbdc 2017-10-05 15:54:56 Chih-Wei Huang

Remove old libraries in /system

Since commit 94559640 the libraries are moved to /vendor. But
the old libraries are not removed in an incremental build.
Therefore the new libraries may not be used.

Fixes: 94559640 ("Android: move libraries to /vendor")

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>

d8b95e3 2017-10-05 02:54:07 Chih-Wei Huang

Fix 32-bit app crashing in 64-bit Android

Seemingly the 64-bit int is always aligned to 8 in LP64.
But this is not hold in LP32.

Consequently sizeof(gralloc_drm_handle_t) are different
between LP64 (which is 18 ints) and LP32 (which is 16 ints).
As a result, 32-bit apps will crash in 64-bit OS since the
checking handle->base.numInts != GRALLOC_GBM_HANDLE_NUM_INTS
is true.

Fix it by always aligning 64-bit int to 8. Besides, to avoid
additional padding, just exchange the order of data_owner
and modifier. It aligns modifier to 8 natually.
This makes gralloc_drm_handle_t fit in 16 ints perfectly.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>

9455964 2017-09-15 22:51:29 Rob Herring

Android: move libraries to /vendor

As part of Treble project in Android O, all the device specific files have
to be located in a separate vendor partition. This is done by setting
LOCAL_PROPRIETARY_MODULE (the name is misleading). This change will not
break existing platforms without a vendor partition as it will just move
files to /system/vendor.

Change-Id: I0e863d55406b3e2457bbaded818e7fd4f19f064a
Signed-off-by: Rob Herring <robh@kernel.org>

d659dc3 2017-09-12 00:11:25 Rob Herring

Convert gralloc_gbm_bo_t to gbm user data

Instead of wrapping struct gbm_bo with our own BO struct, make the
struct GBM BO userdata instead. This makes things clearer as to what a
BO is.

Signed-off-by: Rob Herring <robh@kernel.org>

468f7f4 2017-09-12 00:11:25 Rob Herring

kill off gralloc_gbm_get_pid

Caching getpid() calls seems pointless, so remove the added
complexity and just use getpid() directly when needed.

Signed-off-by: Rob Herring <robh@kernel.org>

fd87c76 2017-09-11 23:59:44 Rob Herring

Rework handle register/unregister calls

What validate_handle() did was ambiguous and broken for binderized
gralloc. Reusing the existing BO pointer for gralloc_gbm_handle_register
is broken because the BO may get freed. It is necessary to always import
the buffer. So split validate handle into separate functions to retrieve
the BO ptr and import the buffer.

Change-Id: I4ea18aa0ded2d201c8f71f4e33a8fc893240d109
Signed-off-by: Rob Herring <robh@kernel.org>

ace14fb 2017-09-07 01:48:40 Rob Herring

remove handle from BO

Pass the handle to internal functions instead of the BO pointer, then we
can always get the BO from the handle and never need to get the handle
from the BO.

Signed-off-by: Rob Herring <robh@kernel.org>

28b45dc 2017-09-07 01:45:05 Rob Herring

Rework unregister/free code

It is not necessary to track imported buffers nor ref count them and
doing so is broken when native handles are cloned. So remove all the
related code and separate the unregister and free code paths.

Signed-off-by: Rob Herring <robh@kernel.org>

fc7f6f2 2017-09-07 01:43:45 Rob Herring

Don't close fds on imported buffers

The fds should only be closed if we allocated the handle.

Signed-off-by: Rob Herring <robh@kernel.org>

daecfc5 2017-07-18 15:41:38 Chih-Wei Huang

Revert "Add libgralloc_drm library to export headers to mesa"

This reverts commit 77f32995cb6e0193878b4b4147201b701076cee8.

5fbb4a8 2017-07-13 00:27:35 Rob Herring

gbm_import: fix missing gbm_import_fd_modifier_data initialization

With gbm_import_fd_modifier_data, some fields are not getting
initialized and in particular offset[0] is not which causes import
failures. Add memset to ensure all fields are initialized.

Reviewed-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Rob Herring <robh@kernel.org>

5a1b30e 2017-07-07 06:08:12 Aleksander Morgado

Sync with the gbm API to import FD with modifier

Commit 4026744fcb31f1d27c1b32e6945aadd4da415c6d in mesa introduced an
updated `struct gbm_import_fd_modifier_data' with arrays for fds,
strides and offsets, instead of single values.

Fix just by specifying one single item in the arrays.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>

2191035 2017-06-22 12:29:32 Robert Foss

Add support for modifiers

Modifiers are used to describe buffer metadata like if and how they are
compressed or if tiling is used.

This is needed to allow different devices to communicate about buffers
that have these properties.

Signed-off-by: Robert Foss <robert.foss@collabora.com>

4615512 2017-06-12 23:17:08 Robert Foss

Add description of GRALLOC_MODULE_PERFORM_GET_DRM_FD

Add description of the perform call GRALLOC_MODULE_PERFORM_GET_DRM_FD.

Signed-off-by: Robert Foss <robert.foss@collabora.com>

0ce0178 2017-06-12 23:17:08 Robert Foss

Change #include guard to reflect filename

Signed-off-by: Robert Foss <robert.foss@collabora.com>

77f3299 2017-06-09 05:45:53 Rob Herring

Add libgralloc_drm library to export headers to mesa

Mesa mainline depends on libgralloc_drm shared library for importing
include paths. Add a dummy library for this purpose. This gets mesa master
building without any additional patches. Patches are still needed for
proper functioning.

Change-Id: Ib9577d0b7af028091f0c6f61d8dd2340cc8425d0
Signed-off-by: Rob Herring <robh@kernel.org>

7979b04 2017-04-14 03:54:36 Rob Herring

Fix missing 0 init of alloc_device_t

This fixes a crash of "dumpsys SurfaceFlinger" because the dump() pointer
is not NULL.

Change-Id: If4c1f71fd532e21bb246c1b815b8b9ca00bb405b
Signed-off-by: Rob Herring <robh@kernel.org>

561c254 2017-04-14 03:53:26 Rob Herring

Quiet log prints changing them to verbose level

Quiet down various informational tracing messages switching them to
verbose log level

Change-Id: I0a78a9bcb1f807dc2db060ab1551cd5f62fa3f2d
Signed-off-by: Rob Herring <robh@kernel.org>

95c1cfb 2017-03-29 21:57:33 John Stultz

gbm_gralloc: Remove the invalid int cast and assignment in gbm_mod_perform()

In gbm_mod_perform(), for the cmd GRALLOC_MODULE_PERFORM_GET_USAGE,
the code takes the third argument, casts it as an int* and then writes
a zero into what the pointer points to.

The problem with this is that the third argument to that function is
actually a native_handle_t, so writing zero to the first int in that
structure ends up overwriting the version value, causing the
native_handle_t code to see the value as corrupt.

This results in lots of warnings and leaked fds.

Change-Id: If64770c164557b467f76ca97ddc182565730d394
Cc: Rob Herring <rob.herring@linaro.org>
Cc: Amit Pundir <amit.pundir@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Vishal Bhoj <vishal.bhoj@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>

e4017f7 2017-03-23 01:45:29 Rob Herring

Change module name to gralloc.gbm

Originally, the intent was to make GBM gralloc a drop-in replacement for
DRM gralloc, but this isn't really happening or needed. Change the name
so both can coexist.

Change-Id: I4eff839523213cc76c56746275d8ba7534ba9c12
Signed-off-by: Rob Herring <robh@kernel.org>

640b8f1 2016-12-14 00:44:56 Rob Herring

Fix mapping for non-zero starting coordinates

While the gralloc API allows for specifying the starting coordinates (L,T),
it seems this doesn't really work. No other gralloc implementations found
use the rectangle bounds. Not exactly sure how this ever worked, but it
broke recently with AOSP master.

Signed-off-by: Rob Herring <robh@kernel.org>

ff66db2 2016-12-14 00:43:50 Rob Herring

Add YV12 pixel format support

GBM doesn't support YV12 and we need a single buffer, so request GR88 from
GBM instead and adjust the width and height. GR88 also ensures (hopefully)
that the GPU texture alignment requirements are met.

Signed-off-by: Rob Herring <robh@kernel.org>

2a8002b 2016-12-14 00:43:50 Rob Herring

Remove unused gralloc_drm_handle_t::name

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
[robh: keep the name member for now for ABI/API compatibility with mesa]
Signed-off-by: Rob Herring <robh@kernel.org>

2df5343 2016-12-14 00:43:50 Emil Velikov

Use alternative GRALLOC_GBM_HANDLE_MAGIC

Using 0x5f47424d ("_GBM") is less likely to colide than the generic
0x12345678.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

46983bb 2016-12-14 00:43:49 Emil Velikov

Open the device node with O_CLOEXEC

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
Not 100% sure it is supported on Android.

128f827 2016-12-14 00:43:49 Emil Velikov

Don't leak the FD in the gbm_dev_create error path

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

2375135 2016-12-14 00:43:49 Emil Velikov

Kill off unused variable

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

78e8025 2016-10-26 06:52:01 Rob Herring

Merge pull request #2 from robertfoss/master

GRALLOC_MODULE_PERFORM_GET_USAGE stub and compiler warning fix

7c5db46 2016-10-26 06:35:46 Robert Foss

Stub out GRALLOC_MODULE_PERFORM_GET_USAGE

This implements an initial stub for GRALLOC_MODULE_PERFORM_GET_USAGE

Signed-off-by: Robert Foss <robert.foss@collabora.com>