From d5a3a2d2fbc42da04ff7ea09356ada134a42d6dd Mon Sep 17 00:00:00 2001 From: Christopher James Halse Rogers Date: Thu, 21 Nov 2013 15:11:39 +1100 Subject: gallium/winsys/drm: Prepare for passing prime fds in winsys_handle Signed-off-by: Christopher James Halse Rogers Reviewed-by: Thomas Hellstrom Signed-off-by: Maarten Lankhorst --- src/gallium/drivers/nouveau/nouveau_screen.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gallium/drivers/nouveau') diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index 5b35ee47c12..248d1641c5a 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -86,6 +86,12 @@ nouveau_screen_bo_from_handle(struct pipe_screen *pscreen, struct nouveau_bo *bo = 0; int ret; + if (whandle->type != DRM_API_HANDLE_TYPE_SHARED) { + debug_printf("%s: attempt to import unsupported handle type %d\n", + __FUNCTION__, whandle->type); + return NULL; + } + ret = nouveau_bo_name_ref(dev, whandle->handle, &bo); if (ret) { debug_printf("%s: ref name 0x%08x failed with %d\n", -- cgit v1.2.3