msm: rpm_rbcpr_stats_v2: Changes for new RPM stats format

The RBCPR(Rapid Bridge Core Power Redcution) driver on RPM processor has
modified the way the RBCPR stats are laid out. Modify the RBCPR stats
driver on Apps to adjust for those.

Change-Id: I51eebf7b52af712281b13f8d831e24dfaeb6de86
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
msm: camera: Avoid memory corruption in actuator start routine

When actuator is initialize for first time reg_tbl and step_position
table pointers are pointed to junk and can't call for memory free.
call for memory free only when actuator is already powered up.

Change-Id: I1fc7d0ed5ad904f9d532651b0468073fd75c284e
Signed-off-by: Lokesh Kumar Aakulu <lkumar@codeaurora.org>
ARM: dts: msm: Add CX regulator Phandle to MDP node

The Phandle might change for different versions of
the msm8974 chip. Add the proper Phandle of CX regulator
to 8974pro version.

Change-Id: I6e8ab19c9765ff225a54a621cd001e8af1c7391d
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
qseecom: change the number of bytes to compare app names

keymaster app has two names with different length: "keymaster" and
"keymaste". To compare the app names correctly, the shorter name
length is choosen for memcmp in __qseecom_send_cmd.

Change-Id: I5f0dff7f9756362be40cc64985b65bc2268d734f
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: William Clark <wclark@codeaurora.org>
mmc: core: Avoid infinite retries of failed mmc command

With some bad SD cards, it is possible that the error recovery
procedure goes into a state where it retries the failed command
infinitely leading to CPU hog.

Fix inifinite retries when the bad SD card isn't responding to
a command even when the SD card reset mechanism is successful.

CRs-Fixed: 671153
Change-Id: Ic6db66b571aa425aec32c82d52789c68fe0cb0e9
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
hwmon: qpnp-current: Fix parameter configuration for IADC

Removing redundant parameters which are not applicable
on the IADC peripheral.

Fix the issue with "fast_avg_setup" and "decimation"
parameters to configure correctly as per channel
configuration.

Change-Id: Idfe823effc6255b57e31f37621971aab29f08020
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>
msm: kgsl: Mark mmapped objects with VM_DONTCOPY

Add VM_DONTCOPY to the default set of mmap flags to keep VM objects
from being copied on fork() and causing issues.  KGSL file descriptors
copied to a child are not expected to be usable.

Change-Id: Ic0dedbad85c07118a931ccb9f7a6fd0507da3e5a
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
mdss: mdp: fix incorrect programming of scalar enable

In use-cases where scaling is required in one direction
and not on other, scalar extension parameter will be set
to update the scale register. Add proper check to this enable
scale bit only in the required direction.

Change-Id: I5527f22c83fe456d0124af12516c5bdb240e80a9
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
ASoC: qcom: qdsp6v2: fix crash due to asynchronous read/write

Whenever an async read command is issued to dsp when
the driver is not enabled, there is a crash in userspace.
The read command is disallowed in the driver and an error
is propagated to userspace which results in the crash.
The driver is re-enabled in a subsequent asynchronous write
command anyway, so the async read command can be allowed.
Ensure that read is allowed by removing a superfluous check.

CRs-Fixed: 675131
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
Change-Id: I5d0598e37d08ac1090f98c24be49fd99c132e22f
ASoC: msm: qdsp6v2: check proxy port is open when closing

The current logic opens the afe proxy port only if the
proxy instance virtual port is opened. If only
pcm instance virtual port is opened and a close of the
afe proxy port is attempted, this causes the device to
crash due to a wait event timeout as the driver tries
to close an unopened afe port.
The change ensures that only if both the virtual ports
are opened, which in effect starts the proxy port,
the afe close commands for the proxy port is sent to DSP,
else return immediately.

Change-Id: I9450001c608208f3d8da22b2881a88db1c21d950
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
media: dvb: increase SDMX shared buffer size

A shared buffer is used to encode the command and response when
sending a command to TZ via qseecom interface.
To allow increasing the number of linear buffers the shared buffer
size is increased to accommodate the command data.
In addition, add checks to detect overflow of the shared buffer.

Change-Id: Ie006d20f3841aa7e8ea2e30bd6a5b211099936af
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
msm: vidc: Disable clock gating feature

Clock gating between inter frames when video hardware
is in IDLE state is not giving any power savings and
at the same time this feature is resulting in few
stability issues. So disabling clock gating feature.

Change-Id: I3d1d4521ec3ee2fbd25d80b33bd5c531a25d9034
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm: vidc: Bug fix in instance clean-up

When close is called directly without proper state operations,
then driver tries to clean all V4L2 framework memory. When driver
calls queue_release, it tries to call stream_off again. This
causes driver to re-enter the state operations. This change
prevents driver to re-enter the state diagram.

Change-Id: I6df248792fca78fe743bead311fa1cec61a6bb79
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
msm: mdss: decouple clk ctrl and bw ctrl

Move bandwidth control to panel on and off functions
to speed up the clock control.

CRs-Fixed: 673613

Change-Id: Ib3828687ab54fb7a5aad7e97dec46c6e76a7311a
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
ASoC: msm-lsm-client: handle close gracefully

The listen pcm device could get closed abruptly due to userspace
application crash. In such cases, the device close will be invoked
abruptly. Handle this scenario gracefully by properly cleaning up the
driver before close.

Change-Id: Ie841f300400d547260da92383712a9aa0689d7a7
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: wcd9xxx: add INP2, INP3, INP4 for IIR paths

Add INP2, INP3, INP4 for IIR paths to provide client to use
any one of the four different paths for sidetone

CRs-Fixed: 653019
Change-Id: I8fc27ca07c84c9381b162f32456f5578f796e468
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
Merge "msm: kgsl: Mark mmapped objects with VM_DONTCOPY"
Merge "msm: vidc: Bug fix in instance clean-up"
Merge "msm: camera: Avoid memory corruption in actuator start routine"
Merge "msm: vidc: Disable clock gating feature"