platform/x86/amd/pmf: Introduce option to disable Smart PC function in PMF
Subsystems (2)
cover platform/x86/amd/pmf: Introduce option to disable Smart PC function in PMF
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(-)
Signature · 1 line
2.52.0
PATCH 1/1 platform/x86/amd/pmf: Introduce option to disable Smart PC function in PMF
Signed-off-by Alexey Zagorodnikov <[email protected]>
--- drivers/platform/x86/amd/pmf/core.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
drivers/platform/x86/amd/pmf/core.c +14 -5
@@ -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 )) {
Signature · 1 line
2.52.0