Skip to content

Commit 26a609e

Browse files
superm1alexdeucher
authored andcommitted
drm/amd: Restore cached power limit during resume
The power limit will be cached in smu->current_power_limit but if the ASIC goes into S3 this value won't be restored. Restore the value during SMU resume. Acked-by: Alex Deucher <alexander.deucher@amd.com> Link: https://lore.kernel.org/r/20250725031222.3015095-2-superm1@kernel.org Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 8e3967a commit 26a609e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,6 +2226,12 @@ static int smu_resume(struct amdgpu_ip_block *ip_block)
22262226

22272227
adev->pm.dpm_enabled = true;
22282228

2229+
if (smu->current_power_limit) {
2230+
ret = smu_set_power_limit(smu, smu->current_power_limit);
2231+
if (ret && ret != -EOPNOTSUPP)
2232+
return ret;
2233+
}
2234+
22292235
dev_info(adev->dev, "SMU is resumed successfully!\n");
22302236

22312237
return 0;

0 commit comments

Comments
 (0)