diff options
-rw-r--r-- | src/ast.h | 1 | ||||
-rw-r--r-- | src/ast_2dtool.c | 3 | ||||
-rw-r--r-- | src/ast_accel.c | 4 | ||||
-rw-r--r-- | src/ast_driver.c | 25 | ||||
-rw-r--r-- | src/ast_mode.c | 6 | ||||
-rw-r--r-- | src/ast_vgatool.c | 16 |
6 files changed, 33 insertions, 22 deletions
@@ -67,7 +67,6 @@ typedef enum _CHIP_ID { AST2200, AST2150, AST2300, - AST2400, AST1180 } CHIP_ID; diff --git a/src/ast_2dtool.c b/src/ast_2dtool.c index 210d75c..603697c 100644 --- a/src/ast_2dtool.c +++ b/src/ast_2dtool.c @@ -248,7 +248,7 @@ bEnable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST) ULONG ulData; PFN_bENABLE_CMDQ pfnEnableCMDQ = bEnableCMDQ; - if ( (pAST->jChipType == AST2300) || (pAST->jChipType == AST2400) ) + if (pAST->jChipType == AST2300) pfnEnableCMDQ = bEnableCMDQ2300; switch (pAST->jChipType) @@ -258,7 +258,6 @@ bEnable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST) case AST2200: case AST2150: case AST2300: - case AST2400: *(ULONG *) (pAST->MMIOVirtualAddr + 0xF004) = 0x1e6e0000; *(ULONG *) (pAST->MMIOVirtualAddr + 0xF000) = 0x1; diff --git a/src/ast_accel.c b/src/ast_accel.c index 71eeb79..a8fd206 100644 --- a/src/ast_accel.c +++ b/src/ast_accel.c @@ -197,7 +197,7 @@ ASTAccelInit(ScreenPtr pScreen) /* Solid Lines */ if (pAST->ENGCaps & ENG_CAP_SolidLine) { - if ( (pAST->jChipType == AST2300) || (pAST->jChipType == AST2400) || (pAST->jChipType == AST1180) ) + if ( (pAST->jChipType == AST2300) || (pAST->jChipType == AST1180) ) { infoPtr->SubsequentSolidTwoPointLine = AIPSubsequentSolidTwoPointLine; } @@ -214,7 +214,7 @@ ASTAccelInit(ScreenPtr pScreen) /* Dashed Lines */ if (pAST->ENGCaps & ENG_CAP_DashedLine) { - if ( (pAST->jChipType == AST2300) || (pAST->jChipType == AST2400) || (pAST->jChipType == AST1180) ) + if ( (pAST->jChipType == AST2300) || (pAST->jChipType == AST1180) ) { infoPtr->SubsequentDashedTwoPointLine = AIPSubsequentDashedTwoPointLine; } 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; diff --git a/src/ast_mode.c b/src/ast_mode.c index de6f4f1..5911bb5 100644 --- a/src/ast_mode.c +++ b/src/ast_mode.c @@ -694,7 +694,7 @@ void vSetStdReg(ScrnInfoPtr pScrn, DisplayModePtr mode, PVBIOS_MODE_INFO pVGAMod } - + } void @@ -795,7 +795,7 @@ void vSetDCLKReg(ScrnInfoPtr pScrn, DisplayModePtr mode, PVBIOS_MODE_INFO pVGAMo pAST = ASTPTR(pScrn); pEnhModePtr = pVGAModeInfo->pEnhTableEntry; - if ((pAST->jChipType == AST2100) || (pAST->jChipType == AST1100) || (pAST->jChipType == AST2200) || (pAST->jChipType == AST2150) || (pAST->jChipType == AST2300) || (pAST->jChipType == AST2400)) + if ((pAST->jChipType == AST2100) || (pAST->jChipType == AST1100) || (pAST->jChipType == AST2200) || (pAST->jChipType == AST2150) || (pAST->jChipType == AST2300)) pDCLKPtr = &DCLKTable_AST2100[pEnhModePtr->DCLKIndex]; else pDCLKPtr = &DCLKTable[pEnhModePtr->DCLKIndex]; @@ -847,7 +847,7 @@ void vSetExtReg(ScrnInfoPtr pScrn, DisplayModePtr mode, PVBIOS_MODE_INFO pVGAMod #endif /* Set Threshold */ - if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400)) + if (pAST->jChipType == AST2300) { SetIndexReg(CRTC_PORT,0xA7, 0x78); SetIndexReg(CRTC_PORT,0xA6, 0x60); diff --git a/src/ast_vgatool.c b/src/ast_vgatool.c index 315c77f..fa9d1e2 100644 --- a/src/ast_vgatool.c +++ b/src/ast_vgatool.c @@ -126,7 +126,7 @@ GetDRAMInfo(ScrnInfoPtr pScrn) pAST->ulDRAMBusWidth = 32; /* Get DRAM Type */ - if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400)) + if (pAST->jChipType == AST2300) { switch (ulData & 0x03) { @@ -236,7 +236,7 @@ GetMaxDCLK(ScrnInfoPtr pScrn) /* Modify DARM utilization to 60% for AST1100/2100 16bits DRAM, ycchen@032508 */ if ( ((pAST->jChipType == AST2100) || (pAST->jChipType == AST1100) || (pAST->jChipType == AST2200) || (pAST->jChipType == AST2150)) && (ulDRAMBusWidth == 16) ) DRAMEfficiency = 600; - else if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400)) + else if (pAST->jChipType == AST2300) DRAMEfficiency = 400; ulDRAMBandwidth = ulMCLK * ulDRAMBusWidth * 2 / 8; ActualDRAMBandwidth = ulDRAMBandwidth * DRAMEfficiency / 1000; @@ -259,7 +259,7 @@ GetMaxDCLK(ScrnInfoPtr pScrn) } /* 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) ) { if (ulDCLK > 200) ulDCLK = 200; } @@ -334,7 +334,7 @@ GetScratchOptions(ScrnInfoPtr pScrn) else { pAST->SupportWideScreen = FALSE; - if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400)) /* for AST1300 */ + if (pAST->jChipType == AST2300) /* for AST1300 */ { *(ULONG *) (pAST->MMIOVirtualAddr + 0xF004) = 0x1e6e0000; *(ULONG *) (pAST->MMIOVirtualAddr + 0xF000) = 0x1; @@ -721,7 +721,7 @@ void vSetDefExtReg(ScrnInfoPtr pScrn) } /* Set Ext. Reg */ - if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400)) + if (pAST->jChipType == AST2300) { if (PCI_DEV_REVISION(pAST->PciInfo) > 0x20) pjExtRegInfo = ExtRegInfo_AST2300; @@ -749,7 +749,7 @@ void vSetDefExtReg(ScrnInfoPtr pScrn) /* Enable RAMDAC for A1, ycchen@113005 */ jReg = 0x04; - if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400)) + if (pAST->jChipType == AST2300) jReg |= 0x20; SetIndexRegMask(CRTC_PORT,0xB6, 0xFF, jReg); @@ -2546,7 +2546,7 @@ void vGetDefaultSettings(ScrnInfoPtr pScrn) ASTRecPtr pAST = ASTPTR(pScrn); ULONG ulData; - if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400)) + if (pAST->jChipType == AST2300) { *(ULONG *) (pAST->MMIOVirtualAddr + 0xF004) = 0x1e6e0000; *(ULONG *) (pAST->MMIOVirtualAddr + 0xF000) = 0x1; @@ -2604,7 +2604,7 @@ Bool InitVGA(ScrnInfoPtr pScrn, ULONG Flags) if (Flags == 0) vGetDefaultSettings(pScrn); - if ((pAST->jChipType == AST2300) || (pAST->jChipType == AST2400)) + if (pAST->jChipType == AST2300) vInitAST2300DRAMReg(pScrn); else vInitDRAMReg(pScrn); |