Skip to content

Commit 796ff50

Browse files
dhananjay-AMDsuperm1
authored andcommitted
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 <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Reviewed-by: Perry Yuan <[email protected]> Reviewed-by: Gautham R. Shenoy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mario Limonciello <[email protected]>
1 parent 73070a9 commit 796ff50

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,8 +1616,9 @@ static void amd_pstate_epp_reenable(struct amd_cpudata *cpudata)
16161616
wrmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, value);
16171617
} else {
16181618
perf_ctrls.max_perf = max_perf;
1619-
perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(cpudata->epp_cached);
16201619
cppc_set_perf(cpudata->cpu, &perf_ctrls);
1620+
perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(cpudata->epp_cached);
1621+
cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1);
16211622
}
16221623
}
16231624

@@ -1658,8 +1659,9 @@ static void amd_pstate_epp_offline(struct cpufreq_policy *policy)
16581659
} else {
16591660
perf_ctrls.desired_perf = 0;
16601661
perf_ctrls.max_perf = min_perf;
1661-
perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(HWP_EPP_BALANCE_POWERSAVE);
16621662
cppc_set_perf(cpudata->cpu, &perf_ctrls);
1663+
perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(HWP_EPP_BALANCE_POWERSAVE);
1664+
cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1);
16631665
}
16641666
mutex_unlock(&amd_pstate_limits_lock);
16651667
}

0 commit comments

Comments
 (0)