summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-05-29WIPWIPRobert Foss2-1/+10
2017-05-26WIP: Initial modifiers codeandroid-etnaviv-modifiersRobert Foss2-0/+2
Signed-off-by: Robert Foss <robert.foss@collabora.com>
2017-05-19Change default device node to openRobert Foss1-2/+1
Signed-off-by: Robert Foss <robert.foss@collabora.com>
2017-05-18Return dup() of FD for GRALLOC_MODULE_PERFORM_GET_DRM_FDRobert Foss1-1/+1
Prevent callers of GRALLOC_MODULE_PERFORM_GET_DRM_FD from sharing the same actual FD. Signed-off-by: Robert Foss <robert.foss@collabora.com>
2017-05-18Add description of GRALLOC_MODULE_PERFORM_GET_DRM_FDRobert Foss1-0/+4
Add description of the perform call GRALLOC_MODULE_PERFORM_GET_DRM_FD. Signed-off-by: Robert Foss <robert.foss@collabora.com>
2017-05-18Change #include guard to reflect filenameRobert Foss1-3/+3
Signed-off-by: Robert Foss <robert.foss@collabora.com>
2017-05-18Move definition of gralloc_gbm_bo_tRobert Foss2-14/+15
This fixes issue where drm_hwcomposer carried a local definition of this struct. Signed-off-by: Robert Foss <robert.foss@collabora.com>
2017-04-13Fix missing 0 init of alloc_device_tRob Herring1-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>
2017-04-13Quiet log prints changing them to verbose levelRob Herring2-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>
2017-03-29gbm_gralloc: Remove the invalid int cast and assignment in gbm_mod_perform()John Stultz1-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>
2017-03-22Change module name to gralloc.gbmRob Herring1-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>
2016-12-13Fix mapping for non-zero starting coordinatesRob Herring1-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>
2016-12-13Add YV12 pixel format supportRob Herring1-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>
2016-12-13Remove unused gralloc_drm_handle_t::nameRob Herring1-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>
2016-12-13Use alternative GRALLOC_GBM_HANDLE_MAGICEmil Velikov1-1/+1
Using 0x5f47424d ("_GBM") is less likely to colide than the generic 0x12345678. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-12-13Open the device node with O_CLOEXECEmil Velikov1-1/+1
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> --- Not 100% sure it is supported on Android.
2016-12-13Don't leak the FD in the gbm_dev_create error pathEmil Velikov1-0/+1
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-12-13Kill off unused variableEmil Velikov1-1/+1
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-10-25Merge pull request #2 from robertfoss/masterRob Herring2-1/+17
GRALLOC_MODULE_PERFORM_GET_USAGE stub and compiler warning fix
2016-10-25Stub out GRALLOC_MODULE_PERFORM_GET_USAGERobert Foss2-0/+15
This implements an initial stub for GRALLOC_MODULE_PERFORM_GET_USAGE Signed-off-by: Robert Foss <robert.foss@collabora.com>
2016-10-25Silence compiler type narrowing errorsRobert Foss1-1/+2
Add static_cast to op, to prevent compiler warnings. Signed-off-by: Robert Foss <robert.foss@collabora.com>
2016-06-01Fix RGB565 pixel format typeRob Herring1-1/+1
The component ordering was wrong causing GBM allocation failures. Signed-off-by: Rob Herring <robh@kernel.org>
2016-04-22Clean-up of unused codeRob Herring2-11/+0
Remove some unused code throwing warnings. Signed-off-by: Rob Herring <robh@kernel.org>
2016-04-22gbm_map: update to revised gbm_bo_map APIRob Herring1-2/+10
Add stride return parameter and properly pass usage flags. Signed-off-by: Rob Herring <robh@kernel.org>
2016-04-22Update usage flag handlingRob Herring1-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>
2016-04-01Initial GBM based grallocRob Herring6-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>