xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Wed Mar 28 19:24:22 EEST 2007


 hw/xfree86/ddc/edid_modes.c      |   13 +++++++++++++
 hw/xfree86/modes/xf86EdidModes.c |   13 +++++++++++++
 2 files changed, 26 insertions(+)

New commits:
diff-tree 5ba4d9eedf1b4ce4795bf910cd184872e2d9b3fc (from 85220446359a75ea2c359b418b4051c04eea739c)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date:   Wed Mar 28 12:03:19 2007 -0400

    Refuse to create tiny modes from EDID detailed timing.

diff --git a/hw/xfree86/ddc/edid_modes.c b/hw/xfree86/ddc/edid_modes.c
index cfc8ddc..926bc89 100644
--- a/hw/xfree86/ddc/edid_modes.c
+++ b/hw/xfree86/ddc/edid_modes.c
@@ -107,6 +107,19 @@ DDCModeFromDetailedTiming(int scrnIndex,
 {
     DisplayModePtr Mode;
 
+    /*
+     * Refuse to create modes that are insufficiently large.  64 is a random
+     * number, maybe the spec says something about what the minimum is.  In
+     * particular I see this frequently with _old_ EDID, 1.0 or so, so maybe
+     * our parser is just being too aggresive there.
+     */
+    if (timing->h_active < 64 || timing->v_active < 64) {
+	xf86DrvMsg(scrnIndex, X_INFO,
+		   "%s: Ignoring tiny %dx%d mode\n", __func__,
+		   timing->h_active, timing->v_active);
+	return NULL;
+    }
+
     /* We don't do stereo */
     if (timing->stereo) {
         xf86DrvMsg(scrnIndex, X_INFO,
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index c4cf687..7a8ec19 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -197,6 +197,19 @@ DDCModeFromDetailedTiming(int scrnIndex,
 {
     DisplayModePtr Mode;
 
+    /*
+     * Refuse to create modes that are insufficiently large.  64 is a random
+     * number, maybe the spec says something about what the minimum is.  In
+     * particular I see this frequently with _old_ EDID, 1.0 or so, so maybe
+     * our parser is just being too aggresive there.
+     */
+    if (timing->h_active < 64 || timing->v_active < 64) {
+	xf86DrvMsg(scrnIndex, X_INFO,
+		   "%s: Ignoring tiny %dx%d mode\n", __func__,
+		   timing->h_active, timing->v_active);
+	return NULL;
+    }
+
     /* We don't do stereo */
     if (timing->stereo) {
         xf86DrvMsg(scrnIndex, X_INFO,



More information about the xorg-commit mailing list