]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.15/drm-amd-display-preserve-original-aspect-ratio-in-cr.patch
Fixes for 5.15
[thirdparty/kernel/stable-queue.git] / queue-5.15 / drm-amd-display-preserve-original-aspect-ratio-in-cr.patch
1 From 327ec5dce7a70d5f742d5a096209c9bad1af47b1 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Tue, 30 Jan 2024 15:34:08 +0800
4 Subject: drm/amd/display: Preserve original aspect ratio in create stream
5
6 From: Tom Chung <chiahsuan.chung@amd.com>
7
8 [ Upstream commit 79f3e38f60e5b2416ba99804d83d22e69ae592a3 ]
9
10 [Why]
11 The original picture aspect ratio in mode struct may have chance be
12 overwritten with wrong aspect ratio data in create_stream_for_sink().
13 It will create a different VIC output and cause HDMI compliance test
14 failed.
15
16 [How]
17 Preserve the original picture aspect ratio data during create the
18 stream.
19
20 Cc: Mario Limonciello <mario.limonciello@amd.com>
21 Cc: Alex Deucher <alexander.deucher@amd.com>
22 Cc: stable@vger.kernel.org
23 Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
24 Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
25 Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
26 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
27 Signed-off-by: Sasha Levin <sashal@kernel.org>
28 ---
29 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
30 1 file changed, 2 insertions(+)
31
32 diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
33 index 9356decd14513..b7b8a2d77da67 100644
34 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
35 +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
36 @@ -6334,7 +6334,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
37 if (recalculate_timing) {
38 freesync_mode = get_highest_refresh_rate_mode(aconnector, false);
39 drm_mode_copy(&saved_mode, &mode);
40 + saved_mode.picture_aspect_ratio = mode.picture_aspect_ratio;
41 drm_mode_copy(&mode, freesync_mode);
42 + mode.picture_aspect_ratio = saved_mode.picture_aspect_ratio;
43 } else {
44 decide_crtc_timing_for_drm_display_mode(
45 &mode, preferred_mode, scale);
46 --
47 2.43.0
48