cpufreq: interactive: merge https://github.com/android/kernel_common/commit/4c7894cb01c7544225d5fcfb0fcb1d11fd2d1777 and fix a small code shit.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Gamma Corrected Brightness: Recalculate backlight intensity based on gamma presets

Thanks to Yorici for gamma info + making me do this :)

sysfs:
/sys/module/lm3630_bl/parameters/gamma_correction
/sys/module/lm3630_bl/parameters/cur_level

gamma_correction:
	0 - Stock
	1 - Gamma 2.0
	2 - Gamma 2.2 (recommended)
	3 - Gamma 3.0
cur_level = current backlight value

Signed-off-by: Dan Trifan <jimsth@gmail.com>
Makefile: set -Wframe-larger-than= to 2048

Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: Enable protected mode for A3XX

Enable protected register mode for A3XX with these commits from
msm-3.10:

msm: kgsl: Enable protected register mode for A3XX
msm: kgsl: Print the register that causes a protected mode error
msm: kgsl: Unprotect the VBIF performance counters

Change-Id: Ic0dedbad950ffbd063fd861d9440bb5dce8d5fb1
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: Protect SMMU registers from being written by the GPU

Put the SMMU register range in protected mode to shield them from
IB1/IB2 writes from userspace.

CRs-Fixed: 599971
Change-Id: Ic0dedbad8c03fc1c54ff73221231e2440d3c34dd
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: get pm_qos_latency from device tree

pm_qos_latency parameter can be configured from
device tree as well. Will set to default value if
entry not found in target device tree.

Signed-off-by: Dan Trifan <jimsth@gmail.com>

Conflicts:
	include/linux/msm_kgsl.h

Change-Id: I76271f4fdc26e191431e5dfe2a6de9e2b3ab426f
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: change pm_qos_latency to pm-qos-latency

Use hyphen symbol instead of underscore for pm-qos-latency
property name. Hyphen should be used instead of underscore
in device tree property name.

Change-Id: I23f720159b4ecb3d81cbd13b570cee8fc633253a
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: Remove unused legacy IB timeout variables

Remove unused variables from legacy IB timeout detection.

Change-Id: I4df94ee43072ccebff4045c5950edbc406de38a8
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: Dump snapshot for long IB timeout

Dump snapshot when long IB timeout is detected. The GPU
command processor is halted on long IB timeout detection,
this will halt the GPU pipeline, dumping the snapshot at
this point is safe and gives us information to debug
long IB timeout.

Change-Id: I51bb73b66e11c3b6945c3dfe92af03e21e3c0e62
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: use %pK to restrict printing GPU / memory addresses

Use %pK in the output for the per-process memory dump to keep from
printing the GPU and user memory addresses for the GPU memory
objects own by the process.  This allows us to make the 'mem' file
world readable without exposing any really dangerous information.

Change-Id: Ic0dedbad21654110905d1b3744f562966584d8ed
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>