gbm: Add GBM_MAX_PLANES definition
authorLepton Wu <lepton@chromium.org>
Thu, 17 Oct 2019 08:53:49 +0000 (01:53 -0700)
committerEric Engestrom <eric@engestrom.ch>
Fri, 18 Oct 2019 13:18:28 +0000 (13:18 +0000)
This removed hard coded "4".

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Signed-off-by: Lepton Wu <lepton@chromium.org>
src/gbm/main/gbm.h

index 4c6ab3776995dc74e43568764b19242a9225115a..45dead8fabb8f225b2490368eedd9d03425debbf 100644 (file)
@@ -285,14 +285,16 @@ struct gbm_import_fd_data {
    uint32_t format;
 };
 
+#define GBM_MAX_PLANES 4
+
 struct gbm_import_fd_modifier_data {
    uint32_t width;
    uint32_t height;
    uint32_t format;
    uint32_t num_fds;
-   int fds[4];
-   int strides[4];
-   int offsets[4];
+   int fds[GBM_MAX_PLANES];
+   int strides[GBM_MAX_PLANES];
+   int offsets[GBM_MAX_PLANES];
    uint64_t modifier;
 };