summaryrefslogtreecommitdiffstats
path: root/gralloc_drm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gralloc_drm.c')
-rw-r--r--gralloc_drm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gralloc_drm.c b/gralloc_drm.c
index 54b9408..6b3825e 100644
--- a/gralloc_drm.c
+++ b/gralloc_drm.c
@@ -278,6 +278,7 @@ static struct gralloc_drm_handle_t *create_bo_handle(int width,
handle->format = format;
handle->usage = usage;
handle->plane_mask = 0;
+ handle->prime_fd = -1;
return handle;
}
@@ -372,6 +373,12 @@ int gralloc_drm_get_gem_handle(buffer_handle_t _handle)
return (handle) ? handle->name : 0;
}
+int gralloc_drm_get_prime_fd(buffer_handle_t _handle)
+{
+ struct gralloc_drm_handle_t *handle = gralloc_drm_handle(_handle);
+ return (handle) ? handle->prime_fd : -1;
+}
+
/*
* Query YUV component offsets for a buffer handle
*/