]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/pm: Fix si_upload_smc_data (v3)
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 28 Aug 2025 15:11:06 +0000 (17:11 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 Sep 2025 19:55:10 +0000 (15:55 -0400)
commita43b2cec04b02743338aa78f837ee0bdf066a6d5
tree16f3a44fe0926d7c479a76af967d86a68f76389a
parent813d13524a3bdcc5f0253e06542440ca74c2653a
drm/amd/pm: Fix si_upload_smc_data (v3)

The si_upload_smc_data function uses si_write_smc_soft_register
to set some register values in the SMC, and expects the result
to be PPSMC_Result_OK which is 1.

The PPSMC_Result_OK / PPSMC_Result_Failed values are used for
checking the result of a command sent to the SMC.
However, the si_write_smc_soft_register actually doesn't send
any commands to the SMC and returns zero on success,
so this check was incorrect.

Fix that by not checking the return value, just like other
calls to si_write_smc_soft_register.

v3:
Additionally, when no display is plugged in, there is no need
to restrict MCLK switching, so program the registers to zero.

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>
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c