msm: vidc: unsecure heaps in the right order during error handling

Unsecure MM and CP heaps in the right order in case of failure
CRs-Fixed: 445400

Change-Id: I2b5d414c5d9f109740a931b75b0cfbdb196c465f
Signed-off-by: Praveen Chavan <pchava@codeaurora.org>
gpu: ion: handle allocation error during heap protection in CP heap

Return error and do not increment ref count in case of failure to
protect the CP heap.
CRs-Fixed: 445400

Change-Id: Ia615773fe2c52386d9522de7a182edd633a66e1c
Signed-off-by: Praveen Chavan <pchava@codeaurora.org>
msm: ADSPRPC: Cleanup header and source.

Cleanup header and source to conform with coding guidelines.

Change-Id: I0fba2a7a758930003d5bce9c8ffc0036574736b8
Acked-by: Anatoly Yakovenko <anatolyy@qti.qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: ADSPRPC: Update driver to create its own device node

Create device node under /dev/adsprpc-smd. Users no longer have to run
mknod after the driver is installed.

Change-Id: I5f5ae4dafc37ce8e87ef2c91358be9bfd5934b8a
Acked-by: Anatoly Yakovenko <anatolyy@qti.qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm_fb: display: remove extra mdp4_dsi_cmd_clk_check()

Since mdp4_dsi_cmd_clk_check() is called inside of
mdp4_dsi_cmd_pipe_commit() also, mdp4_dsi_cmd_clk_check()
is called two times from pan display route. This patch
remove mdp4_dsi_cmd_clk_check() from mdp4_dsi_cmd_overlay()
to avoid mdp4_dsi_cmd_clk_check() called twice from
pan display route.

CRs-fixed: 449809
Change-Id: Idbeb968e6af73abac2bb8c800a8c55015ea6a0bf
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: socinfo: Add support for MSM8130 variants of MSM8930

Add the SoC ID for MSM8130, MSM8130AA and MSM8130AB (all
are variants of MSM8930).

Change-Id: I1fe89b6f75eca8064b580e52ffee4a5e2dfda9b9
Signed-off-by: David Ng <dave@codeaurora.org>
mmc: msm_sdcc: Hard reset controller on errors

For APQ8064 V2 (SDCC version = 0x06000018) doing a soft
reset on errors doesn't reset the state machine that
handles side-band signalling with SPS-BAM fully and can
lead to controller hang for the data transfers after
the reset.

Since there is no register interface to soft reset such
state machine inside the controller, we do hard reset of
the controller in case of errors. SDCC hard reset is
defined as assert and de-assert of asynchronous clock
reset line of the controller.

CRs-Fixed: 451632
Change-Id: I366856e7508a3843688c8acead8a701e7b06fc19
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
msm: audio: qdsp6v2: remove unmap ion region before disable

In the use case of audio playback in non tunnel mode, in audio release
unmap is called twice, before and after audio disable. This is
resulting to request DSP to unmap the region twice. Remove the unmap of
the ion region before audio disable.

CRs-Fixed: 443535

Change-Id: Iba44647063c85ab48091888ab5a583b6208dbb3e
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
msm: vidc: Move metadata shared input mem to firmware heap.

Metadata shared input is used to communicate between the
video core and video driver. Allocate it from firmware
heap for specific targets as MFC command heap size is
limited.

CRs-Fixed: 450118
Change-Id: I3d04cf6dd498ae67adcec7a8cba513bd7932d158
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: mdm: Fix for incorrect ramdump timeout and ssr ref count.

The SSR reference count now gets decremented only once during a SSR cycle.
Ramdump timeout is now set correctly for each mdm.

Change-Id: I3f1d577805d4a6cc5171a69107f8529a9d165b04
Signed-off-by: Ameya Thakur <ameyat@codeaurora.org>
msm: hsic_sysmon: Support multiple instances

Enhance the driver to support (currently up to 2) multiple sysmon
interface instances. This is done by classifying the supported PIDs
as either the first or second allowable instance. Add PID 9079 and
allow it to be instantiated as the second instance. Also make use
of the new USB_DEVICE_INTERFACE_NUMBER macro.

Change-Id: I6f9fbf37d151dcce1d0bcf5204460ce0732730f1
Signed-off-by: Jack Pham <jackp@codeaurora.org>
msm: sysmon: Add support for second USB HSIC modem

Add support for a secondary instance of an external modem over
the USB/HSIC transport.

Change-Id: I1891ccc14279dfcbcf5e3555a6d42f42049e208a
Signed-off-by: Jack Pham <jackp@codeaurora.org>
msm: 8064: add configuration to prevent asserting ap2m_errfatal

For the DSDA2 target with two external modems, independent
subsystem restart of each modem is required. This flag is
used by the mdm driver to prevent it from asserting the
ap2mdm_errfatal during subsystem shutdown for the DSDA2 target,
otherwise both modems would reset because they share the same
gpio.

Change-Id: I27aedaa2b1b8756079710e41d8a4a9572b8ff83a
Signed-off-by: Joel King <joelking@codeaurora.org>
msm: mdm: do not assert ap2mdm_errfatal gpio in some cases during SSR

Some platforms have the ap2mdm_errfatal line shared between
two external modems. Current implementation is to assert that
gpio during the SSR shutdown callback but that does not allow
for independent restart of each modem. On most platforms it is
actually not necessary to assert the ap2mdm_errfatal during
restart of the mdm. It is necessary during kernel panic of the
apps processor but that is already done in the panic handler.
The use case where it is necessary to assert the errfatal gpio
is where the mdm needs to be restarted by the SSR module, for
example on platforms where the internal and external modems need
to be restarted together. This patch adds a platform data parameter
to identify those platforms.

Change-Id: Ie4f5cbed752a04a80f1e4bfb50da03f52e010045
Signed-off-by: Joel King <joelking@codeaurora.org>
msm: mdm: Shutdown specific external modem

The shutdown ioctl now gets the system monitor id for the modem to shutdown
from the platform data structure rather than using a hardcoded value.

Change-Id: Ibe7666075903258932014bcf4c79aba0f71184fd
Signed-off-by: Ameya Thakur <ameyat@codeaurora.org>
wcnss: new SMD control channel with WCNSS

A new SMD control channel is opened with WCNSS, currently only the
version information is exchanged thru this channel. WCNSS version is
exposed thru /sys interface.

Conflicts:

	drivers/net/wireless/wcnss/wcnss_wlan.c

Change-Id: I45638bdd992846fa6087b6131180684d30805002
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
video: msm: Calibration config implementation

Allow software to selectively read/write MDP color calibration registers.
This is needed to allow calibration tool to individually configure
registers.

Change-Id: I5db2dcbca0b3433c7fedf9033ceff0cf6a5e0e1f
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit afc6fbf054d079761d5c2ee85242e56d640ee409)
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
msm: acpuclock-8930ab: Lower VDD_DIG voltage vote for L2 at 384MHz

New characterization data shows that vdd_dig voltage for L2@384MHz
can be lowered to the low level. Update the data in this patch.

Change-Id: Ia80ee9397b3b433b96f2bce49a86d5ef7b024fc5
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
(cherry picked from commit f684b386cbe45229e12a0eb778b933c69bceb0d4)
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
msm: vidc: Add support for NV21 color format encoding

This change adds NV21 color format encoding support.

CRs-fixed: 448511
Change-Id: If26f1241a006e2d325668b8e189f6ff76df8e125
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
arm: mach-msm: qdsp6v2: update dual mono setting check

AUDIO_AAC_DUAL_MONO_PL_PR is 0 anyway and dual mono
setting is defined as unsigned value. Hence,
there is no need if new setting is less than
AUDIO_AAC_DUAL_MONO_PL_PR.

Change-Id: I2e18a875e211d05d100d827fcd5b67545de168ac
Signed-off-by: Patrick Lai <plai@codeaurora.org>