REPOST PATCH: freq_rounding.patch

Started by Jon Smirl on Jun 23, 2005

Subsystems (2)

Maintainers (2)

open the first message on its own page

Message details and related content
What is the status of this patch? It hasn't made it into linus' tree yet.

-- 
Jon Smirl
jonsmirl@gmail.com

#Fix rounding error when mode frequency is very close to monitor limit
#Signed-off-by: Jon Smirl [off-list ref]
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -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 ||


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help