mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
cpuquiet: balanced governor requires cpufreq
The balanced governor relies on cpufreq for some of its decisions. Fail initialization if there are no cpufreq OPP tables available. Change-Id: I5d64215d56f50d5df52c1433208b1eb40440c812 Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/131437 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> Rebase-Id: R03bb471218a088a816a67232861759cba2b91f38
This commit is contained in:
committed by
Huang, Tao
parent
22a3f04881
commit
3f82668838
@@ -511,8 +511,14 @@ static int balanced_start(void)
|
||||
down_delay = msecs_to_jiffies(2000);
|
||||
|
||||
table = cpufreq_frequency_get_table(0);
|
||||
if (!table)
|
||||
return -EINVAL;
|
||||
|
||||
for (count = 0; table[count].frequency != CPUFREQ_TABLE_END; count++);
|
||||
|
||||
if (count < 4)
|
||||
return -EINVAL;
|
||||
|
||||
idle_top_freq = table[(count / 2) - 1].frequency;
|
||||
idle_bottom_freq = table[(count / 2) - 2].frequency;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user