summaryrefslogtreecommitdiffstats
path: root/gralloc_gbm.cpp
Commit message (Collapse)AuthorAgeFilesLines
* use experimental GBM usage flags to better describe BO usagesoftware-clientsLucas Stach2017-07-101-3/+7
| | | | | | This allows the GPU driver to optimize the buffer allocation. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* Sync with the gbm API to import FD with modifierAleksander Morgado2017-07-051-2/+5
| | | | | | | | | | 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>
* Add support for modifiersRobert Foss2017-06-081-2/+13
| | | | | | | | | | 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>
* Change default device node to openRobert Foss2017-05-191-2/+1
| | | | Signed-off-by: Robert Foss <robert.foss@collabora.com>
* Move definition of gralloc_gbm_bo_tRobert Foss2017-05-181-14/+0
| | | | | | | This fixes issue where drm_hwcomposer carried a local definition of this struct. Signed-off-by: Robert Foss <robert.foss@collabora.com>
* Quiet log prints changing them to verbose levelRob Herring2017-04-131-3/+3
| | | | | | | | Quiet down various informational tracing messages switching them to verbose log level Change-Id: I0a78a9bcb1f807dc2db060ab1551cd5f62fa3f2d 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>
* 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>
* 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-221-8/+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-011-0/+486
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>