Commit ed380353 authored by Timur Kristóf's avatar Timur Kristóf Committed by Alex Deucher
Browse files

drm/amd/pm: Disable MCLK switching with non-DC at 120 Hz+ (v2)



According to pp_pm_compute_clocks the non-DC display code
has "issues with mclk switching with refresh rates over 120 hz".
The workaround is to disable MCLK switching in this case.

Do the same for legacy DPM.

Fixes: 6ddbd37f ("drm/amd/pm: optimize the amdgpu_pm_compute_clocks() implementations")
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarTimur Kristóf <timur.kristof@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9003a074
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -66,6 +66,13 @@ u32 amdgpu_dpm_get_vblank_time(struct amdgpu_device *adev)
					(amdgpu_crtc->v_border * 2));

				vblank_time_us = vblank_in_pixels * 1000 / amdgpu_crtc->hw_mode.clock;

				/* we have issues with mclk switching with
				 * refresh rates over 120 hz on the non-DC code.
				 */
				if (drm_mode_vrefresh(&amdgpu_crtc->hw_mode) > 120)
					vblank_time_us = 0;

				break;
			}
		}