minigbm: Added YV12 for Mali platforms

Oak-cheets is using YV12 as it's Android flexible YUV format, so
we need to support it.  Additionally, we're trying to enable
YV12 on Mali with EXT_image_dma_buf_import.  Instead of having
redundant switch statements in every driver, let's add a helper
function to do this.

BUG=chrome-os-partner:54632, b/29059119, chromium:616275
TEST=Ran plane_test, graphics_Gbm on veyron_minnie

Change-Id: I4798225db809941367e58dde962576535b8d767c
Reviewed-on: https://chromium-review.googlesource.com/377884
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/helpers.h b/helpers.h
index 923ce13..e9fc9d7 100644
--- a/helpers.h
+++ b/helpers.h
@@ -12,6 +12,8 @@
 size_t drv_num_planes_from_format(uint32_t format);
 int drv_bpp_from_format(uint32_t format, size_t plane);
 int drv_stride_from_format(uint32_t format, uint32_t width, size_t plane);
+int drv_bo_from_format(struct bo *bo, uint32_t width, uint32_t height,
+		       drv_format_t format);
 int drv_dumb_bo_create(struct bo *bo, uint32_t width, uint32_t height,
 		       uint32_t format, uint32_t flags);
 int drv_dumb_bo_destroy(struct bo *bo);