]> git.hungrycats.org Git - linux/commit
cpufreq/amd-pstate: Use "epp_default_dc" as default when dynamic_epp is disabled
authorK Prateek Nayak <kprateek.nayak@amd.com>
Fri, 8 May 2026 05:17:47 +0000 (05:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Sep 2026 11:36:19 +0000 (13:36 +0200)
commit9c178eba1542a9c9bc3b6cc6ad3f8602b76e4942
tree698dfe15ec5df280571f6d4853caf8748e87a467
parentbf897a1fa96cb99ec3bd21a57099b88ae73eb43e
cpufreq/amd-pstate: Use "epp_default_dc" as default when dynamic_epp is disabled

[ Upstream commit caa822d312be54e3fe1a3b52c887e0888e149c12 ]

If "dynamic_epp" is disabled, the driver initialization and the default
EPP selection from sysfs currently sets the EPP based on the power
supply state of the system at that time but there is no power supply
callbacks registered to toggle it when the power supply state changes.

This can lead to faster battery drain on platforms that start off while
being plugged to the wall but later move to battery power since the EPP
stays at AMD_CPPC_EPP_PERFORMANCE.

Use "epp_default_dc" as the default EPP selection when dynamic_epp is
disabled, restoring older behavior. On servers, this defaults to
AMD_CPPC_EPP_PERFORMANCE and on other platforms, it defaults to
AMD_CPPC_EPP_BALANCE_PERFORMANCE.

Fixes: e30ca6dd5345 ("cpufreq/amd-pstate: Add dynamic energy performance preference")
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://lore.kernel.org/r/20260508051748.10484-6-kprateek.nayak@amd.com
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/amd-pstate.c