summaryrefslogtreecommitdiff
path: root/src/atimach64.c
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsap7@yahoo.gr>2007-02-24 21:20:53 +0200
committerGeorge Sapountzis <gsap7@yahoo.gr>2007-02-25 11:38:39 +0200
commitbb226c9e7218d2a65c056fe74cb7eece0550670f (patch)
tree9ae15f73289773937c452cf8ff6e48dd0cf606c9 /src/atimach64.c
parent31c018ca4a18ce426b29006f103f56eee7f985fa (diff)
[mach64] Consolidate adjustments of mode timings, part 1.
Move LCD block from atimode.c to atimach64.c .
Diffstat (limited to 'src/atimach64.c')
-rw-r--r--src/atimach64.c36
1 files changed, 36 insertions, 0 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)
{