diff options
| author | Shyam Sundar S K <Shyam-sundar.S-k@amd.com> | 2023-01-25 15:29:32 +0530 |
|---|---|---|
| committer | Hans de Goede <hdegoede@redhat.com> | 2023-01-30 14:30:57 +0100 |
| commit | c5258d39fc4cbed37e20945715e7eb102f26d65b (patch) | |
| tree | d8806b0a7229972f13d82c2b042fbd7a17304b04 /drivers/platform/x86/amd/pmf/auto-mode.c | |
| parent | 1bc5d819f0b9784043ea08570e1b21107aa35739 (diff) | |
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 <Shyam-sundar.S-k@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20230125095936.3292883-2-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
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; } |