msm: HTC 8960: remove unused panel width/height fields

Change-Id: I8c01ab993db3625a4019b3a3b655441ea6baf120
msm_fb: display: Add support for 4 layer MDP composition

Add 4 layers composition support to MDP by allowing borderfill
pipe to be used as base layer of mdp blending. This releases
RGB1 base pipe which can be used as a general purpose pipe.

Change-Id:I517485d738e8bb555a263b3ea885d78d5e4f4396
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp4_overlay.c
msm_fb: display: Fix D2L register I2C driver more than once

Fix error message seen on kernel log after suspend/resume

Change-Id: I908efec9fde6e9de838e28d2c778fa4b3567e4f6
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
msm_fb: display: change ion memory map for mdp mixer2 writeback

One way that mdp mixer2 gets writeback address is to get ion memory fd
from userspace, then mdp driver maps this fd in kernel. When mdp iommu
domain was not enabled, this maps to a physical address. Now after mdp
iommu domain is enabled, the map is changed to an iommu virtual addr.

Change-Id: I461a00cc93169de586565834af4fb9a43949cf95
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp4_overlay_writeback.c
msm_fb: display: Flush pipe registers before staging for Mixer 0 or 1

For Mixer 2, register flush need not be called. Flushing is done
only for pipes on mixer 0 and 1.

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: I54758f79552790de2ad936703ba6140ac57b76c4
msm_fb: display: Attach IOMMU for DSI cmd mode in kickoff call

Attach IOMMU call is currently done from DSI cmd mode DMA
update method. Move the attach call to kickoff which enables
it from restore and video paths

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: I06d39e31b3ab1cf797fb655e7e558c1cabd98ebf
msm_fb: display: Enable MDP clock's overlay block during panel on

MDP clock's overlay block is enabled during first update after panel
on currently. This is now moved to panel on to keep clock enabled
right from display on time.

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Ie201186c1471201874f2eff246486bc4a73b5872
msm_fb: display: Wait for overlay done after DSI Video writeback switch

After writeback mode is switched for DSI Video interface, wait for
overlay done for prefill frame to avoid unnecessary fetches from previous
buffers resulting in page faults.

CRs-Fixed: 372389
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Iacd3775a718fe8e08404b4d119d447a88b628617
msm_fb: display: Add panel padding support for active refresh display

Add panel xres and yres padding parameters for active refresh display
interfaces.

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: If8830295814d0e27f49dfffdeb96db63f73809ba

Conflicts:
	drivers/video/msm/mipi_toshiba_video_wsvga_pt.c
msm: display: Change DSI escape clock to byte clock

Changing DSI escape clock source from PXO to byte clock to add
more flexibility.

Change-Id: Ia78093f8b8be6a27c86f3e8db68fa1f4a4d85086
CRs-Fixed: 361022
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>

Conflicts:
	drivers/video/msm/mipi_chimei_wuxga.c
	drivers/video/msm/mipi_chimei_wxga_pt.c
	drivers/video/msm/mipi_novatek_cmd_qhd_pt.c
	drivers/video/msm/mipi_novatek_video_qhd_pt.c
	drivers/video/msm/mipi_orise_video_720p_pt.c
	drivers/video/msm/mipi_toshiba_video_wsvga_pt.c
	drivers/video/msm/mipi_toshiba_video_wuxga.c
Revert "msm_fb: display: Rename MDP IOMMU context bank names"

This reverts commit 06c0500ae33011d1354dc514dd69f098a1aaf381.

Change-Id: I2b0f1df469c71d48f073bad03e98b1a1f441fd36
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
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>
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
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>
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>

Conflicts:
	drivers/media/video/msm/wfd/wfd-ioctl.c
	drivers/video/msm/mdp4_overlay_writeback.c
	drivers/video/msm/msm_fb.h
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>
msm_fb: display: Update video format on fps change

Added check for frame rate change. Corner case if there is no
change in xres,yres and pixclock.

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