Monitor failing mode validation in fb_validate_mode()
I have a monitor that in DDC reports that it supports:
VESA 1024x768-75
The timing from modesdb.c
/* 15 1024x768-75 VESA */
{ NULL, 75, 1024, 768, 12690, 176, 16, 28, 1, 96, 3,Now multiply out the bandwidth:
1000000000/12690*1000 / (1024 +176 + 16 + 96)
gives
60.062 KHz
From DDC the monitor also reports it's bandwidth:
Monitor Operating Limits: From EDID
H: 30-60KHz V: 50-75Hz DCLK: 80MHz
fb_validate_mode() then fails to validate this mode because 60.062Khz is greater than 60KHz
I checked and this isn't a round off problem. For the bandwidth to multiply out to below 60KHz the dot clock would need to be 12704 instead of 12690.
What is the right fix for this? Maybe truncate (or round) hfreq to the nearest KHz before doing the bandwidth comparison in the bottom of fb_validate_mode()?
The dot clock is still well withing range, 78802000 dclkmax 80000000, only the horizontal frequency is a little bit out. Dot clock is probably the hard limit and shouldn't be adjusted.
Signature · 9 lines
Jon Smirl [email protected] ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
This fixes the problem for me, it rounds hfreq to nearest KHz and preserves hard dot clock limit.
===== fbmon.c 1.22 vs edited =====
fbmon.c 2005-04-25 13:58:13 -04:00 renamed from drivers/video/fbmon.c 2005-03-31 06:06:52 -05:00 +2 -0
@@ -1242,6 +1242,8 @@ vtotal *= 2; hfreq = pixclock/htotal; + hfreq = (hfreq + 500) / 1000 * 1000; + vfreq = hfreq/vtotal; return (vfreq < vfmin || vfreq > vfmax ||
Signature · 9 lines
Jon Smirl [email protected] ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click