msm-fb: display: Remove explicit control of mdp_axi_clk

This clock is already enabled and disabled implicitly along
with mdp_clk and should not be controlled directly by the
MDP driver.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm-fb : display: foot switch control for the mdp driver

adds the support for disable/enable the mdp foot switch at
suspend/resume boundaries

Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Move MDP footswitch control to early suspend/resume

Move MDP footswitch control from pipe_ctrl to early suspend/resume
and fix boot related DSI command mode. This patch resolves the side
effects caused by 716e97e704c6591f05f5b88743fca7770f0c61cd on 7x30

CRs-Fixed: 306221
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: received writeback offset from board file

Writeback offset need to be passed from board file to avoid
hard code value used by MDP.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: change mdp clock while mdp is idle at overlay_set()

MDP clock is adjusted base on run time perfomance level.
This patch  will change MDP clock while mdp is in idle
state at overlay_set() when performance level changed to
avoid MDP from underrun.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: no wait for vsync after suspend

There has possibility that overlay_unset() is called after
suspend had been done. In this case no wait_for_vsync is needed
for pulling mode interface (lcdc and dsi video mode) since
timing generator was turned off and hence no vsync interrupt
will be delivered. This will cause thread to hang up.

Signed-off-by: kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msmfb: display: enable the blt mode for bigger line length

blt mode is enabled for bigger line length to avoid the
underun on qt devices

Change-Id: I6055f494034b1e64fbf6fb083442f9513634659c
CRs-Fixed: 316327
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: allocate mdp writeback memory

The writeback buffer is already reserved on the board side. This
allocation separate writeback buffer from framebuffer.

Change-Id: I312be3e0dfcf4c5b611cd06cd68d2baae7e2add8
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
video: msm: Adding support for MDP4 HSIC controls

Adding support for users to adjust Hue, Saturation, Intensity and
Contrast of the display.

Change-Id: I79cb69c871686ccba115798f635f768b9a50affc
Signed-off-by: Liyuan Li <liyuanl@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: avoid staging up two pipes at same mixer_stage

staging two pipes at same mixer stage can cause blue screen, adding
additional check to avoid this.

CRs-Fixed: 304278
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: wait for vsync and change perf level only if needed

since overlay_set can be called multiple times to change some
parameters, there is no need to wait on vsync to change clock for each
call to overlay_set unless there is a change in performance level.

Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm-fb: display: mdp clock scaling clean up

clean up of clock scaling code to organize it better

Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: cleanup usage of shared pipes in overlay

Remove usage of shared pipes. Shared pipes are used to allow VG pipes to
play both video and rgb formats. This can now be handled by calling
overlay set ioctl with new format, that means shared pipes are no longer
needed and can cause instabilities if not used properly.

CRs-Fixed: 312209
Change-Id: If723802d9405001baa69f132a143d21c8aa85613
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Avoid footswitch control for MDP versions <= 4.2

Avoid footswitch control for MDP versions <= 4.2 to prevent any
side effects with video playback and HDMI use cases

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Fix suspend/resume for HDMI as primary display

Fix suspend/resume for HDMI as primary display by setting
solid fill for RGB pipe connected to DTV

Change-Id: I2f6bf1892137ef40c55e26498c03cfb7a439219b
CRs-Fixed: 310198
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: wait for vsync instead of dmap_done

At both lcdc and dsi video mode panel, wait for vsync
interrupt instead of dmap_done interrupt to make sure a
single frame updated during every vsync period.

CRs-fixed: 305599
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: enable border color fill on external display

Enable border color fill feature on external display. This avoids usage
of RGB pipe for background border fill and can now be used as overlay
layer for UI display.

Change-Id: I652ab3ffe2c43260590e4e5a2ffc986340c4a8c0
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: fix mdp underrun on disabling writeback

Writeback fallback for mdp underflow can be enabled/disabled dynamically
based on parameters; if writeback is disabled while displaying previous
frame it can can cause underrun. Disable writeback after programming new
frame to avoid underrun.

Change-Id: I6c73887043f19596cb3611c83c51c1aeac907ff0
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msmfb: display: clean up of the writeback buffer variables

clean up of the writeback variables to change the write back
allocation for ion support

Change-Id: I4999e43cb2f7111853e9c4a17852b2d5a351204e
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Fix DSI PLL/clock warnings

CRs-Fixed: 300073
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>