msm: mdss: Fix check for highest of overlap and prefill bw calc

This check is supposed to be used to get the max between overlap and
prefill bandwidth value. This value is used when calculating the ib
bandwidth value to request when bus bandwidth is updated. Having a value
that is too low results in mdp underrun.

Change-Id: Iddf151eed53c8ae73418741b2775ee1dd0ef450c
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
ASoC: msm: Add bounds checking to ADM get params.

Add additional bounds checking to ADM get params.
Validate that all buffer sizes are valid before
dereferencing.

Change-Id: If7c7a5ae6a56812e9c4a11a38c9bdc78f42d09f3
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Signed-off-by: Abhinav Gurram <c_abhina@codeaurora.org>
Merge "ASoC: msm: Add bounds checking to ADM get params."
Merge "msm: mdss: Fix check for highest of overlap and prefill bw calc"
msm: vidc: Fix race condition in power collapse sequence

There is a race condition if client queued an ETB between
RELEASE_RESOURCE (OCMEM) and PC_PREP commands in power
collapse sequence where the client will never receive
ETB_DONE because the clocks are already turned off.
Avoid the problem by counting the number of commands
queued to video hardware to skip power collapse sequence
if client queues any commands.

Change-Id: I0bb908e11308cfc4f8bdbdc01fd92dac67b78eac
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
mdss: Add MDP_SMP_FORCE_ALLOC mdp flag

MDP_SMP_FORCE_ALLOC flag is used to allow SMP
allocations even when there is mismatch between
allocated and requested SMPs for a pipe.
User space can make use of this flag in extreme scenarios
where SMP allocations need to pass like GPU composition
and playback of protected  or secure videos.

Change-Id: I369b4361e7e2bbfc8150add467678c4ef8d5cfb6
Signed-off-by: Justin Philip <jphili@codeaurora.org>
Merge "mdss: Add MDP_SMP_FORCE_ALLOC mdp flag"
Merge df67189dd117048406b3fc3e4ea137d5dfb78f40 on remote branch

Change-Id: Ib785c3b0631465901c77e4dd1afe1b9261f0991f
Merge "Merge df67189dd117048406b3fc3e4ea137d5dfb78f40 on remote branch"
msm: mdp: Validate input arguments from user space

Fully verify the input arguments from user client are safe
to use.

Change-Id: Ie14332443b187951009c63ebfb78456dcd9ba60f
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
Merge "msm: mdp: Validate input arguments from user space"
Merge "msm: vidc: Fix race condition in power collapse sequence"
Merge ca6bbb9855cc5916e58e2e5514eeb9f6c8629f44 on remote branch

Change-Id: Ia55fdb6769fa6b560c8192299ecbd32170271f38
Merge "Merge ca6bbb9855cc5916e58e2e5514eeb9f6c8629f44 on remote branch"
sched: Fix reference to stale task_struct in try_to_wake_up()

try_to_wake_up() currently drops p->pi_lock and later checks for need
to notify cpufreq governor on task migrations or wakeups. However the
woken task could exit between the time p->pi_lock is released and the
time the test for notification is run. As a result, the test for
notification could refer to an exited task. task_notify_on_migrate(p)
could thus lead to invalid memory reference.

Fix this by running the test for notification with task's pi_lock
held.

Change-Id: I1c7a337473d2d8e79342a015a179174ce00702e1
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
ARM: dts: msm: Enable thermal reset feature for MSM8974

Enable thermal reset feature for MSM8974, where the KTM does
a secure watchdog bite when the temperature of tsens reaches
the preset threshold.

Change-Id: I7f3e576ad7b7e7abef6ece0c64c90d09be180967
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
msm: thermal: Update debug/error logs to be more informative

Update/Add debug and error logs to KTM to give more informative
logs for debugging. Updated the log signature for KTM to
print the module name and function name by default.
The new log signature looks like,
msm_thermal: <FUNCTION_NAME>: <LOG_MESSAGE>

Change-Id: Ie2e03cfaf8d4df5ea8ee51334d55a9de9ca4f75e
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
msm: thermal: Add thermal reset feature to KTM

Add support for issuing a thermal reset from msm thermal driver.
The thermal driver is capable of monitoring all the tsens
temperatures and issuing a reset right from the boot.
The reset temperature can be given as input using devicetree.
Failure to do so will disable this feature for the target.

Conflicts:

	Documentation/devicetree/bindings/arm/msm/msm_thermal.txt
	drivers/thermal/msm_thermal.c

Change-Id: Iaf8f1764d4e4e3abb7e65f1d4397d895d195636d
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Signed-off-by: Venumadhav Kurva <kurva@codeaurora.org>
Merge "msm: thermal: Add thermal reset feature to KTM"
Merge "msm: thermal: Update debug/error logs to be more informative"