diff options
author | Henry Zhao <henry.zhao@sun.com> | 2006-10-15 17:12:06 -0400 |
---|---|---|
committer | Alex Deucher <alex@t41p.(none)> | 2006-10-15 17:12:06 -0400 |
commit | 831fc4a009841f68fe161b6e0db5b212d7d8079b (patch) | |
tree | 2b15f49763e49ed1d43f83d8845975cc6bea9c08 /src | |
parent | 5425be996692425e57884e5a4c159fc79510e89f (diff) |
fix bug 6966 (Henry Zhao, Shem Multinymous)
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon_mergedfb.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/radeon_mergedfb.c b/src/radeon_mergedfb.c index 3e64e940..94ac942a 100644 --- a/src/radeon_mergedfb.c +++ b/src/radeon_mergedfb.c @@ -211,18 +211,14 @@ RADEONCopyModeNLink(ScrnInfoPtr pScrn, DisplayModePtr dest, 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)) || |