msm: sps: Fix BAM ISR race with pipe disconnect

Pipe EOT can occur while SPS pipe disconnect is being done.
The pipe disconnect can free up resources and pointers that
are used by bam_isr() in parallel in SMP environment and can
cause null pointer dereference.

Fix this by calling synchronize_irq() before freeing up resources
and by spin_lock to avoid race conditions.

Change-Id: I51eb88e1d68123d13d4aaf654e729236a4a3f144
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>
Merge "mobicore: t-base-200 Engineering Release."
Conflicts:
	drivers/gud/mobicore_kernelapi/main.c
Merge "mobicore: t-base-200 Engineering Release."
msm_serial_hs_lite: Don't set UART clock to zero always

Setting UART clock rate to zero is causing multiple issues
and leading to more confusion with other stability issues.
Setting UART clock rate to zero is invalid operation on
recent platforms and throws multiple error messages. Hence
add platform data set_uart_clk_zero to enable setting uart
clock rate to zero operation on required platform for
specific use case.

Also set set_uart_clk_zero for GSBI9 shared between different
processor.

CRs-Fixed: 455466
Change-Id: Iba04d4cf094885b0eae6a9c49ed06f750bcc1024
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
msm_fb: display: no native frame buffer memory operations

Since we don't use pan_display, the native frame buffer memory is not
necessary any more. This is driver change, mainly disabling memory
operations that are associated with native frame buffers.

CRs-fixed: 458938
Change-Id: If33bff32ee1d9228ff8a74ca09961a0f10f1fcdd
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>

Conflicts:
	drivers/video/msm/logo.c
	drivers/video/msm/msm_fb.c
media: dvb: Seperate secure demuxing to secure feeds only

In current implementation secure demux performs demuxing on all filters
including non-secure filters.
This implementation fails in case output buffer is externally allocated by
the user from a heap that does not allocate physically contiguous memory,
which is allowed for non-secure filters.
Secure filters buffers are guranteed to be allocated from a heap that
allocates physically contiguous memory.
To overcome this problem, this patch splits the processing between
normal sw demux filters, and secure demux filters.
Filters which user defined as secured will be processed only by the secure
demux, while other filters will be processed by the normal sw demux.

Change-Id: I25c2e0a8e37cf0d3590de85a10c80b84a4f950c6
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>

Conflicts:
	drivers/media/dvb/dvb-core/dvb_demux.c
	drivers/media/dvb/mpq/demux/mpq_dmx_plugin_common.c
	drivers/media/dvb/mpq/demux/mpq_dmx_plugin_tspp_v1.c
ASoC: msm: qdsp6: Check copp_id's array index

Validate the AFE port index before using it as copp_id's
array index.

Change-Id: I16112d03779980ce787ea78b589b34b5fd59ab36
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
Merge "msm: ipc: Update HELLO message processing"
Conflicts:
	arch/arm/mach-msm/ipc_router.c
Merge "msm: ipc: Fix lockdep warning by IPC message router"
Merge "msm: ipc: Advertise service information only from alive subsystems"
Merge "msm: 8064: Add support for GSBI4 based UARTDM"
Conflicts:
	arch/arm/mach-msm/board-8064.c
msm:camera: Increase the UB sizes for stats

Increase the depth of unified buffers for bayer stats

Change-Id: I0296d02e2850b95f7af3bc00101660b2a8433113
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
msm: pm: Add support for retention on each core

Allow each core on 8974 to enter retention and retain
the state of the CPU. On 8960 as hardware restriction does
not permit all cores to enter retention at the same time,
allow only core 0 to enter retention when all other cores
are offline to maintain backward compatibility.

CRs-fixed: 437281
Change-Id: I6690e901afc9fa3a27010c264fa3acc9a0722c1a
Signed-off-by: Priyanka Mathur <pmathur@codeaurora.org>
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
msm: pm: Update spm retention sequence to support per core retention

On krait revision < 3, power driver is not using full spm sequence and
calling into trustzone as a part of executing krait retention.
Also krait retention is not supported on secondary cores.

krait pass3 is upgraded to use full spm sequence, hence add support
for per core retention and avoid calling into trustzone
while executing retention.

CRs-fixed: 437281
Change-Id: I6a2b3d7c4d0fd5b9a340957b16b940b7a09bbd91
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
msm: avs: Restore core voltage when disabling AVS

AVS changes the core voltage to match the current operating conditions
on the part. Not all frequencies supported by the target have characterized
AVS delay synthesizer (AVSDSCR) values. For frequencies that do not have
AVSDSCR set, AVS is not enabled and so need to operate at the
characterized voltage for that frequency. Disabling AVS does not
however, restore the operating voltage to the value the rail was
configured to. This may cause frequencies that do not have AVSDSCR to
run at lower voltage than prescibed.
Set up the core voltage back to the last known good value when disabling
AVS.

Change-Id: I5389996288fa49e45c469d2a8917e00900261de7
CRs-fixed: 457772
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
msm: wfd: Return proper error if mmap fails

Change amends the check condition for mmap return
values appropriately to fix the allocate buffer
failure cases.

CRs-Fixed: 453057
Change-Id: I05ceb4f2960c26e4bc024e0c5f530f874c90a048
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>

Conflicts:
	drivers/media/video/msm_wfd/wfd-ioctl.c
media: dvb: Secure demux debug flag

Add debug flag for secure demux as module parameter to plugin.

Change-Id: I53cf19da5815fbbe5bc2cc8dffd34fe1b2c90b17
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Revert "power: pm8921-charger: add boundary check for out of bounds issues"

This reverts commit 13c972d87f309a326449b42b50b1b923ef3e168f,
which is a duplicate cherry-pick already done by a mega cherry-pick patch
from msm-3.4 branch.

Change-Id: I8a394645d4a80f236cec63fb0ea7a09ff896319a
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
block: blk-core: add printk_ratelimit

On failure of requests the console is flooded with prints,
which result in a watchdog bark.
This patch limits the number of prints to console thus, avoiding
the bark.

CRs-Fixed: 458071
Change-Id: I614002cc1305ab7b5c6a64d278139291c1baa3c4
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Merge "media: dvb: Secure demux API updates"