[PATCH 4/4] drm/amd/pm: restore user PPT limits after GPU reset

Yang Wang <[email protected]> Fri, 31 Jul 2026 11:10:22 +0800
Newsgroups org.freedesktop.lists.amd-gfx
Message-ID <2df05c6292b039bc894807f28befe9c180d476d9.1785467079.git.kevinyang.wang@amd.com>
GPU reset reinitializes PMFW and reloads the platform power table. The
saved user policy remains valid, but suspend-only restore does not run
because adev->in_suspend is clear.

Restore the active PPT policy from SMU late initialization while the
device is in reset recovery. Route each value through the common range
validation and ASIC setter before updating PMFW.

Signed-off-by: Yang Wang <[email protected]>
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 43d5dd7dce7e..bfe2c0bf426d 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -28,6 +28,7 @@
 #include <linux/reboot.h>
 
 #include "amdgpu.h"
+#include "amdgpu_reset.h"
 #include "amdgpu_smu.h"
 #include "smu_internal.h"
 #include "atom.h"
@@ -996,7 +997,7 @@ static int smu_late_init(struct amdgpu_ip_block *ip_block)
 		return ret;
 	}
 
-	if (adev->in_suspend)
+	if (adev->in_suspend || amdgpu_reset_in_recovery(adev))
 		smu_restore_ppt_limits(smu, false);
 	smu_restore_dpm_user_profile(smu);
 
-- 
2.54.0