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 | |
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>
-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, | |||
682 | smga->pvp = dev; | 682 | smga->pvp = dev; |
683 | #endif | 683 | #endif |
684 | 684 | ||
685 | if (pci_device_has_kernel_driver(dev)) { | ||
686 | xf86DrvMsg(0, X_ERROR, | ||
687 | "mga: The PCI device 0x%x at %2.2d@%2.2d:%2.2d:%1.1d has a kernel module claiming it.\n", | ||
688 | dev->device_id, dev->bus, dev->domain, dev->dev, dev->func); | ||
689 | xf86DrvMsg(0, X_ERROR, | ||
690 | "mga: This driver cannot operate until it has been unloaded.\n"); | ||
691 | return FALSE; | ||
692 | } | ||
693 | |||
685 | /* Allocate a ScrnInfoRec and claim the slot */ | 694 | /* Allocate a ScrnInfoRec and claim the slot */ |
686 | pScrn = xf86ConfigPciEntity(pScrn, 0, entity_num, MGAPciChipsets, | 695 | pScrn = xf86ConfigPciEntity(pScrn, 0, entity_num, MGAPciChipsets, |
687 | NULL, | 696 | NULL, |