summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-27 13:26:23 +0100
committerKeith Packard <keithp@keithp.com>2010-06-02 21:09:44 -0700
commitd90f2cd98a97e6534792d3867b3fba70d850b706 (patch)
tree7f3c3f70780a8e6600d043287653a04d504cfec2
parent1304b8b27cb12c803c4f51f04cb6f9d508b82c69 (diff)
xfree86: Unbreak autoconfig following 0abf065e38c4
The move of the PCI device id probing into a separate file neglected to return the number of found devices, and so the PCI devices were being overwritten by the default entries for vesa and fbdev. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tiago Vignatti <tiago.vignatti@nokia.com> Cc: Alex Deucher <alexdeucher@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/xfree86/common/xf86AutoConfig.c2
-rw-r--r--hw/xfree86/common/xf86pciBus.c8
-rw-r--r--hw/xfree86/common/xf86pciBus.h2
3 files changed, 9 insertions, 3 deletions
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index 8947a4f06..5b236af78 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -257,7 +257,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
}
#endif
- xf86PciMatchDriver(matches, nmatches);
+ i = xf86PciMatchDriver(matches, nmatches);
/* Fallback to platform default hardware */
if (i < (nmatches - 1)) {
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 085be0143..184f2213e 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1294,7 +1294,11 @@ matchDriverFromFiles (char** matches, uint16_t match_vendor, uint16_t match_chip
}
#endif /* __linux__ */
-void
+/**
+ * @return The numbers of found devices that match with the current system
+ * drivers.
+ */
+int
xf86PciMatchDriver(char* matches[], int nmatches) {
int i;
struct pci_device * info = NULL;
@@ -1326,4 +1330,6 @@ xf86PciMatchDriver(char* matches[], int nmatches) {
if ((info != NULL) && (i < nmatches)) {
i += videoPtrToDriverList(info, &(matches[i]), nmatches - i);
}
+
+ return i;
}
diff --git a/hw/xfree86/common/xf86pciBus.h b/hw/xfree86/common/xf86pciBus.h
index f84a496df..3f02b9330 100644
--- a/hw/xfree86/common/xf86pciBus.h
+++ b/hw/xfree86/common/xf86pciBus.h
@@ -37,6 +37,6 @@ void xf86PciProbe(void);
Bool xf86PciAddMatchingDev(DriverPtr drvp);
Bool xf86PciProbeDev(DriverPtr drvp);
void xf86PciIsolateDevice(char *argument);
-void xf86PciMatchDriver(char* matches[], int nmatches);
+int xf86PciMatchDriver(char* matches[], int nmatches);
#endif /* _XF86_PCI_BUS_H */