msm_fb: hdmi: Return proper clock get error code

This change returns the proper error code while in probe and trying
to get the required clock and fails. This is required for probe deferral
support.

Change-Id: Ief91b1f634c06d3679157313506b56e5948aa79c
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: camera: Add null checks for stats module

Add null checks in stats driver before accessing the
data structures to avoid null pointer crash.

Change-Id: I87639848e94e69e3fa020344f936e7cc182e2c66
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
ASoC: msm: Fix wrong wait_event_timeout timeout checks

wait_event_timeout returns zero when there is a timeout.
Change fixes the condition check to handle timeouts.

Change-Id: I01184cce0c98a82bb205023b07dd4dd2d91b42ad
CRs-Fixed: 487821
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
msm_fb: hdmi: Proper intialization of mhl resolutions

This change adds missing video format intialization

CRs-Fixed: 481049
Change-Id: Ic14eaba7fefcb8b7f9240cae8c179e3dbeef72a5
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
ASoC: WCD9304: Add the compander support to wcd9304

The compander system is intended to increase the dynamic
range of an input signal. But for the wcd9304 codec,
this feature is to use companding in a novel way in the DAC
converter path to increase the signal noise ratio.
The change is to add the compander support to wcd9304
codec. The dynamic compander enable/disable during stream
playback is not supported.

Change-Id: If912302ee9d48dde1318e894a982cba591908d8f
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
msm: mdm: change where ssr_count is decremented

In fusion targets with more than one external modem, where
the modems are restarted together, ssr_count keeps track of
how many modems are still left to be completely restarted so
that any new SSR requests would be rejected until all modems
are restarted. Ssr_count should be decremented when the SSR
module sends the SUBSYS_AFTER_POWERUP notification instead of
during the powerup callback in order to be in sync with the
state of the SSR module.

Change-Id: I196f4937d929c54f475d251632f111404a2b3bf1
Signed-off-by: Joel King <joelking@codeaurora.org>
msm: kgsl: Protect the mem_entry list during deletion

Use the spinlock to prevent corruption of the mem_entry list during
deletion. Otherwise the mem_entry list may be modified by another
thread at the same time resulting in memory corruption.

Change-Id: I5728a8b925753d5fda82413615e5ebaf0366dfd8
CRs-fixed: 489224
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
msm: kgsl: Submit a draw command on resume

For A305, submit an extra draw command while resuming the GPU from
SLUMBER state. This fixes corruption seen when the screen is
turned on.

Change-Id: Iafed90b617b0a700ac3f2afcb6d9ecadca590914
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
msm: msm_bus: Correct the return value from register-client

On failure, return 0, and not a non-zero value as that can
be interpreted as a valid client ID.

CRs-Fixed: 486328
Change-Id: I7a5b448bc398b4a4792170147a5e5317d25f8b3c
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
msm: vidc: Allow client to set turbo mode

- Allow client to set TURBO performance level
  to video driver.
- Update max performance level to TURBO perf level
  on supported targets.

Change-Id: I0b3b38140d777984ba5062ddd614c07a002389ba
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
ci13xxx_udc: Acquire spinlock before calling ep_nuke()

The commit b0ad433 (USB: ci13xxx_udc: Fix kernel panic during
composition switch) adds ep_nuke() function in gadget_stop_activity().

_ep_nuke() releases and re-acquires spinlock on every entry of the
function. Acquiring spinlock before calling _ep_nuke() is necessary,
else it may end up in unlocking the lock twice, as it is already
unlocked before calling _ep_nuke(), which may lead to crash.

Hence, acquire spinlocks before calling _ep_nuke() function.

CRs-Fixed: 486502
Change-Id: Ia80b9facb8e592f8fb41879dc08f9f1a04a20b48
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
media: dvb: Protect against removing all PIDs from an active filter

When TS filter is active (running), it is not allowed to remove
all PIDs associated with the filter; The filter state would be
invalid and as such may result in unexpected behavior while
performing runtime operations on the filter.

CRs-Fixed: 492444
Change-Id: I340b02bed218e89ffe89932e3b3e9ea93f429876
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
USB: ci13xxx_udc:  Retire pending requests while flushing an endpoint

Rmnet and dun function drivers are designed to start fresh upon MODEM
restart.  The current code is flushing endpoints without freeing
requests.  New requests are allocated again after MODEM is powered up.
All accumulated requests are freed only upon cable disconnect.  If
MODEM is restarted multiple times without disconnecting the cable, we
are running low memory issues.

A pending request can not be freed without dequeuing it.  Dequeuing
all requests in a loop is a heavy operation and involves changing
multiple function drivers.  All pending requests are retired upon
disabling an endpoint.  But an endpoint can not be disabled in
configured state.  Hence retire pending requests while flushing an
endpoint.

CRs-Fixed: 489047
Change-Id: I3440a204ad8c4beb043b1068cb1d3965be96e9b7
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Merge "msm_fb: hdmi: Proper intialization of mhl resolutions"
Merge "msm: kgsl: Submit a draw command on resume"
Merge "media: dvb: Protect against removing all PIDs from an active filter"
msm: camera: Add state check for sensor power up & down

Sensor state check added to avoid incorrect power up &
power down calls.

Change-Id: I278e8be1e346f93fa410b38086388f08c4f6ae31
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
Merge "ci13xxx_udc: Acquire spinlock before calling ep_nuke()"
media: dvb: Add initialization of PES error indicators

Following SDMX notification on PES data the errors indicators
for PES event were not cleared if SDMX did not report any error.

CRs-Fixed: 493108
Change-Id: I89b43ce193b96462b804848c5e484d25343d5f40
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
msm: 8064: Add connector resistance

The adjust vdd max algorithm in the charger driver needs connector
resistance to set the battery voltage appropriately.

Set the connector resistance value from the board file.

Change-Id: If934783e2910c8456090c8926e934138abb75222
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>