summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add support for modifiersHEADmasterRobert Foss2017-06-212-2/+14
| | | | | | | | | | 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>
* Add description of GRALLOC_MODULE_PERFORM_GET_DRM_FDRobert Foss2017-06-121-0/+4
| | | | | | Add description of the perform call GRALLOC_MODULE_PERFORM_GET_DRM_FD. Signed-off-by: Robert Foss <robert.foss@collabora.com>
* Change #include guard to reflect filenameRobert Foss2017-06-121-3/+3
| | | | Signed-off-by: Robert Foss <robert.foss@collabora.com>
* Add libgralloc_drm library to export headers to mesaRob Herring2017-06-082-0/+14
| | | | | | | | | | 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>
* Fix missing 0 init of alloc_device_tRob Herring2017-04-131-1/+1
| | | | | | | | 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>
* Quiet log prints changing them to verbose levelRob Herring2017-04-132-5/+5
| | | | | | | | Quiet down various informational tracing messages switching them to verbose log level Change-Id: I0a78a9bcb1f807dc2db060ab1551cd5f62fa3f2d Signed-off-by: Rob Herring <robh@kernel.org>
* gbm_gralloc: Remove the invalid int cast and assignment in gbm_mod_perform()John Stultz2017-03-291-2/+0
| | | | | | | | | | | | | | | | | | | | | 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>
* Change module name to gralloc.gbmRob Herring2017-03-221-1/+1
| | | | | | | | | 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>
* Fix mapping for non-zero starting coordinatesRob Herring2016-12-131-2/+2
| | | | | | | | | 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>
* Add YV12 pixel format supportRob Herring2016-12-131-0/+25
| | | | | | | | 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>
* Remove unused gralloc_drm_handle_t::nameRob Herring2016-12-131-7/+3
| | | | | | 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>
* Use alternative GRALLOC_GBM_HANDLE_MAGICEmil Velikov2016-12-131-1/+1
| | | | | | | Using 0x5f47424d ("_GBM") is less likely to colide than the generic 0x12345678. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* Open the device node with O_CLOEXECEmil Velikov2016-12-131-1/+1
| | | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> --- Not 100% sure it is supported on Android.
* Don't leak the FD in the gbm_dev_create error pathEmil Velikov2016-12-131-0/+1
| | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* Kill off unused variableEmil Velikov2016-12-131-1/+1
| | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* Merge pull request #2 from robertfoss/masterRob Herring2016-10-252-1/+17
|\ | | | | GRALLOC_MODULE_PERFORM_GET_USAGE stub and compiler warning fix
| * Stub out GRALLOC_MODULE_PERFORM_GET_USAGERobert Foss2016-10-252-0/+15
| | | | | | | | | | | | This implements an initial stub for GRALLOC_MODULE_PERFORM_GET_USAGE Signed-off-by: Robert Foss <robert.foss@collabora.com>
| * Silence compiler type narrowing errorsRobert Foss2016-10-251-1/+2
|/ | | | | | Add static_cast to op, to prevent compiler warnings. Signed-off-by: Robert Foss <robert.foss@collabora.com>
* Fix RGB565 pixel format typeRob Herring2016-06-011-1/+1
| | | | | | The component ordering was wrong causing GBM allocation failures. Signed-off-by: Rob Herring <robh@kernel.org>
* Clean-up of unused codeRob Herring2016-04-222-11/+0
| | | | | | Remove some unused code throwing warnings. Signed-off-by: Rob Herring <robh@kernel.org>
* gbm_map: update to revised gbm_bo_map APIRob Herring2016-04-221-2/+10
| | | | | | Add stride return parameter and properly pass usage flags. Signed-off-by: Rob Herring <robh@kernel.org>
* Update usage flag handlingRob Herring2016-04-221-14/+24
| | | | | | | | | | | Add missing support for GRALLOC_USAGE_SW_READ_OFTEN, GRALLOC_USAGE_SW_WRITE_OFTEN, GRALLOC_USAGE_HW_TEXTURE, and GRALLOC_USAGE_CURSOR usage flags mapping them to GBM flags. For now, cursor flag is commented out because the Android side doesn't seem to honor a larger stride. Signed-off-by: Rob Herring <robh@kernel.org>
* Initial GBM based grallocRob Herring2016-04-016-0/+1040
Based on drm_gralloc. Some remants of drm_gralloc remain to be compatible with mesa and drm_hwcomposer. Signed-off-by: Rob Herring <robh@kernel.org>