cpufreq/amd-pstate: Fix setting scaling max/min freq values
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 19 Jan 2024 11:33:19 +0000 (05:33 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:19:13 +0000 (16:19 -0800)
commit9f30ab3bec2eaa4602a89db472ca1dc04458a660
tree8208469a139c6520ffad7b6ae9ede182ccf5df33
parentee4a2ef15153056c19c16a6a2298ac82816cb14e
cpufreq/amd-pstate: Fix setting scaling max/min freq values

[ Upstream commit 22fb4f041999f5f16ecbda15a2859b4ef4cbf47e ]

Scaling min/max freq values were being cached and lagging a setting
each time.  Fix the ordering of the clamp call to ensure they work.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217931
Fixes: febab20caeba ("cpufreq/amd-pstate: Fix scaling_min_freq and scaling_max_freq update")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Wyes Karny <wkarny@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/amd-pstate.c