[Mesa-dev] [RFC libdrm 0/5] Move alloc_handle_t from gralloc impls.
Robert Foss
robert.foss at collabora.com
Wed Dec 13 17:30:09 UTC 2017
This series moves {gbm,drm,cros}_gralloc_handle_t struct to libdrm,
since at least 4 implementations exist, and share a lot of contents.
The idea is to keep the common stuff defined in one place, and libdrm
is the common codebase to all of these platforms.
Additionally, having this struct defined in libdrm will make it
easier for mesa and grallocs to communicate.
Curretly missing is:
- Planar formats
- Get/Set functions
Planar formats
--------------
Support for planar formats is needed, but has not been added
yet, mostly since this was not already implemented in {gbm,drm}_gralloc
and the fact the having at least initial backwards compatability would
be nice. Anonymous unions can of course be used later on to provide
backwards compatability if so desired.
Get/Set functions
-----------------
During the previous discussion[1] one suggestion was to add accessor
functions. In this RFC I've only provided a alloc_handle_create()
function.
The Get/Set functions have not been added yet, I was hoping for some
conclusive arguments for them being adeded.
Lastly it was suggested by Rob Herring that having a fourcc<->android
pixel format conversion function would be useful.
[1] https://lists.freedesktop.org/archives/mesa-dev/2017-November/178199.html
Robert Foss (5):
android: Move gralloc handle struct to libdrm
android: Add version variable to alloc_handle_t
android: Mark alloc_handle_t magic variable as const
android: Remove member name from alloc_handle_t
android: Change alloc_handle_t format from Android format to fourcc
Android.mk | 8 +++-
Makefile.sources | 3 ++
android/alloc_handle.h | 87 ++++++++++++++++++++++++++++++++++++++++++++
android/gralloc_drm_handle.h | 1 +
4 files changed, 97 insertions(+), 2 deletions(-)
create mode 100644 android/alloc_handle.h
create mode 120000 android/gralloc_drm_handle.h
--
2.14.1
More information about the mesa-dev
mailing list