Commit 230005f0 authored by Viresh Kumar's avatar Viresh Kumar Committed by Zhihong Yu
Browse files

BACKPORT: UPSTREAM: PM / OPP: Update performance state when freq == old_freq



At boot up, CPUfreq core performs a sanity check to see if the system is
running at a frequency defined in the frequency table of the CPU. If so,
we try to find a valid frequency (lowest frequency greater than the
currently programmed frequency) from the table and set it. When the call
reaches dev_pm_opp_set_rate(), it calls _find_freq_ceil(opp_table,
&old_freq) to find the previously configured OPP and this call also
updates the old_freq. This eventually sets the old_freq == freq (new
target requested by cpufreq core) and we skip updating the performance
state in this case.

Fix this by also updating the performance state when the old_freq ==
freq.

Fixes: ca1b5d77 ("OPP: Configure all required OPPs")
Cc: v5.0 <stable@vger.kernel.org> # v5.0
Reported-by: default avatarNiklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
(cherry picked from commit faef080f
https://github.com/torvalds/linux.git

)
Signed-off-by: default avatarNiklas Cassel <niklas.cassel@linaro.org>

BUG=b:129558664
TEST=Validate DVFS and schedutil governor
Git-repo: https://git.linaro.org/people/niklas.cassel/kernel.git


Git-commit: 616d16e1267abb4818072d1462167d3d0fe081ad
Signed-off-by: default avatarPraveen Koya <pkoya@codeaurora.org>

Change-Id: I743fdbe648106dd7af9d6e1e0c74a90f549f7ea1
Signed-off-by: default avatarVamsi Singamsetty <vamssi@codeaurora.org>
Signed-off-by: default avatarKhasim Syed Mohammed <khasim.mohammed@linaro.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1664357


Reviewed-by: default avatarZhihong Yu <zhihongyu@chromium.org>
Commit-Queue: Zhihong Yu <zhihongyu@chromium.org>
Tested-by: default avatarZhihong Yu <zhihongyu@chromium.org>
parent 72b9396e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment