* [PATCH 0/1] platform/x86/amd/pmf: Introduce option to disable Smart PC function in PMF
@ 2026-01-17 19:36 Alexey Zagorodnikov
2026-01-17 19:36 ` [PATCH 1/1] " Alexey Zagorodnikov
0 siblings, 1 reply; 6+ messages in thread
From: Alexey Zagorodnikov @ 2026-01-17 19:36 UTC (permalink / raw)
To: platform-driver-x86
This patch introduces an option to disable Smart PC function in amd_pmf driver.
Sometimes, the vendor firmware may contain bugs or other unwanted behaviours in the power management domain.
This option allows the user to manually disable Smart PC power management and fall back to another strategy.
Alexey Zagorodnikov (1):
platform/x86/amd/pmf: Introduce option to disable Smart PC function in
PMF
drivers/platform/x86/amd/pmf/core.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
--
2.52.0
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/1] platform/x86/amd/pmf: Introduce option to disable Smart PC function in PMF 2026-01-17 19:36 [PATCH 0/1] platform/x86/amd/pmf: Introduce option to disable Smart PC function in PMF Alexey Zagorodnikov @ 2026-01-17 19:36 ` Alexey Zagorodnikov 0 siblings, 0 replies; 6+ messages in thread From: Alexey Zagorodnikov @ 2026-01-17 19:36 UTC (permalink / raw) To: platform-driver-x86 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] 6+ messages in thread
* [PATCH 0/1] platform/x86/amd/pmf: Introduce option to disable Smart PC function in PMF
@ 2026-01-17 20:08 Alexey Zagorodnikov
2026-01-17 20:08 ` [PATCH 1/1] " Alexey Zagorodnikov
0 siblings, 1 reply; 6+ messages in thread
From: Alexey Zagorodnikov @ 2026-01-17 20:08 UTC (permalink / raw)
To: platform-driver-x86
Cc: Alexey Zagorodnikov, Shyam Sundar S K, Hans de Goede,
Ilpo Järvinen, linux-kernel
This patch introduces an option to disable Smart PC function in amd_pmf driver.
Sometimes, the vendor firmware may contain bugs or other unwanted behaviours in the power management domain.
This option allows the user to manually disable Smart PC power management and fall back to another strategy.
Alexey Zagorodnikov (1):
platform/x86/amd/pmf: Introduce option to disable Smart PC function in
PMF
drivers/platform/x86/amd/pmf/core.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
--
2.52.0
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/1] platform/x86/amd/pmf: Introduce option to disable Smart PC function in PMF 2026-01-17 20:08 [PATCH 0/1] " Alexey Zagorodnikov @ 2026-01-17 20:08 ` Alexey Zagorodnikov 2026-01-18 15:20 ` Shyam Sundar S K 0 siblings, 1 reply; 6+ messages in thread From: Alexey Zagorodnikov @ 2026-01-17 20:08 UTC (permalink / raw) To: platform-driver-x86 Cc: Alexey Zagorodnikov, Shyam Sundar S K, Hans de Goede, Ilpo Järvinen, linux-kernel 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] 6+ messages in thread
* Re: [PATCH 1/1] platform/x86/amd/pmf: Introduce option to disable Smart PC function in PMF 2026-01-17 20:08 ` [PATCH 1/1] " Alexey Zagorodnikov @ 2026-01-18 15:20 ` Shyam Sundar S K 2026-01-18 17:58 ` Alexey Zagorodnikov 0 siblings, 1 reply; 6+ messages in thread From: Shyam Sundar S K @ 2026-01-18 15:20 UTC (permalink / raw) To: Alexey Zagorodnikov, platform-driver-x86 Cc: Hans de Goede, Ilpo Järvinen, linux-kernel On 1/18/2026 01:38, Alexey Zagorodnikov wrote: > Signed-off-by: Alexey Zagorodnikov <xglooom@gmail.com> Please include the context in the commit message instead of the cover letter. Additionally, if there are any bug reports or issue tracker entries (e.g., Bugzilla) documenting the problem this addresses, please reference them to provide justification for the change. Thanks, Shyam > --- > 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)) { ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] platform/x86/amd/pmf: Introduce option to disable Smart PC function in PMF 2026-01-18 15:20 ` Shyam Sundar S K @ 2026-01-18 17:58 ` Alexey Zagorodnikov 2026-01-19 10:13 ` Ilpo Järvinen 0 siblings, 1 reply; 6+ messages in thread From: Alexey Zagorodnikov @ 2026-01-18 17:58 UTC (permalink / raw) To: Shyam Sundar S K, platform-driver-x86 Cc: Hans de Goede, Ilpo Järvinen, linux-kernel Sorry for the inconvenience, it is my first time :) Originally bugreport here https://gitlab.freedesktop.org/drm/amd/-/issues/4868 But it turned out to be not a real bug, but rather a feature of the firmware, which in my case is not desirable. Would nice to have a toggle to disable, instead of completely blacklist module. Should I send v2 patch with a new message? On 1/18/26 20:20, Shyam Sundar S K wrote: > > On 1/18/2026 01:38, Alexey Zagorodnikov wrote: >> Signed-off-by: Alexey Zagorodnikov <xglooom@gmail.com> > Please include the context in the commit message instead of the cover > letter. Additionally, if there are any bug reports or issue tracker > entries (e.g., Bugzilla) documenting the problem this addresses, > please reference them to provide justification for the change. > > Thanks, > Shyam > >> --- >> 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)) { > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] platform/x86/amd/pmf: Introduce option to disable Smart PC function in PMF 2026-01-18 17:58 ` Alexey Zagorodnikov @ 2026-01-19 10:13 ` Ilpo Järvinen 0 siblings, 0 replies; 6+ messages in thread From: Ilpo Järvinen @ 2026-01-19 10:13 UTC (permalink / raw) To: Alexey Zagorodnikov Cc: Shyam Sundar S K, platform-driver-x86, Hans de Goede, LKML On Sun, 18 Jan 2026, Alexey Zagorodnikov wrote: > Sorry for the inconvenience, it is my first time :) > > Originally bugreport here https://gitlab.freedesktop.org/drm/amd/-/issues/4868 When the issue is reported in some tracker, the usual custom is to add a Link tag to the changelog so it will be recorded with the change into the kernel history. -- i. > But it turned out to be not a real bug, but rather a feature of the firmware, > which in my case is not desirable. Would nice to have a toggle to disable, > instead of completely blacklist module. > > Should I send v2 patch with a new message? > > On 1/18/26 20:20, Shyam Sundar S K wrote: > > > > On 1/18/2026 01:38, Alexey Zagorodnikov wrote: > > > Signed-off-by: Alexey Zagorodnikov <xglooom@gmail.com> > > Please include the context in the commit message instead of the cover > > letter. Additionally, if there are any bug reports or issue tracker > > entries (e.g., Bugzilla) documenting the problem this addresses, > > please reference them to provide justification for the change. > > > > Thanks, > > Shyam > > > > > --- > > > 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)) { > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-01-19 10:13 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-01-17 19:36 [PATCH 0/1] platform/x86/amd/pmf: Introduce option to disable Smart PC function in PMF Alexey Zagorodnikov 2026-01-17 19:36 ` [PATCH 1/1] " Alexey Zagorodnikov -- strict thread matches above, loose matches on Subject: below -- 2026-01-17 20:08 [PATCH 0/1] " Alexey Zagorodnikov 2026-01-17 20:08 ` [PATCH 1/1] " Alexey Zagorodnikov 2026-01-18 15:20 ` Shyam Sundar S K 2026-01-18 17:58 ` Alexey Zagorodnikov 2026-01-19 10:13 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox