[Mesa-dev] [PATCH 6/9] ilo: Support DRI Image 7

christopher.halse.rogers at canonical.com christopher.halse.rogers at canonical.com
Wed Nov 20 20:11:43 PST 2013


From: Christopher James Halse Rogers <raof at ubuntu.com>

---
 src/gallium/targets/dri-ilo/target.c            | 19 ++++++++++++++++++-
 src/gallium/winsys/intel/drm/intel_drm_winsys.c |  2 --
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/gallium/targets/dri-ilo/target.c b/src/gallium/targets/dri-ilo/target.c
index 451827a..3ce75e9 100644
--- a/src/gallium/targets/dri-ilo/target.c
+++ b/src/gallium/targets/dri-ilo/target.c
@@ -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)
diff --git a/src/gallium/winsys/intel/drm/intel_drm_winsys.c b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
index 521762d..d7ec919 100644
--- a/src/gallium/winsys/intel/drm/intel_drm_winsys.c
+++ b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
@@ -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;
-- 
1.8.4.3



More information about the mesa-dev mailing list