diff options
author | Dave Airlie <airlied@redhat.com> | 2012-05-17 10:19:21 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-17 10:19:21 +0100 |
commit | 0af7dba78559ce82b4c3eed0862415efcde51863 (patch) | |
tree | a8f6a4a247eab845f59aea58433c35aa44307b79 /src/mga_driver.c | |
parent | 3991971c23ebe596742c004b1e583dfb1aa14ec4 (diff) |
mga: don't bind to device if there is a kernel driver
this should only pick up KMS drivers and not old drm drivers.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mga_driver.c')
-rw-r--r-- | src/mga_driver.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mga_driver.c b/src/mga_driver.c index af005f1..61eb96c 100644 --- a/src/mga_driver.c +++ b/src/mga_driver.c @@ -682,6 +682,15 @@ MGAPciProbe(DriverPtr drv, int entity_num, struct pci_device * dev, smga->pvp = dev; #endif + if (pci_device_has_kernel_driver(dev)) { + xf86DrvMsg(0, X_ERROR, + "mga: The PCI device 0x%x at %2.2d@%2.2d:%2.2d:%1.1d has a kernel module claiming it.\n", + dev->device_id, dev->bus, dev->domain, dev->dev, dev->func); + xf86DrvMsg(0, X_ERROR, + "mga: This driver cannot operate until it has been unloaded.\n"); + return FALSE; + } + /* Allocate a ScrnInfoRec and claim the slot */ pScrn = xf86ConfigPciEntity(pScrn, 0, entity_num, MGAPciChipsets, NULL, |