msm: adsp: qdsp5: Allow MOD_READY event in ENABLING state

JPEGTASK is receiving MOD_READY event after it is disabled
which is not expected. When JPEGTASK enable fails with
ETIMEDOUT error, this module is disabled immediately.
But MOD_READY event for this module is sent by RPC to
Apps ADSP Driver even after it is disabled. Ignore this
event incase module state is not in ENABLING state.

CRs-fixed: 395420
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
(cherry picked from commit d8aa19223074d2470a9f4b12a472ea74a82138c0)

Change-Id: I7bd851403bd6422692da756d60427321ca3794c6
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
vidc: 1080p: Handle flush for interlaced clips.

Video core expects one field per buffer for interlaced
clip playback.If a flush is issued we should reset the
need next field flag, so that new bitstream is processed
after flush is completed.
Reconfig flag shouldn't be reset in case of EOS.

Change-Id: Idf50a24c29e904a958b0b1e850813e2d9fc4346d
CRs-fixed: 382368
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
(cherry picked from commit f19f4d27088015842f9bd0945f62b34e90fd784d)
msm_fb: display: remove mdp_lut_enable call to avoid hang issue

Calling this function is not necessary in mdp overlay2 writeback
driver. If called, it causes command mode primary hang.

CRs-fixed: 365332
Change-Id: Id7054c3e56224035ec5939d91f8ce152b038e858
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit 98b3a61592b34d0f39ed2dd00ef56b3ad575e0d2)
vidc: 1080p: IDR picture type support for H264 format

Read IDR picture type from 1080p core register set
and propagate it to user space using IDR frame type
enumeration in api header file. The IDR frame type
info is used in SYNCFRAME logic for H264 format in
userspace.

Change-Id: Ic677eb4d28469f6712832b7e09050467420eb70b
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
(cherry picked from commit b2295e885966a000cceedcfd4a6462113fe3be4a)
msm: video: wfd: Add error handling while wfd open.

- Error handling is not performed when memory allocation failed.
- Reset wfd driver status to false.

Change-Id: Ied77ca1a607c007f5b182e81915f92c9ebc60fee
CRs-fixed: 383712
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
vidc: Handle EOS with Codec config buffer.

Change will handle codec config buffer with EOS.
Video driver will make sure that the codec config buffer with
EOS will be requeued in case of reconfig and non-reconfig paths.

(cherry picked from commit 43b203869814fe5f0ddcb265a8f859aebdaa652f)

Change-Id: I424df5628aaededcbd65c36d369410909e46c515
CRs-fixed: 399347
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
msm: camera: fix for preview rotated by 180 degrees

Change sensor mount angle from 0 to 180 to make the
camera preview proper

Change-Id: I5cd959d6ea6546236ee4be256b7346ae77866fbb
Signed-off-by: Roja Rani Yarubandi <rojay@codeaurora.org>
msm: usb: Tune USB PHY squelch threshold settings

Currently, USB PHY squelch threshold settings(SQRXTUNE) is having
the power on reset value(0x3), due to which enumeration failures
are observed, if amplitude of the USB signal received is less than
threshold. Fix this issue by updating the SQRXTUNE value using
OVERRIDE B register from 3 to 6.

Change-Id: Ib04165bb295c65b6c068a17bba6392611cc1a6d6
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
msm: camera: synchronize vfe start/stop operations.

In monkey runs due to race condition vfe_start gets triggered
before vfe_stop. Add synchoronization mechanism to avoid this.

Change-Id: I78f1820e78dd1cd94098c5edb3ad92548e874713
Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
(cherry picked from commit eeca82f2028f888f4895c6530879446cb3a2693f)
Bluetooth: Add sockopts for LE Connection Params

Various LE profiles require very specific LE parameters for
both establishing and maintaining LE connections to remote
peripherals. These LE only parameters are encapsulated into
a single sockopts structure, and may be passed from user space.

CRs-fixed: 335971 387146
Signed-off-by: Brian Gix <bgix@codeaurora.org>
(cherry picked from commit a94b6122f4f7a44dc1d6e6a5dfd2533cad7a3abf)

Change-Id: Iaa2e6a8b371a5463d335d5ea30fd96493a1688b6
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
Bluetooth: Fix for supervision timeout must be 6X connection interval

Added a new function to verify whether the LE Connection Update
parameters are valid instaed of verifying all the LE Connection
parameters since only update parameters are set in the Connection
Update Request.

CRs-Fixed: 387146
Signed-off-by: Archana Ramachandran <archanar@codeaurora.org>
(cherry picked from commit 95319af0612d58788279748f586cc57221c3443e)

Change-Id: I3b803235150fc2b4508977d766b0f309a74de0c0
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
defconfig: msm7627a: Set 500 mA as gadget vbus draw

Allow the USB gadget to draw 500 mA current from connected
Windows Host rather than 2 mA.

CRs-Fixed: 392931
Change-Id: I100fdc0dca4ec5c0aa16d9b27d1e7d53fcbf7c9f
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
msm: audio: qdsp6v2: Fix WMV stream resume issue

- Suspend phone while WMV clip playback is going on.
Resume it, clip fails to play.
- At resume of WMV clip, Pause is issued initially
to driver. But there is a bug in pause API which is
not returning appropriate result. OMX component when
starts playback, it now issues resume to driver and
driver is setting DSP to run state even before ENC_DEC
params are set.
- Fix pause code to return error value if driver is not
enabled. This will avoid driver in sending CMD_RUN
before ENC_DEC command.

CRs-Fixed: 394756
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
(cherry picked from commit 92ad28cd56803b451ae4bde72bfd20021c769649)

Change-Id: I8435fa5fe21f8d01802fbef70e0994584382b460
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: Qdsp5v2: audio: Migrate to ION

PMEM is deprecated, switch to ION.

Change-Id: Ia15c444e26961d8aa40bd5db3ece1fd9368e02ef
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
Signed-off-by: Sriranjan Srikantam <cssrika@codeaurora.org>
Merge "Bluetooth: Add sockopts for LE Connection Params"
Merge "Bluetooth: Fix for supervision timeout must be 6X connection interval"
Merge "msm: adsp: qdsp5: Allow MOD_READY event in ENABLING state"
Merge "msm: video: wfd: Add error handling while wfd open."
msm-camera: Add Double Padding Support in Gemini

Add support to handle the padding
on both sides of the input buffers
to the Gemini driver to support
rotation in ZSL mode

Change-Id: I4bc0ef5a3d0f551021afbb93fd57acdcc83875b4
Signed-off-by: Ashwini Rao <ashwinik@codeaurora.org>
(cherry picked from commit 7a632c64debde89a280b20ca01e5ec1f27fe947f)
msm: camera: organize VFE frame id field into parts.

The actualt frame number will now be represented by the first
24 bits of the frame id field. Bit 31 will be used as a focus
indicator. The remaining bits will subsequently be given
other meanings.

Change-Id: Id4b248bbbce0e808a11836f94c0d38c877e992af
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
(cherry picked from commit 0127c73c6df100702081ed0a2a723addd17ed97f)