ASoC: msm: fix bounds checking for ADM get params

Update boundary check in ADM_GET_PARAM response,
the param_size returned from DSP is in number
of bytes, update the same in GET_PARAM_CDM_RSP.

Change-Id: Iac0f0c070a021618499bf8545c455885f2346d6a
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
msm: kgsl: Continue if an IB couldn't be dumped in snapshot

If an IB cannot be added to the snapshot list, that's no reason to
stop dumping the object that uses it. Continuing further will make
sure that all possible data is dumped into the snapshot, and make
it available for offline use.

Change-Id: Ia541510754a9919838e7fc337fa3f2515c6f0f05
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
msm: mdss: refactor ping pong completion logic

Replace completion structures with waitq, and track the completion of
ping pong transfer with a single kickoff count variable. This prevents
race conditions when using completion structure and provides a cleaner
way to identify whether wait is required.

Change-Id: Iebb8077d520649db427470fc4963d892967a920c
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@qti.qualcomm.com>
msm: mdss: Correct RGB order for LUT programming in mdp3

MDP3 LUT programming has incorrect RGB order as per HW. The
correct order is to have color0 for green, color1 for red
and color2 for blue. Correcting the order in mdp3.

Change-Id: Ie7b6ab7f83e18495e83a05102e288fee6841e3ab
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
ngd_slim: Fix return paths in transfer function

Return right away if resume fails when runtime-pm is not
enabled. Consolidate return paths if controller power-on
vote fails when runtime-pm is enabled.

CRs-Fixed: 677689
Change-Id: Ia8887dd87df6dba4f93638650794bfcdc7d1ff75
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
slim_msm: support non-blocking writes from slimbus MSM controller

Provide non-blocking write support so that clients can queue multiple
writes, or larger transfers without performance implications.
TX buffer is created and descriptors out of this buffer
are submitted to HW to transmit data.
Descriptor is returned to 'available' pool of TX buffer when HW
interrupt for transmission status is recieved.

Change-Id: Icc2af6bf4f770c8cadb9bd2ef7be0f95eb22c5d8
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
ngd_slim: Ignore pm_runtime_get error when runtime-pm is not enabled

Controller power-up uses different code-path when runtime-pm is not
enabled.

Change-Id: Ibe2f119fd8f43edb657f8f623879dea4730811f4
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
slim_ngd: Use DSP before-shutdown notification for DSP SSR

QMI_SERVER_EXIT notification comes too late (after the DSP has
shutdown). This can result in unclocked access by BAM if there was
in-flight transaction. Use BEFORE_SHUTDOWN notification of SSR
framework instead to make sure in-flight transaction is finished
before DSP turns off its resources.

CRs-Fixed: 730552
Change-Id: If3c2787c74ffa7743772e5e37eac2f768e239050
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Dilip Kota <c_dkota@codeaurora.org>
slim_ngd: Ensure device state consistency with runtime-pm during SSR

During ADSP SSR, client's thread calling runtime-pm resume will
fail since ADSP is unreachable. Make sure such power-up/resume attempt
is blocked until ADSP comes up by using mutex during device-state
transition.

Change-Id: Ie85e52bb2974aaee9654eb8fa1cc60fe37c61b75
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
msm: Increase start voice command timeout

Start voice command timeout is exceeding 300ms
on ADSP.BF.2.2. Increase it to 500ms to avoid
timeout errors.

CRs-fixed: 681025

Change-Id: I940a55a6cd8444ea3ff6fdba0576d7a1f7e8d98c
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
wcnss: send GPIO strength parameter to firmware

To dynamically configure GPIO strength in firmware
send GPIO strength parameter as a part of power manager
indication to firmware.

Change-Id: Iad9351d079a61321d407ca1032add841f16c8fdd
CRs-Fixed: 765151
Signed-off-by: Anand N Sunkad <asunka@codeaurora.org>
ARM: dts: msm: Add GPIO strength parameter for power manager entry

Add new parameter which represents GPIO strength value for power
manager entry for wcnss.

Change-Id: I4ac744c115d1135de5fa6072a94fe823594719d8
CRs-Fixed: 765151
Signed-off-by: Anand N Sunkad <asunka@codeaurora.org>
Revert "msm: kgsl: Device mutex lock for kgsl_cancel_event"

This reverts commit 43371a3f85e286627654e10caae62db22defe6ea.

CRs-Fixed: 765051
Change-Id: Ic42960234e78a258a6918fcc2875ecc502e0e530
Signed-off-by: Anupam Sakargayan <asakarga@codeaurora.org>
msm: kgsl: Device mutex lock for kgsl_cmdbatch_destroy

kgsl_cancel_event must be called with device->mutex
otherwise it will cause a BUG_ON in kgsl_cancel_event

kgsl_cmdbatch_destroy will call kgsl_cancel_event, hence added
device->mutex lock/unlock wherever kgsl_cmdbatch_destroy is called

Change-Id: I9b9959236d6be0d80987279a64a0715363229f7b
Signed-off-by: Anupam Sakargayan <asakarga@codeaurora.org>
msm: mdss: DSI read support for more than 2 bytes

Support more than 2 bytes DSI read for DSI v2 driver.

Change-Id: Ie1b1a7990aed6944036ce82cf4202472604e8e87
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
msm: rtb: Add RTB trace support

Add rtb trace support to support more architectures.

Change-Id: Ic8d42f579f4654db3a4008785fdd7402593a0466
Signed-off-by: Xiaogang Cui <xiaogang@codeaurora.org>
Signed-off-by: Vignesh Radhakrishnan <vigneshr@codeaurora.org>
msm: rtb: Add timestamp to rtb logging

RTB logging currently doesn't log the time
at which the logging was done. This can be
useful to compare with dmesg during debug.
The bytes for timestamp are taken by reducing
the sentinel array size to three from eleven
thus giving the extra 8 bytes to store time.
This maintains the size of the layout at 32.

Change-Id: Ifc7e4d2e89ed14d2a97467891ebefa9515983630
Signed-off-by: Vignesh Radhakrishnan <vigneshr@codeaurora.org>
NFC: Add error handling to i2c access

This patch adds error handling to each i2c access
Furthermore, the timeout for the wake status
register of the nfcc is increased to cover corner cases.

CRs-Fixed: 765256
Change-Id: Ia8f99a89ec2e107dde4256f4afb24b461b50540a
Signed-off-by: Nakul Kadannavar <nakulk@codeaurora.org>
Merge "msm: rtb: Add RTB trace support"
Merge "msm: rtb: Add timestamp to rtb logging"