diff options
author | Rob Herring <robh@kernel.org> | 2016-01-22 10:35:14 -0600 |
---|---|---|
committer | Chih-Wei Huang <cwhuang@linux.org.tw> | 2016-03-17 16:10:43 +0800 |
commit | aac8ca7e1bd5b76967ec9e322526bdb1df10e3d7 (patch) | |
tree | aa27f6657f9e6a0e4922c41576e7aa2aef09ef11 /gralloc_drm.c | |
parent | 55002c84ee70b0d2447b05e720cb4d85ba0080b3 (diff) | |
download | external_drm_gralloc-aac8ca7e1bd5b76967ec9e322526bdb1df10e3d7.zip external_drm_gralloc-aac8ca7e1bd5b76967ec9e322526bdb1df10e3d7.tar.gz external_drm_gralloc-aac8ca7e1bd5b76967ec9e322526bdb1df10e3d7.tar.bz2 |
Add gralloc_drm_get_prime_fd function
Mesa EGL needs to retrieve prime fds from gralloc handles.
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'gralloc_drm.c')
-rw-r--r-- | gralloc_drm.c | 7 |
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 */ |