pipe-loader: Default to kmsro if probe fails
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sat, 19 Oct 2019 20:46:54 +0000 (16:46 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sat, 26 Oct 2019 13:17:42 +0000 (13:17 +0000)
A device supported by kmsro will not automatically probe kmsro since the
driver name will be panfrost/lima/v3d/..., not "kmsro". Since kmsro is a
bit of a catch-all for generic (mostly embedded) GPUs, add a fallback on
kmsro for the dynamic loader.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c

index 45b941e1f13596c6a7602e06af88763c9855225d..3b9b39f62a3b9d982c0e8b8c54275f4db25d7b71 100644 (file)
@@ -208,6 +208,11 @@ pipe_loader_drm_probe_fd_nodup(struct pipe_loader_device **dev, int fd)
    plib = &ddev->lib;
 #endif
    ddev->dd = get_driver_descriptor(ddev->base.driver_name, plib);
+
+   /* kmsro supports lots of drivers, try as a fallback */
+   if (!ddev->dd)
+      ddev->dd = get_driver_descriptor("kmsro", plib);
+
    if (!ddev->dd)
       goto fail;