]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function
authorAlexey Zagorodnikov <xglooom@gmail.com>
Wed, 21 Jan 2026 14:35:19 +0000 (19:35 +0500)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 26 Jan 2026 14:00:19 +0000 (16:00 +0200)
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
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>
drivers/platform/x86/amd/pmf/core.c

index bfc79905433e3b25a4465962fe318208e35f47a6..b9e5a2cf3aae88346a14c1b24cde26884fb537bd 100644 (file)
@@ -57,6 +57,10 @@ static bool force_load;
 module_param(force_load, bool, 0444);
 MODULE_PARM_DESC(force_load, "Force load this driver on supported older platforms (experimental)");
 
+static bool smart_pc_support = true;
+module_param(smart_pc_support, bool, 0444);
+MODULE_PARM_DESC(smart_pc_support, "Smart PC Support (default = true)");
+
 static struct device *pmf_device;
 
 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)
                dev_dbg(dev->dev, "SPS enabled and Platform Profiles registered\n");
        }
 
-       amd_pmf_init_smart_pc(dev);
-       if (dev->smart_pc_enabled) {
-               dev_dbg(dev->dev, "Smart PC Solution Enabled\n");
-               /* If Smart PC is enabled, no need to check for other features */
-               return;
+       if (smart_pc_support) {
+               amd_pmf_init_smart_pc(dev);
+               if (dev->smart_pc_enabled) {
+                       dev_dbg(dev->dev, "Smart PC Solution Enabled\n");
+                       /* If Smart PC is enabled, no need to check for other features */
+                       return;
+               }
+       } else {
+               dev->smart_pc_enabled = false;
        }
 
        if (is_apmf_func_supported(dev, APMF_FUNC_AUTO_MODE)) {