diff options
author | Egbert Eich <eich@suse.de> | 2014-04-22 12:21:57 +0200 |
---|---|---|
committer | Egbert Eich <eich@freedesktop.org> | 2014-04-30 17:25:29 +0200 |
commit | f6a2ba02b2ac8c8a8b66902dd3ac5324971a43fe (patch) | |
tree | 6f0fdfeaf5a4e17fc21483bbaf55a807ce38d11a /src | |
parent | a833ba0b6cd6b6a449ddfed0b4753bc6f8dcb305 (diff) |
Clean up namespace in ast_2dtool.c
- Make local functions static
This sometimes helps the compiler to optimize.
- Make sure exported functions have 'AST' in their name.
This avoids name space conflicts with the server or other drivers.
- Place declaration of exported functions in a header file.
This ensures that changes to the function type or arguments are followed
thru everywhere.
Signed-off-by: Egbert Eich <eich@suse.de>
Acked-by: Y.C. Chen <yc_chen@aspeedtech.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ast.h | 6 | ||||
-rw-r--r-- | src/ast_2dtool.c | 42 | ||||
-rw-r--r-- | src/ast_2dtool.h | 2 | ||||
-rw-r--r-- | src/ast_accel.c | 83 | ||||
-rw-r--r-- | src/ast_driver.c | 10 | ||||
-rw-r--r-- | src/ast_mode.c | 5 |
6 files changed, 68 insertions, 80 deletions
@@ -329,6 +329,12 @@ void ASTGetAST1180DRAMInfo(ScrnInfoPtr pScrn); void vASTEnableVGAMMIO(ScrnInfoPtr pScrn); Bool ASTInitVGA(ScrnInfoPtr pScrn, ULONG Flags); +/* ast_2dtool.c */ +void vASTWaitEngIdle(ScrnInfoPtr pScrn, ASTRecPtr pAST); +UCHAR *pASTjRequestCMDQ(ASTRecPtr pAST, ULONG ulDataLen); +Bool bASTEnable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST); +void vASTDisable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST); + /* Include Files */ #include "ast_mode.h" #include "ast_vgatool.h" diff --git a/src/ast_2dtool.c b/src/ast_2dtool.c index 47f0d64..3cf83fe 100644 --- a/src/ast_2dtool.c +++ b/src/ast_2dtool.c @@ -53,16 +53,8 @@ typedef Bool (*PFN_bENABLE_CMDQ)(ScrnInfoPtr , ASTRecPtr); /* Prototype type declaration */ -Bool bInitCMDQInfo(ScrnInfoPtr pScrn, ASTRecPtr pAST); -Bool bEnableCMDQ(ScrnInfoPtr pScrn, ASTRecPtr pAST); -Bool bEnableCMDQ2300(ScrnInfoPtr pScrn, ASTRecPtr pAST); -Bool bEnable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST); -void vDisable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST); -void vWaitEngIdle(ScrnInfoPtr pScrn, ASTRecPtr pAST); -UCHAR *pjRequestCMDQ(ASTRecPtr pAST, ULONG ulDataLen); -Bool bGetLineTerm(_LINEInfo *LineInfo, LINEPARAM *dsLineParam); -Bool +static Bool bInitCMDQInfo(ScrnInfoPtr pScrn, ASTRecPtr pAST) { @@ -110,12 +102,12 @@ bInitCMDQInfo(ScrnInfoPtr pScrn, ASTRecPtr pAST) return (TRUE); } -Bool +static Bool bEnableCMDQ(ScrnInfoPtr pScrn, ASTRecPtr pAST) { ULONG ulVMCmdQBasePort = 0; - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); /* set DBG Select Info */ if (pAST->DBGSelect) @@ -176,12 +168,12 @@ bEnableCMDQ(ScrnInfoPtr pScrn, ASTRecPtr pAST) return (TRUE); } -Bool +static Bool bEnableCMDQ2300(ScrnInfoPtr pScrn, ASTRecPtr pAST) { ULONG ulVMCmdQBasePort = 0, ulNewModeData; - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); /* set DBG Select Info */ if (pAST->DBGSelect) @@ -242,7 +234,7 @@ bEnableCMDQ2300(ScrnInfoPtr pScrn, ASTRecPtr pAST) } /* bEnableCMDQ2300 */ Bool -bEnable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST) +bASTEnable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST) { ULONG ulData; PFN_bENABLE_CMDQ pfnEnableCMDQ = bEnableCMDQ; @@ -272,13 +264,13 @@ bEnable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST) if (!bInitCMDQInfo(pScrn, pAST)) { - vDisable2D(pScrn, pAST); + vASTDisable2D(pScrn, pAST); return (FALSE); } if (!pfnEnableCMDQ(pScrn, pAST)) { - vDisable2D(pScrn, pAST); + vASTDisable2D(pScrn, pAST); return (FALSE); } @@ -286,11 +278,11 @@ bEnable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST) } void -vDisable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST) +vASTDisable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST) { - vWaitEngIdle(pScrn, pAST); - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); /* restore 2D settings */ if (pAST->jChipType != AST1180) @@ -309,7 +301,7 @@ vDisable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST) void -vWaitEngIdle(ScrnInfoPtr pScrn, ASTRecPtr pAST) +vASTWaitEngIdle(ScrnInfoPtr pScrn, ASTRecPtr pAST) { ULONG ulEngState, ulEngState2; UCHAR jReg; @@ -320,11 +312,11 @@ vWaitEngIdle(ScrnInfoPtr pScrn, ASTRecPtr pAST) /* 2D disable if 0xA4 D[0] = 1 */ GetIndexRegMask(CRTC_PORT, 0xA4, 0x01, jReg); - if (!jReg) goto Exit_vWaitEngIdle; + if (!jReg) goto Exit_vASTWaitEngIdle; /* 2D not work if in std. mode */ GetIndexRegMask(CRTC_PORT, 0xA3, 0x0F, jReg); - if (!jReg) goto Exit_vWaitEngIdle; + if (!jReg) goto Exit_vASTWaitEngIdle; } if (*(ULONG *) (pAST->CMDQInfo.pjCmdQBasePort) & 0x02000000) /* MMIO Mode */ @@ -341,7 +333,7 @@ vWaitEngIdle(ScrnInfoPtr pScrn, ASTRecPtr pAST) } while ((ulEngState & ulEngCheckSetting) || (ulEngState != ulEngState2)); -Exit_vWaitEngIdle: +Exit_vASTWaitEngIdle: ; } @@ -362,7 +354,7 @@ static __inline ULONG ulGetCMDQLength(ASTRecPtr pAST, ULONG ulWritePointer, ULON return ((ulReadPointer << 3) - ulWritePointer - CMD_QUEUE_GUARD_BAND) & ulCMDQMask; } -UCHAR *pjRequestCMDQ( +UCHAR *pASTjRequestCMDQ( ASTRecPtr pAST, ULONG ulDataLen) { UCHAR *pjBuffer; @@ -452,7 +444,7 @@ ASTRecPtr pAST, ULONG ulDataLen) } /* end of pjRequestCmdQ() */ -Bool bGetLineTerm(_LINEInfo *LineInfo, LINEPARAM *dsLineParam) +Bool bASTGetLineTerm(_LINEInfo *LineInfo, LINEPARAM *dsLineParam) { LONG GAbsX, GAbsY, GXInc, GYInc, GXMajor; LONG MM, mm, Error0, K1, K2; diff --git a/src/ast_2dtool.h b/src/ast_2dtool.h index 888bbf2..c3cc54a 100644 --- a/src/ast_2dtool.h +++ b/src/ast_2dtool.h @@ -621,3 +621,5 @@ typedef struct { addr->PKT_SC_dwHeader = (ULONG)(PKT_SINGLE_CMD_HEADER + CMDQREG_LINE_NUMBER); \ addr->PKT_SC_dwData[0] = (ULONG)(no); \ } + +Bool bASTGetLineTerm(_LINEInfo *LineInfo, LINEPARAM *dsLineParam); diff --git a/src/ast_accel.c b/src/ast_accel.c index 3bfe7ee..6fd0ca9 100644 --- a/src/ast_accel.c +++ b/src/ast_accel.c @@ -97,11 +97,6 @@ int ASTXAAPatternROP[16]= ROP_1 }; -/* extern function */ -extern void vWaitEngIdle(ScrnInfoPtr pScrn, ASTRecPtr pAST); -extern UCHAR *pjRequestCMDQ(ASTRecPtr pAST, ULONG ulDataLen); -extern Bool bGetLineTerm(_LINEInfo *LineInfo, LINEPARAM *dsLineParam); - /* Prototype type declaration */ Bool ASTAccelInit(ScreenPtr pScreen); static void ASTSync(ScrnInfoPtr pScrn); @@ -293,7 +288,7 @@ ASTSync(ScrnInfoPtr pScrn) ASTRecPtr pAST = ASTPTR(pScrn); /* wait engle idle */ - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } /* end of ASTSync */ @@ -332,7 +327,7 @@ static void ASTSetupForScreenToScreenCopy(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*2); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*2); ASTSetupSRCPitch(pSingleCMD, pAST->VideoModeInfo.ScreenPitch); pSingleCMD++; @@ -421,7 +416,7 @@ ASTSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1, int x2, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*6); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*6); ASTSetupSRCBase(pSingleCMD, srcbase); pSingleCMD++; @@ -448,7 +443,7 @@ ASTSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1, int x2, ASTSetupRECTXY_MMIO(width, height); ASTSetupCMDReg_MMIO(cmdreg); - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } } /* width & height check */ @@ -489,7 +484,7 @@ ASTSetupForSolidFill(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*2); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*2); ASTSetupDSTPitchHeight(pSingleCMD, pAST->VideoModeInfo.ScreenPitch, -1); pSingleCMD++; @@ -544,7 +539,7 @@ ASTSubsequentSolidFillRect(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*4); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*4); ASTSetupDSTBase(pSingleCMD, dstbase); pSingleCMD++; @@ -565,7 +560,7 @@ ASTSubsequentSolidFillRect(ScrnInfoPtr pScrn, ASTSetupRECTXY_MMIO(width, height); ASTSetupCMDReg_MMIO(cmdreg); - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } @@ -607,7 +602,7 @@ static void ASTSetupForSolidLine(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*3); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*3); ASTSetupDSTPitchHeight(pSingleCMD, pAST->VideoModeInfo.ScreenPitch, -1); pSingleCMD++; @@ -674,7 +669,7 @@ static void ASTSubsequentSolidHorVertLine(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*4); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*4); ASTSetupDSTBase(pSingleCMD, dstbase); pSingleCMD++; @@ -695,7 +690,7 @@ static void ASTSubsequentSolidHorVertLine(ScrnInfoPtr pScrn, ASTSetupRECTXY_MMIO(width, height); ASTSetupCMDReg_MMIO(cmdreg); - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } @@ -745,7 +740,7 @@ static void ASTSubsequentSolidTwoPointLine(ScrnInfoPtr pScrn, LineInfo.X2 = x2; LineInfo.Y2 = y2; - bGetLineTerm(&LineInfo, &dsLineParam); /* Get Line Parameter */ + bASTGetLineTerm(&LineInfo, &dsLineParam); /* Get Line Parameter */ if (dsLineParam.dwLineAttributes & LINEPARAM_X_DEC) ulCommand |= CMD_X_DEC; @@ -760,7 +755,7 @@ static void ASTSubsequentSolidTwoPointLine(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*7); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*7); ASTSetupDSTBase(pSingleCMD, dstbase); pSingleCMD++; @@ -780,7 +775,7 @@ static void ASTSubsequentSolidTwoPointLine(ScrnInfoPtr pScrn, mUpdateWritePointer; /* Patch KDE pass abnormal point, ycchen@052507 */ - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } else @@ -793,7 +788,7 @@ static void ASTSubsequentSolidTwoPointLine(ScrnInfoPtr pScrn, ASTSetupLineK2Term_MMIO(dsLineParam.dwK2Term); ASTSetupCMDReg_MMIO(ulCommand); - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } @@ -841,7 +836,7 @@ ASTSetupForDashedLine(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*5); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*5); ASTSetupDSTPitchHeight(pSingleCMD, pAST->VideoModeInfo.ScreenPitch, -1); pSingleCMD++; @@ -914,7 +909,7 @@ ASTSubsequentDashedTwoPointLine(ScrnInfoPtr pScrn, LineInfo.X2 = x2; LineInfo.Y2 = y2; - bGetLineTerm(&LineInfo, &dsLineParam); /* Get Line Parameter */ + bASTGetLineTerm(&LineInfo, &dsLineParam); /* Get Line Parameter */ if (dsLineParam.dwLineAttributes & LINEPARAM_X_DEC) ulCommand |= CMD_X_DEC; @@ -929,7 +924,7 @@ ASTSubsequentDashedTwoPointLine(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*7); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*7); ASTSetupDSTBase(pSingleCMD, dstbase); pSingleCMD++; @@ -949,7 +944,7 @@ ASTSubsequentDashedTwoPointLine(ScrnInfoPtr pScrn, mUpdateWritePointer; /* Patch KDE pass abnormal point, ycchen@052507 */ - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } else @@ -962,7 +957,7 @@ ASTSubsequentDashedTwoPointLine(ScrnInfoPtr pScrn, ASTSetupLineK2Term_MMIO(dsLineParam.dwK2Term); ASTSetupCMDReg_MMIO(ulCommand); - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } @@ -1004,7 +999,7 @@ ASTSetupForMonoPatternFill(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*5); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*5); ASTSetupDSTPitchHeight(pSingleCMD, pAST->VideoModeInfo.ScreenPitch, -1); pSingleCMD++; @@ -1067,7 +1062,7 @@ ASTSubsequentMonoPatternFill(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*4); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*4); ASTSetupDSTBase(pSingleCMD, dstbase); pSingleCMD++; @@ -1088,7 +1083,7 @@ ASTSubsequentMonoPatternFill(ScrnInfoPtr pScrn, ASTSetupRECTXY_MMIO(width, height); ASTSetupCMDReg_MMIO(cmdreg); - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } } /* end of ASTSubsequentMonoPatternFill */ @@ -1133,7 +1128,7 @@ ASTSetupForColor8x8PatternFill(ScrnInfoPtr pScrn, int patx, int paty, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*(1 + ulPatSize/4)); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*(1 + ulPatSize/4)); ASTSetupDSTPitchHeight(pSingleCMD, pAST->VideoModeInfo.ScreenPitch, -1); pSingleCMD++; for (i=0; i<8; i++) @@ -1198,7 +1193,7 @@ ASTSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn, int patx, int paty, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*4); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*4); ASTSetupDSTBase(pSingleCMD, dstbase); pSingleCMD++; @@ -1219,7 +1214,7 @@ ASTSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrn, int patx, int paty, ASTSetupRECTXY_MMIO(width, height); ASTSetupCMDReg_MMIO(cmdreg); - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } } /* ASTSubsequentColor8x8PatternFillRect */ @@ -1264,7 +1259,7 @@ ASTSetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*3); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*3); ASTSetupDSTPitchHeight(pSingleCMD, pAST->VideoModeInfo.ScreenPitch, -1); pSingleCMD++; @@ -1322,7 +1317,7 @@ ASTSubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*5); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*5); ASTSetupSRCPitch(pSingleCMD, ((width+7)/8)); pSingleCMD++; @@ -1348,7 +1343,7 @@ ASTSubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, ASTSetupRECTXY_MMIO(width, height); ASTSetupCMDReg_MMIO(cmdreg); - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } @@ -1396,7 +1391,7 @@ ASTSetupForScreenToScreenColorExpandFill(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*3); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*3); ASTSetupDSTPitchHeight(pSingleCMD, pAST->VideoModeInfo.ScreenPitch, -1); pSingleCMD++; @@ -1457,7 +1452,7 @@ ASTSubsequentScreenToScreenColorExpandFill(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*6); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*6); ASTSetupSRCBase(pSingleCMD, srcbase); pSingleCMD++; @@ -1484,7 +1479,7 @@ ASTSubsequentScreenToScreenColorExpandFill(ScrnInfoPtr pScrn, ASTSetupRECTXY_MMIO(width, height); ASTSetupCMDReg_MMIO(cmdreg); - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } @@ -1501,7 +1496,7 @@ ASTSetHWClipping(ScrnInfoPtr pScrn, int delta_y) if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*2); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*2); ASTSetupCLIP1(pSingleCMD, pAST->clip_left, pAST->clip_top - delta_y); pSingleCMD++; @@ -1582,7 +1577,7 @@ static void AIPSubsequentSolidTwoPointLine(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*5); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*5); ASTSetupDSTBase(pSingleCMD, dstbase); pSingleCMD++; @@ -1598,7 +1593,7 @@ static void AIPSubsequentSolidTwoPointLine(ScrnInfoPtr pScrn, mUpdateWritePointer; /* Patch KDE pass abnormal point, ycchen@052507 */ - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } else @@ -1609,7 +1604,7 @@ static void AIPSubsequentSolidTwoPointLine(ScrnInfoPtr pScrn, AIPSetupLineNumber_MMIO(0); ASTSetupCMDReg_MMIO(ulCommand); - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } @@ -1652,7 +1647,7 @@ AIPSubsequentDashedTwoPointLine(ScrnInfoPtr pScrn, if (!pAST->MMIO2D) { /* Write to CMDQ */ - pSingleCMD = (PKT_SC *) pjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*5); + pSingleCMD = (PKT_SC *) pASTjRequestCMDQ(pAST, PKT_SINGLE_LENGTH*5); ASTSetupDSTBase(pSingleCMD, dstbase); pSingleCMD++; @@ -1668,7 +1663,7 @@ AIPSubsequentDashedTwoPointLine(ScrnInfoPtr pScrn, mUpdateWritePointer; /* Patch KDE pass abnormal point, ycchen@052507 */ - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } else @@ -1679,7 +1674,7 @@ AIPSubsequentDashedTwoPointLine(ScrnInfoPtr pScrn, AIPSetupLineNumber_MMIO(0); ASTSetupCMDReg_MMIO(ulCommand); - vWaitEngIdle(pScrn, pAST); + vASTWaitEngIdle(pScrn, pAST); } @@ -1791,7 +1786,7 @@ void ASTDisplayVideo(ScrnInfoPtr pScrn, ASTPortPrivPtr pPriv, RegionPtr clipBoxe lSrcX = (ULONG)((float)rect.x * fScaleX + pPriv->src_x + 0.5f); lSrcY = (ULONG)((float)rect.y * fScaleY + pPriv->src_y + 0.5f); - pCopyCmd = (BURSTSCALECMD*)pjRequestCMDQ(pAST, PKT_TYPESCALE_LENGTH); + pCopyCmd = (BURSTSCALECMD*)pASTjRequestCMDQ(pAST, PKT_TYPESCALE_LENGTH); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "pCopyCmd=%p, pBox=%x,%x,%x,%x\n", pCopyCmd, pBox->x1, pBox->y1, pBox->x2, pBox->y2); diff --git a/src/ast_driver.c b/src/ast_driver.c index a35d0ba..5b02c9e 100644 --- a/src/ast_driver.c +++ b/src/ast_driver.c @@ -65,10 +65,6 @@ extern void ASTUnmapMMIO(ScrnInfoPtr pScrn); extern Bool ASTSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode); -extern Bool bInitCMDQInfo(ScrnInfoPtr pScrn, ASTRecPtr pAST); -extern Bool bEnableCMDQ(ScrnInfoPtr pScrn, ASTRecPtr pAST); -extern void vDisable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST); - #ifdef HAVE_XAA_H extern Bool ASTAccelInit(ScreenPtr pScreen); #endif @@ -1062,7 +1058,7 @@ ASTSwitchMode(SWITCH_MODE_ARGS_DECL) xf86FreeOffscreenLinear(pAST->pCMDQPtr); /* free CMDQ */ pAST->pCMDQPtr = NULL; } - vDisable2D(pScrn, pAST); + vASTDisable2D(pScrn, pAST); #endif /* Fixed display abnormal on the of the screen if run xvidtune, ycchen@122909 */ @@ -1138,7 +1134,7 @@ ASTLeaveVT(VT_FUNC_ARGS_DECL) xf86FreeOffscreenLinear(pAST->pCMDQPtr); /* free CMDQ */ pAST->pCMDQPtr = NULL; } - vDisable2D(pScrn, pAST); + vASTDisable2D(pScrn, pAST); #endif ASTRestore(pScrn); @@ -1322,7 +1318,7 @@ ASTCloseScreen(CLOSE_SCREEN_ARGS_DECL) xf86FreeOffscreenLinear(pAST->pCMDQPtr); /* free CMDQ */ pAST->pCMDQPtr = NULL; } - vDisable2D(pScrn, pAST); + vASTDisable2D(pScrn, pAST); #endif ASTRestore(pScrn); diff --git a/src/ast_mode.c b/src/ast_mode.c index 14dcc8c..3d06700 100644 --- a/src/ast_mode.c +++ b/src/ast_mode.c @@ -407,9 +407,6 @@ VBIOS_DAC_INFO DAC_VGA[] = { }; /* extern. function */ -extern Bool bEnable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST); -extern void vDisable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST); - extern Bool bInitHWC(ScrnInfoPtr pScrn, ASTRecPtr pAST); /* Prototype type declaration*/ @@ -472,7 +469,7 @@ ASTSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode) /* post set mode */ #ifdef Accel_2D if (!pAST->noAccel) { - if (!bEnable2D(pScrn, pAST)) { + if (!bASTEnable2D(pScrn, pAST)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"Enable 2D failed\n"); pAST->noAccel = TRUE; } |