summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Wei Huang <cwhuang@linux.org.tw>2017-03-18 00:56:19 +0800
committerChih-Wei Huang <cwhuang@linux.org.tw>2017-03-18 00:56:19 +0800
commita3701d20a58a9f1716776b1c3234f5452b7c8823 (patch)
tree46b0d5c922b6eb661049457f1e3244f25421a324
parent2f394b35e903912ceb302842e2ed530a2991ccb9 (diff)
downloadexternal_drm_gralloc-a3701d20a58a9f1716776b1c3234f5452b7c8823.tar.gz
external_drm_gralloc-a3701d20a58a9f1716776b1c3234f5452b7c8823.tar.bz2
external_drm_gralloc-a3701d20a58a9f1716776b1c3234f5452b7c8823.zip
gralloc_drm_pipe: fix the arguments of resource_get_handle
The second argument is pipe_context and the third is pipe_resource. Correct the error introduced by commit 397a5a4.
-rw-r--r--gralloc_drm_pipe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gralloc_drm_pipe.c b/gralloc_drm_pipe.c
index f18ecef..16de013 100644
--- a/gralloc_drm_pipe.c
+++ b/gralloc_drm_pipe.c
@@ -156,8 +156,8 @@ static struct pipe_buffer *get_pipe_buffer_locked(struct pipe_manager *pm,
goto fail;
buf->winsys.type = DRM_API_HANDLE_TYPE_SHARED;
- if (!pm->screen->resource_get_handle(pm->screen,
- buf->resource, NULL, &buf->winsys, PIPE_HANDLE_USAGE_READ_WRITE))
+ if (!pm->screen->resource_get_handle(pm->screen, pm->context,
+ buf->resource, &buf->winsys, PIPE_HANDLE_USAGE_READ_WRITE))
goto fail;
}
@@ -167,8 +167,8 @@ static struct pipe_buffer *get_pipe_buffer_locked(struct pipe_manager *pm,
memset(&tmp, 0, sizeof(tmp));
tmp.type = DRM_API_HANDLE_TYPE_KMS;
- if (!pm->screen->resource_get_handle(pm->screen,
- buf->resource, NULL, &tmp, PIPE_HANDLE_USAGE_READ_WRITE))
+ if (!pm->screen->resource_get_handle(pm->screen, pm->context,
+ buf->resource, &tmp, PIPE_HANDLE_USAGE_READ_WRITE))
goto fail;
buf->base.fb_handle = tmp.handle;