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)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 29 Nov 2023 16:40:16 +0000 (17:40 +0100)
commitfebab20caebac959fdc3d7520bc52de8b1184455
tree9edd6af0204f6f008e4bbf6681f9124a50b47b3c
parentbb87be267b8ee9b40917fb5bf51be5ddb33c37c2
cpufreq/amd-pstate: Fix scaling_min_freq and scaling_max_freq update

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>
drivers/cpufreq/amd-pstate.c
include/linux/amd-pstate.h