From e742aeb28c7d9d6e75932c408bcc7c44af52e303 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 19 Sep 2006 13:45:33 -0400 Subject: fix large negative refresh rates with mergedfb (Henry Zhao) fixes bug 6966 --- src/radeon_mergedfb.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/radeon_mergedfb.c b/src/radeon_mergedfb.c index 313dda24..6f3288f0 100644 --- a/src/radeon_mergedfb.c +++ b/src/radeon_mergedfb.c @@ -212,6 +212,12 @@ 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 * extension to allow selecting among a number of modes whose merged result * looks identical but consists of different modes for CRT1 and CRT2 -- cgit v1.2.3