msm_fb: display: Allocate writeback buffers of panel resolution sizes

Allocate MDP writeback buffers based on panel resolution size
dynamically

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Change-Id: I4a456199a05850f35c204edfa7ae3679036138a9
msm_fb: display: add mixer1 writeback buf init call

mdp4_init_writeback_buf call is missing for mixer1 interface. And
blt_addr should be nulled when dtv interface is initialized,
otherwise, mixer1 writeback mode may be false enabled which causes
system crashes or garbage display on TV.

Change-Id: Idbf5fe90eb50f0a68b434f2c76012c64a38553a4
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Add clk prepare changes to MDP and rotator

Use clk_prepare_enable and clk_disable_unprepare instead of
clk_enable and clk_disable respectively.

CRs-Fixed: 351340
Change-Id: Ifb2a9405b8f445a90277d2fade9ab33f5becbd6e
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/hdmi_msm.c
	drivers/video/msm/mipi_dsi.c
msm_fb: display: Update clock prepare changes for MIPI DSI

Update the clock prepare/unprepare changes for MIPI DSI clocks
and update the clock lookup table for ebi_lcdc_clk for MIPI DSI
interface.

Change-Id: Ic31e2e1b169894e633849573eb54325457080b53
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm: display: Clean DSI state on continuous splash disabled cases

Reset the DSI clock control, disable controller and PLL
to resolve boot issues for DSI command mode for continuous
splash feature disabled/unspported cases

Change-Id: I1e5e9a9d2d548c518d2620bf6d9e125d5efc8fd4
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: add YUV444 interleave format support to mdp

Add support for H1V1 interleave (YUV444) to mdp

Change-Id: I86b76831ad87dede90ddd8d8f5ae64e51fa28c27
Signed-off-by: Kyong Hwa Bae <kbae@codeaurora.org>
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: update dtv panel info clk rate

dtv panel clk rate is dynamically changed with the HDMI
resolution. s/w panel info needs to keep its clk rate updated.

CRs-fixed: 355110
Change-Id: I9365d67820158afb2bc520736df9152864a2a962
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Rename MDP IOMMU context bank names

MDP IOMMU context banks do not correspond to the input
processing pipes like RGB and VG. So the context banks
are renamed based on port and number.

Change-Id: I39a6b1a66226aeaaf48fb3697f90ab55b67a592c
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm-fb: display: Reducing the display wake up time

100 msec sleep in phy init delays system wake up. Using usleep instead of
msleep to optimize it.

Change-Id: Ibdbb771145210c9462aa68543024be2ae797be4f
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/msm_dss_io_8960.c
msm_fb: display: Flush MDP registers before staging up any pipe

Add flush calls to MDP's pipe and mixer registers before staging
up any pipe to a mixer.

Change-Id: I36f5aa04634bae43a38e57cd97bd2aafe9631eda
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: add mdp version info for later mdp h/w

fbtest needs to get the correct mdp version number, but now only the
version up to mdp4.0 is returned. Add the latest mdp version up to
4.4.

Change-Id: If1ff302bb4a02ed13bb4dcabcb933fd5adfbec6d
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/msm_fb.c
msm_fb: display: Attach and detach MDP IOMMU on suspend/resume

MDP IOMMU is not in a clean state on suspend/resume with page faults
seen with video playback after resume. Hence, IOMMU is detached
during suspend and attached on every resume call.

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

Conflicts:

	drivers/video/msm/mdp4.h
msm_fb: display: Fix invalid x offset programming for YUV444 fmt

Source x offset adjustment is not properly programmed for YUV444 format,
it is always programmed as 0. Add support for correct x offset
adjustment.

Change-Id: I73e87f961bda60670cc764c66be955e48ccf2734
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm_fb: display: Flush background pipe after solid fill configuration

For is_fg support on a foreground pipe, the  background pipe is
currently set to Solid Fill mode without being flushed. Add flush
after enabling Solid Fill on background pipe.

CRs-fixed: 352855
Change-Id: I91c4e391c9577a9198d048d2b369369d348efeab
Signed-off-by: Amara Venkata Mastan Manoj Kumar <manojavm@codeaurora.org>
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
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>
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>