KGSL: Add a simple GPU governor for Adreno xxx GPU series

initial coding for a Simple GPU governor based on my own work 2 years ago
from Sensation GB kernel commit: c1ea8f64167270d67915b4d4fb00910b1c0f513f

Signed-off-by: Paul Reioux <reioux@gmail.com>
KGSL: make simple govenor a selectable option, co-exist with ondemand

also removed some hardcoded values

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:

	drivers/gpu/msm/kgsl_pwrscale_trustzone.c
KGSL: simple governor: expose tunables to sysfs interface via module_param

Signed-off-by: Paul Reioux <reioux@gmail.com>
KGSL: Simple Governor: fix minor logic issue

Signed-off-by: Paul Reioux <reioux@gmail.com>
enable gpu simple governor
msm: kgsl: Add new sysfs node to list GPU clock frequencies

Add a new sysfs node to communicate available GPU clock frequencies
to userspace for the power daemons.

Change-Id: I2479217aa797e2066cc50476ef7f73c5cae8aebe
Signed-off-by: Anshuman Dani <adani@codeaurora.org>

Conflicts:

	drivers/gpu/msm/kgsl_pwrctrl.c
msm: kgsl: Set sysfs max clock for devices with no power scale policy

When the sysfs entry for max clock is updated, set it immediately for the
devices that has no power scale policy. This prevents the device from
running with undesired clock.

Change-Id: I3211234f6d2afe4c2de115dace70b332d2b30f21
CRs-fixed: 408963
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>
msm: kgsl: Remove extra interrupts when setting MMU state

The interrupts added to the ringbuffer on PTFLUSH and TLBUPDATE
were causing a major increase in the number of interrupts from the GPU.
This was leading to increase in power and loss of performance. Add a check
to turn off IOMMU clocks when going to SLEEP.

Change-Id: I41617dd3b7b3f7d9622523f2a1407b912dbd989e
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>

Conflicts:

	drivers/gpu/msm/adreno.c
	drivers/gpu/msm/kgsl_mmu.c
msm: kgsl: Add max and min power level controls in sysfs

Add min_pwrlevel, max_pwrlevel and thermal_pwrlevel to give a
privileged user more control over which power levels are considered
during DCVS power management.  max_pwrlevel is the maximum power
level that the system can go to at any time, min_pwrlevel represents
the lowest power level.  DCVS will chose any level between these
two extremes.  thermal_pwrlevel allows a daemon to set an absolute
top for frequency to prevent thermal issues. The effective maximum
power level is considered to be the lower of thermal or max.

Also added is num_pwrlevels that shows the number of active power
levels. This corresponds to the gpu frequencies in
available_gpu_frequencies.

Change-Id: Ic0dedbad20102d9a3c3350055e6fcd10358fc53d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

Conflicts:

	drivers/gpu/msm/kgsl_pwrctrl.c
	drivers/gpu/msm/kgsl_pwrctrl.h
Revert "msm: kgsl: Add max and min power level controls in sysfs"

This reverts commit 8f5e49254ca8f566d10c2838ab2ca97d09bbecfd.
Revert "msm: kgsl: Remove extra interrupts when setting MMU state"

This reverts commit 6d87d331374d9c3b19c8b74a2b549bbea365943d.
Revert "msm: kgsl: Set sysfs max clock for devices with no power scale policy"

This reverts commit 0e85217786b191e01a4234ab2a2edb6982e3af87.
Revert "msm: kgsl: Add new sysfs node to list GPU clock frequencies"

This reverts commit cc3a2deec9ffb2fe08273d3e821e6922bedf7e8e.
fix memset for 4.8+ linaro toolchain
switch to linaro-4.9.1-toolchain
safe boot speed 1008MHz
return to sabermod-4.7-toolchain because of random reboots on 4.8/4.9 toolchains
cpufreq: bulk merge of a dozen cpu governors + skeleton for dynamic voltage control

Conflicts:
	drivers/cpufreq/Kconfig
	drivers/cpufreq/Makefile
	drivers/cpufreq/cpufreq.c
	drivers/cpufreq/cpufreq_interactivex.c
	drivers/cpufreq/cpufreq_savagedzen.c
	drivers/cpufreq/cpufreq_smartass2.c
preparation to cherry-pick
undervolt: add VDD sysfs interface for configuring the voltage levels

Conflicts:
	arch/arm/mach-msm/acpuclock.c