]> git.ipfire.org Git - thirdparty/linux.git/commit
cpufreq: cppc: Update MIN_PERF/MAX_PERF in target callbacks
authorSumit Gupta <sumitg@nvidia.com>
Fri, 6 Feb 2026 14:26:56 +0000 (19:56 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 27 Feb 2026 19:50:42 +0000 (20:50 +0100)
commitea3db45ae476889a1ba0ab3617e6afdeeefbda3d
treea98931b7074bba7ba3b67dc1fdf02d0b2124664d
parent24ad4c6c136bdaa4c92c5c5948856752ce3e9f76
cpufreq: cppc: Update MIN_PERF/MAX_PERF in target callbacks

Update MIN_PERF and MAX_PERF registers from policy->min and policy->max
in the .target() and .fast_switch() callbacks. This allows controlling
performance bounds via standard scaling_min_freq and scaling_max_freq
sysfs interfaces.

Similar to intel_cpufreq which updates HWP min/max limits in .target(),
cppc_cpufreq now programs MIN_PERF/MAX_PERF along with DESIRED_PERF.
Since MIN_PERF/MAX_PERF can be updated even when auto_sel is disabled,
they are updated unconditionally.

Also program MIN_PERF/MAX_PERF in store_auto_select() when enabling
autonomous selection so the platform uses correct bounds immediately.

Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Link: https://patch.msgid.link/20260206142658.72583-6-sumitg@nvidia.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cppc_cpufreq.c