msm: vidc: Add LTR feature for H264 encoder

This change adds Long Term Reference picture
selection feature for H264 video encoder.

Change-Id: Ida957df244d8715c955afe8d809708123a94e999
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
ASoC: wcd9304: Fix incorrect detection of headphone

On slow insertion of headphone, if the v_hs_max value
is too high, it can be detected as headset instead of
lineout when the mic is floating. Adjust the value of
v_hs_max to correct plug type detection.

CRs-Fixed: 507511
Change-Id: Ieeef329d93fc2d3ca6ca9c0171f00ceb756ea747
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
HSIC: Add support for product id 9075

Product Id 0x9075 includes DIAG, SER3(System monitor), SER4(EFS sync),
DUN, CSVT, NET1(Tethered RmNet) + NET2(Muxed Embedded RmNet) device
interfaces.

Change-Id: I75f61445af0ff9eab3d8f22bc2239011a9495e0e
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
usb: ks_bridge: Add efs sync support for PID 0x9075

Driver needs to claim efs sync interface for PID 0x9075
at the time of driver probe.

Change-Id: Idd637aa04eab7babe509a4fbfc3671555dcca189
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
msm: camera: Guard the release of resources using mutex

The critical section of the code related to release needs to be
protected against race conditions.

Change-Id: I2165d37168882c345e2f845df08b74eb49b3cb23
CRs-fixed: 518302
Signed-off-by: Alok Kediya <kediya@codeaurora.org>
usb: u_bam: Fix spinlock leak followed by lockup from workqueue

Driver has missing code to release spinlock while returning from
workqueue in case of memory allocation failures.
Returning from workqueue without releasing spinlock messes up
with worker thread and kernel keeps throwing up warnings like:
"BUG: workqueue leaked lock or atomic: kworker/u" for any
sleeping function called from worker thread afterwards. Later
when driver again tries to acquire same (unreleased) spinlock
it results in spinlock lockup.

CRs-Fixed: 497158
Change-Id: I4eaa7aaa42ed95a9b78a8939e80f4c0694e574b2
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
msm_fb: display: Add compulsory wait after DTV's TG is disabled.

When DTV timing generator is disabled during dtv_off, a wait for
at least a frame period is required. This is done by waiting on
vsync. In some scenarios, vsync interrupt is received such that, no
wait really happens which results in MDP hangs.
Add wait for 20ms after TG is disabled, to ensure wait for at least
a frame period. Also, print timeout error in case wait for vsync
times out.

Change-Id: I960326e495bc8dc108bf6c6f1994ea3071f1c06d
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: kgsl: Do not try to resume the device from INIT state

If the device is still in INIT state there are no open instances
of it running.  Resume calls should be no-ops.  Do not attempt
to start the device at this point.

Change-Id: I1cb6d60581b0b5b0a2ab1b13418adc4ae3983c5e
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Merge "msm: kgsl: Do not try to resume the device from INIT state"
Merge "msm: camera: Guard the release of resources using mutex"
msm: camera: prevent invalid access through mmap

Disable access to invalid addresses through mmap.
Add appropriate range checks to ensure valid accesses
through framebuffer mmap. This prevents illegal
access into memory.

Change-Id: Ie053d9d8efe951b88f28b020dd9c2356e54723a7
CRs-Fixed: 475794
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
defconfig: disable not needed thermal driver

This caused a race condition when assigning trusted zones.

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
thermal: patch down msm_thermal, pre device

This also removes the cputable freq changes, which
we won't need since we use static values.

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c
	include/linux/msm_thermal.h

Conflicts:
	arch/arm/mach-msm/lge/mako/board-mako.c
	drivers/thermal/msm_thermal.c
	include/linux/msm_thermal.h

Change-Id: I1d7569067a2a2eda31958e429841099525889c43
msm_thermal: 3-phase thermal throttling

This introduces 3-phase thermal throttling to the existing
msm_thermal driver (it now works more like thermald).
This also changes the sampling rate to check every second
for increased temperatures.
Additionally this adds clear thresholds for the 2 new tripping
points.

Signed-off-by: showp1984 <showp1984@gmail.com>
msm_thermal: add sysfs interface

This adds a sysfs interface to msm_thermal.
I've also restructured the tuneables into a struct
for better overview.

Signed-off-by: showp1984 <showp1984@gmail.com>
msm_thermal: move sysfs to /sys/kernel/msm_thermal/conf/

Signed-off-by: showp1984 <showp1984@gmail.com>
msm_thermal: fix saving pre-throttled freq

Signed-off-by: showp1984 <showp1984@gmail.com>
drivers/thermal: create own unbound (highpri) wq for msm_thermal

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>

Conflicts:
	drivers/thermal/msm_thermal.c

Change-Id: Ic43c44c3e2c3ff50668490836183f39ecdc13ec8
drivers/thermal: adapt msm_thermal for quadcore & mako

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
drivers/thermal: add emergency shutdown

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>