Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00319840 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

cpufreq: qcom-hw: Update freq_scale from fast_switch path



The freq_scale maintained by the topology driver needs to be
updated when the frequency is transitioned. Without this,
the current capacity of a CPU metric gets broken in the scheduler.

The current code calls arch_set_freq_scale() from the target_index
method but not from the fast_switch method. Fix this.

Change-Id: I92cafba9ffd4a70c8a06ed54e4e410336de4d453
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 93df147c
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -137,15 +137,14 @@ static unsigned int
qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy,
			    unsigned int target_freq)
{
	void __iomem *perf_state_reg = policy->driver_data +
					offsets[REG_PERF_STATE];
	int index;

	index = policy->cached_resolved_idx;
	if (index < 0)
		return 0;

	writel_relaxed(index, perf_state_reg);
	if (qcom_cpufreq_hw_target_index(policy, index))
		return 0;

	return policy->freq_table[index].frequency;
}