Message ID | 20250304152327.1561017-3-superm1@kernel.org (mailing list archive) |
---|---|
State | New |
Delegated to: | Mario Limonciello |
Headers | show |
Series | amd-pstate Dynamic EPP and raw EPP | expand |
On Tue, Mar 04, 2025 at 09:23:24AM -0600, Mario Limonciello wrote: > From: Mario Limonciello <mario.limonciello@amd.com> > > Add `amd_dynamic_epp=enable` and `amd_dynamic_epp=disable` to override > the kernel configuration option `CONFIG_X86_AMD_PSTATE_DYNAMIC_EPP` > locally. Even with this patch, the user can switch the dynamic_epp value via the sysfs file. However, it is useful in case the CONFIG_X86_AMD_PSTATE_DYNAMIC_EPP value is switched in the future. I suspect that the servers will prefer to have this feature disabled by default (they are always on AC power!) while the laptop/battery operated devices would prefer to have this option enabled by default. Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index fb8752b42ec85..1afe6d8ab09bb 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -392,6 +392,13 @@ disable Disable amd-pstate preferred core. + amd_dynamic_epp= + [X86] + disable + Disable amd-pstate dynamic EPP. + enable + Enable amd-pstate dynamic EPP. + amijoy.map= [HW,JOY] Amiga joystick support Map of devices attached to JOY0DAT and JOY1DAT Format: <a>,<b> diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst index 2e076650dc77c..8424e7119dd7e 100644 --- a/Documentation/admin-guide/pm/amd-pstate.rst +++ b/Documentation/admin-guide/pm/amd-pstate.rst @@ -438,6 +438,13 @@ For systems that support ``amd-pstate`` preferred core, the core rankings will always be advertised by the platform. But OS can choose to ignore that via the kernel parameter ``amd_prefcore=disable``. +``amd_dynamic_epp`` + +When AMD pstate is in auto mode, dynamic EPP will control whether the kernel +autonomously changes the EPP mode. The default is configured by +``CONFIG_X86_AMD_PSTATE_DYNAMIC_EPP`` but can be explicitly enabled with +``amd_pstate_epp=enable`` or disabled with ``amd_pstate_epp=disable``. + User Space Interface in ``sysfs`` - General =========================================== diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index f00fb4ba9f26e..9911808fe0bcf 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -1928,8 +1928,19 @@ static int __init amd_prefcore_param(char *str) return 0; } +static int __init amd_dynamic_epp_param(char *str) +{ + if (!strcmp(str, "disable")) + dynamic_epp = false; + if (!strcmp(str, "enable")) + dynamic_epp = true; + + return 0; +} + early_param("amd_pstate", amd_pstate_param); early_param("amd_prefcore", amd_prefcore_param); +early_param("amd_dynamic_epp", amd_dynamic_epp_param); MODULE_AUTHOR("Huang Rui <ray.huang@amd.com>"); MODULE_DESCRIPTION("AMD Processor P-state Frequency Driver");