msm: kgsl: Enable VBIF dynamic clock gating for 8974v2

Enable VBIF dynamic clock gating for 8974v2 by leaving
VBIF_CLKON at its POR value.

Change-Id: Iea465c992448188bb6a248fa625e37a37b578f7c
Signed-off-by: Pu Chen <puchen@codeaurora.org>
msm: vidc: support 128 byte stride alignment for Q6

Q6 video firmware supports the same stride and
scanlines alignment as Venus hardware.

Change-Id: Iaeea81454eb3da1ae1be26ea5111454ceacd3b1a
Signed-off-by: Arun Menon <menon@codeaurora.org>
arm/dt: msm: Remove standalone property for smd communication

Remove standalone property to allow smd communication
between apps and rpm.

Change-Id: Id122082c7e5629b8a455ef2cffcfe761af46eba0
Signed-off-by: Priyanka Mathur <pmathur@codeaurora.org>
tty: n_smux: Add SMUX documentation

Add SMUX documentation that was missed when the initial
driver was added.

Change-Id: I5b23e451ff48d1eac05b22de3e5f0e017a6f7b0c
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
ASoC: wcd9xxx: 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: Icd819737db289a688a993ba5e5f47967ae14a0d8
Signed-off-by: Patrick Lai <plai@codeaurora.org>
ASoC: wcd9320: correct headphone event type

When headphone power amplifier event callback is being called,
wrong headphone event type is passed to CODEC resource manager.
This results in headphone over current protection status not getting
cleared.

Change-Id: I30a949029e0bb38e569aa6984e703dcc0d878c54
Signed-off-by: Patrick Lai <plai@codeaurora.org>
msm: msm_bus: Add NULL pointer check

This patch protects the bus driver against clients who try to
update requests without registering the client.

Change-Id: Ie740844218dbabe5fca098798c461590aba42e97
CRs-Fixed: 459651
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
msm: clock-pll: Fix handoff code for various PLL types.

Soft vote PLLs are missing handoff ops. The legacy shared PLL handoff
implementation does not account for the case where the PLL might be
initialized but not enabled. Fix these issues.

Change-Id: I14febb40a15eb1edc996cdbe6db122db7d05a9e1
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
msm: kgsl: Change bus frequency before GPU frequency

On frequency increase the GPU may be able to overflow the
bandwidth it has requested.  Increase the bus first to be
sure that isn't an issue.

Change-Id: Ief21ce5263196e0e0c537901c91986b178fb8910
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
msm: mdss: export mdp capabilities to user space

There are many variants of MDP with different capabilities, in order to
get the most out of the hardware userspace should be aware of the use
cases that can be supported.

Change-Id: I7a4146d38af7e81f586f3e2818320fb7264d303e
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
coresight: 8610: clock support for coresight driver

Add clock support for coresight driver in preparation for
enabling coresight debug support on msm8610

Change-Id: I261d4c4acd366ac9dc7a943785b543434d1017ad
Signed-off-by: Aparna Das <adas@codeaurora.org>
msm: ADSPRPC: Fix bugs in hlist usage

Use hlist_for_each_entry_safe to iterate over nodes when deleting them.
Don't assume that for_each loop will find a node to delete.

Change-Id: Ia3bf5c88844b865d8cfb7e02ce6008a1b9f8e2b4
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Acked-by: Anatoly Yakovenko <anatolyy@qti.qualcomm.com>
msm: ADSPRPC: Implement persistent mapping of memory to the dsp.

Implement ioctl for persistent mapping of memory to the dsp.  Keep track
of mappings and free them when the device is released.

Change-Id: Iefc836bd982b28d37de649d1685c8965604f7f58
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Acked-by: Anatoly Yakovenko <anatolyy@qti.qualcomm.com>
msm: kgsl: pwrscale functions should be run while GPU is ACTIVE

Base the decision to call power scaling functions on the current
state, not the requested state.  The GPU may not transition to the
requested state; call through based on current GPU state instead.

Change-Id: I1524bc92c908dc50a60b5815f2221ae3feef59be
CRs-Fixed: 441847
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
msm: clock-8974: Add clock look-up table entry for osr_clk

osr_clk is the Master clock used by Audio Codec for its internal
operations.

Change-Id: I4ae2f20ee6b43f23f8263ec863f550a3f74c2659
Signed-off-by: Banajit Goswami <bgoswa@codeaurora.org>
msm: mdss: hdmi: add hdmi debugfs support

Register HDMI Core's address space with mdss debugfs for
run-time debug.

Change-Id: I5230a48024eaa732fb2bd526c56e28489bbb87ec
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
ASoC: wcd9xxx: Fix incorrect detection of mbhc plug type

When MBHC detects plug type as headset or headphone, hphl
status should be 1 in all the DCE measurements. Where as
in case of euro headset hphl status should be 0. Declare
invalid plug type if the above conditions are not satisfied.

Change-Id: I1b8d687904942425eba0759785e6625575b1a308
CRs-fixed: 461300
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
arm/dt: msm8974: Remove PLL commands for Standalone PC

On V2 hardware, the SPM can handle turning on/off HFPLL only if the core
was running on HFPLL before stand alone power collapse. This operations
requires a 50us delay for the HFPLL to stabilize when entering
standalone power collapse. This results in higher power numbers when the
device is in a idle state. So remove the PLL on/off commands for
standalone power collapse only.

Change-Id: I517fb9aeade6084d6d0ad07726bd9e6b10d83bfb
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
msm: mdss: hdmi: reset hpd_state when hpd circuitry is turned off

Reset hpd_state to disconnect when hpd circuitry is turned off by the user.

Change-Id: Ib37d8f55d51afa57b7f46f603fbae4e3e3a47de5
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
diag: dci: Add new Logs and Events API for DCI

Diag Consumer Interface now has new APIs for disabling all logs and
events and also to query the log codes and event IDs for a
particular client. Fixed issues in Diag Driver where memory was not
freed up in error conditions and a mutex was released incorrectly.
Also added mutexes at places where DCI Health Statistics members
are modified.

Change-Id: I6da13487782b77c72edc93106165cd9c3d9682d9
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>