[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>
This commit is contained in:
Jon Smirl 2005-07-27 11:46:03 -07:00 коммит произвёл Linus Torvalds
Родитель 4e4b7952cd
Коммит 0a793b77f7
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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 ||