Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH v3 0/2] cpufreq: CPPC: add autonomous mode boot parameter support
@ 2026-05-15 12:26 Sumit Gupta
  2026-05-15 12:26 ` [PATCH v3 1/2] cpufreq: CPPC: Set CPPC Enable register in cpu_init Sumit Gupta
  2026-05-15 12:26 ` [PATCH v3 2/2] cpufreq: CPPC: add autonomous mode boot parameter support Sumit Gupta
  0 siblings, 2 replies; 3+ messages in thread
From: Sumit Gupta @ 2026-05-15 12:26 UTC (permalink / raw)
  To: rafael, viresh.kumar, pierre.gondois, ionela.voinescu,
	zhenglifeng1, zhanjie9, corbet, skhan, rdunlap, mario.limonciello,
	linux-pm, linux-doc, linux-kernel
  Cc: linux-tegra, treding, jonathanh, vsethi, ksitaraman, sanjayc,
	mochs, bbasu, sumitg

This series adds a kernel boot parameter 'cppc_cpufreq.auto_sel_mode'
to enable CPPC autonomous performance selection on all CPUs at system
startup, avoiding per-CPU sysfs scripting at every boot.

When autonomous mode is enabled, the hardware automatically adjusts
CPU performance based on workload demands using Energy Performance
Preference (EPP) hints.

Patch 1: sets CPPC Enable Register for both OS-driven and autonomous
CPPC control modes. It can be applied independently of patch 2.

Patch 2: adds the auto_sel_mode boot parameter with two modes:
  - performance (or 1): override EPP to performance preference (0x0)
  - default_epp (or 2): preserve EPP value programmed by BIOS/firmware

Patch 2 depends on Pierre's series [3] ("cpufreq: Set policy->min and
max as real QoS constraints") so that policy->min/max set during
cppc_cpufreq_cpu_init() are not overridden by cpufreq_set_policy().

v2[2] -> v3:
- Split cppc_set_enable() into a separate patch (1/2).
- Change auto_sel_mode to accept EPP mode (string or numeric).
- Drop clamp on desired_perf; initialize it to max_perf as a starting hint.
- cppc_set_perf() failure during autonomous setup is non-fatal.
- cppc_set_auto_sel() failure: fall back to OS-driven mode.
- Documentation: list 'performance' and 'default_epp' modes as per code.
- Removed Randy Dunlap's reviewed-by from documentation as some change.

Sumit Gupta (2):
  cpufreq: CPPC: Set CPPC Enable register in cpu_init
  cpufreq: CPPC: add autonomous mode boot parameter support

 .../admin-guide/kernel-parameters.txt         |  16 +++
 drivers/cpufreq/cppc_cpufreq.c                | 130 +++++++++++++++++-
 2 files changed, 141 insertions(+), 5 deletions(-)

[1] v1: https://lore.kernel.org/lkml/20260317151053.2361475-1-sumitg@nvidia.com/
[2] v2: https://lore.kernel.org/lkml/20260424201814.230071-1-sumitg@nvidia.com/ 
[3] https://lore.kernel.org/lkml/20260511135538.522653-1-pierre.gondois@arm.com/

-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-15 12:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-15 12:26 [PATCH v3 0/2] cpufreq: CPPC: add autonomous mode boot parameter support Sumit Gupta
2026-05-15 12:26 ` [PATCH v3 1/2] cpufreq: CPPC: Set CPPC Enable register in cpu_init Sumit Gupta
2026-05-15 12:26 ` [PATCH v3 2/2] cpufreq: CPPC: add autonomous mode boot parameter support Sumit Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox