diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-10 14:50:47 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-10 14:50:47 +0100 |
commit | 005075de9d20fe7c2b9a6e184c912559929710ad (patch) | |
tree | b5b6a52ab07cba758574c71b136bda588cc998e4 /src | |
parent | 3d760c9b32776bf2f1acde9256388769a9c5a398 (diff) |
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@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_display.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 0ea2de5d..db4cb38c 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)) |