]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/pm: Adjust si_upload_smc_data register programming (v3)
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 28 Aug 2025 15:11:07 +0000 (17:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:31 +0000 (11:56 +0200)
commit1ebcf6f1e548f01a120eb21a4ed998d1ec5393f3
tree49f2b4f133c8c75d0bb919e24caf569bb1d4de07
parent82963fb4eca9d4858f5c2fda77741575aa504903
drm/amd/pm: Adjust si_upload_smc_data register programming (v3)

[ Upstream commit ce025130127437dc884c84c254170e27b2ce9309 ]

Based on some comments in dm_pp_display_configuration
above the crtc_index and line_time fields, these values
are programmed to the SMC to work around an SMC hang
when it switches MCLK.

According to Alex, the Windows driver programs them to:
mclk_change_block_cp_min = 200 / line_time
mclk_change_block_cp_max = 100 / line_time
Let's use the same for the sake of consistency.

Previously we used the watermark values, but it seemed buggy
as the code was mixing up low/high and A/B watermarks, and
was not saving a low watermark value on DCE 6, so
mclk_change_block_cp_max would be always zero previously.

Split this change off from the previous si_upload_smc_data
to make it easier to bisect, in case it causes any issues.

Fixes: 841686df9f7d ("drm/amdgpu: add SI DPM support (v4)")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c