summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon
diff options
context:
space:
mode:
authorChristopher James Halse Rogers <[email protected]>2013-11-21 15:11:39 +1100
committerMaarten Lankhorst <[email protected]>2013-12-10 09:46:05 +0100
commitd5a3a2d2fbc42da04ff7ea09356ada134a42d6dd (patch)
tree78713128416960253fd27072b8197f598e91dd13 /src/gallium/winsys/radeon
parent343133167f4ae127a375791790c982bde12025c4 (diff)
gallium/winsys/drm: Prepare for passing prime fds in winsys_handle
Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index 3019a525cf8..744df1b745e 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -877,6 +877,9 @@ static struct pb_buffer *radeon_winsys_bo_from_handle(struct radeon_winsys *rws,
memset(&open_arg, 0, sizeof(open_arg));
+ if (whandle->type != DRM_API_HANDLE_TYPE_SHARED)
+ return NULL;
+
/* We must maintain a list of pairs <handle, bo>, so that we always return
* the same BO for one particular handle. If we didn't do that and created
* more than one BO for the same handle and then relocated them in a CS,
@@ -991,6 +994,9 @@ static boolean radeon_winsys_bo_get_handle(struct pb_buffer *buffer,
whandle->handle = bo->flink;
} else if (whandle->type == DRM_API_HANDLE_TYPE_KMS) {
whandle->handle = bo->handle;
+ } else if (whandle->type == DRM_API_HANDLE_TYPE_FD) {
+ /* TODO: Implement */
+ return FALSE;
}
whandle->stride = stride;