edid: Adjust rounding of max_clock

A simple hack to accommodate various EDID who have detailed modes that
exceed the EDID's max pixel clock. The pixel clock is only defined in
units of 10MHz and often appears as the maximum pixel code of the
detailed modes, rounded to the nearest 10MHz. Adjusting the max_clock to
include an extra 5MHz prevents the parser from rejecting the detailed
modes.

The kernel uses the same fuzz and by including it in X we can use the
same modes in X as for the console.

Fixes:

  Bug 23833 - X uses different refresh rate to that set by kernel module
  https://bugs.freedesktop.org/show_bug.cgi?id=23833

In the future, we will want to try harder to keep the KMS modes but at
the same time we need to apply the restrictions as specified by the
user's configuration, and need to fill in modes for fullscreen games on
fixed-mode panels.

Reported-and-tested-by: Fabio Pedretti <fabio.ped@libero.it>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 951605b466)
This commit is contained in:
Chris Wilson 2010-08-20 13:51:04 +01:00 committed by Julien Cristau
parent d5248f0364
commit f43e105ee8
1 changed files with 1 additions and 1 deletions

View File

@ -385,7 +385,7 @@ get_monitor_ranges(Uchar *c, struct monitor_ranges *r)
r->max_h = MAX_H;
r->max_clock = 0;
if(MAX_CLOCK != 0xff) /* is specified? */
r->max_clock = MAX_CLOCK * 10;
r->max_clock = MAX_CLOCK * 10 + 5;
if (HAVE_2ND_GTF) {
r->gtf_2nd_f = F_2ND_GTF;
r->gtf_2nd_c = C_2ND_GTF;