diff options
author | Y.C. Chen <yc_chen@aspeedtech.com> | 2014-03-19 09:48:51 +0800 |
---|---|---|
committer | Y.C. Chen <yc_chen@aspeedtech.com> | 2014-03-19 09:48:51 +0800 |
commit | 0bbae30ffc6a18dd5335380c9808ce3f69ecb7cf (patch) | |
tree | 0d45845926d33131edadf2086b710c690c32f0b5 /src/ast_driver.c | |
parent | b308902b4a14de08e6d7077c70060a15e87b4fd8 (diff) |
Support DP501 Display Output
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); |