platform/x86/amd/pmf: Add helper routine to check pprof is balanced
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Wed, 25 Jan 2023 09:59:33 +0000 (15:29 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:06 +0000 (11:28 +0100)
commitdadc3820a3d98105360477949bd3be94b7d6a3af
treea9969bc6c5ae41de6a7286cdd390d97389fb7760
parent1db1edddb8731defcd7df55470d4cd51abbee4d7
platform/x86/amd/pmf: Add helper routine to check pprof is balanced

[ Upstream commit 16909aa8c9cc284085f1202c6403ecb9814af812 ]

Add helper routine to check if the current platform profile
is balanced mode and remove duplicate code occurrences.

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-3-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Stable-dep-of: f21bf62290dd ("platform/x86/amd/pmf: Fix to update SPS thermals when power supply change")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/amd/pmf/cnqf.c
drivers/platform/x86/amd/pmf/pmf.h
drivers/platform/x86/amd/pmf/sps.c