xf86-video-intel: src/intel_display.c

Chris Wilson ickle at kemper.freedesktop.org
Sat Sep 4 10:50:50 PDT 2010


 src/intel_display.c |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 00f6af2c8ec899258ffab60dc2d9d80c4d9daec8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Sep 4 18:45:11 2010 +0100

    display: Set MONITOR_EDID_COMPLETE_RAWDATA for large EDIDs
    
    Quoting Adam Jackson:
    
    "But the X driver looks like
    it never sets MONITOR_EDID_COMPLETE_RAWDATA, which means the X core
    doesn't know that any sections beyond the first are present, so it won't
    ever hand back more than 128 bytes to clients.  Boo."
    
    This patch is based on his.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/intel_display.c b/src/intel_display.c
index 4da2790..b3c8a7c 100644
--- a/src/intel_display.c
+++ b/src/intel_display.c
@@ -708,6 +708,7 @@ intel_output_attach_edid(xf86OutputPtr output)
 	drmModeConnectorPtr koutput = intel_output->mode_output;
 	struct intel_mode *mode = intel_output->mode;
 	drmModePropertyBlobPtr edid_blob = NULL;
+	xf86MonPtr mon = NULL;
 	int i;
 
 	/* look for an EDID property */
@@ -733,15 +734,16 @@ intel_output_attach_edid(xf86OutputPtr output)
 	}
 
 	if (edid_blob) {
-		xf86OutputSetEDID(output,
-				  xf86InterpretEDID(output->scrn->scrnIndex,
-						    edid_blob->data));
+		mon = xf86InterpretEDID(output->scrn->scrnIndex,
+					edid_blob->data);
+
+		if (mon && edid_blob->length > 128)
+			mon->flags |= MONITOR_EDID_COMPLETE_RAWDATA;
+
 		drmModeFreePropertyBlob(edid_blob);
-	} else {
-		xf86OutputSetEDID(output,
-				  xf86InterpretEDID(output->scrn->scrnIndex,
-						    NULL));
 	}
+
+	xf86OutputSetEDID(output, mon);
 }
 
 static DisplayModePtr


More information about the xorg-commit mailing list