kgsl: Do not return invalid power stats when the device is off

adreno_power_stats() was returning unitialized data when the device
state was not active. Leave early from the function if the device
is not active and return 0s instead.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Prabhat Awasthi <pawasthi@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
kgsl combined changes

msm: kgsl: Align ION buffer mappings from userspace to 4k
When userspace allocates an ION buffer and maps it to GPU virtual space,
adjust the buffer size to be 4k aligned before mapping it to GPU virtual
space. GPU virtual space map routine expects the buffer to be 4k
aligned.

Change-Id: Ibdb95597c24e2b5d0c3390d2c8550abb6b4b730b
Acked-by: Rama Vaddula <rvaddula@qualcomm.com>
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>

msm: kgsl: Avoid turning on GPU clock if already off
In adreno_idle(), check if the GPU clock is already
turned off. If so, the GPU is already idle,
so don't turn on the clocks again.

Change-Id: I27ae939253ee71830466e3117bed0230d7ff67d5
Signed-off-by: Ananta Kishore K <akollipa@codeaurora.org>
cpufreq / stats: fix race between stats allocation and first usage

This patch forces complete struct cpufreq_stats allocation for all cpus
before
registering CPUFREQ_TRANSITION_NOTIFIER notifier, otherwise in some
conditions
cpufreq_stat_notifier_trans() can be called in the middle of stats
allocation,
in this case cpufreq_stats_table already exists, but stat->freq_table is
NULL.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Version 1.1.9