[Mesa-dev] [RFC libdrm 5/5] android: Change alloc_handle_t format from Android format to fourcc

Robert Foss robert.foss at collabora.com
Wed Dec 13 17:30:14 UTC 2017


Change the alloc_handle_t format to signify the fourcc pixel format
code instead of the Android pixel format definition.

This is desirable since the fourcc code is what is used within the DRM
subsystem. Naturally translation will still have to happen somewhere.

Also bump the alloc_handle_t version.

Sign-off-by: Robert Foss <robert.foss at collabora.com>
---
 android/alloc_handle.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/android/alloc_handle.h b/android/alloc_handle.h
index ed9a720a8990..70a311a8cfa9 100644
--- a/android/alloc_handle.h
+++ b/android/alloc_handle.h
@@ -38,7 +38,7 @@ struct alloc_handle_t {
 	int prime_fd; /* dma-buf file descriptor */
 	int width; /* width of buffer in pixels */
 	int height; /* height of buffer in pixels */
-	int format; /* pixel format (Android) */
+	int format; /* pixel format (fourcc) */
 	int usage; /* android libhardware usage flags */
 
 	int stride; /* the stride in bytes */
@@ -51,7 +51,7 @@ struct alloc_handle_t {
 	} __attribute__((aligned(8)));
 };
 
-#define ALLOC_HANDLE_VERSION 3
+#define ALLOC_HANDLE_VERSION 4
 #define ALLOC_HANDLE_MAGIC 0x60585350
 #define ALLOC_HANDLE_NUM_FDS 1
 #define ALLOC_HANDLE_NUM_INTS (	\
-- 
2.14.1



More information about the mesa-dev mailing list