[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:
parent
4e4b7952cd
commit
0a793b77f7
|
@ -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 ||
|
||||
|
|
Loading…
Reference in a new issue