minigbm: Add mmap() in backends
Gralloc requires the ability to mmap a buffer into userspace. This
change adds the necessary entry points to our internal "drv"
interface.
BUG=chromium:616275
TEST=minigbm still builds. Also ran:
./gralloctest mapping
with CL:362062 applied on minnie and cyan (decided to split that CL
into smaller patches).
CQ-DEPEND=CL:366041
Change-Id: I7396b0c79702f24eb779984805bc679c237bd932
Reviewed-on: https://chromium-review.googlesource.com/370798
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 de17f7f..7dfcc41 100644
--- a/helpers.h
+++ b/helpers.h
@@ -16,10 +16,12 @@
uint32_t format, uint32_t flags);
int drv_dumb_bo_destroy(struct bo *bo);
int drv_gem_bo_destroy(struct bo *bo);
+void *drv_dumb_bo_map(struct bo *bo);
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);
+uint32_t drv_num_buffers_per_bo(struct bo *bo);
#endif