summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Herring <[email protected]>2019-01-24 16:36:00 -0600
committerEric Anholt <[email protected]>2019-01-28 09:35:45 -0800
commit511e7b6f610fc5c2d4d462ba0586590d62bc7247 (patch)
treef80f918be943bc1bef3e0a8294cff91d019d2cff /src
parented65aeec7810a7d98a19461ba933bd77268cb0f6 (diff)
pipe-loader: Fallback to kmsro driver when no matching driver name found
If we can't find a driver matching by name, then use the kmsro driver. This removes the need for needing a driver descriptor for every possible KMS driver. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
index 230bafe5e15..c1323ac6590 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
@@ -107,11 +107,6 @@ static const struct drm_driver_descriptor driver_descriptors[] = {
.configuration = pipe_default_configuration_query,
},
{
- .driver_name = "pl111",
- .create_screen = pipe_kmsro_create_screen,
- .configuration = pipe_default_configuration_query,
- },
- {
.driver_name = "virtio_gpu",
.create_screen = pipe_virgl_create_screen,
.configuration = pipe_default_configuration_query,
@@ -142,6 +137,13 @@ static const struct drm_driver_descriptor driver_descriptors[] = {
.configuration = pipe_default_configuration_query,
},
};
+
+static const struct drm_driver_descriptor default_driver_descriptor = {
+ .driver_name = "kmsro",
+ .create_screen = pipe_kmsro_create_screen,
+ .configuration = pipe_default_configuration_query,
+};
+
#endif
static const struct drm_driver_descriptor *
@@ -152,6 +154,7 @@ get_driver_descriptor(const char *driver_name, struct util_dl_library **plib)
if (strcmp(driver_descriptors[i].driver_name, driver_name) == 0)
return &driver_descriptors[i];
}
+ return &default_driver_descriptor;
#else
*plib = pipe_loader_find_module(driver_name, PIPE_SEARCH_DIR);
if (!*plib)