cpufreq/amd-pstate: Fix scaling_min_freq and scaling_max_freq update
authorWyes Karny <wyes.karny@amd.com>
Fri, 17 Nov 2023 06:38:39 +0000 (06:38 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Dec 2023 07:52:24 +0000 (08:52 +0100)
commit4d78331c193919d9b62a9a72259939a1c5fdecd6
tree3a6e0641eebe4ab4a64a5bd26a18499ad3e4754b
parent684cf5d6aef1a8d5355cc23d3f0577513575833a
cpufreq/amd-pstate: Fix scaling_min_freq and scaling_max_freq update

[ Upstream commit febab20caebac959fdc3d7520bc52de8b1184455 ]

When amd_pstate is running, writing to scaling_min_freq and
scaling_max_freq has no effect. These values are only passed to the
policy level, but not to the platform level. This means that the
platform does not know about the frequency limits set by the user.

To fix this, update the min_perf and max_perf values at the platform
level whenever the user changes the scaling_min_freq and scaling_max_freq
values.

Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors")
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Wyes Karny <wyes.karny@amd.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
include/linux/amd-pstate.h