summaryrefslogtreecommitdiff
path: root/src/loader/loader.c
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-03-17 14:42:12 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2014-03-19 18:17:40 -0400
commit51989817e6767d8ef469708c69d7ce38b87e9b6e (patch)
tree921fa2c336e3976b3336615f1981303921debc5b /src/loader/loader.c
parentc049dd4396d1639859810d6124faa863dae61d1b (diff)
loader: add special logic to distinguish nouveau from nouveau_vieux
There are a lot of different pci ids supported by nouveau, and more are added all the time. The relevant distinguisher between drivers is the chipset id. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/loader/loader.c')
-rw-r--r--src/loader/loader.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 811f8a2571..e343f4a579 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -78,7 +78,7 @@
#endif
#define __IS_LOADER
-#include "pci_ids/pci_id_driver_map.h"
+#include "pci_id_driver_map.h"
static void default_logger(int level, const char *fmt, ...)
{
@@ -352,6 +352,9 @@ loader_get_driver_for_fd(int fd, unsigned driver_types)
if (!(driver_types & driver_map[i].driver_types))
continue;
+ if (driver_map[i].predicate && !driver_map[i].predicate(fd))
+ continue;
+
if (driver_map[i].num_chips_ids == -1) {
driver = strdup(driver_map[i].driver);
goto out;