]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/pm: Disable ULV even if unsupported (v3)
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 28 Aug 2025 15:11:04 +0000 (17:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:31 +0000 (11:56 +0200)
[ Upstream commit 3a0c3a4035f995e1f993dfaf4d63dc19e9b4bc1c ]

Always send PPSMC_MSG_DisableULV to the SMC, even if ULV mode
is unsupported, to make sure it is properly turned off.

v3:
Simplify si_disable_ulv further.
Always check the return value of amdgpu_si_send_msg_to_smc.

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

index 52e4397d4a2a9dded6171a67988e7a6f2f6b8848..c17d567cf8bc5f1b14b266fb6ada59f908b93752 100644 (file)
@@ -5617,14 +5617,10 @@ static int si_populate_smc_t(struct amdgpu_device *adev,
 
 static int si_disable_ulv(struct amdgpu_device *adev)
 {
-       struct si_power_info *si_pi = si_get_pi(adev);
-       struct si_ulv_param *ulv = &si_pi->ulv;
+       PPSMC_Result r;
 
-       if (ulv->supported)
-               return (amdgpu_si_send_msg_to_smc(adev, PPSMC_MSG_DisableULV) == PPSMC_Result_OK) ?
-                       0 : -EINVAL;
-
-       return 0;
+       r = amdgpu_si_send_msg_to_smc(adev, PPSMC_MSG_DisableULV);
+       return (r == PPSMC_Result_OK) ? 0 : -EINVAL;
 }
 
 static bool si_is_state_ulv_compatible(struct amdgpu_device *adev,