OSDN Git Service

minigbm: cros_gralloc: fix rendernode query
[android-x86/external-minigbm.git] / gbm.h
diff --git a/gbm.h b/gbm.h
index 87c1eb7..839e2a5 100644 (file)
--- a/gbm.h
+++ b/gbm.h
@@ -68,6 +68,8 @@ union gbm_bo_handle {
    uint64_t u64;
 };
 
+#define GBM_MAX_PLANES 4
+
 #define __gbm_fourcc_code(a,b,c,d) ((uint32_t)(a) | ((uint32_t)(b) << 8) | \
                              ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24))
 
@@ -273,13 +275,13 @@ struct gbm_import_fd_data {
 };
 
 struct gbm_import_fd_planar_data {
-   int fds[4];
+   int fds[GBM_MAX_PLANES];
    uint32_t width;
    uint32_t height;
    uint32_t format;
-   uint32_t offsets[4];
-   uint32_t strides[4];
-   uint64_t format_modifiers[4];
+   uint32_t strides[GBM_MAX_PLANES];
+   uint32_t offsets[GBM_MAX_PLANES];
+   uint64_t format_modifiers[GBM_MAX_PLANES];
 };
 
 struct gbm_bo *