msm_fb: display: Enable H/W vsync in msm7x27a
msm_fb: display: change mdp clock while mdp is idle

Mdp clock need to be adjusted at run time base on the
performance level. However mdp clock can only be changed
when mdp blending/dma engine is idle.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: add ioctl for mixer info

Add new ioctl to allow user to query mdp mixer detail configuration.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Use __va instead of ioremap for framebuffer memory map

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: clear interrupt flag to properly wait for vsync

need to properly clear vsync interrupt flag so that subsequent waits
for vsync are handled properly, otherwise wait will return before next
vsync happens

CRs-Fixed: 299043
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: disable fill screen with blank on early suspend

Disable logic to fill framebuffer with black screen before early
suspend, this is causing slugish wipe off from top to bottom
animation on screen.
This logic is still needed for MDP3 because of hardware limitation.

CRs-Fixed: 298050
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Avoid BTA requests during panel init.
msm_fb: display: Add MDP 4.2 histogram support for DSI Video

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: use spin_lock_irqsave before call disable_irq

disable_irq() will wait for irq handle to complete before disable
the specified irq. Therefore use spin_lock_irqsave() instead of
spin_lock() before call disable_irq() to avoid deadlock on same
spin lock.

CRs-fixed: 299938
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: increase mdp max burst size

increase mdp dma and pipes max burst size, to avoid mdp underruns
(blue frames shown on display).

Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Fix vsync GPIO for DSI command mode
msm_fb: display: increase mdp clock for lcdc panel

MDP shows underrun (blue screen flicking) randomly during
video playback of 720p. Increase MDP clock rate on both
performance level 2 and level 3 of mdp_core_clk_rate_table[]
to prevent MDP from underrun.

Signed-off-by: KUogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Enable tv_enc_clk for 7x30 to avoid HDMI freeze

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Add mb() before reading MDP histogram data

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Adjust overlay VG pipe src params for non-zero x_offset

Adjust overlay VG pipe src params for non-zero x_offset to avoid
overfetching of pixels from the left of x_offset

CRs-Fixed: 296185
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Add MDP Vsync GPIOMUX config for 8960

CRs-Fixed: 298596
Signed-off-by: Ravishangar Kalyanam <rkalya@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: Fix HDMI clock control during suspend/resume

Fix HDMI clock control during suspend/resume to avoid incorrect
reference counts

CRs-Fixed: 293818
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: disable timing generator before enable writeback mode

At pulling mode (lcdc and dsi video mode), timing generator need to
be turned off before enable wriback mode and turn it back on after
enabled.

CRs-fixed: 298593
Signed-off-by: kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: use mutex instead of spin lock to avoid deadlock

There has deadlock between mdp4_isr() and disable_irq() called by
LCDC thread. Disable_irq() will wait for mdp4_isr() to complete
before return. Meanwhile mdp4_isr() will try to acquire mdp_spin_lock
which had been acquired by lcdc thread before call disable_irq().
This patch replace spin lock with mutex to avoid deadlock from happening.

CRs-fixed: 301276
Signed-off-by: kuogee hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>