msm: display: Add MDP footswitch regulator control for HDMI PLL

Add support for enabling HDMI PLL regulator along with footswitch
enable/disable to avoid PLL lock detection failures during
suspend/resume

CRs-fixed: 360135
Change-Id: I9b161cab50d2b6c39de39b588e326f5ff97cbc65
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: display: Set HDMI PLL footswitch regulator to 1.8V after get()

After regulator_get call for HDMI PLL footswitch purpose, set
output voltage to 1.8 V to ensure proper state while enabling and
disabling regulator.

CRs-fixed: 360135
Change-Id: Ia6b130286f50066dc0dc7d3441a909223683b33a
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: hdmi: Break infinite loop

Currently, if HDMI PLL lock fails, it will retry. It retries until
the PLL is locked. This may result in infinite loop. This change will
limit the retries to max 10.

CRs-fixed: 360135
Change-Id: I1745643cba7bbc5272f1252208759a83258e9fcb
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: clock-dss-8960: Update HDMI PLL settings

Update the HDMI PLL register settings for all the supported
frequencies to address the issue of HDMI PLL not getting
locked sporadically.

CRs-fixed: 360135
Change-Id: I033f70f11f406a6be0de7e1a2286d9ad17cc0064
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: HDMI: Fix handling of HDMI PLL software reset

Whenever a software reset is asserted on the HDMI PLL, we should
wait for short time to wait for the PLL calibration to be
successful before checking to see if the PLL is locked.

CRs-fixed: 378044 360135
Change-Id: I736e2eff4dce778ba3e305d9461cdedc607156ae
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: hdmi: Proper switching of switch device

Switch device used to tell userspace about HDMI connection
needs to be enabled when:
1. HPD connect
2. Authentication successful

And disable when:
1. HPD disconnect
2. Authentication failed

CRs-fixed: 360135
Change-Id: I8d4529fa2335ec1b2dc1196e57e3c8bad7d6b657
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: hdmi: Do not turn on HPD at boot

HPD is getting turned on by userspace if HDMI is enabled.
We don't need to turn on the HPD from HDMI driver.

CRs-fixed: 377899 360135
Change-Id: I29af0ca6ba222c7af61b1a0e8b51be35dee6426c
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>

Conflicts:

	drivers/video/msm/hdmi_msm.c
lge: HDMI: add support for error handling in LGE_MULTICORE_FASTBOOT function

Implementing error-handling function for LGE-specific function used to boot
up the device
msm_fb: HDMI: Fix for high HDMI sleep current

In certain cases, the HPD circuitry is not switched off when the
device goes to suspend state, resulting in high sleep current on
the HDMI power rail. This patch ensures that the HPD circuitry is
always turned off during suspend operation by removing an
unnecessary condition check.

CRs-fixed: 360135
Change-Id: I5846255ff4405ff1f449158f4b2f0d5ed0cd96bb
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: hdmi: 3D configurations in HDMI

3D configurations using Generic0 packets need to be done
after enabling HDMI Control to take these configurations
into effect.

CRs-fixed: 349578 360135
Change-Id: I8d658ddf4f2ccb2ae47015fe411e8c1a5a55e4df
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: HDMI: HDCP: Start HDCP authentication as a work item

HDCP authentication should be kicked off as a scheduled work
item so as to ensure that MDP is already configured and frames
are being transmitted over the HDMI channel prior to the start
of the HDCP authentication procedure.

CRs-fixed: 384513
Change-Id: I27cab44babfc24d91a318b0641674f85910cc33f
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: display: add mutex on overlay_play to fix iommu page fault

An iommu page fault may heppen When a pipe_commit is executed
in between of frame dropped and pipe_queue during overlay play.
An mutex is necessary to mutual exclusive between pipe_commit
and overlay_play.

Change-Id: I736e821c6c648a6ebd435303a1906a40e9b75791
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>