From: Shyam Sundar S K Date: Wed, 25 Jan 2023 09:59:34 +0000 (+0530) Subject: platform/x86/amd/pmf: update to auto-mode limits only after AMT event X-Git-Tag: baikal/mips/sdk6.1~1921 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=be498c921be71e00067e0b955277746ffec396fb;p=kernel.git platform/x86/amd/pmf: update to auto-mode limits only after AMT event [ Upstream commit 7e62288f1344a72b44f245a069d698eb3eadc1c9 ] Auto-mode thermal limits should be updated only after receiving the AMT event. But due to a bug in the older commit, these settings were getting applied during the auto-mode init. Fix this by removing amd_pmf_set_automode() during auto-mode initialization. Fixes: 444cb0ffcf08 ("platform/x86/amd/pmf: Add support for Auto mode feature") Suggested-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20230125095936.3292883-4-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sasha Levin --- diff --git a/drivers/platform/x86/amd/pmf/auto-mode.c b/drivers/platform/x86/amd/pmf/auto-mode.c index 644af42e07cf8..85ce9ed25b857 100644 --- a/drivers/platform/x86/amd/pmf/auto-mode.c +++ b/drivers/platform/x86/amd/pmf/auto-mode.c @@ -299,7 +299,5 @@ void amd_pmf_deinit_auto_mode(struct amd_pmf_dev *dev) void amd_pmf_init_auto_mode(struct amd_pmf_dev *dev) { amd_pmf_load_defaults_auto_mode(dev); - /* update the thermal limits for Automode */ - amd_pmf_set_automode(dev, config_store.current_mode, NULL); amd_pmf_init_metrics_table(dev); }