ARM: mutex: use generic atomic_dec-based implementation for ARMv6+

Commit a76d7bd96d65 ("ARM: 7467/1: mutex: use generic xchg-based
implementation for ARMv6+") removed the barrier-less, ARM-specific
mutex implementation in favour of the generic xchg-based code.

Since then, a bug was uncovered in the xchg code when running on SMP
platforms, due to interactions between the locking paths and the
MUTEX_SPIN_ON_OWNER code. This was fixed in 0bce9c46bf3b ("mutex: place
lock in contended state after fastpath_lock failure"), however, the
atomic_dec-based mutex algorithm is now marginally more efficient for
ARM (~0.5% improvement in hackbench scores on dual A15).

This patch moves ARMv6+ platforms to the atomic_dec-based mutex code.

Change-Id: I5cb600b15f891dc692356322b38cae1d692a084c
Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
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>
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>
media: dvb: Fix race condition in DVR thread

When DVR thread is created, it may happen that user sets
DVR buffer mode to external buffer but did not yet set the
buffer itself, meanwhile, DVR thread checks whether the
input buffer was already set and if not the thread terminates.

This causes termination of DVR thread for no good reason.
DVR thread should be terminated only when DVR device is closed.
The change removes termination of the thread when input buffer
is not set yet to avoid such race condition.

CRs-Fixed: 493761
Change-Id: I57c9acd13bd493ae08d28703bf5f6c0dea55c20a
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
msm_fb: display: change TE simulation and read pointer interrupt timing

The current parameters for command mode TE simulation on mdp side are
not straightforward and cause double read pointer interrupts. Now make
read pointer interrupt and line counter reset happen right at h/w
vsync, and kick_off start position and height are set to back porch
and max respectively, so timing is much simplified and the chance of
tearing is reduced.

CRs-fixed: 463273
Change-Id: Ia25710556bc2b031cdfaaf08fee034baab33d124
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
led: leds-pm8xxx: Add support to control compensation resistor

Add support to control compensation resistor of WLED
passed from the board file platform data.

Change-Id: Id5f36d49a532d8216ea9bc1415e67135d40ee18d
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
arm: board-8930-pmic: Pass WLED compensation resistor value

Pass WLED compensation resitor value via platform data.

Change-Id: I318b2edc817f50181bd2b7c08cb01b15b72cc5e6
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
media: dvb: Fix parsing of SDMX results

When playing from memory, it may happen that demux thread
is stalled while parsing SDMX results due to PULL mode.
While thread is stalled it is possible that user asked to
add new filter and therefore the SDMX filter count increases.

When thread gets back from stalling, it may parse additional
filters result even-though they were not processed by SDMX yet,
hence parsing un-initialized data.

Change-Id: Idb9430ec07f5869585ed1ae9ab3d43c4d31ff4d2
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Merge "media: dvb: Add initialization of PES error indicators"
Merge "media: dvb: Fix race condition in DVR thread"
Merge "media: dvb: Fix parsing of SDMX results"
msm: camera: Update op_pixel_clk for ov9724 sensor.

The op_pixel_clk for ov9724 sensor is not updated properly.
Since this decices the VFE clock while using this sensor,
this leads to violation errors from VFE especially during zoom.
Adjust the clk such that VFE clock is upgraded accordingly.

CRs-Fixed: 495462
Change-Id: Ice1bb722143ef24982b5ba7c5e528235bc779123
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
msm: rotator: Add proper checks for enabling Fast YUV

For rotator version 2.0 and above, there is support for fast
YUV which gives better rotator performance. However, there are
few constraints related to height under which fast YUV cannot be
enabled when 90 degree rotation is enabled. Make sure
to add proper checks before enabling fast YUV.

Change-Id: Iafd204a6e4ef09e1151d01d8fde35359b7c3b7a5
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Merge "msm_fb: display: change TE simulation and read pointer interrupt timing"
Merge "led: leds-pm8xxx: Add support to control compensation resistor"
Merge "arm: board-8930-pmic: Pass WLED compensation resistor value"
Merge "msm: camera: Update op_pixel_clk for ov9724 sensor."
Merge "msm: rotator: Add proper checks for enabling Fast YUV"
Merge "ASoC: WCD9304: Add the compander support to wcd9304"