diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2011-03-30 12:22:43 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2011-03-30 14:22:54 +0200 |
commit | 04297d435b87e3d04a427ac8ef33d314727220e6 (patch) | |
tree | 07a24b022266c5febe12cf5a9746cca169e0607a /src | |
parent | c5ca599361c87ec816db92d4f9841143f8601934 (diff) |
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 <thellstrom@vmware.com>
Reviewed-by: Alan Hourihane <alanh@vmware.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vmwaremodes.c | 9 |
1 files changed, 3 insertions, 6 deletions
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); } |