diff options
| author | Shyam Sundar S K <[email protected]> | 2023-01-25 09:59:32 +0000 |
|---|---|---|
| committer | Hans de Goede <[email protected]> | 2023-01-30 13:30:57 +0000 |
| commit | c5258d39fc4cbed37e20945715e7eb102f26d65b (patch) | |
| tree | d8806b0a7229972f13d82c2b042fbd7a17304b04 /drivers/platform/x86/amd/pmf/auto-mode.c | |
| parent | platform/x86: thinkpad_acpi: Fix profile modes on Intel platforms (diff) | |
| download | kernel-c5258d39fc4cbed37e20945715e7eb102f26d65b.tar.gz kernel-c5258d39fc4cbed37e20945715e7eb102f26d65b.zip | |
platform/x86/amd/pmf: Add helper routine to update SPS thermals
Add helper routine to update the static slider information
and remove the duplicate code occurrences after this change.
Signed-off-by: Shyam Sundar S K <[email protected]>
Reviewed-by: Mario Limonciello <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'drivers/platform/x86/amd/pmf/auto-mode.c')
| -rw-r--r-- | drivers/platform/x86/amd/pmf/auto-mode.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/platform/x86/amd/pmf/auto-mode.c b/drivers/platform/x86/amd/pmf/auto-mode.c index 644af42e07cf..7564ef1bca7d 100644 --- a/drivers/platform/x86/amd/pmf/auto-mode.c +++ b/drivers/platform/x86/amd/pmf/auto-mode.c @@ -275,13 +275,8 @@ int amd_pmf_reset_amt(struct amd_pmf_dev *dev) */ if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR)) { - int mode = amd_pmf_get_pprof_modes(dev); - - if (mode < 0) - return mode; - dev_dbg(dev->dev, "resetting AMT thermals\n"); - amd_pmf_update_slider(dev, SLIDER_OP_SET, mode, NULL); + amd_pmf_set_sps_power_limits(dev); } return 0; } |
