Commit 0a793b77 authored by Jon Smirl's avatar Jon Smirl Committed by Linus Torvalds

[PATCH] fbmon: horizontal frequency rounding fix

Fix rounding error when mode frequency is very close to monitor limit
Signed-off-by: default avatarJon Smirl <jonsmirl@gmail.com>
Acked-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4e4b7952
......@@ -1241,6 +1241,8 @@ int fb_validate_mode(const struct fb_var_screeninfo *var, struct fb_info *info)
vtotal *= 2;
hfreq = pixclock/htotal;
hfreq = (hfreq + 500) / 1000 * 1000;
vfreq = hfreq/vtotal;
return (vfreq < vfmin || vfreq > vfmax ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment