msm: kgsl: unprepare clocks when we move from NAP to SLEEP

The existing code leaves clks prepared when we transition from
NAP to SLEEP. We fail to reach Vdd_min as voltage scaling has
moved to prepare/unprepare.

Change-Id: I509f4c6bd217ead985890147819236dd2c5d03ce
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
block: row: Re-design urgent request notification mechanism

This patch updates the ROW URGENT notification policy to apply with the
bellow:
- Don't notify URGENT if there is an un-completed URGENT request in driver
- After notifying that URGENT request is present, the next request
  dispatched is the URGENT one.
- At every given moment only 1 request can be marked as URGENT.
  Independent of it's location (driver or scheduler)

Other changes to URGENT policy:
- Only queues that are allowed to notify of an URGENT request pending
are READ queues

Change-Id: I17ff73125bc7a760cea1116b466115a2df635a14
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: fix the enable_all_threshold, previous value was just for testing.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: governor: Set MIN_LATENCY_MULTIPLIER to 20

Currently MIN_LATENCY_MULTIPLIER is set defined as 100 and so on a system with
transition latency of 1 ms, the minimum sampling time comes to be around 100 ms.
That is quite big if you want to get better performance for your system.

Redefine MIN_LATENCY_MULTIPLIER to 20 so that we can support 20ms sampling rate
for such platforms.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Revert "sched: fix init NOHZ_IDLE flag"

This reverts commit 00401b21e918807fc50dee26d385f64c45242f6c.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
sched: fix init NOHZ_IDLE flag

On my smp platform which is made of 5 cores in 2 clusters, I have the
nr_busy_cpu field of sched_group_power struct that is not null when the
platform is fully idle. The root cause seems to be:
During the boot sequence, some CPUs reach the idle loop and set their
NOHZ_IDLE flag while waiting for others CPUs to boot. But the nr_busy_cpus
field is initialized later with the assumption that all CPUs are in the busy
state whereas some CPUs have already set their NOHZ_IDLE flag.
We set the NOHZ_IDLE flag when nr_busy_cpus is initialized to 0 in order to
have a coherent configuration.
If set_cpu_sd_state_idle is called during the buld of the new sched_domain it
will not crrupt the initial state
set_cpu_sd_state_busy is modified and clear the NOHZ_IDLE only if a non NULL
sched_domain is attached to the CPU.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: lets consider 15 loads instead of 10.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Accuracy Filter Control: export accuracy filter items to userspace via sysfs.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: kgsl: Set requested power state to NONE after resume

When GPU resumes from suspend requested state is not cleared to NONE.
Due to this idle reporting is not done and GPU stays at MAX freq. As
a fix if the current power state is already ACTIVE and request is
made for active power state then clear the requested state immediately.

CRs-fixed: 424682
Change-Id: I7f0d7fa819308f166cbbbf30b2c20aee73644cfb
Signed-off-by: Vinay Roy <vroy@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>