msm_fb: hdmi: change HDMI_PHY_REG1 based on foundry.

Set value of HDMI_PHY_REG1[2:0] for output voltage swing control,
to prevent fallout for Vlow for GF foundry MSM's.

Change-Id: Ifb0f694226896fa1ad74dd84fb489f015901fc3e
Signed-off-by: Abhishek Kharbanda <akharban@codeaurora.org>
Signed-off-by: Mukesh Jha <cmjha@codeaurora.org>
msm_fb: hdmi: change HDMI_PHY_REG1 based on source.

Set value of HDMI_PHY_REG1[2:0] for output voltage swing control.

CRs-Fixed: 488207
Change-Id: I9aeba47491467a14a3141cf7688a95a2f43e80f5
Signed-off-by: Abhishek Kharbanda <akharban@codeaurora.org>
Revert "msm_fb: display: remove wait4vsync during dtv off"

This reverts commit ab5358c6fcb7e85501d65e4c5deb4670c09570c2.

Change-Id: Ia7718141481c71e0fdad4ebfba6254cc2a925f23
msm_fb: display: Add compulsory wait after DTV's TG is disabled.

When DTV timing generator is disabled during dtv_off, a wait for
at least a frame period is required. This is done by waiting on
vsync. In some scenarios, vsync interrupt is received such that, no
wait really happens which results in MDP hangs.
Add wait for 20ms after TG is disabled, to ensure wait for at least
a frame period. Also, print timeout error in case wait for vsync
times out.

Change-Id: I960326e495bc8dc108bf6c6f1994ea3071f1c06d
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: HTC: m7: add missing dsi_pll regulator supply

* Originally introduced in patch ID:
  fb4e77edf9ce62aa836e8406aa9dfc1bf9aecab5
  "msm: display: Add DSI clock control for MDP GDHS power collapse"

Change-Id: Ic31897b6dee815be858fe5eda3e9e092539be19b
msm: sps: update clocks for 8974 in SPS driver

Two changes for clocks:
1> Vote for dfab_clk which is the peripheral NOC on 8974;
2> Do not vote for mem_clk since it does not exist on 8974.

Change-Id: Ia9d5547073219cea4250d3038aa5aa01a47ff4e0
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: adapt to clock API change

With the change in clock driver, clk_get() can return -EPROBE_DEFER even
when the clock is actually present in HW. Thus, we need to return
-EPROBE_DEFER in SPS driver probe function if clk_get() fails.

Change-Id: Ia1b9f18425ca5432f4a56419adf142f2674ce64a
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: improve BAM inactivity timer function

1> Add the support for BAM global inactivity timer which is a new feature
in B family.
2> There is an update that changes the time unit of the inactivity timer
counter from 0.1ms to 0.125ms. Thus, we adjust the parameter in SW driver
for this update.
3> Inactivity timer timeout interrupt will become a new type of BAM global
interrupts, and it is a normal interrupt different from other BAM global
error interrupts. Thus, change the log level for callback message from INFO
to DEBUG.
4> Change timer result argument of inactivity timer API to an optional one
for client drivers.

Change-Id: If223ef311f0393f2f2243f6b8a862fe760ff5214
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: enable BAM DMA client to control BAM DMA clock

For power saving reason, SPS driver will turn off the clock of
BAM DMA after the initial configuration. A new API is provided
to BAM DMA clients to vote for or relinquish BAM DMA clock when
they start/stop using BAM DMA.

Change-Id: I03f8a6cfa19c1722ca4e92e0785ca309fdd10ba2
Signed-off-by: Yan He <yanhe@codeaurora.org>
msm: sps: turn off BAM DMA clock after initial config

For power saving, SPS driver will turn off BAM DMA clock after the
initial configuration of BAM DMA. The clients of BAM DMA will vote
for the clock when BAM DMA is used.

Change-Id: I388a21cff3c619ef49705a064d7d5ef760fa9ef8
Signed-off-by: Yan He <yanhe@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
Change-Id: I29af0ca6ba222c7af61b1a0e8b51be35dee6426c
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
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.

Change-Id: I5846255ff4405ff1f449158f4b2f0d5ed0cd96bb
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Revert "msm: move printk out of spin lock low_water_lock"

This reverts commit 749c4210f338496abf2e16ef51308ff756b34f7b.

This patch is a hack intended to solve a particular instance of a more
generic problem. The cause of the spindump timeout has been fixed with
the commit f37a3dc536e4ecd72961a2d9c77f5587c5c55d8f. Furthermore this
change also introduces a race condition since the printk is actually
intended to be protected with the spinlock.

Change-Id: I8ca057f47760c7bb5b826cceeac92ae5e124e904
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>