mirror of
https://github.com/torvalds/linux.git
synced 2026-10-16 04:39:02 +02:00
Add a util layer to AMD PMF that exposes a minimal userspace interface via a character device for metrics monitoring and feature discovery. This creates /dev/amdpmf_interface with basic ioctl support to retrieve PMF metrics such as: * Power source and power slider position * Platform type, lid state, and user presence * Skin temperature and ambient light * BIOS input parameters (1-10) * Graphics workload metrics * CPU C-state residency (average and maximum) * Socket power consumption * Auto Mode: Automatic power profile switching based on system activity * Static Power Slider: User-selectable power profiles * Policy Builder (Smart PC): Action based policy management * Dynamic Power Slider AC: Adaptive power profiles when on AC power * Dynamic Power Slider DC: Adaptive power profiles when on battery The interface enables smoother integration with userspace tools such as AMD SystemDeck [1], which is widely used for monitoring and controlling power and thermal behavior on AMD platforms. These tools help designers keep major components within thermal limits to ensure proper operation and enhance overall system stability and reliability. The feature is gated behind the CONFIG_AMD_PMF_UTIL_SUPPORT Kconfig option, allowing it to be disabled if not needed. The implementation uses existing PMF infrastructure to populate data from the TA (Trusted Application) shared memory buffer. Link: https://docs.amd.com/v/u/en-US/68773_0.50 [1] Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://patch.msgid.link/20260609081044.2416731-2-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# AMD PMF Driver
|
|
#
|
|
|
|
config AMD_PMF
|
|
tristate "AMD Platform Management Framework"
|
|
depends on ACPI && PCI
|
|
depends on POWER_SUPPLY
|
|
depends on AMD_NODE
|
|
select ACPI_PLATFORM_PROFILE
|
|
depends on TEE && AMDTEE
|
|
depends on AMD_SFH_HID
|
|
depends on HAS_IOMEM
|
|
help
|
|
This driver provides support for the AMD Platform Management Framework.
|
|
The goal is to enhance end user experience by making AMD PCs smarter,
|
|
quiter, power efficient by adapting to user behavior and environment.
|
|
|
|
To compile this driver as a module, choose M here: the module will
|
|
be called amd_pmf.
|
|
|
|
config AMD_PMF_DEBUG
|
|
bool "PMF debug information"
|
|
depends on AMD_PMF
|
|
help
|
|
Enabling this option would give more debug information on the OEM fed
|
|
power setting values for each of the PMF feature. PMF driver gets this
|
|
information after evaluating a ACPI method and the information is stored
|
|
in the PMF config store.
|
|
|
|
Say Y here to enable more debug logs and Say N here if you are not sure.
|
|
|
|
config AMD_PMF_UTIL_SUPPORT
|
|
bool "AMD PMF Util layer support"
|
|
depends on AMD_PMF
|
|
help
|
|
Enabling this option provides a character device for userspace to capture
|
|
PMF features (Smart PC Builder, Auto Mode, Static Power Slider, Dynamic
|
|
Power Slider AC/DC) along with PMF metrics from the AMD PMF driver.
|
|
|
|
Say Y here to enable it and Say N here if you are not sure.
|