summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Rossi <issor.oruam@gmail.com>2016-03-28 22:13:20 +0200
committerChih-Wei Huang <cwhuang@linux.org.tw>2016-06-13 21:13:23 +0800
commit2000f202474f9e3ed1be4e545fab761ced383835 (patch)
treec8aa89b4e532de856668db942dbf1ddbfeba706a
parent6f606572cf6ba77d84c69a32189eeccbc363a3c4 (diff)
downloadexternal_drm_gralloc-2000f202474f9e3ed1be4e545fab761ced383835.zip
external_drm_gralloc-2000f202474f9e3ed1be4e545fab761ced383835.tar.gz
external_drm_gralloc-2000f202474f9e3ed1be4e545fab761ced383835.tar.bz2
android: fix gralloc_drm_pipe building error with mesa 11.3
Fixes a building error introduced by commit 82db518 "gallium: add external usage flags to resource_from(get)_handle (v2)" parameter usage is required as a combination of PIPE_HANDLE_USAGE_* flags, PIPE_HANDLE_USAGE_READ_WRITE was used as the most general case
-rw-r--r--gralloc_drm_pipe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gralloc_drm_pipe.c b/gralloc_drm_pipe.c
index 5cc7dc8..00909bf 100644
--- a/gralloc_drm_pipe.c
+++ b/gralloc_drm_pipe.c
@@ -150,7 +150,7 @@ static struct pipe_buffer *get_pipe_buffer_locked(struct pipe_manager *pm,
buf->winsys.stride = handle->stride;
buf->resource = pm->screen->resource_from_handle(pm->screen,
- &templ, &buf->winsys);
+ &templ, &buf->winsys, PIPE_HANDLE_USAGE_READ_WRITE);
if (!buf->resource)
goto fail;
}
@@ -162,7 +162,7 @@ static struct pipe_buffer *get_pipe_buffer_locked(struct pipe_manager *pm,
buf->winsys.type = DRM_API_HANDLE_TYPE_SHARED;
if (!pm->screen->resource_get_handle(pm->screen,
- buf->resource, &buf->winsys))
+ buf->resource, &buf->winsys, PIPE_HANDLE_USAGE_READ_WRITE))
goto fail;
}
@@ -173,7 +173,7 @@ 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, &tmp))
+ buf->resource, &tmp, PIPE_HANDLE_USAGE_READ_WRITE))
goto fail;
buf->base.fb_handle = tmp.handle;