[Mesa-dev] [PATCH 2/5] gallium: remove unused drm_driver_descriptor::driver_name

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 11 18:39:24 UTC 2016


From: Emil Velikov <emil.velikov at collabora.com>

Likely unused since day 1, although I've only checked back until the
st/dri unification with commit 29ca7d2c948 ("st/dri: merge dri/drm and
dri/sw backends")

Based on the comment, referencing drmOpenByName it's not something we
want to bring back.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c | 12 ------------
 src/gallium/include/state_tracker/drm_driver.h      |  9 +--------
 src/gallium/targets/pipe-loader/pipe_i915.c         |  2 +-
 src/gallium/targets/pipe-loader/pipe_i965.c         |  2 +-
 src/gallium/targets/pipe-loader/pipe_msm.c          |  2 +-
 src/gallium/targets/pipe-loader/pipe_nouveau.c      |  2 +-
 src/gallium/targets/pipe-loader/pipe_r300.c         |  2 +-
 src/gallium/targets/pipe-loader/pipe_r600.c         |  2 +-
 src/gallium/targets/pipe-loader/pipe_radeonsi.c     |  2 +-
 src/gallium/targets/pipe-loader/pipe_vmwgfx.c       |  2 +-
 10 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
index 0246414..c6ff190 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
@@ -90,7 +90,6 @@ configuration_query(enum drm_conf conf)
 static const struct drm_driver_descriptor driver_descriptors[] = {
     {
         .name = "i915",
-        .driver_name = "i915",
         .create_screen = pipe_i915_create_screen,
         .configuration = configuration_query,
     },
@@ -101,68 +100,57 @@ static const struct drm_driver_descriptor driver_descriptors[] = {
      */
     {
         .name = "i965",
-        .driver_name = "vc4",
         .create_screen = pipe_vc4_create_screen,
         .configuration = configuration_query,
     },
 #endif
     {
         .name = "i965",
-        .driver_name = "i915",
         .create_screen = pipe_ilo_create_screen,
         .configuration = configuration_query,
     },
     {
         .name = "nouveau",
-        .driver_name = "nouveau",
         .create_screen = pipe_nouveau_create_screen,
         .configuration = configuration_query,
     },
     {
         .name = "r300",
-        .driver_name = "radeon",
         .create_screen = pipe_r300_create_screen,
         .configuration = configuration_query,
     },
     {
         .name = "r600",
-        .driver_name = "radeon",
         .create_screen = pipe_r600_create_screen,
         .configuration = configuration_query,
     },
     {
         .name = "radeonsi",
-        .driver_name = "radeon",
         .create_screen = pipe_radeonsi_create_screen,
         .configuration = configuration_query,
     },
     {
         .name = "vmwgfx",
-        .driver_name = "vmwgfx",
         .create_screen = pipe_vmwgfx_create_screen,
         .configuration = configuration_query,
     },
     {
         .name = "kgsl",
-        .driver_name = "freedreno",
         .create_screen = pipe_freedreno_create_screen,
         .configuration = configuration_query,
     },
     {
         .name = "msm",
-        .driver_name = "freedreno",
         .create_screen = pipe_freedreno_create_screen,
         .configuration = configuration_query,
     },
     {
         .name = "virtio_gpu",
-        .driver_name = "virtio-gpu",
         .create_screen = pipe_virgl_create_screen,
         .configuration = configuration_query,
     },
     {
         .name = "vc4",
-        .driver_name = "vc4",
         .create_screen = pipe_vc4_create_screen,
         .configuration = configuration_query,
     },
diff --git a/src/gallium/include/state_tracker/drm_driver.h b/src/gallium/include/state_tracker/drm_driver.h
index 540cc38..06f41e7 100644
--- a/src/gallium/include/state_tracker/drm_driver.h
+++ b/src/gallium/include/state_tracker/drm_driver.h
@@ -91,11 +91,6 @@ struct drm_driver_descriptor
    const char *name;
 
    /**
-    * Kernel driver name, as accepted by drmOpenByName.
-    */
-   const char *driver_name;
-
-   /**
     * Create a pipe srcreen.
     *
     * This function does any wrapping of the screen.
@@ -103,7 +98,6 @@ struct drm_driver_descriptor
     */
    struct pipe_screen* (*create_screen)(int drm_fd);
 
-
    /**
     * Return a configuration value.
     *
@@ -119,10 +113,9 @@ extern struct drm_driver_descriptor driver_descriptor;
 /**
  * Instantiate a drm_driver_descriptor struct.
  */
-#define DRM_DRIVER_DESCRIPTOR(name_str, driver_name_str, func, conf) \
+#define DRM_DRIVER_DESCRIPTOR(name_str, func, conf) \
 struct drm_driver_descriptor driver_descriptor = {             \
    .name = name_str,                                           \
-   .driver_name = driver_name_str,                             \
    .create_screen = func,                                      \
    .configuration = (conf),				       \
 };
diff --git a/src/gallium/targets/pipe-loader/pipe_i915.c b/src/gallium/targets/pipe-loader/pipe_i915.c
index b0da613..3af8fe3 100644
--- a/src/gallium/targets/pipe-loader/pipe_i915.c
+++ b/src/gallium/targets/pipe-loader/pipe_i915.c
@@ -47,4 +47,4 @@ static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
 }
 
 PUBLIC
-DRM_DRIVER_DESCRIPTOR("i915", "i915", create_screen, drm_configuration)
+DRM_DRIVER_DESCRIPTOR("i915", create_screen, drm_configuration)
diff --git a/src/gallium/targets/pipe-loader/pipe_i965.c b/src/gallium/targets/pipe-loader/pipe_i965.c
index 810dffc..a2d8deb 100644
--- a/src/gallium/targets/pipe-loader/pipe_i965.c
+++ b/src/gallium/targets/pipe-loader/pipe_i965.c
@@ -44,4 +44,4 @@ static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
    return NULL;
 }
 PUBLIC
-DRM_DRIVER_DESCRIPTOR("i965", "i915", create_screen, drm_configuration)
+DRM_DRIVER_DESCRIPTOR("i965", create_screen, drm_configuration)
diff --git a/src/gallium/targets/pipe-loader/pipe_msm.c b/src/gallium/targets/pipe-loader/pipe_msm.c
index 8a44edd..fa098e9 100644
--- a/src/gallium/targets/pipe-loader/pipe_msm.c
+++ b/src/gallium/targets/pipe-loader/pipe_msm.c
@@ -41,4 +41,4 @@ static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
 }
 
 PUBLIC
-DRM_DRIVER_DESCRIPTOR("msm", "freedreno", create_screen, drm_configuration)
+DRM_DRIVER_DESCRIPTOR("msm", create_screen, drm_configuration)
diff --git a/src/gallium/targets/pipe-loader/pipe_nouveau.c b/src/gallium/targets/pipe-loader/pipe_nouveau.c
index 825b36f..d882493 100644
--- a/src/gallium/targets/pipe-loader/pipe_nouveau.c
+++ b/src/gallium/targets/pipe-loader/pipe_nouveau.c
@@ -41,4 +41,4 @@ static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
 }
 
 PUBLIC
-DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen, drm_configuration)
+DRM_DRIVER_DESCRIPTOR("nouveau", create_screen, drm_configuration)
diff --git a/src/gallium/targets/pipe-loader/pipe_r300.c b/src/gallium/targets/pipe-loader/pipe_r300.c
index 368b8c2..0c17085 100644
--- a/src/gallium/targets/pipe-loader/pipe_r300.c
+++ b/src/gallium/targets/pipe-loader/pipe_r300.c
@@ -37,4 +37,4 @@ static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
 }
 
 PUBLIC
-DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen, drm_configuration)
+DRM_DRIVER_DESCRIPTOR("r300", create_screen, drm_configuration)
diff --git a/src/gallium/targets/pipe-loader/pipe_r600.c b/src/gallium/targets/pipe-loader/pipe_r600.c
index 65b11c8..dd2652d 100644
--- a/src/gallium/targets/pipe-loader/pipe_r600.c
+++ b/src/gallium/targets/pipe-loader/pipe_r600.c
@@ -37,4 +37,4 @@ static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
 }
 
 PUBLIC
-DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen, drm_configuration)
+DRM_DRIVER_DESCRIPTOR("r600", create_screen, drm_configuration)
diff --git a/src/gallium/targets/pipe-loader/pipe_radeonsi.c b/src/gallium/targets/pipe-loader/pipe_radeonsi.c
index 31077af..59ea82d 100644
--- a/src/gallium/targets/pipe-loader/pipe_radeonsi.c
+++ b/src/gallium/targets/pipe-loader/pipe_radeonsi.c
@@ -43,4 +43,4 @@ static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
 }
 
 PUBLIC
-DRM_DRIVER_DESCRIPTOR("radeonsi", "radeon", create_screen, drm_configuration)
+DRM_DRIVER_DESCRIPTOR("radeonsi", create_screen, drm_configuration)
diff --git a/src/gallium/targets/pipe-loader/pipe_vmwgfx.c b/src/gallium/targets/pipe-loader/pipe_vmwgfx.c
index 71015df..4572327 100644
--- a/src/gallium/targets/pipe-loader/pipe_vmwgfx.c
+++ b/src/gallium/targets/pipe-loader/pipe_vmwgfx.c
@@ -47,4 +47,4 @@ static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
 }
 
 PUBLIC
-DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen, drm_configuration)
+DRM_DRIVER_DESCRIPTOR("vmwgfx", create_screen, drm_configuration)
-- 
2.10.0



More information about the mesa-dev mailing list