summaryrefslogtreecommitdiff
path: root/drv_priv.h
diff options
context:
space:
mode:
authorGurchetan Singh <gurchetansingh@chromium.org>2016-08-12 16:38:25 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-08-17 19:15:51 -0700
commitef920536083c3e6959daa6a98db01b0f653c1c83 (patch)
tree39147f8f0e9a43dfbbb667a067e1e371309fc385 /drv_priv.h
parent1647fbe1196e21cb314a4c9b950846393e1dbc6a (diff)
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>
Diffstat (limited to 'drv_priv.h')
-rw-r--r--drv_priv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drv_priv.h b/drv_priv.h
index 349d02e..b4d1913 100644
--- a/drv_priv.h
+++ b/drv_priv.h
@@ -27,6 +27,7 @@ struct bo
uint32_t strides[DRV_MAX_PLANES];
uint64_t format_modifiers[DRV_MAX_PLANES];
void *priv;
+ void *map_data;
};
struct driver {
@@ -44,6 +45,7 @@ struct backend
void (*close)(struct driver *drv);
int (*bo_create)(struct bo *bo, uint32_t width, uint32_t height,
drv_format_t format, uint32_t flags);
+ void* (*bo_map)(struct bo *bo);
int (*bo_destroy)(struct bo *bo);
struct format_supported {
drv_format_t format;