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.
This commit is contained in:
parent
9643e8d348
commit
82d51e6df2
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user