minigbm: Implemented cros_gralloc

It is desirable to have a gralloc implementation based on the same
drivers we use for minigbm. This will help synchronize the code between
CrOS and the Android container.

BUG=chromium:616275
TEST=Ran the gralloc unit test:

test_that -b veyron_minnie-cheets $IP1 graphics_Gralloc

Verified it succeeded.

CQ-DEPEND=CL:395066

Change-Id: Iff11eba3a92268327ef00eb12b4eabe6fc190cf3
Reviewed-on: https://chromium-review.googlesource.com/362062
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 c9902b8..56e399f 100644
--- a/drv.h
+++ b/drv.h
@@ -46,7 +46,7 @@
 #define DRV_BO_USE_HW_FB		(1ull << 14)
 #define DRV_BO_USE_EXTERNAL_DISP	(1ull << 15)
 #define DRV_BO_USE_PROTECTED		(1ull << 16)
-#define DRV_BO_USE_HW_VIDEO_ENCODE	(1ull << 17)
+#define DRV_BO_USE_HW_VIDEO_ENCODER	(1ull << 17)
 #define DRV_BO_USE_HW_CAMERA_WRITE	(1ull << 18)
 #define DRV_BO_USE_HW_CAMERA_READ	(1ull << 19)
 #define DRV_BO_USE_HW_CAMERA_ZSL	(1ull << 20)
@@ -208,8 +208,17 @@
 drv_bo_get_plane_format_modifier(struct bo *bo, size_t plane);
 
 drv_format_t
+drv_bo_get_format(struct bo *bo);
+
+drv_format_t
 drv_resolve_format(struct driver *drv, drv_format_t format);
 
+int
+drv_stride_from_format(uint32_t format, uint32_t width, size_t plane);
+
+uint32_t
+drv_num_buffers_per_bo(struct bo *bo);
+
 #ifdef __cplusplus
 }
 #endif