Skip to content
Commit 8ebebfc3 authored by Gautham R. Shenoy's avatar Gautham R. Shenoy Committed by Greg Kroah-Hartman
Browse files

cpufreq/amd-pstate: Fix the return value of amd_pstate_fast_switch()



commit bb87be26 upstream.

cpufreq_driver->fast_switch() callback expects a frequency as a return
value. amd_pstate_fast_switch() was returning the return value of
amd_pstate_update_freq(), which only indicates a success or failure.

Fix this by making amd_pstate_fast_switch() return the target_freq
when the call to amd_pstate_update_freq() is successful, and return
the current frequency from policy->cur when the call to
amd_pstate_update_freq() is unsuccessful.

Fixes: 4badf2eb ("cpufreq: amd-pstate: Add ->fast_switch() callback")
Acked-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarWyes Karny <wyes.karny@amd.com>
Reviewed-by: default avatarPerry Yuan <perry.yuan@amd.com>
Cc: 6.4+ <stable@vger.kernel.org> # v6.4+
Signed-off-by: default avatarGautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0376fd5f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment