summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-08-20 13:49:19 +1000
committerDave Airlie <airlied@redhat.com>2012-08-20 13:49:19 +1000
commitbc04e9ed659be51a3c712f34a038bd60f639f9c5 (patch)
treee051c1b7782cf27fe18ec697a968dd38edb96ba5
parent129076c2a9c20ab515736bb7141b4f334699e21b (diff)
downloadxorg-driver-xf86-video-cirrus-bc04e9ed659be51a3c712f34a038bd60f639f9c5.tar.gz
cirrus: fix falling back after kernel check
if we find a kernel driver the code leave the pci slot claimed which stops us falling back. unclaim the pci slot. Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--src/cir_driver.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cir_driver.c b/src/cir_driver.c
index 5468b6b..c8d5aae 100644
--- a/src/cir_driver.c
+++ b/src/cir_driver.c
@@ -237,9 +237,10 @@ CIRProbe(DriverPtr drv, int flags)
CIRChipsets, CIRPciChipsets, devSections,
numDevSections, drv, &usedChips);
/* Free it since we don't need that list after this */
- free(devSections);
- if (numUsed <= 0)
+ if (numUsed <= 0) {
+ free(devSections);
return FALSE;
+ }
if (flags & PROBE_DETECT)
foundScreen = TRUE;
else for (i = 0; i < numUsed; i++) {
@@ -257,6 +258,8 @@ CIRProbe(DriverPtr drv, int flags)
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");
+ xf86UnclaimPciSlot(pPci, devSections[0]);
+ free(devSections);
return FALSE;
}
#endif
@@ -290,6 +293,7 @@ CIRProbe(DriverPtr drv, int flags)
pScrn->Probe = NULL;
}
}
+ free(devSections);
free(usedChips);
return foundScreen;