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>
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: 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: 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>
msm: mhl: sii8334: Add mutex lock to avoid race condition

Add mutex lock betweeen mhl_sii_config and mhl_sii_device_discovery
functions to avoid accesing the variable flag before it is updated.
This will avoid accessing the mhl init settings i2c register
before turning on the mhl regulator's and gpio's.

Change-Id: If3f7fbe3d6ab84f101c407c43ac8b410e6df38fe
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
msm: mdss: fix the RGB666 PACK_ALIGN setting for dsi

For RGB 666 panel format on DSI, a change has been made earlier to set the
alignment to MSB. This was causing color corruption on EDP panel as it
requires LSB alignment. This fix is to set the MSB alignment for RGB666
format only on DSI panels, so that it doesn't affect EDP.

Change-Id: If07b915bb30b00ff1824c7c662bbf4db8a217a6b
Signed-off-by: Vineet Bajaj <vbajaj@codeaurora.org>
Merge "msm: vidc: disable Hier-P when LTR is enabled"
Merge "msm: mhl: sii8334: Fix null pointer dereference at power off"
Merge "msm: mhl: sii8334: Add mutex lock to avoid race condition"
Merge "msm: mdss: fix the RGB666 PACK_ALIGN setting for dsi"
power: qpnp-bms: Improve logic for storing FCC learnt data

BMS module supports 16 (8-bit) battery backed-up registers.
Make sure that while backing-up the new data, always replace
the oldest stored data.

CRs-Fixed: 730047
Change-Id: I5fc406ec24ce242b722926cc1096f7dcaf561656
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
msm: mdss: reset pixel extension flag if validation fails

While validating the pixel extension values, reset the pixel
extension flag in case of failure. If this flag is not reset,
driver will programm the wrong configuration into hardware
registers in the commit ioctl.

Change-Id: I6fb90ca331f39e704a8aa915a04b6be776bcff55
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Merge "diag: Prevent suspend in Memory Device mode"
Merge "msm: mdss: Add support to enable esd check through dtsi entry"
Merge "msm: mdss: Add support for checking panel status through register read"
Merge "msm: mdss: add ESD support by register read for DSI v2"
Merge "ARM: dts: msm: configure panel esd status check method for panels"