Skip to content

Commit

Permalink
cpu-boost: Avoid boosting over user set max freq
Browse files Browse the repository at this point in the history
It was negating the user set max cpu freq and boosting over it if for example input_boost_freq > max_freq, so fix it

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
  • Loading branch information
franciscofranco authored and mylove90 committed Jan 25, 2024
1 parent e287485 commit 3d80f12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/cpufreq/cpu-boost.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ static int boost_adjust_notify(struct notifier_block *nb, unsigned long val,
if (!ib_min)
break;

ib_min = min(ib_min, policy->max);

pr_debug("CPU%u policy min before boost: %u kHz\n",
cpu, policy->min);
pr_debug("CPU%u boost min: %u kHz\n", cpu, ib_min);
Expand Down

0 comments on commit 3d80f12

Please sign in to comment.