mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
cpufreq: interactive: make sure governor is ready for task boost
enqueue_task() may call cpufreq_task_boost() before governor is initial,
so enable_sem and speedchange_task is not initial, then do not boost.
Fixes: 2d367d61e8 (cpufreq: interactive: introduce boost cpufreq interface for task)
Change-Id: I68ec027299fa46e7749efd43b44af6e476753ac5
Signed-off-by: Liang Chen <cl@rock-chips.com>
This commit is contained in:
@@ -1417,6 +1417,9 @@ void cpufreq_task_boost(int cpu, unsigned long util)
|
||||
struct interactive_policy *ipolicy = pcpu->ipolicy;
|
||||
unsigned long cap, min_util;
|
||||
|
||||
if (!speedchange_task)
|
||||
return;
|
||||
|
||||
if (!down_read_trylock(&pcpu->enable_sem))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user