* Monitor failing mode validation in fb_validate_mode()
@ 2005-04-25 17:03 Jon Smirl
2005-04-25 18:00 ` Jon Smirl
0 siblings, 1 reply; 2+ messages in thread
From: Jon Smirl @ 2005-04-25 17:03 UTC (permalink / raw)
To: Benjamin Herrenschmidt, fbdev
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.
--
Jon Smirl
jonsmirl@gmail.com
-------------------------------------------------------
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_id\x14396&op=click
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Monitor failing mode validation in fb_validate_mode()
2005-04-25 17:03 Monitor failing mode validation in fb_validate_mode() Jon Smirl
@ 2005-04-25 18:00 ` Jon Smirl
0 siblings, 0 replies; 2+ messages in thread
From: Jon Smirl @ 2005-04-25 18:00 UTC (permalink / raw)
To: Benjamin Herrenschmidt, fbdev
This fixes the problem for me, it rounds hfreq to nearest KHz and
preserves hard dot clock limit.
===== fbmon.c 1.22 vs edited =====
--- 1.22/drivers/video/fbmon.c 2005-03-31 06:06:52 -05:00
+++ edited/fbmon.c 2005-04-25 13:58:13 -04:00
@@ -1242,6 +1242,8 @@
vtotal *= 2;
hfreq = pixclock/htotal;
+ hfreq = (hfreq + 500) / 1000 * 1000;
+
vfreq = hfreq/vtotal;
return (vfreq < vfmin || vfreq > vfmax ||
--
Jon Smirl
jonsmirl@gmail.com
-------------------------------------------------------
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_id\x14396&op=click
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-25 18:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-25 17:03 Monitor failing mode validation in fb_validate_mode() Jon Smirl
2005-04-25 18:00 ` Jon Smirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).