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

Commit 96871e06 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Jonathan Avila
Browse files

qcom-cpufreq: Notify the current frequency to the topology driver



The topology driver keeps track of the current capacity of a CPU
and make it available via arch_scale_freq_capacity(). The PELT
load tracking in the scheduler and energy-aware task placement
are the clients of this API. Hence notify the new frequency to the
topology driver during frequency transition.

Change-Id: I6dae674ba3b9d4c745b3caff59b165215926d970
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: default avatarJonathan Avila <avilaj@codeaurora.org>
parent 2799dd51
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
 * MSM architecture cpufreq driver
 *
 * Copyright (C) 2007 Google, Inc.
 * Copyright (c) 2007-2017,2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2007-2019, The Linux Foundation. All rights reserved.
 * Author: Mike A. Chan <mikechan@google.com>
 *
 */
@@ -55,8 +55,11 @@ static int set_cpu_freq(struct cpufreq_policy *policy, unsigned int new_freq,
	rate = clk_round_rate(cpu_clk[policy->cpu], rate);
	ret = clk_set_rate(cpu_clk[policy->cpu], rate);
	cpufreq_freq_transition_end(policy, &freqs, ret);
	if (!ret)
	if (!ret) {
		arch_set_freq_scale(policy->related_cpus, new_freq,
				    policy->cpuinfo.max_freq);
		trace_cpu_frequency_switch_end(policy->cpu);
	}

	return ret;
}