Recent commits on external-gbm_gralloc (git) - hady_renjer - OSDN https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/ 0afe19: Open the DRM device of the primary framebuffer (fb0) Wit... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/0afe1961cda99527fa8827cfaeece393b77b57fc ]]> Chih-Wei Huang Commit: 0afe1961cda99527fa8827cfaeece393b77b57fc
Open the DRM device of the primary framebuffer (fb0)

With the new added drmOpenByFB function in libdrm, it's easy to find
the correct DRM device of the primary framebuffer.

Signed-off-by: Chih-Wei Huang 
]]>
22d8ed: Let gbm_free() return a value So that gralloc_gbm_handle... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/22d8ed6e3de7537fd960c44207dfa347edafbcd5 ]]> Chih-Wei Huang Commit: 22d8ed6e3de7537fd960c44207dfa347edafbcd5
Let gbm_free() return a value

So that gralloc_gbm_handle_unregister() could return correct value
required by gralloctest.

Signed-off-by: Chih-Wei Huang 
]]>
9daba0: Merge branch 'fb' of https://github.com/lambdadroid/gbm_g... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/9daba0a40b23c9361956c84901c8fd4ecbefa54d Chih-Wei Huang Commit: 9daba0a40b23c9361956c84901c8fd4ecbefa54d
Merge branch 'fb' of https://github.com/lambdadroid/gbm_gralloc into oreo-x86
]]>
9a78d4: android: add gralloctest gralloctest executable is added... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/9a78d4f87eafcb1ab950ab3b4a07f45f10bbc16e ]]> Mauro Rossi Commit: 9a78d4f87eafcb1ab950ab3b4a07f45f10bbc16e
android: add gralloctest

gralloctest executable is added for Android based on minigbm/cros_gralloc commits:

b57dffc ("minigbm: move gralloctest to this repo")
2eeaf5a ("minigbm: cros_gralloc: fix -Wimplicit-function-declaration warnings in gralloctest")

Signed-off-by: Mauro Rossi 
]]>
5ddecb: Merge remote-tracking branch 'origin/master' into oreo-x8... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/5ddecb14af4da0dda3f3817be23f1b3c54514aec Chih-Wei Huang Commit: 5ddecb14af4da0dda3f3817be23f1b3c54514aec
Merge remote-tracking branch 'origin/master' into oreo-x86

Conflicts:
	gralloc_drm_handle.h
]]>
c8de38: Add simple framebuffer HAL implementation using drm_frame... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/c8de380a3c3ba2737702bceb4741cba8663fea4a lambdadroid Commit: c8de380a3c3ba2737702bceb4741cba8663fea4a
Add simple framebuffer HAL implementation using drm_framebuffer
]]>
137cc3: Update usage flag handling for hwc Add support for GRALL... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/137cc39aaa57f8c64db3397cd6ec7600a191a88d Signed-off-by: Rob Herring ]]> Mauro Rossi Commit: 137cc39aaa57f8c64db3397cd6ec7600a191a88d
Update usage flag handling for hwc

Add support for GRALLOC_USAGE_HW_COMPOSER usage flag
mapping it to GBM flags, inspired by minigbm implementation.

Fixes the artifacts issues with vulkan hal radv with the following apps
with benefit to all apps using HWC layers:
V1 - GPU Benchmark Pro (Vulkan API)
PPSSPP - PSP emulator
Sascha Willems Vulkan Examples (e.g. Vulkan Gears, Vulkan Texture)

Signed-off-by: Mauro Rossi 
Signed-off-by: Rob Herring 
]]>
27763e: Switch to use gralloc handle defined in libdrm Remove ou... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/27763e0d43cc16387d6de8ad89eafba33d5072e3 ]]> Rob Herring Commit: 27763e0d43cc16387d6de8ad89eafba33d5072e3
Switch to use gralloc handle defined in libdrm

Remove our custom handle definition and use the one defined in libdrm.

Signed-off-by: Rob Herring 
]]>
f552ac: Use a std::unordered_map to lookup BOs from handles Remo... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/f552ac5e246f1e7d2348e4baee16d82faa25e7e7 ]]> Rob Herring Commit: f552ac5e246f1e7d2348e4baee16d82faa25e7e7
Use a std::unordered_map to lookup BOs from handles

Remove the fragile dependency on the handle 'data' pointer and
'data_owner' flag.

This idea is stolen from the CrOS minigbm gralloc implementation.

Signed-off-by: Rob Herring 
]]>
2b61be: Remove GRALLOC_MODULE_PERFORM_GET_USAGE This is no longe... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/2b61bef10ff3b53b62b8edd8759e1c12c9c6a4d7 ]]> Rob Herring Commit: 2b61bef10ff3b53b62b8edd8759e1c12c9c6a4d7
Remove GRALLOC_MODULE_PERFORM_GET_USAGE

This is no longer used by drm_hwc and can be removed.

Signed-off-by: Rob Herring 
]]>
82c008: Move gralloc_gbm_handle_t accesses into gralloc_gbm.cpp ... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/82c0082b4e88b0770e3517fce76d72adfc32e499 ]]> Rob Herring Commit: 82c0082b4e88b0770e3517fce76d72adfc32e499
Move gralloc_gbm_handle_t accesses into gralloc_gbm.cpp

The only access to the gralloc_gbm_handle_t in gralloc.cpp is to set the
stride of allocated buffers. Move this into gralloc_gbm.cpp to isolate
accesses to the struct in one place.

Signed-off-by: Rob Herring 
]]>
2f7282: Merge remote-tracking branch 'origin/master' into nougat-... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/2f728292e676b48584c75cc1f46f4c5a35b5eb99 Chih-Wei Huang Commit: 2f728292e676b48584c75cc1f46f4c5a35b5eb99
Merge remote-tracking branch 'origin/master' into nougat-x86

Conflicts:
	gralloc_drm_handle.h
]]>
ed2c24: Explicitly include string.h The master build started fai... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/ed2c246bfc6c4bd8f9ef72b6a771814cf493c1f8 ]]> Rob Herring Commit: ed2c246bfc6c4bd8f9ef72b6a771814cf493c1f8
Explicitly include string.h

The master build started failing on strcmp and memset being undeclared, so
explicitly include string.h.

Change-Id: I55d042b34e55375ed50f9300ab0c3abdfa0f2631
Signed-off-by: Rob Herring 
]]>
35be82: Fix unused parameter 'handle' warning AOSP now builds wi... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/35be82684a04b7b8f99a69e5e0ae402d85238a4e ]]> Rob Herring Commit: 35be82684a04b7b8f99a69e5e0ae402d85238a4e
Fix unused parameter 'handle' warning

AOSP now builds with -Werror. Fix this warning:

gralloc_drm_handle.h:90:62: error: unused parameter 'handle' [-Werror,-Wunused-parameter]

Change-Id: Ief13c01f0ca1ede2b9ef5662acbdc6d0f27f6cd4
Signed-off-by: Rob Herring 
]]>
c10ef2: Use native_handle functions Use native_handle_{create,de... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/c10ef2b61bb5957470f55d15cf98ecaf7a0b4d4a ]]> Rob Herring Commit: c10ef2b61bb5957470f55d15cf98ecaf7a0b4d4a
Use native_handle functions

Use native_handle_{create,delete} functions instead of the C++
alloc/free. This will do the initialization for us instead of open
coding it.

Change-Id: I285292770ca756c1d2c2effa5c73e252526bae0c
Signed-off-by: Rob Herring 
]]>
3f7e56: Merge remote-tracking branch 'origin/master' into nougat-... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/3f7e566fd8abc0e1a90280bc7def2732abe2f41f Chih-Wei Huang Commit: 3f7e566fd8abc0e1a90280bc7def2732abe2f41f
Merge remote-tracking branch 'origin/master' into nougat-x86
]]>
c1bdbd: Remove old libraries in /system Since commit 94559640 th... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/c1bdbdc667f5406034e44445d9759818db7ad292 ]]> Chih-Wei Huang Commit: c1bdbdc667f5406034e44445d9759818db7ad292
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 
]]>
d8b95e: Fix 32-bit app crashing in 64-bit Android Seemingly the ... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/d8b95e3ed2f0b38949c9339b6f5c9ffb32ca1089 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 ]]> Chih-Wei Huang Commit: d8b95e3ed2f0b38949c9339b6f5c9ffb32ca1089
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 
]]>
945596: Android: move libraries to /vendor As part of Treble pro... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/94559640a3381ec3aac3a32d6cece4003048ba72 ]]> Rob Herring Commit: 94559640a3381ec3aac3a32d6cece4003048ba72
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 
]]>
d659dc: Convert gralloc_gbm_bo_t to gbm user data Instead of wra... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/d659dc35a2f90d4813edea9987ed284d31a5bd8c ]]> Rob Herring Commit: d659dc35a2f90d4813edea9987ed284d31a5bd8c
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 
]]>
468f7f: kill off gralloc_gbm_get_pid Caching getpid() calls seem... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/468f7f4fe1eb0e319ce001b1ff6b4d5ef7bd178d ]]> Rob Herring Commit: 468f7f4fe1eb0e319ce001b1ff6b4d5ef7bd178d
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 
]]>
fd87c7: Rework handle register/unregister calls What validate_ha... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/fd87c76a2f0b07308112dc2e286d29238eec38f3 ]]> Rob Herring Commit: fd87c76a2f0b07308112dc2e286d29238eec38f3
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 
]]>
ace14f: remove handle from BO Pass the handle to internal functi... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/ace14fb65bc6b37e90c775dd34899c7a087f4187 ]]> Rob Herring Commit: ace14fb65bc6b37e90c775dd34899c7a087f4187
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 
]]>
28b45d: Rework unregister/free code It is not necessary to track... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/28b45dc78151b791c3815fd8c696feccb5f78e04 ]]> Rob Herring Commit: 28b45dc78151b791c3815fd8c696feccb5f78e04
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 
]]>
fc7f6f: Don't close fds on imported buffers The fds should only ... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/fc7f6f28cfeca1c81c9289601f1f10c2884fe22f ]]> Rob Herring Commit: fc7f6f28cfeca1c81c9289601f1f10c2884fe22f
Don't close fds on imported buffers

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

Signed-off-by: Rob Herring 
]]>
daecfc: Revert "Add libgralloc_drm library to export headers to m... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/daecfc5a36da8be6e9114ef8257c6629c62d5831 Chih-Wei Huang Commit: daecfc5a36da8be6e9114ef8257c6629c62d5831
Revert "Add libgralloc_drm library to export headers to mesa"

This reverts commit 77f32995cb6e0193878b4b4147201b701076cee8.
]]>
5fbb4a: gbm_import: fix missing gbm_import_fd_modifier_data initi... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/5fbb4a87c53d8f3ef63c2f6cf7d9f91b188b6546 Reviewed-by: Aleksander Morgado Signed-off-by: Rob Herring ]]> Rob Herring Commit: 5fbb4a87c53d8f3ef63c2f6cf7d9f91b188b6546
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 
Reviewed-by: Aleksander Morgado 
Signed-off-by: Rob Herring 
]]>
5a1b30: Sync with the gbm API to import FD with modifier Commit ... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/5a1b30eb410bf88f9804a7bd29554f52a86348a6 ]]> Aleksander Morgado Commit: 5a1b30eb410bf88f9804a7bd29554f52a86348a6
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 
]]>
219103: Add support for modifiers Modifiers are used to describe... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/21910353a1d5b03d18d25be22516b51e580885a2 ]]> Robert Foss Commit: 21910353a1d5b03d18d25be22516b51e580885a2
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 
]]>
461551: Add description of GRALLOC_MODULE_PERFORM_GET_DRM_FD Add... https://pt.osdn.net/users/hady_renjer/pf/external-gbm_gralloc/scm/commits/461551297c51776e9ec9d48b08768cb6747308f5 ]]> Robert Foss Commit: 461551297c51776e9ec9d48b08768cb6747308f5
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 
]]>