]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpufreq: loongson: Set .set_boost directly
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 23 Jan 2025 07:44:20 +0000 (13:14 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 7 Feb 2025 04:15:15 +0000 (09:45 +0530)
commit13e92357b6e875c4ad1a4f5edeb460717380e76a
tree13f5e63f4c78f79facac93b9390d5910550a4780
parentddef17bb869858eb610f34b681fccde9fbbe4539
cpufreq: loongson: Set .set_boost directly

The boost feature can be controlled at two levels currently, driver
level (applies to all policies) and per-policy.

Currently the driver enables driver level boost support from the
per-policy ->init() callback, which isn't really efficient as that gets
called for each policy and then there is online/offline path too where
this gets done unnecessarily.

Instead set the .set_boost field directly and always enable the boost
support. If a policy doesn't support boost feature, the core will not
enable it for that policy.

Keep the initial state of driver level boost to disabled and let the
user enable it if required as ideally the boost frequencies must be used
only when really required.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/loongson3_cpufreq.c