summaryrefslogtreecommitdiff
path: root/src/ast_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast_driver.c')
-rw-r--r--src/ast_driver.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/ast_driver.c b/src/ast_driver.c
index 4001c36..e0dd4fa 100644
--- a/src/ast_driver.c
+++ b/src/ast_driver.c
@@ -300,6 +300,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)))
@@ -642,9 +657,7 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
bASTRegInit(pScrn);
/* Get Chip Type */
- if (PCI_DEV_REVISION(pAST->PciInfo) >= 0x30)
- pAST->jChipType = AST2400;
- else if (PCI_DEV_REVISION(pAST->PciInfo) >= 0x20)
+ if (PCI_DEV_REVISION(pAST->PciInfo) >= 0x20)
pAST->jChipType = AST2300;
else if (PCI_DEV_REVISION(pAST->PciInfo) >= 0x10)
GetChipType(pScrn);
@@ -694,7 +707,7 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
clockRanges->doubleScanAllowed = FALSE;
/* Add for AST2100, ycchen@061807 */
- if ((pAST->jChipType == AST2100) || (pAST->jChipType == AST2200) || (pAST->jChipType == AST2300) || (pAST->jChipType == AST2400) || (pAST->jChipType == AST1180))
+ if ((pAST->jChipType == AST2100) || (pAST->jChipType == AST2200) || (pAST->jChipType == AST2300) || (pAST->jChipType == AST1180))
{
maxPitch = 1920;
maxHeight = 1200;
@@ -1010,7 +1023,7 @@ ASTScreenInit(SCREEN_INIT_ARGS_DECL)
xf86DPMSInit(pScreen, ASTDisplayPowerManagementSet, 0);
#ifdef AstVideo
- if ( (pAST->jChipType == AST1180) || (pAST->jChipType == AST2300) || (pAST->jChipType == AST2400) )
+ if ( (pAST->jChipType == AST1180) || (pAST->jChipType == AST2300) )
{
xf86DrvMsg(pScrn->scrnIndex, X_INFO,"AST Initial Video()\n");
ASTInitVideo(pScreen);
@@ -1204,7 +1217,7 @@ ASTValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
if ( (mode->CrtcHDisplay == 1600) && (mode->CrtcVDisplay == 900) )
return MODE_OK;
- if ( (pAST->jChipType == AST2100) || (pAST->jChipType == AST2200) || (pAST->jChipType == AST2300) || (pAST->jChipType == AST2400) || (pAST->jChipType == AST1180) )
+ if ( (pAST->jChipType == AST2100) || (pAST->jChipType == AST2200) || (pAST->jChipType == AST2300) || (pAST->jChipType == AST1180) )
{
if ( (mode->CrtcHDisplay == 1920) && (mode->CrtcVDisplay == 1080) )
return MODE_OK;