linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/8] Enhanced autonomous selection and improvements
@ 2025-11-05 11:38 Sumit Gupta
  2025-11-05 11:38 ` [PATCH v4 1/8] cpufreq: CPPC: Add generic helpers for sysfs show/store Sumit Gupta
                   ` (9 more replies)
  0 siblings, 10 replies; 42+ messages in thread
From: Sumit Gupta @ 2025-11-05 11:38 UTC (permalink / raw)
  To: rafael, viresh.kumar, lenb, robert.moore, corbet, pierre.gondois,
	zhenglifeng1, rdunlap, ray.huang, gautham.shenoy,
	mario.limonciello, perry.yuan, ionela.voinescu, zhanjie9,
	linux-pm, linux-acpi, linux-doc, acpica-devel, linux-kernel
  Cc: linux-tegra, treding, jonathanh, vsethi, ksitaraman, sanjayc,
	nhartman, bbasu, sumitg

This patch series enhances the ACPI CPPC CPUFREQ driver with
comprehensive support for autonomous performance selection, expanded
runtime control interfaces and improvements.

It adds support for below:
- Expose sysfs to read/write the Minimum/Maximum Performance Registers
  using frequency (kHz), with internal conversion to performance values.
  Also, update the policy min/max accordingly.
    /sys/.../cpufreq/policy*/min_perf and max_perf

- Expose sysfs to read/write the Performance Limited Register.
    /sys/.../cpufreq/policy*/perf_limited

- When toggling autonomous selection, synchronize the policy limits
  by updating the policy min/max.

- System-wide autonomous mode configuration via 'auto_sel_mode' boot
  parameter. Mode can be switched dynamically on individual CPUs.

- Generic sysfs helper functions to reduce code duplication.

The patches are grouped as below:
- Patch 1, 2 & 3: Improvements. Can be applied independently.
- Patch 4: Sysfs to update min/max_perf. Can be applied independently.
- Patch 5: Sysfs to update perf_limited. Can be applied independently.
- Patch 6: add sysfs documentation. Depends on 'Patch 4 and 5'.
- Patch 7: sync policy min/max with auto_select. Depends on 'Patch 4'.
- Patch 8: Boot Parameter Support. Depends on 'Patch 4 and 7'.

---
v3[3] -> v4:
- patch1: changed param order for show/store and moved them above use.
- patch3: write epp and auto_sel registers independently. 
- patch4:
  - move mutex define outside macro.
  - return EOPNOTSUPP error also to the caller to handle appropriately.
  - change min/max_perf sysfs to accept freq, convert to perf internally
- patch6:
  - update dates and corrected names in description.
  - remove dependency of min/max_perf on auto_sel.
  - add info about highest_perf and lowest_perf interfaces.
  - update info about min/max_perf interface to read/write freq in kHz.

v2[2] -> v3:
- drop changes to rename exisiting APIs.
- add new 'patch 1' with generic helpers for sysfs show/store.
- used guard(mutex)() in place of mutex_lock/unlock.
- update kernel-parameters text to 'enable if supported by hardware'.
- disable auto_sel for all cpus if one fails in auto_sel_mode.
- use min/max_perf values if set from bootloader.
- general code improvements, error handling and reduced redundancies.

v1[1] -> v2:
- Move CPC register set sysfs from acpi_cppc to cpufreq directory.
- No sysfs to set auto_sel and epp. They were merged from diff series.
- Remove 'cppc_cpufreq_epp' instance of the 'cppc_cpufreq' driver.
- Synchronize perf_min/max with policy min/max.
- Update policy min/max Toggling auto_select.
- add sysfs to update the perf_limited register.

Sumit Gupta (8):
  cpufreq: CPPC: Add generic helpers for sysfs show/store
  ACPI: CPPC: Add cppc_get_perf() API to read performance controls
  ACPI: CPPC: extend APIs to support auto_sel and epp
  ACPI: CPPC: add APIs and sysfs interface for min/max_perf
  ACPI: CPPC: add APIs and sysfs interface for perf_limited register
  cpufreq: CPPC: Add sysfs for min/max_perf and perf_limited
  cpufreq: CPPC: update policy min/max when toggling auto_select
  cpufreq: CPPC: add autonomous mode boot parameter support

 .../ABI/testing/sysfs-devices-system-cpu      |  46 ++
 .../admin-guide/kernel-parameters.txt         |  12 +
 drivers/acpi/cppc_acpi.c                      | 196 +++++++-
 drivers/cpufreq/cppc_cpufreq.c                | 425 ++++++++++++++++--
 include/acpi/cppc_acpi.h                      |  39 +-
 5 files changed, 676 insertions(+), 42 deletions(-)

[1] https://lore.kernel.org/lkml/20250211103737.447704-1-sumitg@nvidia.com/
[2] https://lore.kernel.org/lkml/20250823200121.1320197-1-sumitg@nvidia.com/
[3] https://lore.kernel.org/lkml/20251001150104.1275188-1-sumitg@nvidia.com/

-- 
2.34.1


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

end of thread, other threads:[~2025-12-09 18:10 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 11:38 [PATCH v4 0/8] Enhanced autonomous selection and improvements Sumit Gupta
2025-11-05 11:38 ` [PATCH v4 1/8] cpufreq: CPPC: Add generic helpers for sysfs show/store Sumit Gupta
2025-11-10 10:56   ` Viresh Kumar
2025-11-11 11:20     ` Sumit Gupta
2025-11-05 11:38 ` [PATCH v4 2/8] ACPI: CPPC: Add cppc_get_perf() API to read performance controls Sumit Gupta
2025-11-27 14:53   ` Pierre Gondois
2025-11-28 14:01     ` Sumit Gupta
2025-11-28 15:05       ` Pierre Gondois
2025-11-05 11:38 ` [PATCH v4 3/8] ACPI: CPPC: extend APIs to support auto_sel and epp Sumit Gupta
2025-11-12 15:02   ` Ionela Voinescu
2025-11-18  9:17     ` Sumit Gupta
2025-11-27 14:54   ` Pierre Gondois
2025-12-09 18:10     ` Sumit Gupta
2025-11-05 11:38 ` [PATCH v4 4/8] ACPI: CPPC: add APIs and sysfs interface for min/max_perf Sumit Gupta
2025-11-06 10:30   ` kernel test robot
2025-11-07 10:00     ` Sumit Gupta
2025-11-07 20:08       ` Rafael J. Wysocki
2025-11-11 11:06         ` Sumit Gupta
2025-11-13 10:56   ` Ionela Voinescu
2025-11-18  9:34     ` Sumit Gupta
2025-11-27 14:54   ` Pierre Gondois
2025-12-09 16:38     ` Sumit Gupta
2025-11-05 11:38 ` [PATCH v4 5/8] ACPI: CPPC: add APIs and sysfs interface for perf_limited register Sumit Gupta
2025-11-13 11:35   ` Ionela Voinescu
2025-11-18 10:20     ` Sumit Gupta
2025-11-27 14:54   ` Pierre Gondois
2025-12-09 17:22     ` Sumit Gupta
2025-11-05 11:38 ` [PATCH v4 6/8] cpufreq: CPPC: Add sysfs for min/max_perf and perf_limited Sumit Gupta
2025-11-13 12:41   ` Ionela Voinescu
2025-11-18 10:46     ` Sumit Gupta
2025-11-05 11:38 ` [PATCH v4 7/8] cpufreq: CPPC: update policy min/max when toggling auto_select Sumit Gupta
2025-11-27 14:53   ` Pierre Gondois
2025-11-28 14:08     ` Sumit Gupta
2025-11-05 11:38 ` [PATCH v4 8/8] cpufreq: CPPC: add autonomous mode boot parameter support Sumit Gupta
2025-11-13 15:15   ` Ionela Voinescu
2025-11-26 13:32     ` Sumit Gupta
2025-11-27 14:53   ` Pierre Gondois
2025-11-28 14:29     ` Sumit Gupta
2025-11-28 15:05       ` Pierre Gondois
2025-12-01 14:09         ` Sumit Gupta
2025-11-10 11:00 ` [PATCH v4 0/8] Enhanced autonomous selection and improvements Viresh Kumar
2025-11-18  8:45 ` Jie Zhan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).