msm_fb: display: enable pixel repeat on VG pipe only for alpha upscaling

VG pipe doesn't support pixel repeat/drop to avoid alpha channel drop
during downscaling. Keep pixel repeat only for upscaling.

Change-Id: Id400d0f823bc0054a94330600d5085778a65b936
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: fix underrun seen for some YV12 format input

Underruns seen on display because source rectangle width is
aligned to 16 before being passed to MDP. Only ystride should be
aligned, source rectangle should be passed as received.

CRs-Fixed: 329453
Change-Id: Ibb71ad316023d21ebad4c5db37fdc5e5c8acb02b
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: fix underrun seen with big src coordinates

MDP underrun happens if combination of x + w or y + h exceeds 2048.
To handle such use cases add an offset to the source address instead.

Change-Id: I36a8b687c4e21cac9915b5bf71211c97f6b44ddd
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
video: msm: Remove ifdef from mdp_histogram_ctrl

Replace the mdp revision specific code with reference to
mdp_rev global var.

CRs-Fixed: 310429
Change-Id: I09fe3707bc9926af89874966e7d640c5862cffa0
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb:display: Enable Layermixer2 for nv12 writeback

enabling the layermixer2 for new MDP hardware so that it can be
used to writeback the output in nv12 format for wi-fi display usecase

Change-Id: I70322e722d8382102077db2d94a9320c2f2bb175
Signed-off-by: Rajesh Sastrula <vrajesh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
Fix-up
msmfb: display: fix the issue with overlay wait api

calling overlay wait api asynchronous to the other overlay apis
results in race condition in protection flags. this case is
observed with HDMI true mirroring feature. it modifies the
protection logic to fix the race condition

Change-Id: Ib933055a395c2fc743f018aee96090defde33d37
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: add mdp overlay1 writeback

This feature is enabled to avoid underrun on the display external
interface (HDMI). For example, if 1080p to 720p downscaling is
required, and mdp clk rate already is in its max, writeback is the
only solution for this situation.

Change-Id: I2323272a90730da45601f1d4c7dfc2bf06337b59
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
Fix-up
msm_fb: display: perform staging updates on a single vsync

Store all staging updates locally and write to hw on a single vsync
only when changes are detected, this allows a smooth transition
from using multiple overlays to framebuffer for UI

Change-Id: I2cd61d858e74d450b8ad515b75008518274bd15e
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
Revert "msm_fb: display: perform staging updates on a single vsync"

This reverts commit 5294a4b4d9253d877e3a873796733dbf19333ca9.
msm_fb: display: Move debug messages to debug statistics

Move some debug messages that were shown as errors in display driver
to debug statistics to avoid excesive prints in kernel log.

CRs-Fixed: 326925
Change-Id: I529586f0e79baf27e2ae17f08fac203ba28bf416
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: perform staging updates on a single vsync

Store all staging updates locally and write to hw on a single vsync
only when changes are detected, this allows a smooth transition
from using multiple overlays to framebuffer for UI

Change-Id: I2cd61d858e74d450b8ad515b75008518274bd15e
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Use FIR (QSEED) for upscaling.

Low resolution UI is observed on HDTV connected with HDMI.
FIR (QSEED) algorithm needs to be used instead of pixel
repetition to improve the performance in case the BYPASS
composition is not used.

CRs-fixed: 332123
Change-Id: Ib4c2b107b4ae1300458cccc7e8066d31aee50a0d
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>