msm_fb: display: Add MDP IOMMU detach support for DTV

IOMMU detach support on suspend is currently meant for DSI Video
and LCDC modes. The detach call is moved to early suspend for primary
display and external DTV to avoid page faults related to
suspend/resume cases.

Change-Id: Ia45071c44c20b951a328f39a033bdd83ff77d8f8
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm_fb: display: Free staged foreground pipes during suspend

During suspend, some foreground pipes might still be staged and
have to be removed before disabling timing generator.
So, these pipes are staged down and freed before timing generator
is switched off.

Change-Id: I3f2376cac43464c64cd1c9e2f16f3d801298c25d
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c
msm_fb: Display: Add additional settings to improve DSI signal strength.

Modify/add new Physical layer settings for Lane,
BIST and PHY strength to improve the rise/fall time of
the DSI clock waveform.

CRs-Fixed: 364037
Change-Id: Ie2503100eebdf9d4c82d457c187ab8fa903778c6
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
msm-fb: display: lm2 writeback support on mpq platfroms

lm2 writeback has broken on mpq platfroms as lm1 and lm2 are
selecting the same axi writeback path. It adds the support
to select the right axi writeback path based the availability
of the write master

Change-Id: Ia6b868ff13de5edc641e4795794286893c063e66
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
msm_fb: display: Wait for external vsync before DTV IOMMU unmap

In play wait call for DTV, software waits for overlay1 done before
unmapping IOMMU buffers. This is replaced by external vsync wait
to avoid page faults.

Change-Id: I67d3615121e9eda3a4378553049a41e32860a520
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm_fb: display: Set the minimal sleep time for DSI PHY Initialisation

On 7x27A/8x25, set the minimal sleep time required for DSI PHY
hardware to get initialized and for the display to come up.

CRs-fixed: 367652
Change-Id: If040a5ac37f694e83b819ecf08fc80f2afb7afaa
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: display: Clear background solid fill on closing video pipe

Clear background pipe's solid fill setting on closing Video pipe
to avoid blink issues in display

Change-Id: Iac3c884334f38580fb5c9dbfb260dd6940ef5019
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c
msm_fb: display: switch mdp mode without turning off timing generator

MDP need to be in idle state before switching to different mode.
Dmap_done interrupt is delivered when the last line of frame is
clocked out. Therefore mdp is in idle state during dmap_done ISR.
This patch execute mdp mode switching inside dmap_done ISR.
Therefore timing generator is not necessary to be turned off
since mdp is in idle state already.

CRs-fixed: 350154
Change-Id: Ib10557bde90856ffd5284a0a76dddbe92f2abc0e
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>