minigbm: Added support for multiplane import
Gralloc requires flexible YUV formats (YV12, NV12) to be importable.
This change modifies our internal import API to support this.
TEST=ran graphics_Gbm
BUG=chromium:616275
CQ-DEPEND=CL:373048
Change-Id: I4100e1c1639828e4adf08764b45fe5a44b7078a3
Reviewed-on: https://chromium-review.googlesource.com/374162
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
diff --git a/drv.h b/drv.h
index 6fc83cf..cc7752a 100644
--- a/drv.h
+++ b/drv.h
@@ -123,19 +123,21 @@
struct bo;
union bo_handle {
- void *ptr;
- int32_t s32;
- uint32_t u32;
- int64_t s64;
- uint64_t u64;
+ void *ptr;
+ int32_t s32;
+ uint32_t u32;
+ int64_t s64;
+ uint64_t u64;
};
struct drv_import_fd_data {
- int fd;
- uint32_t width;
- uint32_t height;
- uint32_t stride;
- drv_format_t format;
+ int fds[DRV_MAX_PLANES];
+ uint32_t strides[DRV_MAX_PLANES];
+ uint32_t offsets[DRV_MAX_PLANES];
+ uint32_t sizes[DRV_MAX_PLANES];
+ uint32_t width;
+ uint32_t height;
+ drv_format_t format;
};
struct driver *