From 088090646d24dbb41cb2bd53c134db4544cc6921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Tue, 31 May 2016 11:11:21 +0300 Subject: [PATCH xf86-video-intel] sna: Avoid clobbering output physical size with xf86OutputSetEDID() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ville Syrjälä --- src/sna/sna_display.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 98fb8afd9758..38095b0a90db 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -3476,6 +3476,7 @@ sna_output_attach_edid(xf86OutputPtr output) { struct sna *sna = to_sna(output->scrn); struct sna_output *sna_output = output->driver_private; + unsigned old_mm_width, old_mm_height; struct drm_mode_get_blob blob; void *old, *raw = NULL; xf86MonPtr mon = NULL; @@ -3578,12 +3579,17 @@ skip_read: } done: + output = sna_output->base; + old_mm_width = output->mm_width; + old_mm_height = output->mm_height; xf86OutputSetEDID(output, mon); if (raw) { sna_output->edid_raw = raw; sna_output->edid_len = blob.length; sna_output->edid_blob_id = blob.blob_id; } + output->mm_width = old_mm_width; + output->mm_height = old_mm_height; } static void -- 2.7.4