summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-02-26 00:06:09 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-02-26 00:06:09 +0000
commit0534ead689d6be1336b9816d926ef3be9fc846f5 (patch)
treef7c4521e04d5f44aa4a1907372862fcc4960c242
parent856cef7c40e4bbd576b535780ac64ff400ff331e (diff)
drm/amd/display: Preserve original aspect ratio in create stream
From Tom Chung 482cda9e50dedda43695fe52410add03cc146a30 in linux-6.6.y/6.6.18 deb110292180cd501f6fde2a0178d65fcbcabb0c in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 9a3904921e1..9c2833b096a 100644
--- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6076,7 +6076,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
if (recalculate_timing) {
freesync_mode = get_highest_refresh_rate_mode(aconnector, false);
drm_mode_copy(&saved_mode, &mode);
+ saved_mode.picture_aspect_ratio = mode.picture_aspect_ratio;
drm_mode_copy(&mode, freesync_mode);
+ mode.picture_aspect_ratio = saved_mode.picture_aspect_ratio;
} else {
decide_crtc_timing_for_drm_display_mode(
&mode, preferred_mode, scale);