msm:qseecom: Add validation checks for memory cleanup for qseecom

Add validation checks to handle memory freeing &
prevent NULL pointer access.

Change-Id: I7383b10037ca0ce3f049de060dc70f3ad4b9ca55
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
msm: camera: Check for valid mctl handle before using it.

Everytime we get the mctl handle, check if its valid or not
to avoid null ptr dereferences.

(cherry picked from commit c258cd8dae56a95e2bc3a299501f1e988bfac113)

Change-Id: Iff8bb4886b3d94dc55ee13ad8470e2c8b1a6f4ee
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>

Conflicts:
	drivers/media/video/msm/server/msm_cam_server.c
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>
Merge "msm: pm: Update spm retention sequence to support per core retention"
Conflicts:
	arch/arm/mach-msm/board-8960.c
Merge "ASoc: msm: Add support for VoLTE"
Conflicts:
	sound/soc/msm/msm-dai-fe.c
	sound/soc/msm/msm-pcm-routing.c
	sound/soc/msm/msm-pcm-routing.h
Merge "ASoC: msm: Change SGLTE to Voice2 for reusability of code"
Merge "ASoC: msm: Add support for Voice2"
Merge "msm: sglte2: change the soft reset gpio for the qsc modem"
mfd: marimba: 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: I0a51d324c157db95a8e86d49215012a1c73bb37f
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
Signed-off-by: Ram Mohan Korukonda <rkorukon@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: hdmi: Proper disabling of HDMI

This change allows customers to disable the HDMI in the build
itself. This can be achieved using kernelconfig macros. It fixes
issues where some of the functions got undefined after removing
the HDMI from kernelconfig. Also, fixes issues related to resume
where it was getting stuck in an empty list infinite iteration.

CRs-Fixed: 458871
Change-Id: Id87dc970aa82a6c1cc7756f94f4c61a8ce1c22d0
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/clock-8960.c
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>
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>

Conflicts:
	drivers/net/wireless/wcnss/wcnss_vreg.c
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>
msm: board-8064-gpiomux: clean up of AP2MDM GPIO configurations

Fix drive strength of each of the ap2mdm gpios cleanup so as to avoid
any leakage current and incorrect state. The ap2mdm gpios are
using the default MUX configuration to set them as input and we change
the direction of the gpio as required. Having high drive strength for
these gpios will end up with more leakage current.

CRs-Fixed: 409427
Change-Id: I3e607b2e993c8dbe6b34e32a436749a348686380
Signed-off-by: Taniya Das <tdas@codeaurora.org>
net: rmnet_usb: qmap: reset skb tail when changing data pointer

data pointer is moved to accommodate mux header but as tail pointer
is not updated resulting in loss of data during ip forwarding. Avoid
data loss by resetting tail pointer when manipulating data pointer.

Change-Id: Ica8c8fd25672cdb4ae036454fdaae98f1d327b22
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
USB: u_serial: Fix NULL pointer dereference in unthrottle callback

TTY may call unthrottle callback after port is closed.  This is
happening when tty is hung up during cable disconnect.  The tty's
driver data is set to NULL in port close.  Don't access driver data
in unthrottle callback.  There is nothing to do unthrottle callback
when port is closed.

CRs-Fixed: 463195
Change-Id: Iacedc30f6a5bc8e840d103e6e29f2f5b72b4f007
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
net: rmnet_usb: Fix rx_submitted anchor list corruption

The control receive work is scheduled from interrupt URB completion
handler.  The receive work calls synchronous runtime PM API before
queuing the receive URB.  If suspend is in progress, runtime PM core
will immediately resume the device after the ongoing suspend is
completed.

The suspend and resume is handled by the rmnet data interface driver.
The control receive work state is checked before proceeding to suspend.
If work is pending, suspend is aborted.  Otherwise interrupt URB is
unlinked and considered control interface is suspended.  But a receive
work may get scheduled during interrupt URB unlinking or just before
unlink begins.  The receive work if at all scheduled in this window,
will be waiting for device resume.  The interface resume will queue the
interrupt URB before processing the current receive work and it will
lead to rx_submit anchor list corruption.

Check receive work state after unlinking the interrupt URB during
suspend.  If the work is pending, abort the suspend.

CRs-Fixed: 463353
Change-Id: I8920286be9e29ef02a2643f9b87de99b3294068a
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
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>