msm_fb: display: Wait for DMAE for external interface (DTV)

When calling FBIOPAN_DISPLAY for external, there is no wait
which results in irregular fps when tested with fbtest.
Enable DMAE wait to wait until DMAE is over thereby fixing
irregular fps shown in fbtest results.

Crs-fixed: 438078
Change-Id: Iff528ccc17a1e4078c8825b35d4778a7d9e40e7f
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm_fb: Correctly setup splash screen flag in MDP probe

The continuous splash screen flag is sometimes not correctly setup
during MDP probe. This causes a corrupted grey screen on resets.

CRs-fixed: 389531
Change-Id: Id88d8a239ccfd1cbb5ce0f4f3db68756182f5ff9
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Mayank Goyal <goyalm@codeaurora.org>
msm_fb: display: Avoid dsi clock warnings during boot

Correctly set up the dsi_clk_rate in
cont_splash_clk_ctrl before enabling them.

Crs-fixed: 389531
Change-Id: Iee13e6d871ca1fdb7f3f45a5e3b36784145abd86
Signed-off-by: Mayank Goyal <goyalm@codeaurora.org>
msm_fb: display: reset base layer database

Reset base layer database at suspend so that new base layer can
be populated properly at next resume.

CRs-fixed: 462289
Change-Id: Iddffa15ab8d6ca024b37674fbbb412d23d27b59d
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: Add support for multiple DCS commands in a single tx

This patch adds support to send multiple DCS commands in a
single transaction. This helps to reduce the latency caused by
separate tx for each DCS command. The turnaround time
caused by the wait for one DSI interrupt for each transaction
is reduced with this.

CRs-fixed: 453746
Change-Id: I5810b3819426f7df6ca9719a925a0e6906f7dace
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: display: free pipe if blt is detected for the pipe

Once blt is detected, overlay set will return fail to disable blt
mode, but the pipe was already allocated, so it is necessary to free
the pipe before overlay set returns to userspace.

Change-Id: Id9352c65a890b594ea15c85571233090c1f7d323
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm_fb: display: get mdp bandwidth parameters from board file

Underrun issues can be solved by changing mdp bandwidth parameters:
max_bw, ab_factor and ib_factor. However these parameters are not
universally same for all targets, and one set of values that works for
one target could cause underruns or higher power on other
targets. This change is driver change which makes those parameters
target dependent.

CRs-Fixed: 464492
Change-Id: Ib23ebc431caabbe91c7ae3bd96bb38789d7ddc90
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm:video: Enable LUT update on DSI command mode panel

CRs-Fixed: 462625

Change-Id: Ieb670abbed0ad06a9c758fb044bf71b6fc2c71b0
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
msm_fb: Fix adb shell start/stop issue when bypass enabled

Currently when 2/3/4 layer bypass is enabled, doing a adb shell
stop/start is failing overlay and composition happens through
GPU. Fix this issue by proper overlay configuration during this
scenario.

Change-Id: Ia04f1839bf80ed552671e48445af63a4dcd6bdfd
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: Enable mdp clock during LVDS init.

Currently on 8064 CDP, MDP clock is off when configuring LVDS
PHY registers during boot up. This is causing display not to
come up. Enable MDP clock during the PHY configuration during
LVDS on and off.

CRs-fixed: 455620
Change-Id: Ie2b607591e936e9ab63d50cd0e2c8ba981aae6a2
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: Set timeline threshold for command mode to 2

For command mode panel, timeline threshold is 1 and we return
commit ioctl on DMA_P interrupt. This causes fps to drop
since sometimes overlay is kickoff just after vsync interrupt
causing DMA_P wait time more than 1 vsync period. Hence, increase
timeline to 2 and return commit ioctl on vsync interrupt.

CRs-fixed: 457153
CRs-fixed: 452269
Change-Id: Ic7385631fdeb25f269306d284c94fdf43cade3d1
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: display: vsync usage in turning off dsi video

Add timeout to waiting for vsync so that it can come out
when vsync interrupt is not working.
Need not wait for vsync after timing engine is off.

CRs-Fixed: 458419

Change-Id: Ib989e435405613d891024ba15144723730454e34
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm_fb: display: silent blending error warning message

If there had no any pipe blending stage changes, then do not
call belnding set up to avoid unnecessary warning messges.

CRs-fixed: 467556
Change-Id: I07520b3b0917375c41405e736dcb9eb8a3daddc1
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Revert "msm_fb: display: remove background invert alpha option for alpha drop pipe"

This reverts commit 0119007a18aae8a8fb43f4320509bda161da4167.

CRs-fixed: 461574
Change-Id: Ia768030ec859a4ff38549686936789413826df32
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm_fb: display: prepare clocks before enable AHB clock

Clocks need to be prepared before enabled and unprepared after
clock disabled.

CRs-fixed: 466843
Change-Id: I5180c98a2c5fd4bd867272ee1d2bf274ff15d215
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: fix the hang issue caused by solidfill pipe

When mdp pipe solidfill mode is disabled, the staled pipe info is used
to update mdp pipe regs. This caused mdp hang. Since
mdp4_overlay_rgb_setup function already resets solidfill mode, this
patch removes any pipe register updates that are related to disabling
solidfill mode.

CRs-fixed: 467555
Change-Id: I23f4b29731c9097ab0cc38baa00cd35bc536d2ba
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm: display: Fix composition issues when framework rebooted in suspend.

Currently, if framework is rebooted while in suspend mode, borderfill
is not unset due to which MDP composition can not be enabled. This patch
fixes the issue.

Change-Id: I8b671eccedebf2bb08724cf2d284d4ab27a71360
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
msm_fb: display: fix the suspend/resume hang caused by wait4vsync stuck

wait_for_completion in wait4vsync stucks after multiple suspend/resume
tests. The cause is that when show_event timeout happens, or vsync isr
is disabled for long time, wait_vsync_cnt resets to zero, and in vsync
isr complete_all has no chance to be called which caused mdp hang. So
complete_all needs to be called whenever show_event has timeouts.

Change-Id: I124899ff95fd5550d2759d215f16fa9cb8c0c211
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm_fb: Set backlight during resume after first display commit

Set the backlight after resume only after the first display
commit is done. This will avoid panel specific transients to
show up on the panel during its initialization. Also, avoid
backlight scaling during resume until backlight is set.

CRs-fixed: 468633
Change-Id: Ic9e24e9cd9d57fbdd767f9dae92f418b0b139c94
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: mpq8064: Add support for GSBI5 UARTDM for serial console

This change enables GSBI5 UARTDM support,pin configuration
and clock support for enabling serial console.

Change-Id: I937e37af80b2ea30981cadd432b2302a14aff9be
Signed-off-by: Kiran Kumar Raparthy <krapar@codeaurora.org>