diff options
-rw-r--r-- | src/atimach64.c | 36 | ||||
-rw-r--r-- | src/atimode.c | 42 |
2 files changed, 38 insertions, 40 deletions
diff --git a/src/atimach64.c b/src/atimach64.c index 98eb894d..dee82c45 100644 --- a/src/atimach64.c +++ b/src/atimach64.c @@ -594,6 +594,42 @@ ATIMach64Calculate { int VDisplay; + /* Clobber mode timings */ + if (pATI->OptionPanelDisplay && (pATI->LCDPanelID >= 0) && + !pMode->CrtcHAdjusted && !pMode->CrtcVAdjusted && + (!pATI->OptionLCDSync || (pMode->type & M_T_BUILTIN))) + { + int VScan; + + pMode->Clock = pATI->LCDClock; + pMode->Flags &= ~(V_DBLSCAN | V_INTERLACE | V_CLKDIV2); + + /* + * Use doublescanning or multiscanning to get around vertical blending + * limitations. + */ + VScan = pATI->LCDVertical / pMode->VDisplay; + { + pMode->VScan = 0; + if (VScan > 1) + { + VScan = 2; + pMode->Flags |= V_DBLSCAN; + } + } + + pMode->HSyncStart = pMode->HDisplay + pATI->LCDHSyncStart; + pMode->HSyncEnd = pMode->HSyncStart + pATI->LCDHSyncWidth; + pMode->HTotal = pMode->HDisplay + pATI->LCDHBlankWidth; + + pMode->VSyncStart = pMode->VDisplay + + ATIDivide(pATI->LCDVSyncStart, VScan, 0, 0); + pMode->VSyncEnd = pMode->VSyncStart + + ATIDivide(pATI->LCDVSyncWidth, VScan, 0, 1); + pMode->VTotal = pMode->VDisplay + + ATIDivide(pATI->LCDVBlankWidth, VScan, 0, 0); + } + /* If not already done adjust horizontal timings */ if (!pMode->CrtcHAdjusted) { diff --git a/src/atimode.c b/src/atimode.c index d4554048..68c13426 100644 --- a/src/atimode.c +++ b/src/atimode.c @@ -528,46 +528,8 @@ ATIModeCalculate CARD32 lcd_index; int Index, ECPClock, MaxScalerClock; - /* Clobber mode timings */ - if (pATI->OptionPanelDisplay && (pATI->LCDPanelID >= 0) && - !pMode->CrtcHAdjusted && !pMode->CrtcVAdjusted && - (!pATI->OptionLCDSync || (pMode->type & M_T_BUILTIN))) - { - int VScan; - - pMode->Clock = pATI->LCDClock; - pMode->Flags &= ~(V_DBLSCAN | V_INTERLACE | V_CLKDIV2); - - /* - * Use doublescanning or multiscanning to get around vertical blending - * limitations. - */ - VScan = pATI->LCDVertical / pMode->VDisplay; - { - pMode->VScan = 0; - if (VScan > 1) - { - VScan = 2; - pMode->Flags |= V_DBLSCAN; - } - } - - pMode->HSyncStart = pMode->HDisplay + pATI->LCDHSyncStart; - pMode->HSyncEnd = pMode->HSyncStart + pATI->LCDHSyncWidth; - pMode->HTotal = pMode->HDisplay + pATI->LCDHBlankWidth; - - pMode->VSyncStart = pMode->VDisplay + - ATIDivide(pATI->LCDVSyncStart, VScan, 0, 0); - pMode->VSyncEnd = pMode->VSyncStart + - ATIDivide(pATI->LCDVSyncWidth, VScan, 0, 1); - pMode->VTotal = pMode->VDisplay + - ATIDivide(pATI->LCDVBlankWidth, VScan, 0, 0); - } - - { - /* Fill in Mach64 data */ - ATIMach64Calculate(pATI, pATIHW, pMode); - } + /* Fill in Mach64 data */ + ATIMach64Calculate(pATI, pATIHW, pMode); /* Set up LCD register values */ if (pATI->LCDPanelID >= 0) |