Skip to content

Commit

Permalink
PM / devfreq: tegra30: Make CPUFreq notifier to take into account boo…
Browse files Browse the repository at this point in the history
…sting

We're taking into account both HW memory-accesses + CPU activity based on
current CPU's frequency. For memory-accesses there is a kind of hysteresis
in a form of "boosting" which is managed by the tegra30-devfreq driver.
If current HW memory activity is higher than activity judged based of the
CPU's frequency, then there is no need to schedule cpufreq_update_work
because the result of the work will be a NO-OP. And thus,
tegra_actmon_cpufreq_contribution() should return 0, meaning that at the
moment CPU frequency doesn't contribute anything to the final decision
about required memory clock rate.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
  • Loading branch information
Dmitry Osipenko authored and Chanwoo Choi committed Apr 14, 2020
1 parent 8f3d9f3 commit d20ab9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/devfreq/tegra30-devfreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ tegra_actmon_cpufreq_contribution(struct tegra_devfreq *tegra,

static_cpu_emc_freq = actmon_cpu_to_emc_rate(tegra, cpu_freq);

if (dev_freq >= static_cpu_emc_freq)
if (dev_freq + actmon_dev->boost_freq >= static_cpu_emc_freq)
return 0;

return static_cpu_emc_freq;
Expand Down

0 comments on commit d20ab9b

Please sign in to comment.