Validating modes should be more fuzzy

Adam Jackson ajax at nwnk.net
Thu Aug 23 07:07:54 PDT 2007


On Wed, 2007-08-22 at 15:14 +0200, Matthias Hopf wrote:
> While testing the current Xserver + drivers it occurred to us that a
> mode wasn't accepted though it looked perfectly sane. It turned out,
> that its refresh rate (60.01fps) was *just* above the nominal maximum
> refresh rate of the monitor (60fps).
> 
> As PLLs cannot be programmed exactly to any given value, there should be
> a certain fuzziness in mode validation, like the attached patch will do
> (in this case +/- 0.5Hz for vrefresh, +/- 0.5kHz for hrefresh, +/-
> 0.5MHz for clock).
> 
> I chose these values arbitrarily, and it should be discussed what to use
> here (absolute/relative? How much?). I would suggest going for 0.5
> absolute like in this patch (because people tend to specify integer
> values for limits), or 0.1% to 1% relative.
> 
> If nobody cares, I will commit it the way it is.

The classic mode selection code has some tolerance already.  In
xf86str.h:

#define SYNC_TOLERANCE          0.01    /* 1 percent */

Which seems to have served us well.  So I'd prefer to either have the
new mode code use the same fuzz, or else change it in both places.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20070823/f5c6beca/attachment.pgp>


More information about the xorg mailing list