msm: kgsl: Increase IDLE_TIMEOUT for 2D core to 20secs

Increasing the hang detection time for 2D core from
10 secs to 20 secs to avoid False GPU Hangs.
Some c2d test cases are taking more than 10 secs
to process which results in a False GPU Hang.

Change-Id: Ice5e4b719adb44cd13fb8164bafedce1049416f7
CRs-Fixed: 454439
Signed-off-by: Vikram Orre <vorre@codeaurora.org>
ASoC: wcd9304: Enhance OCP reporting logic

CODEC has over current protection(OCP) finite state
machine for both left and right headphone while CODEC
driver tries to delay reporting of OCP event after
CODEC reporting OCP two times. Current CODEC driver
implementation results in unlocking one of headphone
power amplifier when OCP reported on both headphone.
Change the behavior to report OCP event for a give
headphone immediately if OCP already occurs on opposite
headphone.

Change-Id: I49d062f7c7f1a99390e82660c8f3e538a0a3cd56
Signed-off-by: Patrick Lai <plai@codeaurora.org>
msm: kgsl: Add barriers to GPU fault tolerance memory reads

In GPU fault tolerance When reading from memstore add
memory barriers. This ensures memstore reads are
completed and makes GPU fault tolerance code robust.

Change-Id: Iefb950ae2647eb8ae16bfb9a8d7ee9885636d920
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: a2xx: Check the right interrupt status bits

Check the actual interrupt status bits in a2xx_irq_pending instead
of reading the mask registers which were always set and returning
true. Troutslap for the original author (me).

CRs-fixed: 467381
Change-Id: Ic0dedbada1c5fa64548221718c1eaf9b6eaaa1e8
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
ASoC: msm: qdsp6v2:  Instantiate mi2s dai driver

Current mi2s dai design is inherited from legacy platform which only
has one MI2S interface. When multiple MI2S interfaces are exercised,
same soc dai driver structure is shared among MI2S DAI drivers. As
assignment of MI2S serial data lines are assigned based on platform
data, it was found that succeeding mi2s dai driver overwrites
playback/capture channel min and channel max fields of soc dai driver
structure which are meant for prior mi2s dai driver. Update the
design to dynamically instantiate mi2s dai driver structure instead
of sharing same statically defined structure.

Change-Id: I8de377c471d4a0372072e2acc6ab13bae24df996
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
ASoC: msm: qdsp6v2: Fix MI2S channel mapping

For MI2S, SD lines using for audio playback and capture come
from platform data, then map to LPASS MI2S interface. There
is bug in the mapping function which causes incorrect SD
lines are assigned which leads to AFE starts failed.

Change-Id: I0dd79768350d32d22cefcefead6bfd4aa172e5fc
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
hwmon: qpnp-adc-current: Add init_completion

Initialize the completion before requesting a
conversion. This is to avoid cases where we might
miss the completion and rely on the timed wait which
would cause slight delay before returning the result
to the client.

Change-Id: I49b635699c3432ca8363d68493ea02e17f7c6c64
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
msm: vidc: Convert cluster definitions to bitwise constants

Make all the enums into bitwise constants so that we can put controls
into multiple clusters.

Change-Id: I74ca935fd8173e8b978692054509c3d333809840
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: kgsl: Add global timestamp information to snapshot

Make sure that we always add global timestamp information to
snapshot. This is needed in playbacks for searching whereabouts
of last executed IB.

Change-Id: Ica5b3b2ddff6fd45dbc5a911f42271ad5855a86a
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
arm/dt: 8974-v2: declare HDMI Tx differences from 8974 v1 to v2

Register address space for HDMI Tx has increased between 8974 v1 and v2.
Handle it by overriding default register mapping from mdss device tree.

Change-Id: I16720a74145654fd6b78d159055f8dc2965b5094
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
arm/dt: msm9625-mtp: Configure MPP4 and MPP6

Configure MPP4 and MPP6 as analog input to AMUX8 and
AMUX6 respectively. MPP4 and MPP6 are used to read
the thermistors on premux VADC channels 19 and 21
respectively.

Change-Id: I61b5b745434572165a55da28a257940badc12ec6
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
ASoC: msm8930: properly protect external mclk control function

Both audio path and MBHC accessory detection logic need master clock
enabled along with bandgap and clock block of CODEC. Clock control
is managed by the machine driver. Calls to clock control function from
audio and MBHC detection paths can be nested. As a result, reference
counter of master clock is incremen/decrement out of order and cause
master clock not enabled when audio path is enabled. Without master clock
CODEC will not consume data and this leads to SLIMBUS overflow error.

CRs-Fixed: 469683
Change-Id: Ib3a55f5d0b36ebe9ba345e7f18162a9314500df2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
arm/dt: msm8610: Add bus topology for 8610

This patch adds the device-tree file to build bus topology
with master/slave definitions for 8610.

Change-Id: Id54363a1dab45cf85092654571879228afe246be
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
msm: 8610: Switch on bus scaling on 8610

This patch enables bus scaling on 8610 by selecting the config.

Change-Id: I33a79e804e682dbb241b96ecfb03ac01eaaf703d
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
msm: camera_v2: differentiate streams with vb2 buffers.

vb2_poll needs to be called only for streams that have
vb2 buffers associated with them. If this is not taken care of,
the function constantly returns an error code for non vb2 streams
resulting in the polling process hogging the CPU.

Change-Id: I70d29e1666478c07bf8513ead7499891a3f01bd6
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
msm: cpr-regulator: add MX handling as dependency for VDD APC

It could be required for the memory power (MX) to be equal or
higher than VDD APC voltage in certain way. Add code to
handle this voltage dependency with the support for several
possible methods of dependencies. If no such requirement on
certain target, don't specify the MX regulator in device tree.

Change-Id: Iabc8abe3eda881a92304aeb8e1f98394c8938c67
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
arm/dt: msm8226-regulator: add vdd-mx-supply entry

Add vdd-mx-supply entry and its parameters to support voting
for the dependency of vdd-apc on MSM8226.

Change-Id: I2d8439b333584b2cd2c712be4d1fb244f98d70d3
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
hwmon: qpnp-adc-current: Fix IADC current units

At low current values, not using the correct units
for scaling the voltage and dividing it by the appropriate
units for rsense causes incorrect resolution in units for
current. Fix it by using the correct units.

Change-Id: Ia76382268b69db194f5f17f5a129140e75d66298
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
msm: clock-8610: add mdp and dsi clocks

Add mdp and dsi clocks for display on 8x10.

Change-Id: Id105c5b6fede82c3dd6d220ffa9f22c913430c3c
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
gpu: ion: Move ION_HEAP_TYPE_DMA to msm specific code

ION_HEAP_TYPE_DMA has not yet been merged upstream. Keep
the definitions in msm code until a final version has
been reached.

Change-Id: Idaf3a4df48a627f94d60c53d30edc7a20b1b2127
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>