minigbm: store BO_USE_* flags in buffer object

Currently, minigbm only cares about the buffer use flags during buffer
creation.  We would like to use cached renderscript buffers, so we need
knowledge about how the buffer was created at map time. Let's add this
to the buffer object struct.

BUG=b:38097499
TEST=run cts -m CtsViewTestCases -t android.view.cts.SurfaceViewSyncTests
     passes on 9776.0.0 veyron_minnie

Change-Id: I73943dae309e60038affb78385aef4b6d3b678ed
Reviewed-on: https://chromium-review.googlesource.com/602734
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 c92d0ca..e4678a1 100644
--- a/drv.h
+++ b/drv.h
@@ -76,6 +76,7 @@
 	uint32_t width;
 	uint32_t height;
 	uint32_t format;
+	uint64_t flags;
 };
 
 struct map_info {
@@ -96,7 +97,8 @@
 
 struct combination *drv_get_combination(struct driver *drv, uint32_t format, uint64_t usage);
 
-struct bo *drv_bo_new(struct driver *drv, uint32_t width, uint32_t height, uint32_t format);
+struct bo *drv_bo_new(struct driver *drv, uint32_t width, uint32_t height, uint32_t format,
+		      uint64_t flags);
 
 struct bo *drv_bo_create(struct driver *drv, uint32_t width, uint32_t height, uint32_t format,
 			 uint64_t flags);