gbm: Add map/unmap functions
authorRob Herring <robh@kernel.org>
Wed, 4 May 2016 02:02:47 +0000 (21:02 -0500)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 23 May 2016 11:07:46 +0000 (12:07 +0100)
commit8aeb6d768b4285f600d09f38d0b406adf46c251d
treec4ad438adb7e6862da2b8dbc77a3963a9188f073
parent1f4869a2089c6172feff382e177d74ac68c241a7
gbm: Add map/unmap functions

This adds map and unmap functions to GBM utilizing the DRIimage extension
mapImage/unmapImage functions or existing internal mapping for dumb
buffers. Unlike prior attempts, this version provides a region to map and
usage flags for the mapping. The operation follows the same semantics as
the gallium transfer_map() function.

This was tested with GBM based gralloc on Android.

Signed-off-by: Rob Herring <robh@kernel.org>
[Emil Velikov: drop no longer relevant hunk from commit message.]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gbm/Makefile.am
src/gbm/backends/dri/gbm_dri.c
src/gbm/backends/dri/gbm_driint.h
src/gbm/gbm-symbols-check
src/gbm/main/gbm.c
src/gbm/main/gbm.h
src/gbm/main/gbmint.h