summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-08-01 13:17:55 -0400
committerAdam Jackson <ajax@redhat.com>2008-08-01 13:17:55 -0400
commit82d51e6df2bf677bdf24376092bcaa79b534f6e5 (patch)
treee9d44ce62c7bb6492dd58e49b14029dbbe0bc2c6
parent9643e8d3482a35d355a243db7aa397ad47f29be0 (diff)
Silence the "No matching Device section" warning in some harmless cases.
If the device doesn't have any BARs then it's just a stub for some lame operating systems that need one PCI device per output for multihead. No point in warning about it.
-rw-r--r--hw/xfree86/common/xf86Helper.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index fedd7a3f7..c983b9ad9 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1550,6 +1550,21 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist)
return i;
}
+static Bool
+pciDeviceHasBars(struct pci_device *pci)
+{
+ int i;
+
+ for (i = 0; i < 6; i++)
+ if (pci->regions[0].size)
+ return TRUE;
+
+ if (pci->rom_size)
+ return TRUE;
+
+ return FALSE;
+}
+
struct Inst {
struct pci_device * pci;
GDevPtr dev;
@@ -1804,7 +1819,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID,
}
if (devBus) dev = devBus; /* busID preferred */
if (!dev) {
- if ( xf86CheckPciSlot( pPci ) ) {
+ if (xf86CheckPciSlot(pPci) && pciDeviceHasBars(pPci)) {
xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section "
"for instance (BusID PCI:%u@%u:%u:%u) found\n",
driverName, pPci->domain, pPci->bus, pPci->dev,