msm: mdss: reset runtime status upon device resume

MDSS is power-collapsed in idle screen cases using the pm runtime
framework. However, it is possible that the runtime PM status may
not match with the post-system sleep status when the device is
resumed. This sometimes leads to the inconsistencies in MDSS
idle-power collapse upon system resume. To address this issue,
reset the runtime PM status in the pm resume handler.

Change-Id: I5696ce6c154f2898b82e70119d3d9a2be79b59b7
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm: mdss: Disable the PP features if partial update feature is enabled

Check the whether partial update feature is enabled or not before enabling
any post processing features.

Change-Id: Ibf2111d5ca8714279903980d14e63bab556bb41f
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
msm: mdss: set vsync clock rate

Vsync clock rate is not set when vsync clock is enabled.
This cause command mode TE logic not works.

Change-Id: Ibf7dd07e53b2cd76ef30f13133368000c79ae149
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: mdss: call suspend and resume panel events during runtime triggers

Send a panel suspend/resume event to all the MDSS devices to ensure
proper handling of regulators and clocks during the suspend/resume
sequence.

Change-Id: I820f5e4113f599ba53d4fa4726e406f74872f95f
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>

Conflicts:
	drivers/video/msm/mdss/mdss_fb.h
msm: mdss: Add SMP parameters into hw capabilites

To handle use cases better, expose smp_mb_cnt and
smp_mb_per_pipe to userspace as part of hardware capability.
Pipes availablity for a use case can be computed taking these
values, based on which, composition decisions can be made.

Change-Id: Ia7cc4db153cdb164a29ae2369d3e991b95aaba65
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: mdss: Add backlight notification support for PP features

Notify post-processing features whenever there is a backlight change, so
that PP feature can update accordingly.

Change-Id: I2317088752444478bcfd9cf4f6acfa8553e85d30
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
audio: ocmem: fix the ocmem driver crash during video playback

Triggering SSR during wait for client callback by the audio
ocmem driver causes de-reference of freed memory in ocmem_free
function. Fixed by assigning NULL to the ocmem buffer pointer after every
ocmem_free function call.

CRs-Fixed: 589762
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Change-Id: I53208de26a4d22f6b60d118e47d16a3ad29a8040
ASoC: msm: Add sample rates to PCM front-end

Add two additional sample rates to the PCM front-
end: 88200 KHz and 176400 KHz.

CRs-Fixed: 601715
Change-Id: If61fb034a60f41b5c63a00fd764da50db7333cb5
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
ASoC: wcd9xxx: Do not acquire codec resource lock to get hph impedance

Acquiring codec resource lock within get impedance function may
cause deadlock when headset inserted/removed repeatedly. Remove
the lock as it is not required to be protected with a mutex.

CRs-fixed: 597226
Change-Id: I20865e0b2bb193f2f8777f2b69e735a0d4997cca
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
ASOC: msm: Enable volume mixer for hfp

Enable volume mixer for HFP in afe loopback

CRs-Fixed: 596437
Change-Id: I6ba180b4c700f24e610fbac4abcbbb0d1d57ccda
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
ASoC: msm: qdsp6v2: Low latency mode for audio capture

For low latency audio capture sessions adm should be
opened in low latency mode.This change checks for low latency
mode and passes the info to adm.

CRs-fixed: 622080
Change-Id: I1fb6f82570f48b392ada631278ed097214d9cb5b
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
ASoC: msm: Update the correct channel count for dolby configuration

Wfd supports both 5.1 and stereo pcm playback. Add the dolby
configuration for 5.1 playback on wfd.

Conflicts:

	sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c

CRs-Fixed: 609429
Change-Id: I6727ca1a4825bf64e48f211ca9d270f661ceedf0
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ASoC: wcd9xxx: [HACK] Prevent headphone&speaker from clipping

* Buck mode is set to 2V when HPH+Spk combo device has been selected.

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>

Change-Id: Id9c60be9298cc3eae2fb178900fc95582b00f716
ASoC: msm: set the master gain to 0 on DSP while configuring

- Mute media volume and play any music clip then reboot
  the phone. Play music again noise comes. This noise
  is introduced in DSP/LPASS.

- DSP suggestion is to mute master volume gain while
  configuring ASM session to avoid such noise at
  begining of asm playback.

Change-Id: I2aa2846d6e3e9a85c459534e9108e6fe7aebb962
Signed-off-by: Ramjee Singh <ramjee@codeaurora.org>
asoc: msm: Update compress device name

Change-Id: Ie85c4d8ace20691c81393c553448b1403cecb674
misc: Kill logspam

Change-Id: Ida0b1eaeda4c678f0103675b44a8cc845f3dacbf

Conflicts:
	drivers/misc/shineled/shineled_driver_find7.c
	drivers/misc/shineled/shineled_driver_find7op.c
msm: mdss: Set correct flush bit for writeback mixer.

Wrong flush bit is being set for writeback mixer which can cause
MDP hang/unexpected behaviour when the mixer is used in line mode.
This patch addresses the issue by setting the correct flush bit.

Change-Id: Ie0c2ee27b1f466164a8fb84f7daae9309b74d1d8
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
msm: mdss: Finetune ab votes for PPP

Current ab calculation pushed the power numbers very high.
Finentune the calculation and keep ib undisturbed.

Change-Id: Iddfa39a735201a52daae7278f4006fa6f929b19c
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
mdss: display: Add support for variable refresh rate

Add support for variable refresh rate by changing the
VFP immediately and programming it to MDP TG and
DSI registers.

Change-Id: I186e80cf38d42f4224afedadda96cc613ae68470
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: mdss: fix display time out when taking ESD test

Currently, Command engine will be blocked when sending
display off command in ESD test. Root cause is
panel BTA will affect DSI status. Reset dsi driver
when command engine is blocked.

Change-Id: I729b079d2becfad60630fc941d36199f95618eab
Signed-off-by: Shuo Yan <shuoy@codeaurora.org>