summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/i915/drm
diff options
context:
space:
mode:
authorChristopher James Halse Rogers <raof@ubuntu.com>2013-11-21 15:11:39 +1100
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>2013-12-10 09:46:05 +0100
commitd5a3a2d2fbc42da04ff7ea09356ada134a42d6dd (patch)
tree78713128416960253fd27072b8197f598e91dd13 /src/gallium/winsys/i915/drm
parent343133167f4ae127a375791790c982bde12025c4 (diff)
gallium/winsys/drm: Prepare for passing prime fds in winsys_handle
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Diffstat (limited to 'src/gallium/winsys/i915/drm')
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_buffer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/winsys/i915/drm/i915_drm_buffer.c b/src/gallium/winsys/i915/drm/i915_drm_buffer.c
index ac66af333df..38e06193c61 100644
--- a/src/gallium/winsys/i915/drm/i915_drm_buffer.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_buffer.c
@@ -95,9 +95,13 @@ i915_drm_buffer_from_handle(struct i915_winsys *iws,
unsigned *stride)
{
struct i915_drm_winsys *idws = i915_drm_winsys(iws);
- struct i915_drm_buffer *buf = CALLOC_STRUCT(i915_drm_buffer);
+ struct i915_drm_buffer *buf;
uint32_t tile = 0, swizzle = 0;
+ if (whandle->type != DRM_API_HANDLE_TYPE_SHARED)
+ return NULL;
+
+ buf = CALLOC_STRUCT(i915_drm_buffer);
if (!buf)
return NULL;