xserver: Branch 'master'

Eric Anholt anholt at kemper.freedesktop.org
Mon Sep 24 21:09:09 PDT 2007


 hw/xfree86/ddc/edid.h |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
diff-tree 988f446fe00ac2b92c484a4440613dd82191eadd (from 27ad5d74c20f01516a1bff73be283f8982fcf0fe)
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Sep 24 20:23:35 2007 -0700

    [EDID] Ignore reserved bits in deciding monitor vs detailed timing descriptor.
    
    Even though they're defined to zero by the spec, we've seen an EDID block
    where the (empty) ASCII strings were stuffed in a byte early, leading to the
    descriptor being considered a detailed timing instead.

diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h
index 0b6a15a..4487273 100644
--- a/hw/xfree86/ddc/edid.h
+++ b/hw/xfree86/ddc/edid.h
@@ -190,7 +190,14 @@
 
 
 /* EDID Ver. >= 1.2 */
-#define _IS_MONITOR_DESC(x) (x[0] == 0 && x[1] == 0 && x[2] == 0 && x[4] == 0)
+/**
+ * Returns true if the pointer is the start of a monitor descriptor block
+ * instead of a detailed timing descriptor.
+ *
+ * Checking the reserved pad fields for zeroes fails on some monitors with
+ * broken empty ASCII strings.  Only the first two bytes are reliable.
+ */
+#define _IS_MONITOR_DESC(x) (x[0] == 0 && x[1] == 0)
 #define IS_MONITOR_DESC _IS_MONITOR_DESC(c)
 #define _PIXEL_CLOCK(x) (x[0] + (x[1] << 8)) * 10000
 #define PIXEL_CLOCK _PIXEL_CLOCK(c)


More information about the xorg-commit mailing list