platform/x86/amd/pmf: Added a module parameter to disable the Smart PC function
Subsystems (2)
PATCH 1/1 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 [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
--- drivers/platform/x86/amd/pmf/core.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
drivers/platform/x86/amd/pmf/core.c +13 -5
@@ -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 )) {
Signature · 1 line
2.52.0
Quoted 2 lines · Alexey Zagorodnikov
Addresses a low power limits issue on HP ZBook Ultra G1a [1]
No need to have the [1] in the subject IMV.
Quoted 6 lines
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 <[email protected]>---
LGTM though otherwise.
Quoted 39 lines
drivers/platform/x86/amd/pmf/core.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)drivers/platform/x86/amd/pmf/core.c +13
-5@@ -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 )) {
Ilpo Järvinen
maintainerQuoted 6 lines · Alexey Zagorodnikov
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.