msm_fb: Clear real pipe attributes in the pipe free

Clear original pipe attributes in the pipe free call.

Change-Id: I776869e7997e5b70e4c2b102e1a394034247bbcd
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp4_overlay.c
msm_fb: display: free base layer pipe at adb stop

Base layer pipe need to be freed at adb stop so that same
pipe can be allocated at adb start.

CRs-fixed: 390644
Change-Id: I948bb27687cfe1c96cc3b071b7bb9bb84b2c52c6
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
msm_fb: display: empty pending queue during suspend

Overlay_play() adds a pipe into pending queue and pan_display()
will commit those pipes to hardware and empty queue. This patch
will make sure queue is empty at suspend so that no unexpected
pipes will be commited to hardware by pan_display() at resume.
Otherwise, iommu page fault may happen.

Change-Id: Ib35c247550bb8754f9bff68a6352022d58c55ff8
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp4_overlay_dsi_video.c
	drivers/video/msm/mdp4_overlay_dtv.c
	drivers/video/msm/mdp4_overlay_lcdc.c
[ARM] msm: call video start function

Change-Id: Ib8ef8d2c0e0d550a2d100dd90334400f6761f6ac
Signed-off-by: Iliyan Malchev <malchev@google.com>

Conflicts:
	drivers/video/msm/mdp4_overlay_dsi_video.c
msm: mdp: Disable vsync in video off.

Change-Id: I69fa66e4b3110a5d996d9c91dea6e73bd5280f47
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm_fb: display: check base layer pipe at irq handler

Change-Id: Ib188d575044f5479672503508042c8c1e9c759c4
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Revert "msm: display: fence fd releasing"

This reverts commit e221a8a6c352028e4ebf6de314cf1285a022ca77.
display: removed the code exhausts file descriptor in mdp overlay and rotator.

Fix the problem crashed while playing video clips and VT camera test.
ion_share_dma_buf is called in pr_debug.
So, it is called depends on build option and makes crash problem.

Change-Id: Ia96fdb7838eb2f3cdf979d8e0f886cb64eba6ca8
msm_fb: Display: Fix Dithering issue for rgb565 format

Using RGB888 as source format and rgb565 as destination pixel format,
will cause image corruption on the display. Fix this issue by
setting the destination format as RGB888 in MDP and DSI controller
pixel format as RGB565 for DSI specific panels.

CRs-Fixed: 377484
Change-Id: If58976ee9cd4825efb39437170e54796fa2213e0
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
video: msm_fb: Ensure backlight is scaled atomically.

Ensure that when backlight scaling ratio or backlight level is being
changed that the operation execute atomically. This prevents a backlight
level change from being overwritten when it interrupts a backlight scale
update.

CRs-Fixed: 404017
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit ce328861aa1f4fa489e9abfc9d1e02b13af2ba47)

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
(cherry picked from commit 0584596f75f8f2b184b8be1a0479ee61e449acba)

Change-Id: Ifb4bd5e823815b51dae38f1b8647b80d21b8ee45
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
msm_fb: display: remove extra dmap irq disable

irq enable and disable need to be called symmetrically.
Remove an extra dmap irq disable call.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: display: display idle checking update

msm_fb_blank_sub might be called for UNBLANK from
display update work queue, which is at commit state.
Idle detection is invalid in this situation
Add detection for external snd earlyuspend/resume interface.

Change-Id: I1b08d10c9c494b9b3df5e95c4a54036877d5653f
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm: dsi: use timeout for dma transfer

Use wait_for_completion_timeout instead of wait_for_completion
not to stuck in the kernel even when the DMA fails.

Change-Id: I29702c3c62f78399c173d660bbbc17a07ed27468
Signed-off-by: Iliyan Malchev <malchev@google.com>

Conflicts:
	drivers/video/msm/mipi_dsi_host.c