Skip to content

Commit 57a2b25

Browse files
dhananjay-AMDsuperm1
authored andcommitted
cpufreq/amd-pstate: Move the invocation of amd_pstate_update_perf()
amd_pstate_update_perf() should not be a part of shmem_set_epp() function, so move it to the amd_pstate_epp_update_limit() function, where it is needed. Signed-off-by: Dhananjay Ugwekar <[email protected]> Reviewed-by: Mario Limonciello <[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 16c977f commit 57a2b25

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,6 @@ static int shmem_set_epp(struct amd_cpudata *cpudata, u32 epp)
296296
int ret;
297297
struct cppc_perf_ctrls perf_ctrls;
298298

299-
amd_pstate_update_perf(cpudata, cpudata->min_limit_perf, 0U,
300-
cpudata->max_limit_perf, false);
301-
302299
perf_ctrls.energy_perf = epp;
303300
ret = cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1);
304301
if (ret) {
@@ -1600,6 +1597,10 @@ static int amd_pstate_epp_update_limit(struct cpufreq_policy *policy)
16001597
epp = 0;
16011598

16021599
WRITE_ONCE(cpudata->cppc_req_cached, value);
1600+
1601+
amd_pstate_update_perf(cpudata, cpudata->min_limit_perf, 0U,
1602+
cpudata->max_limit_perf, false);
1603+
16031604
return amd_pstate_set_epp(cpudata, epp);
16041605
}
16051606

0 commit comments

Comments
 (0)