summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-08-20 13:51:04 +0100
committerJulien Cristau <jcristau@debian.org>2010-08-21 20:41:31 +0100
commitf43e105ee8741c8be49a602b08752f2390f094f7 (patch)
treeac5033ec0bd6166e2e963f049b112b79d2c52f28
parentd5248f036470150bd68148755b47abbbae3bfb33 (diff)
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 951605b4660290044fb238bcf1d6d9e498567e8c)
-rw-r--r--hw/xfree86/ddc/interpret_edid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index 12a52545e..f48ed5205 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -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;