mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
cpufreq: arm_scmi: Discover the power scale in performance protocol
Add mechanism to discover the power scale present in the performance protocol for all domains. Provide this information to Energy Model, which then can be checked in other frameworks, e.g. thermal. Suggested-by: Morten Rasmussen <morten.rasmussen@arm.com> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
This commit is contained in:
parent
76ea4d8eee
commit
f9b0498d29
1 changed files with 3 additions and 1 deletions
|
@ -125,6 +125,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
|
||||||
struct scmi_data *priv;
|
struct scmi_data *priv;
|
||||||
struct cpufreq_frequency_table *freq_table;
|
struct cpufreq_frequency_table *freq_table;
|
||||||
struct em_data_callback em_cb = EM_DATA_CB(scmi_get_cpu_power);
|
struct em_data_callback em_cb = EM_DATA_CB(scmi_get_cpu_power);
|
||||||
|
bool power_scale_mw;
|
||||||
|
|
||||||
cpu_dev = get_cpu_device(policy->cpu);
|
cpu_dev = get_cpu_device(policy->cpu);
|
||||||
if (!cpu_dev) {
|
if (!cpu_dev) {
|
||||||
|
@ -188,8 +189,9 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
|
||||||
policy->fast_switch_possible =
|
policy->fast_switch_possible =
|
||||||
handle->perf_ops->fast_switch_possible(handle, cpu_dev);
|
handle->perf_ops->fast_switch_possible(handle, cpu_dev);
|
||||||
|
|
||||||
|
power_scale_mw = handle->perf_ops->power_scale_mw_get(handle);
|
||||||
em_dev_register_perf_domain(cpu_dev, nr_opp, &em_cb, policy->cpus,
|
em_dev_register_perf_domain(cpu_dev, nr_opp, &em_cb, policy->cpus,
|
||||||
false);
|
power_scale_mw);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue