ilo: Support DRI Image 7
authorChristopher James Halse Rogers <raof@ubuntu.com>
Thu, 21 Nov 2013 04:11:43 +0000 (15:11 +1100)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Tue, 10 Dec 2013 08:46:29 +0000 (09:46 +0100)
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>
src/gallium/targets/dri-ilo/target.c
src/gallium/winsys/intel/drm/intel_drm_winsys.c

index 451827a43090dcda1d98cb2467e22bf1b66e4cf6..3ce75e96b2edcb014d44acccb1e05d8aefab68b6 100644 (file)
@@ -24,4 +24,21 @@ create_screen(int fd)
    return screen;
 }
 
-DRM_DRIVER_DESCRIPTOR("i965", "i915", create_screen, NULL)
+
+static const struct drm_conf_ret share_fd_ret = {
+   .type = DRM_CONF_BOOL,
+   .val.val_int = true,
+};
+
+static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
+{
+   switch (conf) {
+   case DRM_CONF_SHARE_FD:
+      return &share_fd_ret;
+   default:
+      break;
+   }
+   return NULL;
+}
+
+DRM_DRIVER_DESCRIPTOR("i965", "i915", create_screen, drm_configuration)
index 521762d8f90a796d8460ccfffff077536ae780ee..d7ec919130bbb7b5b6488e60f5d182def53fa043 100644 (file)
@@ -257,7 +257,6 @@ intel_winsys_import_handle(struct intel_winsys *winsys,
                name, gem_name);
       }
       break;
-#if 0
    case DRM_API_HANDLE_TYPE_FD:
       {
          const int fd = (int) handle->handle;
@@ -265,7 +264,6 @@ intel_winsys_import_handle(struct intel_winsys *winsys,
                fd, height * handle->stride);
       }
       break;
-#endif
    default:
       bo = NULL;
       break;