diff options
Diffstat (limited to 'src/ast_driver.c')
-rw-r--r-- | src/ast_driver.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ast_driver.c b/src/ast_driver.c index e79577e..5f7fa8e 100644 --- a/src/ast_driver.c +++ b/src/ast_driver.c @@ -85,6 +85,9 @@ extern Bool bInitAST1180(ScrnInfoPtr pScrn); extern void GetAST1180DRAMInfo(ScrnInfoPtr pScrn); extern void vEnableASTVGAMMIO(ScrnInfoPtr pScrn); +extern Bool ReadEDID_M68K(ScrnInfoPtr pScrn, BYTE *pEDIDData); +extern UCHAR GetLinkMaxCLK(ScrnInfoPtr pScrn); + extern Bool bInitCMDQInfo(ScrnInfoPtr pScrn, ASTRecPtr pAST); extern Bool bEnableCMDQ(ScrnInfoPtr pScrn, ASTRecPtr pAST); extern void vDisable2D(ScrnInfoPtr pScrn, ASTRecPtr pAST); @@ -1286,10 +1289,14 @@ ASTGetRec(ScrnInfoPtr pScrn) static void ASTFreeRec(ScrnInfoPtr pScrn) { + ASTRecPtr pAST = ASTPTR(pScrn); + if (!pScrn) return; if (!pScrn->driverPrivate) return; + if (pAST->pDP501FWBufferVirtualAddress) + free(pAST->pDP501FWBufferVirtualAddress); free(pScrn->driverPrivate); pScrn->driverPrivate = 0; } @@ -1554,6 +1561,12 @@ ASTProbeDDC(ScrnInfoPtr pScrn, int index) { if (pAST->jChipType == AST1180) Flags = GetVGA2EDID(pScrn, DDC_data); + else if (pAST->jTxChipType == Tx_DP501) + { + Flags = ReadEDID_M68K(pScrn, DDC_data); + if (Flags == FALSE) + Flags = GetVGAEDID(pScrn, DDC_data); + } else Flags = GetVGAEDID(pScrn, DDC_data); @@ -1598,6 +1611,14 @@ ASTDoDDC(ScrnInfoPtr pScrn, int index) { if (pAST->jChipType == AST1180) Flags = GetVGA2EDID(pScrn, DDC_data); + else if (pAST->jTxChipType == Tx_DP501) + { + pAST->DP501_MaxVCLK = 0xFF; + Flags = ReadEDID_M68K(pScrn, DDC_data); + if (Flags) pAST->DP501_MaxVCLK = GetLinkMaxCLK(pScrn); + else + Flags = GetVGAEDID(pScrn, DDC_data); + } else Flags = GetVGAEDID(pScrn, DDC_data); |