xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Mon Oct 16 00:13:01 EEST 2006


 src/radeon_mergedfb.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

New commits:
diff-tree 831fc4a009841f68fe161b6e0db5b212d7d8079b (from 5425be996692425e57884e5a4c159fc79510e89f)
Author: Henry Zhao <henry.zhao at sun.com>
Date:   Sun Oct 15 17:12:06 2006 -0400

    fix bug 6966 (Henry Zhao, Shem Multinymous)

diff --git a/src/radeon_mergedfb.c b/src/radeon_mergedfb.c
index 3e64e94..94ac942 100644
--- a/src/radeon_mergedfb.c
+++ b/src/radeon_mergedfb.c
@@ -211,18 +211,14 @@ RADEONCopyModeNLink(ScrnInfoPtr pScrn, D
     mode->VSyncEnd += dy;
     mode->VTotal += dy;
 
-    /* This is needed for not generating negative refesh rates in xrandr with the
-       faked DotClock below
-     */
-    if (!(mode->VRefresh))
-        mode->VRefresh = mode->Clock * 1000.0 / mode->HTotal / mode->VTotal;
-
-     /* Provide a sophisticated fake DotClock in order to trick the vidmode
+     /* Provide a fake VRefresh/DotClock in order to trick the vidmode
       * extension to allow selecting among a number of modes whose merged result
       * looks identical but consists of different modes for CRT1 and CRT2
       */
-    mode->Clock = (((i->Clock >> 3) + i->HTotal) << 16) | ((j->Clock >> 2) + j->HTotal);
-    mode->Clock ^= ((i->VTotal << 19) | (j->VTotal << 3));
+    mode->VRefresh = (i->Clock * 1000.0 / i->HTotal / i->VTotal) * 100 +
+	(j->Clock * 1000.0 / j->HTotal / j->VTotal);
+
+    mode->Clock = (int)(mode->VRefresh * 0.001 * mode->HTotal * mode->VTotal);
 
     if( ((mode->HDisplay * ((pScrn->bitsPerPixel + 7) / 8) * mode->VDisplay) > 
 	(pScrn->videoRam * 1024)) ||



More information about the xorg-commit mailing list