From f40b7151dc3ab1767fe7d3bf40d1c700af355e0e Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 10 Feb 2023 14:35:37 +0000 Subject: [PATCH] drm/amd/display: Fix timing not changning when freesync video is enabled From Aurabindo Pillai f3056978934cf809c0ae70a22ac3af2a857e1a93 in linux-6.1.y/6.1.11 4b069553246f993c4221e382d0d0ae34f5ba730e in mainline linux --- sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++++++ 1 file changed, 7 insertions(+) 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 ad33dc8ffc8..4b9d6e1a524 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 @@ -8788,6 +8788,13 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm, if (!dm_old_crtc_state->stream) goto skip_modeset; + /* Unset freesync video if it was active before */ + if (dm_old_crtc_state->freesync_config.state == VRR_STATE_ACTIVE_FIXED) { + dm_new_crtc_state->freesync_config.state = VRR_STATE_INACTIVE; + dm_new_crtc_state->freesync_config.fixed_refresh_in_uhz = 0; + } + + /* Now check if we should set freesync video mode */ if (amdgpu_freesync_vid_mode && dm_new_crtc_state->stream && is_timing_unchanged_for_freesync(new_crtc_state, old_crtc_state)) { -- 2.20.1