From ca111eed553213e1f3bc047c360976dd516d54d8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 30 Oct 2015 15:53:06 +0000 Subject: [PATCH] sna: Always refresh the blob property before reading Ensure that the property value for the EDID is current before retreiving the blob. Reported-by: Rui Tiago Matos Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92728 Signed-off-by: Chris Wilson --- src/sna/sna_display.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 5cacedc..e52843e 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -3240,6 +3240,13 @@ sna_output_attach_edid(xf86OutputPtr output) if (sna_output->edid_idx == -1) return; + /* Always refresh the blob as the kernel may randomly update the + * id even if the contents of the blob doesn't change, and a + * request for the stale id will return nothing. + */ + if (sna_output->update_properties) + update_properties(sna, sna_output); + raw = sna_output->edid_raw; blob.length = sna_output->edid_len; @@ -3352,6 +3359,9 @@ sna_output_attach_tile(xf86OutputPtr output) if (id == -1) goto out; + if (sna_output->update_properties) + update_properties(sna, sna_output); + VG_CLEAR(blob); blob.blob_id = sna_output->prop_values[id]; blob.length = 0; -- 2.6.2