devfreq: update to LA.BF.1.1_rb1.11

Conflicts:
	drivers/devfreq/devfreq.c
	drivers/devfreq/governor_simpleondemand.c
PM: devfreq: Use high priority workqueue

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

Signed-off-by: flar2 <asegaert@gmail.com>
Signed-off-by: Jake Weinstein <xboxlover360@gmail.com>
PM: devfreq: Always reflect a change of polling interval

Change-Id: Ie895bdf1ed1126e05483890f7ed64ac05890710a
Signed-off-by: Jake Weinstein <xboxlover360@gmail.com>
devfreq: Export profile frequency table to sysfs

devfreq exported the frequencies based that were available from OPP,
however, some devices that use devfreq do not utilise OPP, but they
give the list of supported frequencies separately for devfreq. This
patch makes devfreq use the given table (if available) and fallback
to OPP.

Bug 1330780

Change-Id: I60ec2eade6066b0c3520f7e372384f0a42734048
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/256695
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: Jake Weinstein <xboxlover360@gmail.com>
devfreq: Round frequencies in transition stats

Transition statistics required that the new frequency was *exactly*
as it was in the table. However, we may unexpectedly select a
frequency that is not in the table (i.e. thermal limit forces us to
select a bit lower frequency, the original DVFS table does not hold
for the current PLL for some reason, etc.)

This patch modifies transition table to select the best candidate
from the frequency table.

Bug 1366760

Change-Id: I4329f77e733f5f1d39b9d9c3aebe3681a0760d90
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/273596
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: Jake Weinstein <xboxlover360@gmail.com>
devfreq: Fix type of frequency table

Frequencies are always expressed as ulong, but devfreq's table is of
type uint *. Fix the mismatch.

Change-Id: I0ed6b43f397331d1940c7f573d37796e50e8ac58
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/352720
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Signed-off-by: Jake Weinstein <xboxlover360@gmail.com>
devfreq: Account only powered time in trans_stat

This patch modifies devfreq to account only the time a device is
powered in trans_stat. In addition, this patch also fixes a race
in trans_stat maintenance in cases where the node is readed at
the same time the transition table is being updated by frequency
re-estimation.

Change-Id: I6e4341317b6dda88d69028c9f67785400e5a7a65
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/435174
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com>
Reviewed-by: Samuel Russell <samuelr@nvidia.com>
Tested-by: Samuel Russell <samuelr@nvidia.com>
Reviewed-by: Ilan Aelion <iaelion@nvidia.com>
Signed-off-by: Jake Weinstein <xboxlover360@gmail.com>
Fix mismatch
KGSL: correct kgsl_pwrctrl gpu freq store.

*ROM firmware store 450mhz to gpuclk store after GPU is cool again.
this leave me locked on MAX 450Mhz.

So to hack it. i must use pwr->thermal_pwrlevel = level - 2;
in gpuclk store.

now i get 650Mhz and higher GPU freqs on higher temp.

Tested with all possible hard 3d heavy tests, all great.
Temp is holding < 78c

Conflicts:
	drivers/gpu/msm/kgsl_pwrctrl.c
KGSL GPU OC: Fixed mess for my kernel.

*I was getting freq 27Mhz (lvl 7) set on high temp. that lead to gpu stall.

Now all OK.

@neoboddy89 please check this. you too have the same amount of freqs for GPU.
you need to corect this.!

num of gpu freqs is 8! not 7 (0-7) as 7 is the 27mhz we cant really use it
for GPU!
so we must lock min to 6.

Conflicts:
	drivers/gpu/msm/kgsl_pwrctrl.c
Fix merge error
Fix unexpected data