mirror of
https://github.com/X11Libre/xf86-video-ast.git
synced 2026-03-24 01:24:41 +00:00
ast: 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. patch inspired by correspondant patch for cirrus driver by Dave Airlie. Signed-off-by: Stefan Dirsch <sndirsch@suse.de> Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -291,7 +291,10 @@ ASTProbe(DriverPtr drv, int flags)
|
||||
devSections, numDevSections,
|
||||
drv, &usedChips);
|
||||
|
||||
free(devSections);
|
||||
if (numUsed <= 0) {
|
||||
free(devSections);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (flags & PROBE_DETECT) {
|
||||
if (numUsed > 0)
|
||||
@@ -310,6 +313,8 @@ ASTProbe(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;
|
||||
}
|
||||
}
|
||||
@@ -343,6 +348,7 @@ ASTProbe(DriverPtr drv, int flags)
|
||||
} /* end of for-loop */
|
||||
} /* end of if flags */
|
||||
|
||||
free(devSections);
|
||||
free(usedChips);
|
||||
|
||||
return foundScreen;
|
||||
|
||||
Reference in New Issue
Block a user