summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Foss <robert.foss@collabora.com>2017-05-26 16:18:29 -0400
committerRobert Foss <robert.foss@collabora.com>2017-05-26 16:18:29 -0400
commit5a8764bab4d8ef9372c440e0e246432a07096be8 (patch)
tree3b2e03cca7da7700918480c4d78f1f16bd02431e
parent75371e8b2991c5e6447ab3acb177c981ca7d67f3 (diff)
downloadgbm_gralloc-5a8764bab4d8ef9372c440e0e246432a07096be8.tar.gz
gbm_gralloc-5a8764bab4d8ef9372c440e0e246432a07096be8.tar.xz
WIP: Initial modifiers codeandroid-etnaviv-modifiers
Signed-off-by: Robert Foss <robert.foss@collabora.com>
-rw-r--r--gralloc_drm_handle.h1
-rw-r--r--gralloc_gbm.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/gralloc_drm_handle.h b/gralloc_drm_handle.h
index 5c8d925..cd31cdf 100644
--- a/gralloc_drm_handle.h
+++ b/gralloc_drm_handle.h
@@ -49,6 +49,7 @@ struct gralloc_drm_handle_t {
int name; /* the name of the bo */
int stride; /* the stride in bytes */
+ uint64_t modifier; /* buffer modifiers */
int data_owner; /* owner of data (for validation) */
union {
diff --git a/gralloc_gbm.cpp b/gralloc_gbm.cpp
index 3bfe45a..f7e5750 100644
--- a/gralloc_gbm.cpp
+++ b/gralloc_gbm.cpp
@@ -178,6 +178,7 @@ static struct gralloc_gbm_bo_t *gbm_alloc(struct gbm_device *gbm,
handle->prime_fd = gbm_bo_get_fd(buf->bo);
handle->stride = gbm_bo_get_stride(buf->bo);
+ handle->modifier = gbm_bo_get_modifier(buf->bo);
return buf;
}