* [PATCH 1/1] platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function
@ 2026-01-19 20:20 Alexey Zagorodnikov
2026-01-19 21:00 ` Mario Limonciello
0 siblings, 1 reply; 5+ messages in thread
From: Alexey Zagorodnikov @ 2026-01-19 20:20 UTC (permalink / raw)
To: platform-driver-x86
Cc: Alexey Zagorodnikov, Shyam Sundar S K, Hans de Goede,
Ilpo Järvinen, linux-kernel
Addresses a low power limits issue on HP ZBook Ultra G1a
https://gitlab.freedesktop.org/drm/amd/-/issues/4868
If vendor firmware capped APU power limits with 3rd-party AC adapters,
the user can disable the Smart PC function via the module parameter
Signed-off-by: Alexey Zagorodnikov <xglooom@gmail.com>
---
drivers/platform/x86/amd/pmf/core.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c
index 8fc293c9c5380..00a4fc899c727 100644
--- a/drivers/platform/x86/amd/pmf/core.c
+++ b/drivers/platform/x86/amd/pmf/core.c
@@ -53,6 +53,11 @@ static bool force_load;
module_param(force_load, bool, 0444);
MODULE_PARM_DESC(force_load, "Force load this driver on supported older platforms (experimental)");
+/* Force to disable Smart PC Solution */
+static bool disable_smart_pc;
+module_param(disable_smart_pc, bool, 0444);
+MODULE_PARM_DESC(disable_smart_pc, "Disable Smart PC Solution");
+
static int amd_pmf_pwr_src_notify_call(struct notifier_block *nb, unsigned long event, void *data)
{
struct amd_pmf_dev *pmf = container_of(nb, struct amd_pmf_dev, pwr_src_notifier);
@@ -362,11 +367,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 (disable_smart_pc) {
+ dev->smart_pc_enabled = false;
+ } else {
+ 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 (is_apmf_func_supported(dev, APMF_FUNC_AUTO_MODE)) {
--
2.52.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function
2026-01-19 20:20 Alexey Zagorodnikov
@ 2026-01-19 21:00 ` Mario Limonciello
0 siblings, 0 replies; 5+ messages in thread
From: Mario Limonciello @ 2026-01-19 21:00 UTC (permalink / raw)
To: Alexey Zagorodnikov, platform-driver-x86
Cc: Shyam Sundar S K, Hans de Goede, Ilpo Järvinen, linux-kernel
On 1/19/2026 2:20 PM, Alexey Zagorodnikov wrote:
> Addresses a low power limits issue on HP ZBook Ultra G1a
> https://gitlab.freedesktop.org/drm/amd/-/issues/4868
>
> If vendor firmware capped APU power limits with 3rd-party AC adapters,
> the user can disable the Smart PC function via the module parameter
>
> Signed-off-by: Alexey Zagorodnikov <xglooom@gmail.com>
You should use a tag instead for "Link:". It would look like this
(assuming rest of commit text was OK):
Addresses a low power limits issue on HP ZBook Ultra G1a [1].
.
.
.
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/4868 [1]
Signed-off-by: Foo Bar <foo@bar.com>
> ---
> drivers/platform/x86/amd/pmf/core.c | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c
> index 8fc293c9c5380..00a4fc899c727 100644
> --- a/drivers/platform/x86/amd/pmf/core.c
> +++ b/drivers/platform/x86/amd/pmf/core.c
> @@ -53,6 +53,11 @@ static bool force_load;
> module_param(force_load, bool, 0444);
> MODULE_PARM_DESC(force_load, "Force load this driver on supported older platforms (experimental)");
>
> +/* Force to disable Smart PC Solution */
> +static bool disable_smart_pc;
> +module_param(disable_smart_pc, bool, 0444);
> +MODULE_PARM_DESC(disable_smart_pc, "Disable Smart PC Solution");
Totally a nit/preference thing but I would think this is more logical:
static bool smart_pc = 1;
module_param(disable_smart_pc, bool, 0444);
MODULE_PARM_DESC(disable_smart_pc, "Smart PC Support");
Then the code reads the common flow more directly
if (smart_pc)
//probe
else
dev->smart_pc = false;
> +
> static int amd_pmf_pwr_src_notify_call(struct notifier_block *nb, unsigned long event, void *data)
> {
> struct amd_pmf_dev *pmf = container_of(nb, struct amd_pmf_dev, pwr_src_notifier);
> @@ -362,11 +367,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 (disable_smart_pc) {
> + dev->smart_pc_enabled = false;
> + } else {
> + 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 (is_apmf_func_supported(dev, APMF_FUNC_AUTO_MODE)) {
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function
@ 2026-01-21 14:35 Alexey Zagorodnikov
2026-01-21 18:34 ` Mario Limonciello
2026-01-26 14:30 ` Ilpo Järvinen
0 siblings, 2 replies; 5+ messages in thread
From: Alexey Zagorodnikov @ 2026-01-21 14:35 UTC (permalink / raw)
To: platform-driver-x86
Cc: mario.limonciello, Alexey Zagorodnikov, Shyam Sundar S K,
Hans de Goede, Ilpo Järvinen, linux-kernel
Addresses a low power limits issue on HP ZBook Ultra G1a [1]
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>
---
drivers/platform/x86/amd/pmf/core.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c
index 8fc293c9c5380..ee7b3adc63a02 100644
--- a/drivers/platform/x86/amd/pmf/core.c
+++ b/drivers/platform/x86/amd/pmf/core.c
@@ -53,6 +53,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 int amd_pmf_pwr_src_notify_call(struct notifier_block *nb, unsigned long event, void *data)
{
struct amd_pmf_dev *pmf = container_of(nb, struct amd_pmf_dev, pwr_src_notifier);
@@ -362,11 +366,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)) {
--
2.52.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function
2026-01-21 14:35 [PATCH 1/1] platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function Alexey Zagorodnikov
@ 2026-01-21 18:34 ` Mario Limonciello
2026-01-26 14:30 ` Ilpo Järvinen
1 sibling, 0 replies; 5+ messages in thread
From: Mario Limonciello @ 2026-01-21 18:34 UTC (permalink / raw)
To: Alexey Zagorodnikov, platform-driver-x86
Cc: Shyam Sundar S K, Hans de Goede, Ilpo Järvinen, linux-kernel
On 1/21/26 8:35 AM, Alexey Zagorodnikov wrote:
> Addresses a low power limits issue on HP ZBook Ultra G1a [1]
>
No need to have the [1] in the subject IMV.
> 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>
> ---
LGTM though otherwise.
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
> drivers/platform/x86/amd/pmf/core.c | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c
> index 8fc293c9c5380..ee7b3adc63a02 100644
> --- a/drivers/platform/x86/amd/pmf/core.c
> +++ b/drivers/platform/x86/amd/pmf/core.c
> @@ -53,6 +53,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 int amd_pmf_pwr_src_notify_call(struct notifier_block *nb, unsigned long event, void *data)
> {
> struct amd_pmf_dev *pmf = container_of(nb, struct amd_pmf_dev, pwr_src_notifier);
> @@ -362,11 +366,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)) {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function
2026-01-21 14:35 [PATCH 1/1] platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function Alexey Zagorodnikov
2026-01-21 18:34 ` Mario Limonciello
@ 2026-01-26 14:30 ` Ilpo Järvinen
1 sibling, 0 replies; 5+ messages in thread
From: Ilpo Järvinen @ 2026-01-26 14:30 UTC (permalink / raw)
To: platform-driver-x86, Alexey Zagorodnikov
Cc: mario.limonciello, Shyam Sundar S K, Hans de Goede, linux-kernel
On Wed, 21 Jan 2026 19:35:19 +0500, Alexey Zagorodnikov wrote:
> Addresses a low power limits issue on HP ZBook Ultra G1a [1]
>
> If vendor firmware capped APU power limits with 3rd-party AC adapters,
> the user can disable the Smart PC function via the module parameter
>
>
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function
commit: 8164a14b15008579801ba6ba3ae00d37ecc310e5
--
i.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-26 14:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-21 14:35 [PATCH 1/1] platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function Alexey Zagorodnikov
2026-01-21 18:34 ` Mario Limonciello
2026-01-26 14:30 ` Ilpo Järvinen
-- strict thread matches above, loose matches on Subject: below --
2026-01-19 20:20 Alexey Zagorodnikov
2026-01-19 21:00 ` Mario Limonciello
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox