- Jan 18, 2019
-
-
Tomeu Vizoso authored
-
- Oct 02, 2018
-
-
Tomeu Vizoso authored
-
- Jul 02, 2018
-
-
Mauro Rossi authored
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 <issor.oruam@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
-
Rob Herring authored
Remove our custom handle definition and use the one defined in libdrm. Signed-off-by: Rob Herring <robh@kernel.org>
-
Rob Herring authored
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 <robh@kernel.org>
-
Rob Herring authored
This is no longer used by drm_hwc and can be removed. Signed-off-by: Rob Herring <robh@kernel.org>
-
Rob Herring authored
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 <robh@kernel.org>
-
- Jan 24, 2018
-
-
Rob Herring authored
The master build started failing on strcmp and memset being undeclared, so explicitly include string.h. Change-Id: I55d042b34e55375ed50f9300ab0c3abdfa0f2631 Signed-off-by: Rob Herring <robh@kernel.org>
-
- Nov 30, 2017
-
-
Rob Herring authored
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 <robh@kernel.org>
-
- Nov 29, 2017
-
-
Rob Herring authored
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 <robh@kernel.org>
-
- Oct 04, 2017
-
-
Chih-Wei Huang authored
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>
-
- Sep 15, 2017
-
-
Rob Herring authored
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>
-
- Sep 11, 2017
-
-
Rob Herring authored
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>
-
Rob Herring authored
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>
-
Rob Herring authored
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>
-
- Sep 06, 2017
-
-
Rob Herring authored
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>
-
Rob Herring authored
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>
-
Rob Herring authored
The fds should only be closed if we allocated the handle. Signed-off-by: Rob Herring <robh@kernel.org>
-
- Jul 12, 2017
-
-
Rob Herring authored
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>
-
- Jul 06, 2017
-
-
Aleksander Morgado authored
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>
-
- Jun 22, 2017
-
-
Robert Foss authored
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>
-
- Jun 12, 2017
-
-
Robert Foss authored
Add description of the perform call GRALLOC_MODULE_PERFORM_GET_DRM_FD. Signed-off-by: Robert Foss <robert.foss@collabora.com>
-
Robert Foss authored
Signed-off-by: Robert Foss <robert.foss@collabora.com>
-
- Jun 08, 2017
-
-
Rob Herring authored
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>
-
- Apr 13, 2017
-
-
Rob Herring authored
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>
-
Rob Herring authored
Quiet down various informational tracing messages switching them to verbose log level Change-Id: I0a78a9bcb1f807dc2db060ab1551cd5f62fa3f2d Signed-off-by: Rob Herring <robh@kernel.org>
-
- Mar 29, 2017
-
-
John Stultz authored
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>
-
- Mar 22, 2017
-
-
Rob Herring authored
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>
-
- Dec 13, 2016
-
-
Rob Herring authored
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>
-
Rob Herring authored
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>
-
Rob Herring authored
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>
-
Emil Velikov authored
Using 0x5f47424d ("_GBM") is less likely to colide than the generic 0x12345678. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> --- Not 100% sure it is supported on Android.
-
Emil Velikov authored
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-
- Oct 25, 2016
-
-
Rob Herring authored
GRALLOC_MODULE_PERFORM_GET_USAGE stub and compiler warning fix
-
Robert Foss authored
This implements an initial stub for GRALLOC_MODULE_PERFORM_GET_USAGE Signed-off-by: Robert Foss <robert.foss@collabora.com>
-
Robert Foss authored
Add static_cast to op, to prevent compiler warnings. Signed-off-by: Robert Foss <robert.foss@collabora.com>
-
- Jun 01, 2016
-
-
Rob Herring authored
The component ordering was wrong causing GBM allocation failures. Signed-off-by: Rob Herring <robh@kernel.org>
-
- Apr 22, 2016
-
-
Rob Herring authored
Remove some unused code throwing warnings. Signed-off-by: Rob Herring <robh@kernel.org>
-