xorg-x11-drv-intel/0001-sna-Avoid-clobbering-output-physical-size-with-xf86O.patch

48 lines
1.3 KiB
Diff
Raw Permalink Normal View History

2023-04-04 17:43:19 +00:00
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