Skip to content

Commit 8164a14

Browse files
iglooomij-intel
authored andcommitted
platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function
Addresses a low power limits issue on HP ZBook Ultra G1a. If vendor firmware capped APU power limits with 3rd-party AC adapters, the user can disable the Smart PC function via the module parameter Link: https://gitlab.freedesktop.org/drm/amd/-/issues/4868 [1] Signed-off-by: Alexey Zagorodnikov <xglooom@gmail.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/20260121143519.12318-1-xglooom@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent 7c9aa38 commit 8164a14

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

  • drivers/platform/x86/amd/pmf

drivers/platform/x86/amd/pmf/core.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ static bool force_load;
5757
module_param(force_load, bool, 0444);
5858
MODULE_PARM_DESC(force_load, "Force load this driver on supported older platforms (experimental)");
5959

60+
static bool smart_pc_support = true;
61+
module_param(smart_pc_support, bool, 0444);
62+
MODULE_PARM_DESC(smart_pc_support, "Smart PC Support (default = true)");
63+
6064
static struct device *pmf_device;
6165

6266
static int amd_pmf_pwr_src_notify_call(struct notifier_block *nb, unsigned long event, void *data)
@@ -493,11 +497,15 @@ static void amd_pmf_init_features(struct amd_pmf_dev *dev)
493497
dev_dbg(dev->dev, "SPS enabled and Platform Profiles registered\n");
494498
}
495499

496-
amd_pmf_init_smart_pc(dev);
497-
if (dev->smart_pc_enabled) {
498-
dev_dbg(dev->dev, "Smart PC Solution Enabled\n");
499-
/* If Smart PC is enabled, no need to check for other features */
500-
return;
500+
if (smart_pc_support) {
501+
amd_pmf_init_smart_pc(dev);
502+
if (dev->smart_pc_enabled) {
503+
dev_dbg(dev->dev, "Smart PC Solution Enabled\n");
504+
/* If Smart PC is enabled, no need to check for other features */
505+
return;
506+
}
507+
} else {
508+
dev->smart_pc_enabled = false;
501509
}
502510

503511
if (is_apmf_func_supported(dev, APMF_FUNC_AUTO_MODE)) {

0 commit comments

Comments
 (0)