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>
block: test-iosched: Sleep before each test

In order to be sure that the packing statistics collected after the test
reflect *only* requests issued by the test (and not real request from
FS) - sleep before each test in order to give an already dispatched
requests time to complete.

Change-Id: If2f40efad1d79084a8ea85afe93cce58e49ff698
CRs-Fixed: 453712
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
msm: clock-8974: Update MMSS NOC and OCMEM NOC frequencies

Update frequencies and nominal fmax values to match
the latest documentation.

Change-Id: Ia9786b253a653fe848f6414713d650c15a68272c
Signed-off-by: Vikram Mulukutla <markivx@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>
misc: Increase dynamic number space

We've exhausted all of the 64 dynamic minor numbers in misc
devices. Ideally, we shouldn't be using so many misc devices. We
should be using cdev directly instead. Increase the number for
now so that kernel drivers don't fail to probe.

Change-Id: I514f4acc7d27b68005ec7f0a8d4ab3c0906b36ff
Signed-off-by: Stephen Boyd <sboyd@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>
ASoC: wcd9xxx: Use appropriate logging levels

During tests where back to back playback is performed multiple
times, the logs can get flooded due to using dev_info. Correct
this to dev_dbg

CRs-fixed: 457386
Change-Id: Ia2edf91b03c99bf59318804e5fceba3347d00856
Signed-off-by: Bhalchandra Gajare <gajare@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: msm: Update media format block with acutal number of bits per sample

Update bits per sample inside media format block to support
16/24-bit playback.

Change-Id: I64568a43b4a7f90d3ca421fcd7d074d48bd5d118
Signed-off-by: Phani Kumar Uppalapati <phanik@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>
cpufreq: Retain only online cpus in managed_policy->cpus

cpufreq's handling of cpu online event can incorrectly initialize
managed_policy->cpus to include offline cpus. This causes cpufreq
governors to include offline cpus in their idle time computation, which
causes frequency to shoot up beyond normal levels (on systems where 2 or
more cpus need to be synchronized wrt frequency change).

This frequency shootup was not seen prior to commit 21111be8 which
changed idle time accounting for offline cpus. Prior to commit 21111be8,
idle time statistics for offline cpus would include their offline time
as well. Post commit 21111be8, offline time is not included in a cpu's
idle time statistics.

As a result, ondemand (or other cpufreq) governors would see unchanged
idle time for offline cpus, causing them to interpret those (offline)
cpus as 100% busy, which is wrong.

This patch fixes the issue by modifying cpufreq's hotplug handling to
retain only online cpus in managed_policy->cpus field. cpufreq governors
would then skip such offline cpus from idle time calculations.

Change-Id: Id2eba8c0ec3367609369b2e42a4e1386ff2e7ab5
Signed-off-by: Srivatsa Vaddagiri <vatsa@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>
ASoC: msm: Avoid accessing audio client in cases of hw_params failure

When asm session open fails in hw_params, it frees up
audio_client. However, the subsequent session close call
tries to access this freed audio client memory. Add check
inside session close to avoid this invalid access.

Change-Id: I63d59566916172c2827dd88aacf6c0a094bf90a9
CRs-fixed: 458359
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
msm: camera: Fix DMI 64 bit write

Updated the DMI 64 bit write to fix issues while writing
both high and low values.

Change-Id: I073bf6aab0cc7ca8789729b62519bb034a5e0deb
Signed-off-by: Nagesh Subba Reddy <nageshsreddy@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>
power: pm8921-charger: decrease the index by 1 except for case 0

The purpose is to get index of [0..3] instead of [0..4].

Change-Id: I736312f04edbd889ac325fe8d0180f9a38c816ca
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
arm/dt: msm8974: Add aDSP heap

8974 based targets have a use case for memory to be used with
the DSP for post processing. Add a dedicated Ion heap for this
use case.

Change-Id: I481c26b6621f68511acf08b0f4ed31933ccca234
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: camera: Add open count check for isp buffer manager

When the second ISP open, the buffer manager should not
be initialized again. This change allow buffer manager
to be shared by two ISP.

Change-Id: I401196296dcc8b4d1eb3056c07f9b5f79c9529d0
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
msm: camera: Increase max ISP buffer queue

When two ISPs are used simultaneously, there could be
maximum of 7 image and 7 statistics output from each
ISP. Increase the maximum number of buffer queue to 28,
since two ISPs share the same buffer manager.

Change-Id: I74fab1dd6091b61db0885dd04b129accd3e81d73
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>