From 04297d435b87e3d04a427ac8ef33d314727220e6 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Wed, 30 Mar 2011 12:22:43 +0200 Subject: vmwlegacy: Fix up default mode VRefresh anc Clock calculation The VRefresh value was a factor 1000 too high. Calculate clock based on vrefresh and resolution. Signed-off-by: Thomas Hellstrom Reviewed-by: Alan Hourihane --- src/vmwaremodes.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/vmwaremodes.c b/src/vmwaremodes.c index 5386b17..6df977d 100644 --- a/src/vmwaremodes.c +++ b/src/vmwaremodes.c @@ -120,10 +120,6 @@ vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight) dynamic.HSyncStart = dynamic.HDisplay + 1; dynamic.HSyncEnd = dynamic.HSyncStart + 1; dynamic.HTotal = dynamic.HSyncEnd * 5 / 4; - if (monitor->nHsync > 0) - dynamic.Clock = dynamic.HTotal * monitor->hsync[0].lo; - else - dynamic.Clock = 75000; dynamic.VDisplay = dheight; dynamic.VSyncStart = dynamic.VDisplay + 1; dynamic.VSyncEnd = dynamic.VSyncStart + 1; @@ -131,8 +127,9 @@ vmwareAddDefaultMode(ScrnInfoPtr pScrn, uint32 dwidth, uint32 dheight) if (monitor->nVrefresh > 0) dynamic.VRefresh = monitor->vrefresh[0].lo; else - dynamic.VRefresh = 60000; - + dynamic.VRefresh = 60; + dynamic.Clock = dynamic.VRefresh * dynamic.VTotal * + dynamic.HTotal / 1000; mode = xf86DuplicateMode(&dynamic); modes = xf86ModesAdd(modes, mode); } -- cgit v1.2.3