From: Shyam Sundar S K Date: Wed, 25 Jan 2023 09:59:35 +0000 (+0530) Subject: platform/x86/amd/pmf: Fix to update SPS default pprof thermals X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1db1edddb8731defcd7df55470d4cd51abbee4d7;p=users%2Fjedix%2Flinux-maple.git platform/x86/amd/pmf: Fix to update SPS default pprof thermals [ Upstream commit 635f79bc73cf3d40c4198a20b3a0e7016dd6f0d3 ] By design PMF static slider will be set to BALANCED during init, but updating to corresponding thermal values from the PMF config store was missed, leading to improper settings getting propagated to PMFW. Fixes: 4c71ae414474 ("platform/x86/amd/pmf: Add support SPS PMF 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-5-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/sps.c b/drivers/platform/x86/amd/pmf/sps.c index 5f842d6e6db2f..5bccea137bda4 100644 --- a/drivers/platform/x86/amd/pmf/sps.c +++ b/drivers/platform/x86/amd/pmf/sps.c @@ -131,6 +131,9 @@ int amd_pmf_init_sps(struct amd_pmf_dev *dev) dev->current_profile = PLATFORM_PROFILE_BALANCED; amd_pmf_load_defaults_sps(dev); + /* update SPS balanced power mode thermals */ + amd_pmf_set_sps_power_limits(dev); + dev->pprof.profile_get = amd_pmf_profile_get; dev->pprof.profile_set = amd_pmf_profile_set;