aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@gmail.com>2005-07-27 11:46:03 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 16:26:18 -0700
commit0a793b77f786022bd0fef1a18142c1b9be9e421d (patch)
tree3a1c92ad2728db09f465eb32f7e31ccbb483d381 /drivers
parent4e4b7952cd34af4dd78e012265d4bc858db6adf3 (diff)
[PATCH] fbmon: horizontal frequency rounding fix
Fix rounding error when mode frequency is very close to monitor limit Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Acked-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbmon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
index 6cd1976548d..c2718bb9494 100644
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -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 ||