xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Fri Aug 1 10:18:40 PDT 2008


 hw/xfree86/common/xf86Helper.c |   17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

New commits:
commit 82d51e6df2bf677bdf24376092bcaa79b534f6e5
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Aug 1 13:17:55 2008 -0400

    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.

diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index fedd7a3..c983b9a 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,


More information about the xorg-commit mailing list