msm: vidc: disable Hier-P when LTR is enabled

Hier-P and LTR are mutually exclusive in firmware. Disable Hier-P
using HFI_PROPERTY_PARAM_VENC_HIER_P_MAX_NUM_ENH_LAYER
instead of HFI_PROPERTY_CONFIG_VENC_HIER_P_ENH_LAYER.

Change-Id: Ib4eb053a0ccef94c1996392eba19c5b83f7c9971
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
msm: vidc: Send resolution along with output buffer

Send the resolution along with output buffer to the client
to avoid a race condition where resolution might be changed
multiple times in driver before client requests for updated
resolution.

Change-Id: I8ebb99e3baa04da09f153195a674babcebcfea78
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm: mdss: refactor pipe list management

A pipe can only belong to either used list or cleanup list, to ensure
this refactor the list management by having only a single list head in
pipe structure. Also add a better name for the lock that should be used
for ensuring atomic access to these lists to prevent incorrect use of
these locks.

This also ensures that a pipe can only be freed on the fb device it was
allocated and prevents unexpected behavior when this is not the case.

Change-Id: Ib1c8ffefe51d837c2b30aa3734d37fee3c54cf1b
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: mdss: Allow smp change during composition switch

The composition fallback mechanism might not ensure unsetting of
the pipe whose prepare call failed due to smp configuration change,
typically in the cases where change in composition requests same
pipe. This scenario is a deadlock where composition switch does
not happen, due to these pipe failures.

To handle such cases, for changed SMP request for a pipe doing
non backend composition, allow smp configuration to happen, so
that the composition could be successfully switched, thereby
preventing the deadlock.

Change-Id: I2d29ac6591671494abc7c4caf7c6c53f058d12f6
Signed-off-by: Justin Philip <jphili@codeaurora.org>
ASoC: msm: Fix ADM GET PARAM callback

Add size check on inband get param call and do
not process inband if RTAC is active.

Change-Id: I2c099f5ea254a214f224dda556773a7fe6754fe5
CRs-fixed: 548397
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
diag: Prevent suspend in Memory Device mode

Apps processor can goto suspend when receiving data from peripherals.
This can result in data being drop from Diag driver to the user
space clients in Memory Device mode. Make changes to acquire
wakeup source object till the data is copied to user space.

Change-Id: I7479c89707199557420bac18e1744a829477164c
CRs-Fixed: 624445
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
msm: mdss: fix multiple overlay release sequence

Overlay release allows multiple releases to happen by having
multiple bits set in overlay unset call. Fix logic to find
all pipes which match the bitmap.

Change-Id: I6a25a81fe4c437b5546537d48e250055357682f0
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
kernel: cgroup: protect cgroup linked lists

Protecting cgroup lists to fix corruption due to race since
freeing of css_set now in new worker thread, free_css_set_work()

CRs-fixed: 715355
Change-Id: Iec4d7be0c372a17487f96bcdc1542afaff79dd1b
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
msm: mdss: Add support to enable esd check through dtsi entry

Add support to enable or disable esd check through panel dtsi
entry. This will help in enabling the feature only for those
panels which support BTA.

Change-Id: I4ef85bb2e78b133dd9577ac3d6788e46b34fe761
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
msm: mdss: Add support for checking panel status through register read

ESD feature may need to check the status of the panel by reading specific
panel register depending on the panel. Add support for ESD status check
through status register read and to configure the method used for checking
panel status through the panel dtsi entry.

Change-Id: I13b11362722eb2ad379162944eafff04ec01d1cb
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
msm: mdss: add ESD support by register read for DSI v2

Add support to check ESD status by register read for
DSI-v2 based platforms.

Change-Id: I013d31c67b3e5c61b7723ecb234be06c2fd5a451
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
ARM: dts: msm: configure panel esd status check method for panels

All the panels may not support BTA for checking the status of the
panel due to ESD attack. Configure dsi-panel-status-check-mode
to 'bta_check' for nt35590 720p panel. For panels not supporting
BTA, configure dsi-panel-status-check-mode to 'reg_read' in
corresponding DTSI file.

CRs-Fixed: 660805
[nabrah@codeaurora.org: change-id from msm-3.10 is
I73e8a883ff571c5679d18c5beed0025f1aa9f0d9. Manually merged the
change due to directory structure difference with msm-3.10 branch.]

Change-Id: I2cffeaa73161e5619cc869aa1e51afdd17b37318
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
msm: vidc: Enable clocks before iommu attach

Change the fw load sequence to match the opposite of
unload sequence. This makes sure all clocks are on before calling
iommu attach.

Change-Id: I1113357c37158da5889f26da8fd4a74d0d170c07
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
mdss: mdp: reset init phase and phase step to default

reset the init phase and phase step registers to default
when the pixel extension are not calculated in userspace.

Change-Id: I876f1628fb46901a07deb1b97a4ab55f924612b0
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
msm_serial_hs: Handle client requests without port open

Adding defensive checks in the APIs to handle the
client driver requests calling without port open.

Change-Id: I0d618abbc7a38151651550a07aa909689ce92054
Signed-off-by: Dilip Kota <c_dkota@codeaurora.org>
kernel: cgroup: protecting css_set object

Accessing the css_set object should be protected with css_set_lock.
NULL check is required before accesing object.

CRs-fixed: 723762
Change-Id: Ia3a0314a04419889d5002a8f2bf2c1fe9dfa3671
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
platform: msm: fix s3 source macros

PON stage 3 source macros are wrongly ordered. Fix the
S3 source macros with proper values.

Change-Id: If68d7405d9db107a4d2aceb152589da2e34fc73b
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
platform: qpnp-power-on: choose correct s2 control registers

The PMICs which have PON_REVISION2 register value as 0x00
have a single register for both s2 reset type and
s2 reset enable. All the other PON revisions have separate
registers for s2 reset type and s2 reset enable. Add support
to choose correct s2 control registers based on PON_REVISION2
register value.

Change-Id: Iaf0fb5c10a6883092d6a49336c40df0db7940ad2
CRs-Fixed: 661934
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
ARM: dts: msm: enable reset on long press of PWR key

The dt property "qcom,support-reset" is added explicitly in the
KPDPWR child node of PON module. This enables s2 reset as well as
configures the s1 and s2 timers for KPDPWR reset source. Now long
press of PWR key makes the device to go into download mode.

CRs-Fixed: 673974
Change-Id: I4118ba9963f287c4ca88b6ea61322907321e1e16
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
msm: mhl: sii8334: Fix null pointer dereference at power off

Check for null pointer before disabling the regulators.
During cable connect/disconnect and suspend/resume check for
previous power state of mhl to avoid enabling/disabling gpio's
and regulators twice.

Change-Id: I44dc51122da4630974147b829236cb39c1ad54b0
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>