cpufreq/amd-pstate: Invalidate cppc_req_cached during suspend
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 17 Feb 2025 19:28:51 +0000 (13:28 -0600)
committerMario Limonciello <mario.limonciello@amd.com>
Thu, 6 Mar 2025 19:01:24 +0000 (13:01 -0600)
commitb7a41156588ad03757bf0a2f0e05d6cbcebeaa9e
tree26aa1259c673fafd75ce3094fb9583e779511d73
parenta1d1d8fb653532638cfb3ee0b7e67ebd5327a3d6
cpufreq/amd-pstate: Invalidate cppc_req_cached during suspend

During resume it's possible the firmware didn't restore the CPPC request
MSR but the kernel thinks the values line up. This leads to incorrect
performance after resume from suspend.

To fix the issue invalidate the cached value at suspend. During resume use
the saved values programmed as cached limits.

Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Reported-by: Miroslav Pavleski <miroslav@pavleski.net>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217931
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
drivers/cpufreq/amd-pstate.c