msm_fb: Provide support for ARGC and CSC for layer mixer 2

MDP 4.4 supports additional layer mixer (LM2) with ARGC and
CSC blocks. Extend existing ARGC and CSC functionality to additional
layer mixer (LM2).

Change-Id: Id9e5d0a80fcd9a6e3b6132b083d8a43450c0efa1
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_util.c
msm-fb: display: Tearing issue during video playback

Tearing was observed while playing 1080p H264 videos in
potrait mode. Enabled blt mode check for MIPI command
mode panel as well.

CRs-Fixed: 369365
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Change-Id: Iac980050e5966db4731240c11e89e1f68118f2b7

Conflicts:

	drivers/video/msm/mdp4_overlay.c
msm_fb: display: Enable mixer1 writeback for video downscale use cases

Underrun occurs while downscaling video data on 8x60. Enable writeback
if video downscale is required.

CRs-fixed: 329630
Change-Id: Ief4b002efd6f4ad9fcfd844325c05de619d47719
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: use spin_lock_bh() when turns on/off dsi_clk

Since dsi clock is accessed by both thread and timer context,
spin_lcok_bh()/spin_unlcok_bh() must be used to serialize accessing
of dsi clock.

Change-Id: Iac80400d871c90413dcbb10a12efc6bc6247e986
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4.h
msm_fb: display: add dtv_pipe null check before dereferenc it

There are chances that a null dtv_pipe pointer is dereferenced and
system crashes. One such case is unplug HDMI cable while playing
video. So a null check is needed for each dtv_pipe dereference.

CRs-fixed: 355238
Change-Id: I1ff57b00169e217fc5ed98574db7fd49b9319d0a
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Increase wait for VSYNC

Wait time for VSYNC needs to be increased to accomodate 1080p
24HZ resolution which requires around 41ms.

CRs-Fixed: 368521
Change-Id: Ideda24bb83e32a6d5035c6193ef3dfd5e0c947fc
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
video: msm_fb: Wait for dma to finish before terminating

If writeback takes too long to finish, after calling _stop()
writeback client might deallocate buffers during the DMA causing faults.
To prevent this situation, make _stop() a blocking call that waits
for the writeback to finish before returning.

Change-Id: Ia710095a55d705589a81aa9bc29c41d536c2a42d
CRs-Fixed: 351773
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
video: msm: Load correct default values to QSEED at init

The previous QSEED Table 1 values are not suitable values (would end up
smoothing and sharpening content which can lead to artifacts).

The values loaded by this patch are the suggested default values for QSEED
since they do not smooth or sharpen most content (bi-cubic filter), but
will slightly smooth low frequency components of the image (i.e. helps
reduce artifacts that produce sharp edges on content that is supposed to
be a constant color; often introduced by some video encoding algorithms).

Change-Id: Ic4c0ca4719141bf52123ad239fcca5d3767a2c2b
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>