Commit 26a609e0 authored by Mario Limonciello's avatar Mario Limonciello Committed by Alex Deucher
Browse files

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: default avatarAlex Deucher <alexander.deucher@amd.com>
Link: https://lore.kernel.org/r/20250725031222.3015095-2-superm1@kernel.org


Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8e3967a7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2226,6 +2226,12 @@ static int smu_resume(struct amdgpu_ip_block *ip_block)

	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;