From: Jon Smirl <jonsmirl@gmail.com>

Fix rounding error when mode frequency is very close to monitor limit

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/video/fbmon.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN drivers/video/fbmon.c~fbmon-horizontal-frequency-rounding-fix drivers/video/fbmon.c
--- 25/drivers/video/fbmon.c~fbmon-horizontal-frequency-rounding-fix	Wed Jul 13 15:38:24 2005
+++ 25-akpm/drivers/video/fbmon.c	Wed Jul 13 15:38:24 2005
@@ -1241,6 +1241,8 @@ int fb_validate_mode(const struct fb_var
 		vtotal *= 2;
 
 	hfreq = pixclock/htotal;
+	hfreq = (hfreq + 500) / 1000 * 1000;
+
 	vfreq = hfreq/vtotal;
 
 	return (vfreq < vfmin || vfreq > vfmax || 
_