minigbm: pass in map flags to (*bo_map) callback

Some eagle-eyed observers have commented that we lose some
potentially useful information for the (*bo_map) callback when
we convert our map flags to page protection flags. Let's not
lose this information, so pass in the map flags. We can convert
to page protection flags using a helper function.

BUG=chromium:764871
TEST=Boot Android and play games on Eve

Change-Id: Ie2cf395109eb5a8de663dfb97a343d20ff0df30c
Reviewed-on: https://chromium-review.googlesource.com/691425
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 6192086..766b7d1 100644
--- a/helpers.h
+++ b/helpers.h
@@ -15,11 +15,12 @@
 int drv_dumb_bo_create(struct bo *bo, uint32_t width, uint32_t height, uint32_t format,
 		       uint64_t use_flags);
 int drv_dumb_bo_destroy(struct bo *bo);
-int drv_map_info_destroy(struct bo *bo);
 int drv_gem_bo_destroy(struct bo *bo);
 int drv_prime_bo_import(struct bo *bo, struct drv_import_fd_data *data);
-void *drv_dumb_bo_map(struct bo *bo, struct map_info *data, size_t plane, int prot);
+void *drv_dumb_bo_map(struct bo *bo, struct map_info *data, size_t plane, uint32_t map_flags);
 int drv_bo_munmap(struct bo *bo, struct map_info *data);
+int drv_map_info_destroy(struct bo *bo);
+int drv_get_prot(uint32_t map_flags);
 uintptr_t drv_get_reference_count(struct driver *drv, struct bo *bo, size_t plane);
 void drv_increment_reference_count(struct driver *drv, struct bo *bo, size_t plane);
 void drv_decrement_reference_count(struct driver *drv, struct bo *bo, size_t plane);