drm/amd/pm: restore user PPT limits after GPU reset

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 <kevinyang.wang@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Yang Wang 2026-07-31 06:07:20 +08:00 committed by Alex Deucher
parent 534e172b88
commit cf9fa4d4d0

View File

@ -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"
@ -994,7 +995,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);