diff options
author | Alex Deucher <alex@botch2.com> | 2007-03-04 17:18:10 -0500 |
---|---|---|
committer | Alex Deucher <alex@botch2.com> | 2007-03-13 00:17:29 -0400 |
commit | cf83ef7685609cd9daea193b4c842d232edcf506 (patch) | |
tree | 73686a8fbefe23e90d7b884e1f536a2b4bf4bef9 | |
parent | 3030e5a6afda5d05ddee5b586295a9e608b7a0de (diff) |
actually calculate and use vclk1
-rw-r--r-- | src/smi_driver.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/smi_driver.c b/src/smi_driver.c index 09437d9..255bd5c 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -1525,6 +1525,10 @@ SMI_WriteMode(ScrnInfoPtr pScrn, vgaRegPtr vgaSavePtr, SMIRegPtr restore) } } + /* vclk1 */ + VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x6C, restore->SR6C); + VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x6D, restore->SR6D); + if (pSmi->Dualhead) { /* TFT panel uses FIFO1, DSTN panel uses FIFO1 for upper panel and @@ -2339,7 +2343,7 @@ SMI_ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) vgaHWPtr hwp = VGAHWPTR(pScrn); SMIPtr pSmi = SMIPTR(pScrn); unsigned char tmp; - int panelIndex, modeIndex, i; + int panelIndex, modeIndex, i, vclk; /* Store values to current mode register structs */ SMIRegPtr new = &pSmi->ModeReg; @@ -2519,6 +2523,14 @@ SMI_ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) vganew->MiscOutReg &= ~0xC0; } + /* calculate vclk1 */ + vclk = mode->Clock; + SMI_CommonCalcClock(pScrn->scrnIndex, vclk, + 1, 1, 31, 0, 2, + pScrn->clockRanges->minClock, + pScrn->clockRanges->maxClock, + &new->SR6C, &new->SR6D); + /* dualhead */ if (pSmi->Dualhead) { /* PLL controls */ |