diff options
author | Dave Airlie <airlied@redhat.com> | 2012-05-17 10:23:34 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-17 10:23:34 +0100 |
commit | 2e35bc316d7b74feca177c87a49a8050a2a0ff00 (patch) | |
tree | 61958b248920d10448d93b33033e27fa71d77823 /src/cir_driver.c | |
parent | 52ae4d254fee97a215ac497a45b69b4c83470b2b (diff) |
cirrus: don't bind if there is a PCI kernel driver loaded.
this should ensure we end up using -modesetting under kms.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/cir_driver.c')
-rw-r--r-- | src/cir_driver.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cir_driver.c b/src/cir_driver.c index 7e470bb..c6967da 100644 --- a/src/cir_driver.c +++ b/src/cir_driver.c @@ -256,6 +256,17 @@ CIRProbe(DriverPtr drv, int flags) they should be handled in this driver (as opposed to their own driver). */ pPci = xf86GetPciInfoForEntity(usedChips[i]); + +#ifdef XSERVER_LIBPCIACCESS + if (pci_device_has_kernel_driver(pPci)) { + xf86DrvMsg(0, X_ERROR, + "cirrus: The PCI device 0x%x at %2.2d@%2.2d:%2.2d:%1.1d has a kernel module claiming it.\n", + pPci->device_id, pPci->bus, pPci->domain, pPci->dev, pPci->func); + xf86DrvMsg(0, X_ERROR, + "cirrus: This driver cannot operate until it has been unloaded.\n"); + return FALSE; + } +#endif pScrn = NULL; if (pPci && (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_GD5462 || PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_GD5464 || |