msm: kgsl: fix interrupt mask in tracing macro

In tracing macro kgsl_a3xx_irq_status replace
A3XX_INT_RBBM_AHB_ERROR with A3XX_INT_RBBM_GPU_IDLE
mask for status bit.

Change-Id: I44b7ae9bc5eadd25b43723d1b4d45ad3cde1a47a
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
msm: kgsl: Use IDLE interrupt to switch to NAP state

Replace busy waiting loop to interrupt driven.
Current code starts probing for GPU idle after
RB_INT interrupt. This prevents CPU
from clock gating for 150-400uS per frame
and burns battery.

This change utilizes the RBBM_GPU_IDLE interrupt from
GPU. The GPU triggers this interrupt when it is
entering IDLE, so there's no need for busy
probing loop.

Change-Id: Ib00780ff426927a6e88013804d9b08a63e06affd
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
Revert "ASoC: wcd9310: Fix DMIC current leakage after disable"

Codec power rail has 0.3mA higher sleep current leakage.
This happens due to configuring digital mic clock pin
(DMIC0_CLK,DMIC1_CLK) to GPIO through the TLMM mux register.

This reverts commit 8a3b82c661020e915dfc1be3b77d222019e7da57.

CRs-Fixed: 529174.
Change-Id: I79dbc08d2ed7030245f9da454c20ae483c348f4c
Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
Revert "ASoC: wcd9310: Fix DMIC current leakage after disable"

Codec power rail has 0.3mA higher sleep current leakage.
This happens due to configuring digital mic clock pin
(DMIC0_CLK,DMIC1_CLK) to GPIO through the TLMM mux register.

This reverts commit 28959576b1fbdc18c4c972c1b8b744db73d81641.

Change-Id: I92ece13a012386978dcf2d4bbec8cbf0046baf93
CRs-Fixed: 529174
Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
Revert "ASoC: wcd9304: Fix DMIC current leakage after disable"

Codec power rail has 0.3mA higher sleep current leakage.
This happens due to configuring digital mic clock pin
(DMIC0_CLK,DMIC1_CLK) to GPIO through the TLMM mux register.

This reverts commit c28ec1d9d28fccf4b012ff7252688a588eed299f

Change-Id: If3c43de6805eef9549e6d08fe508a2463ceca1f0
CRs-Fixed: 529174
Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
ARM: dts: msm: Disable HSIC controller clock gating for MDM9625

Clock gating is by default enabled in HSIC controller.
This is resulting in stability issues during enumeration.
Hence, disable clock gating in the HSIC controller.

Change-Id: Id7b68d83da43a6050be509a489c6aa601bf87f72
CRs-fixed: 538509
Signed-off-by: Amit Blay <ablay@codeaurora.org>
ARM: dts: msmkrypton: Add qprng device tree data

Add QUALCOMM random number generator device tree data to dtsi file
by adding msm-rng device node with all the necessary parameters

Change-Id: Idf1aea8cadeffb453525b20f479d0d6171953e7f
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
USB: phy: msm: Add support for overriding SSPHY deemphasis setting

TX deemphasis value can be different from platform to platform.
This value has to be set to suitable value to pass USB3 complaince
test. Hence add support for overriding this deemphasis value from
device tree.

CRs-Fixed: 536912
Change-Id: Ic3c2213fc0d090407057525115eae1351ecc4668
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
arm/dts: 8974pro: Set deemphasis value to override default setting

driver is currently setting deemphasis value to 22 for all 8974
variants. This value needs to be set to 26 for USB3 complaince
tests passing for 8974 pro. Hence set deemphasis value to 26 in
device tree file.

CRs-Fixed: 536912
Change-Id: Ib14c4a213a435bf8c89810ce7a741d27950d1851
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
msm: vidc: Implement control for VOP time resolution

Implement new control for VOP time resolution for MPEG4 encoder.

Change-Id: I0d73700b050464f6196ec6d10832f0f7be3254b4
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
msm: vidc: avoid usage of output_tag to get session_id

The firmware will send session_id as part of
struct hfi_msg_event_notify_packet. The driver should use
the session_id in this structure rather than from output_tag.
Without this change release reference event will not
be handled correctly by driver.

Change-Id: I6005482a1b2dfefb6acf0ff797c291197791ca4a
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
msm: camera: Add support for YUV422 formats

Adding support for YUV422 pixel formats for ISP output.
This formats will be only supported by the RDI dump, for sensor which
outputs this kind of formats.

Change-Id: I45db56c3efa69fb4f70a551fe33cec42190df987
Signed-off-by: Vladislav Hristov <vhrist@codeaurora.org>
ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork

Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to
prevent it from being used as a covert channel between two tasks.

There are more and more applications coming to Windows RT,
Wine could support them, but mostly they expect to have
the thread environment block (TEB) in TPIDRURW.

This patch preserves that register per thread instead of clearing it.
Unlike the TPIDRURO, which is already switched, the TPIDRURW
can be updated from userspace so needs careful treatment in the case that we
modify TPIDRURW and call fork(). To avoid this we must always read
TPIDRURW in copy_thread.

Change-Id: Ib1e25be7b9faa846ba5335aad2574e21a1246066
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Git-commit: a4780adeefd042482f624f5e0d577bf9cdcbb760
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
ARM: poison the vectors page

Fill the empty regions of the vectors page with an exception generating
instruction.  This ensures that any inappropriate branch to the vector
page is appropriately trapped, rather than just encountering some code
to execute.  (The vectors page was filled with zero before, which
corresponds with the "andeq r0, r0, r0" instruction - a no-op.)

Change-Id: I74c0105a2bcb3b78d9fc8b105a05c0fc269ba400
Cc: <stable@vger.kernel.org>
Acked-by Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
ARM: poison memory between kuser helpers

Poison the memory between each kuser helper.  This ensures that any
branch between the kuser helpers will be appropriately trapped.

Change-Id: Ifa4abe51d3dd89a96670a8609cd472fa03988e7e
Cc: <stable@vger.kernel.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Git-commit: 5b43e7a383d69381ffe53423e46dd0fafae07da3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
msm: kgsl: Add CMA memory feature to support NOMMU for GPU

Reserves CMA memory for kgsl driver early during bootup and then
uses dma_alloc_coherent() to allocate physically contiguous memory
instead of using the MMU

Change-Id: Ica9b244fe9b9d8a902d670293a0bec2edf81bd5d
Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
ASoC: msm: qdsp6v2: Fix buffer overflow in voice driver

Userspace registers calibration data with acdb driver
through ioctls. Voice driver registers the calibration
data with CVD by querying acdb data from acdb driver and
copies the calibration data in apr message.

The size of the calibration data can be controlled by userspace
and can result in buffer overflow if the calibration size is
greater than the destination buffer size.

Reject acdb data if the size is greater than the size of
destination buffer.

CRs-Fixed: 548872
Change-Id: I4cd23a38c90b745226ddbc28656c82ff7c10432b
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
msm: qpnp-power-on: add support for handling pmic watchdog barks

PMIC watchdog resets are often very difficult to debug due to the sudden
shutdown of the system. Add support in the qpnp-power-on driver to
handle the pmic watch dog bark, log a message and panic so that the
reset reason is clear to testers.

Change-Id: I0b7f3f3780769a8260cce73ee8dce91200e8873a
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
ARM: dts: msm: Add the pmic-wd-bark irq to PM8110 power-on

Unknown PMIC watchdog resets are found on PM8110 devices. Add the
pmic-wd-bark irq to the power-on node in order to facilitate debugging
efforts.

Change-Id: Ib794c283592191b3d41970495cab1d7669f15dac
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
msm: vidc: Expose extra data header structure

The driver clients need this structure to know how to get
the extra data information coming from the driver.

Change-Id: I32074c1a5130fd5378ef77e34a5f39b0bd60ab95
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>