Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 226dd019 authored by Afzal Mohammed's avatar Afzal Mohammed Committed by Dave Jones
Browse files

[CPUFREQ] cpufreq:userspace: fix cpu_cur_freq updation



CPU frequency is guranteed to be changed on notifier callback with
CPUFREQ_POSTCHANGE. Notifier callback with CPUFREQ_PRECHANGE does
not gurantee a change in frequency; after it, if cpufreq driver is
unable to change CPU to new frequency. This results in wrong
information being fed to user (if setting CPU frequency fails)
upon doing like,

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

Hence in userspace governer update cpu_cur_freq only if notifier
has been called with POSTCHANGE.

Signed-off-by: default avatarAfzal Mohammed <afzal@ti.com>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 21f2e3c8
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