diff options
Diffstat (limited to 'src/ast_2dtool.c')
-rw-r--r-- | src/ast_2dtool.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/ast_2dtool.c b/src/ast_2dtool.c index 61f549c..7e54370 100644 --- a/src/ast_2dtool.c +++ b/src/ast_2dtool.c @@ -272,10 +272,12 @@ bEnable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST) ulData = *(ULONG *) (pAST->MMIOVirtualAddr + 0x1200c); *(ULONG *) (pAST->MMIOVirtualAddr + 0x1200c) = (ulData & 0xFFFFFFFD); + + case AST2000: + SetIndexRegMask(CRTC_PORT, 0xA4, 0xFE, 0x01); /* enable 2D */ + break; } - - SetIndexRegMask(CRTC_PORT, 0xA4, 0xFE, 0x01); /* enable 2D */ if (!bInitCMDQInfo(pScrn, pAST)) { @@ -299,7 +301,8 @@ vDisable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST) vWaitEngIdle(pScrn, pAST); vWaitEngIdle(pScrn, pAST); - SetIndexRegMask(CRTC_PORT, 0xA4, 0xFE, 0x00); + if (pAST->jChipType != AST1180) + SetIndexRegMask(CRTC_PORT, 0xA4, 0xFE, 0x00); } @@ -315,14 +318,18 @@ vWaitEngIdle(ScrnInfoPtr pScrn, ASTRecPtr pAST) ulEngCheckSetting = 0x10000000; else ulEngCheckSetting = 0x80000000; + + if (pAST->jChipType != AST1180) + { + + /* 2D disable if 0xA4 D[0] = 1 */ + GetIndexRegMask(CRTC_PORT, 0xA4, 0x01, jReg); + if (!jReg) goto Exit_vWaitEngIdle; - /* 2D disable if 0xA4 D[0] = 1 */ - GetIndexRegMask(CRTC_PORT, 0xA4, 0x01, jReg); - if (!jReg) goto Exit_vWaitEngIdle; - - /* 2D not work if in std. mode */ - GetIndexRegMask(CRTC_PORT, 0xA3, 0x0F, jReg); - if (!jReg) goto Exit_vWaitEngIdle; + /* 2D not work if in std. mode */ + GetIndexRegMask(CRTC_PORT, 0xA3, 0x0F, jReg); + if (!jReg) goto Exit_vWaitEngIdle; + } do { |