msm_serial_hs: Wait for discard flush completion for UART Rx channel

Completion of requested flush command with ADM driver is having more
latency then previously. Hence now it is required to wait for discard
flush complete if there is more events expected with UART driver which
would go out of sync without it. Below are 2 instances where it is must
to wait for discard flush completion requested on UART Rx channel.

1. Changing Baud Rate of UART
UART application can send baud rate change request based on its requirement
of communication with connected device on remote uart. Serial core also
does set by default baud rate when application is opening the uart port. As
Rx command is queued always with ADM driver from UART driver, for above
events it is required to flush the same after setting the baud rate. Not
waiting for completion of Rx flush would allow application to send command
on Tx or any other ioctl which would reach to connected device but response
may not be received as Rx flush completion is not received to queue next Rx
command to ADM. Hence with this there are chances that received data with
UART wil be lost when Rx flush completion is not received in-time. Hence
wait for Rx flush completion from set_termios() with timeout as 300 jiffie.
Rx flush completion time is non-deterministic as it depends on number of
commands queued to ADM driver from ADM client drivers.

2. While going for UART clock off
UART clock off has multiple state machines and before going into last
state it makes sure that there are no pending data in UART Tx and Rx FIFO.
Although there would be one Rx command queued which is flushed before
moving to last state and going ahead with UART clock off. If UART clock is
turned off before Rx flush request is being executed and ADM tried to flush
Rx command, ADM encounters data bus error on UART Rx Channel. Hence with
waiting for Rx flush completion, and then doing UART clock off on receving
the same would resolve ADM data bus error issue on UART Rx channel.

CRs-Fixed: 457769
Change-Id: I9344277224a2dc3f28140a1f42aa3feed5411b97
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>
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_fb: display: don't enable blt mode

The switch of blt mode may cause mdp hang on some targets. To avoid
blt switch, we won't allocate the pipe that requires blt
mode. Basically this implies two things: downscaling is done by
rotator and gpu composition is used in case of blt mode is needed.

Change-Id: I2d6f1a0e33a40af90e3a1a013a1b48b0df0c8ea2
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
ASoC: audio: Fix MEM_UNMAP called before CLOSE ack

-When the commands for ASM_STREAM_CMD_SET_PP_PARAMS
and ASM_STREAM_CMD_CLOSE are sent back to back, Ack
for first command is misinterpreted as CMD_CLOSE ack
and proceeds to send memory unmap command resulting
in LPASS fatal.
-Maintain separate variable to wait on for CMD_CLOSE
that will avoid dependency to other commands getting
Ack early.

CRs-Fixed: 434279
Change-Id: I7b6b7f1b8154437b21c5ea14be2e774e4b96e2d1
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
USB: gadget: f_audio_source: Switch to DMA memory to support MMAP

- Music takes more time to resume on speaker after USB unplug.
- USB driver does not support the Non-blocking mode i.e.
  MMAP mode. When the USB is unplugged, write is blocked for
  10 sec, and after a 10 sec timeout, the USB accessory device
  is closed and the device switch to speaker occurs.
- Changes were made to implement the MMAP interface in the
  driver that is Non-blocking. Hence, the write thread gets
  unblocked immediately and the switch to speaker is
  instantaneous.

CRs-Fixed: 453134
Change-Id: I3020f56db31e78aed114e6a4021f519b1ed234c3
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
msm_fb: display: delay commit video tile frame size register

Video tile frame size register is NOT double buffered.
when this register updated, it kicks in immediatly.
During transition from smaller resolution to higher
resolution  it may have possibility that mdp still fetch
from smaller resolution buffer with new higher resolution
frame size. This will cause iommu page fault. This patch
delay commit frame size register until next frame update
if it is necessary.

CRs-fixed: 450126, 461598
Change-Id: I0339100b8b2d76adf2b4b4206d1942effae55e0a
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Merge "msm:camera: Increase the UB sizes for stats"
Merge "ASoC: audio: Fix MEM_UNMAP called before CLOSE ack"
wcnss: Add support for nv bin download at coldboot

NV bin is downloaded when wlan driver is loaded. This change
adds support for NV bin download during coldboot of WCNSS and
thus much before wlan driver is loaded. NV bin id not downloaded
by platform driver during SSR.

Change-Id: I44065185e73a9d43ab7e5d731705321522a0e5a1
Acked-by: Rajesh Chauhan <rajeshc@qca.qualcomm.com>
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Merge "msm_fb: display: delay commit video tile frame size register"
Merge "wcnss: Add support for nv bin download at coldboot"
radio: iris: Shutdown the FM Radio gracefully

Abrupt killing of FM process causes FM Radio not to be turned off properly
and results in audio getting routed to the output devices.
Implemented the release function which takes care of shutting down the
FM Radio in such scenarios.

CRs-Fixed: 456512
Change-Id: I57d0ef59c1fa4f844e794f1adb4f42ea929c7710
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
Merge "msm_serial_hs: Wait for discard flush completion for UART Rx channel"
Merge "radio: iris: Shutdown the FM Radio gracefully"
radio-tavarua: Add support for WCN2243 v2.1 SOC

Enable support for WCN2243 v2.1 SoC which is respin of
WCN2243 v2.0 with the bug fixes.

Change-Id: I883ec0407224d875b1ba1b062903a4eefeb962c4
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
Signed-off-by: Ram Mohan Korukonda <rkorukon@codeaurora.org>
radio-tavarua: Configure channel spacing for enhanced search

Enhanced search algorithm detects 50Khz channel spacing frequencies
in a band with 100khz channel spacing.
Update channel spacing for enhanced Search algorithm on WCN2243 2.1.

Change-Id: If133895e33679a1bc84df8d25841e7e13aa36629
CRs-Fixed: 450643
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
spi_qsd: DM mode support for different fifo sizes

SPI driver doesn't support different block size in
DM mode because based on assumption that GSBI tx&rx
FIFOs are of same size. Some GSBI configuration
can have different tx/rx fifo size. Tx/Rx fifo size
is defined based on input/output block size.

Adds support for different rx/tx fifo size in
case of DMA transaction.

CRs-Fixed: 452986
Change-Id: Ie86f487ea97037ed14e9838a3bd52dfe95f56974
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
ASoC: msm8930: Update gpio values for sglte platform

-Add support for update value for sglte spkr boost
-Add support for new GPIO value for headset

Change-Id: I4e58c54dea3cd144d1c08e817b4062febcf67fca
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
msm: display: msm_fb: Fix hang when framework is rebooted in suspend mode.

Currently, if framework is rebooted while in suspend mode, system hangs
permanently. With this fix, framework will be rebooted successfully even in
suspend mode.

Change-Id: If86ed2613f05454c28a9474ca813f3cfb7cb1069
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>