40 lines
1.5 KiB
Diff
40 lines
1.5 KiB
Diff
From c5eadae39ccdf6bada95c834147e285e445b12ad Mon Sep 17 00:00:00 2001
|
|
From: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
|
|
Date: Wed, 23 Oct 2024 10:21:10 +0000
|
|
Subject: cpufreq/amd-pstate: Call cppc_set_epp_perf in the reenable function
|
|
|
|
The EPP value being set in perf_ctrls.energy_perf is not being propagated
|
|
to the shared memory, fix that.
|
|
|
|
Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
|
|
Reviewed-by: Perry Yuan <perry.yuan@amd.com>
|
|
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
|
|
---
|
|
drivers/cpufreq/amd-pstate.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/cpufreq/amd-pstate.c
|
|
+++ b/drivers/cpufreq/amd-pstate.c
|
|
@@ -1646,8 +1646,9 @@ static void amd_pstate_epp_reenable(stru
|
|
wrmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, value);
|
|
} else {
|
|
perf_ctrls.max_perf = max_perf;
|
|
- perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(cpudata->epp_cached);
|
|
cppc_set_perf(cpudata->cpu, &perf_ctrls);
|
|
+ perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(cpudata->epp_cached);
|
|
+ cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1);
|
|
}
|
|
}
|
|
|
|
@@ -1688,8 +1689,9 @@ static void amd_pstate_epp_offline(struc
|
|
} else {
|
|
perf_ctrls.desired_perf = 0;
|
|
perf_ctrls.max_perf = min_perf;
|
|
- perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(HWP_EPP_BALANCE_POWERSAVE);
|
|
cppc_set_perf(cpudata->cpu, &perf_ctrls);
|
|
+ perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(HWP_EPP_BALANCE_POWERSAVE);
|
|
+ cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1);
|
|
}
|
|
mutex_unlock(&amd_pstate_limits_lock);
|
|
}
|