xf86-video-intel: src/sna/sna_display.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Jun 10 07:06:57 PDT 2013


 src/sna/sna_display.c |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 005075de9d20fe7c2b9a6e184c912559929710ad
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jun 10 14:50:47 2013 +0100

    sna: Keep the cached EDID if it hasn't changed
    
    Rather than reparsing the EDID each time we probe the modes, if the
    property hasn't changed keep it.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 0ea2de5..db4cb38 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -1814,7 +1814,6 @@ sna_output_detect(xf86OutputPtr output)
 		conn.count_encoders = 0;
 		conn.count_props = 0;
 		if (drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_GETCONNECTOR, &conn)) {
-			ErrorF("err = %d\n", errno);
 			sna_output->num_modes = min(old_count, sna_output->num_modes);
 			break;
 		}
@@ -1880,8 +1879,21 @@ sna_output_attach_edid(xf86OutputPtr output)
 	blob.length = sna_output->edid_len;
 
 	blob.blob_id = sna_output->prop_values[sna_output->edid_idx];
-	if (blob.blob_id == sna_output->edid_blob_id)
+	if (blob.blob_id == sna_output->edid_blob_id) {
+		if (output->MonInfo) {
+			/* XXX the property keeps on disappearing... */
+			RRChangeOutputProperty(output->randr_output,
+					       MakeAtom("EDID", strlen("EDID"), TRUE),
+					       XA_INTEGER, 8, PropModeReplace,
+					       sna_output->edid_len,
+					       sna_output->edid_raw,
+					       FALSE, TRUE);
+
+			return;
+		}
+
 		goto skip_read;
+	}
 
 	blob.data = (uintptr_t)raw;
 	if (drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_GETPROPBLOB, &blob))


More information about the xorg-commit mailing list