PM / devfreq: Fix simple_ondemand crashing

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Luka Karinja <lk@varjanta.com>
PM: devfreq: Add sysfs nodes for devfreq governors

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Luka Karinja <lk@varjanta.com>
PM: devfreq: Fix show available freqs

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Luka Karinja <lk@varjanta.com>
PM: devfreq: Add conservative governor

A GPU governor is not rocket science. This one gets the job done pretty
smoothly while complying with devfreq framework rules.

Signed-off-by: Luka Karinja <lk@varjanta.com>
PM: devfreq: Add some conservativeness

Signed-off-by: Luka Karinja <lk@varjanta.com>
PM: devfreq: Always reflect a change of polling interval

Signed-off-by: Luka Karinja <lk@varjanta.com>
PM: devfreq: conservative: Return 0 if GPU just started

Bailing out early is perfectly fine, so do not trigger an error in
update_devfreq.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Luka Karinja <lk@varjanta.com>
PM: devfreq: Fixup device transition and usage statistics

Ignore bogus data during slumber in transition and usage stats that
rendered the output basically useless. Also fix the reported GPU
frequency.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Luka Karinja <lk@varjanta.com>
PM: devfreq: Use high priority workqueue

It does not make sense to run kgsl on high and devfreq on regular
priority.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Luka Karinja <lk@varjanta.com>
PM: devfreq: Adapt devfreq_get_freq_level to cpubw requirements

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Luka Karinja <lk@varjanta.com>
cpufreq: force cpuN policy to match cpu0 when changing freq or gov

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Luka Karinja <lk@varjanta.com>
cpufreq: Initialize utilization with 0

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Luka Karinja <lk@varjanta.com>
msm: kgsl: Export device state to devfreq

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Luka Karinja <lk@varjanta.com>