drm/amd: Restore cached power limit during resume
commit ed4efe426a49729952b3dc05d20e33b94409bdd1 upstream. 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> (cherry picked from commit 26a609e053a6fc494403e95403bc6a2470383bec) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f5b7a94305
commit
20e6f7dd8a
@@ -1332,6 +1332,12 @@ static int smu_resume(void *handle)
|
||||
|
||||
adev->pm.dpm_enabled = true;
|
||||
|
||||
if (smu->current_power_limit) {
|
||||
ret = smu_set_power_limit(smu, smu->current_power_limit);
|
||||
if (ret && ret != -EOPNOTSUPP)
|
||||
return ret;
|
||||
}
|
||||
|
||||
dev_info(adev->dev, "SMU is resumed successfully!\n");
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user