summaryrefslogtreecommitdiff
path: root/source/x/x11/patch/xf86-video-intel/0001-sna-Avoid-clobbering-output-physical-size-with-xf86O.patch
blob: cb279a786f7ac5c56da13407458d52ff602b4ebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 09bf64d69d97172f22fe08eb495bf50f920ae9ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
Date: Tue, 31 May 2016 11:11:21 +0300
Subject: [PATCH] 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ä <ville.syrjala@linux.intel.com>
---
 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 10d33f2..57de410 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -3576,6 +3576,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;
@@ -3678,12 +3679,17 @@ skip_read:
 	}
 
 done:
+	output = sna_output->base;
+	old_mm_width = output->mm_width;
+	old_mm_height = output->mm_height;
 	sna_output_set_parsed_edid(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