msm: kgsl: Insert kgsl idle for iommu-v1 when pagetables are changed.

An idle is needed for iommu-v1 before programming both tlb registers
and the pagetable register. Without this idle faults are observed on
2D core because a process uses another processes pagetable.

Change-Id: Ief14cd79b8e7ffaed413da49dc4b9e8416233186
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
msm: camera: Recovery through camif stop and overall reset.

Add recovery mechanism in case of bus overflow. As part of the
recovery, stop the CAMIF, reset the VFE and reload the AXI
write masters and then restore the IRQ settings to VFE.

Change-Id: Iba6576777f05135cc13c1ee0c9db764d35c7282a
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
msm: camera: Add recovery routine for live snapshot.

During live snapshot, if bus overflow happen, recovery routine will
kick in and reset the hardware. At this point, the live snapshot
might not be completed and application will continue to wait for
the snapshot to complete. This change adds the logic to restart
the snapshot process after recovery is completed.

Change-Id: I9ba0a27ce53eb008a4af8d65a3f37a7cded03559
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
msm: camera: Move halt logic in case of overflow to ISR.

Move the halt logic which includes AXI HALT and CAMIF Disable
to ISR to start the recovery mechanism sooner.
Add some protection in case of liveshot.

Change-Id: I28ec462474524c0064cd7ecd4f77801cd494e514
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
msm: wcnss: Dump PMIC regulator contol registers

Dump PMIC registers which are related to WCNSS(RIVA)during the
WCNSS SSR or WDI timeout.  This  information helps to check PMIC
status during the SSR. This allows to debug multiple crash issues,
where WCNSS SSR dumps are insufficient to conclude why FIQ is not
reaching the WCNSS from HOST and why SPM is stuck.

Change-Id: Ibcd767c8832e2df268591e03da93ccf1bd819c68
CRs-fixed: 487483
Signed-off-by: Naresh Jayaram <njayar@codeaurora.org>
ASoC: wcd9310: Fix to reduce the delay while recording

The current delay of 250ms is too long and can impact
several usecases which involve TX path. Reduce the delay
to 20ms as it is safe to do so. This delay was added to
ensure low voltage for a while before turning on micbias
for recording. Reason being, few headsets need voltage to
be ramped up from 0V to micbias to enable microphone.

CRs-Fixed: 486830
Change-Id: I6becfde379403115a77492754bae26c2fd1ba9cb
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
spi_qsd: Add runtime PM support to SPI QSD driver

Enable and disable the clocks and gpios to the SPI controller
using runtime PM. This serves the dual purpose of reducing power
Consumption a little and letting the core know when the device is idle.

If runtime_pm is not supported, then make sure the device becomes
active in first transaction after system-suspend, instead of
system-resume.

CRs-Fixed: 460988
Change-Id: I2360b6f48491cd0e8e5f1ce54805079daf92e36b
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
ASoC: msm: qdsp6: Fix for EVRC-B/WB vocoder rate

Rate set in userspace for EVRC-B/WB vocoders are not
propagated to DSP. Fix the issue by sending rate command to DSP

Change-Id: I478f4afafac25dcb4b23964db24598205f9bcc05
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
CRs-Fixed: 488084
ci13xxx_udc: Draw 100mA of current in unconfigured state

As a part of usb enumeration, udc driver is currently notifying the pmic
to draw 0mA of current during usb reset. The pmic driver notifies the
charger driver that usb is in suspend state if <=2mA is notified.
In 8930 targets with real battery connected, USB-CV Enumeration tests
fail after some iterations. The failure logs show an error in SOF frame
number and unexpected chirp sequence.

As a part of USB Reset, instead of notifying PMIC to draw 0mA current,
if we notify to draw 100mA current, then the USB-CV Ch-9 Enumeration
failures are not seen. It seems there is some interference when PMIC stops
charging during USB reset and causing the unexpected chirp sequence
during USB Reset.

In any case, as a part of USB reset or unconfigured state, device can draw
upto 100mA of current from USB bus. Hence notify charging driver with
100mA current draw as a part of USB reset interrupt.

CRs-Fixed: 477655
Change-Id: I2658bd570c500c62705e0c07384d6b5c900f407d
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
mmc: msm_sdcc: fix a type mismatch in msmsdccc_config_dma()

msmsdcc_prep_xfer() function returns a signed integer value but
caller function msmsdcc_config_dma() is storing this value in an unsigned
integer variable which is obviously not the correct thing to do.

CRs-Fixed: 476578
Change-Id: I39159e2f4f73c7f54de359cbe4faba5e902915ff
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Revert "Revert "msm: cache_erp: Handle recoverable L1 errors""

This reverts commit dfaa1681d4a72a31276506791c04bc01d070f3f5.

Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Merge "msm: kgsl: Insert kgsl idle for iommu-v1 when pagetables are changed."
Merge "ASoC: msm: qdsp6: Fix for EVRC-B/WB vocoder rate"
Merge "msm: wcnss: Dump PMIC regulator contol registers"
Merge "msm: camera: Recovery through camif stop and overall reset."
Merge "msm: camera: Add recovery routine for live snapshot."
Merge "msm: camera: Move halt logic in case of overflow to ISR."
msm: audio: qdsp6v2: Fix command sequence issue in Non-tunnel player

The CMD_CLOSE and CMD_UNMAP needs to be sequentially sent to dsp.
Avoid sending CMD_UNMAP if CMD_CLOSE is not sent.

CRs-Fixed: 485051
Change-Id: Ic6dd9775b0aea218874161b8a44dc0286608616c
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Merge "mmc: msm_sdcc: fix a type mismatch in msmsdccc_config_dma()"
Merge "spi_qsd: Add runtime PM support to SPI QSD driver"