drm/amd/display: Preserve original aspect ratio in create stream
authorjsg <jsg@openbsd.org>
Mon, 26 Feb 2024 00:06:08 +0000 (00:06 +0000)
committerjsg <jsg@openbsd.org>
Mon, 26 Feb 2024 00:06:08 +0000 (00:06 +0000)
From Tom Chung
482cda9e50dedda43695fe52410add03cc146a30 in linux-6.6.y/6.6.18
deb110292180cd501f6fde2a0178d65fcbcabb0c in mainline linux

sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 9a39049..9c2833b 100644 (file)
@@ -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);