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

Commit ef63f2b7 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
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>
parent 5461825e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
 * MSM architecture cpufreq driver
 *
 * Copyright (C) 2007 Google, Inc.
 * Copyright (c) 2007-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2007-2018, The Linux Foundation. All rights reserved.
 * Author: Mike A. Chan <mikechan@google.com>
 *
 * This software is licensed under the terms of the GNU General Public
@@ -63,8 +63,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;
}