mirror of
https://github.com/X11Libre/xf86-video-ast.git
synced 2026-03-24 01:24:41 +00:00
ast: don't bind to device if there is a loaded PCI driver.
This stops this driver being used on top of the kernel modesetting driver, so fallback works correctly. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -295,6 +295,21 @@ ASTProbe(DriverPtr drv, int flags)
|
||||
for (i = 0; i < numUsed; i++) {
|
||||
ScrnInfoPtr pScrn = NULL;
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
{
|
||||
struct pci_device *pPci = xf86GetPciInfoForEntity(usedChips[i]);
|
||||
|
||||
if (pci_device_has_kernel_driver(pPci)) {
|
||||
xf86DrvMsg(0, X_ERROR,
|
||||
"ast: 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
|
||||
|
||||
/* Allocate new ScrnInfoRec and claim the slot */
|
||||
if ((pScrn = xf86ConfigPciEntity(pScrn, 0, usedChips[i],
|
||||
ASTPciChipsets, 0, 0, 0, 0, 0)))
|
||||
|
||||
Reference in New Issue
Block a user