msm: display: fix iommu page faults for devices with lcdc panel.

Fetch was happening from non-iommu buffer because of wrong mixer
configuration for lcdc panels.

Change-Id: Ie313ce71ff269108271437f758c0dc37884a240c
Signed-off-by: Sangani Suryanarayana Raju <csuryan@codeaurora.org>
Merge "msm: display: fix iommu page faults for devices with lcdc panel."
msm_fb: display: Program source address registers correctly

Scale filter FIR uses the adjacent pixels as part of the
processing. Source address registers should be program such that
they point to the first valid pixel so that non-ROI pixels are
ignored. This is done by making source x,y offsets to zero and
adding the computed offset to source address.

CRs-Fixed: 380020
Change-Id: I998fdd46f39dc67f32c422ec209da59d1add2e95
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c

Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Anil Gahlot <anilg@codeaurora.org>
msm_fb: display: keep borderfill pipe's iommu info

Keep borderfill pipe's iommu info during base layer pipe
swap with original base layer pipe. Otherwise, borderfill
pipe's may contain original base layer pipe's iommu info
which cause iommu page fault due to same iommu buffer is
unmapped two times.

CRs-fixed: 436711
Change-Id: Ibdb792055287283c4449db07c2de2901aa4fe9b6
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Anil Gahlot <anilg@codeaurora.org>
msm_fb: display: fix iommu page fault when iommu buffer freed

There has possibility that pipe commit come very close to next vsync.
This may cause two consecutive pipe_commits happen within same vsync
period which cause iommu page fault when previous iommu buffer is
freed since mdp stil fetching it. Set ION_IOMMU_UNMAP_DELAYED flag
at ion_map_iommu() to add delay un mapping iommu buffer to fix this problem.
Otherwise four buffer mechanism is needed to avoid this problem..
Also ion_unmap_iommu() may take long time to free an ion buffer. Move
mdp4_overlay_iommu_unmap_freelist(mixer) called after stage_commit()
to increase chance to have pipe_commit (up to stage_commit) is completed
within same vsync period
This patch also fix an potential race condition at wait_for_completion
between show_event thread and wait4vsync thread.

Change-Id: I089950ac61c0bd3c4207b8925817577e42fbb258
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Anil Gahlot <anilg@codeaurora.org>
msm_fb: display: Copy splash image to kernel memory

The bootloader memory from which the splashscreen is shown
gets reclaimed before frame update happens from framework.
Hence, copy the splash image to a local buffer as soon as
display is initialized. This will ensure proper continuous
splashscreen functionality.

CRs-Fixed: 378721
Change-Id: I55a7b97eeced56d2f108d34998d58966610c4305
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
Signed-off-by: Mayank Goyal <goyalm@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: calculate mdp clock including borderfill pipe

For hdmi case, mdp clock calculation needs including borderfill
pipe to prevent dtv underrun while system is in suspend.

Crs-fixed: 449027
Change-Id: I98789343317d5cfdf1f56e496cecb4dd663c907f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Anil Gahlot <anilg@codeaurora.org>
msm_fb: display: don't enable blt mode

The switch of blt mode may cause mdp hang on some targets. To avoid
blt switch, we won't allocate the pipe that requires blt
mode. Basically this implies two things: downscaling is done by
rotator and gpu composition is used in case of blt mode is needed.

Change-Id: I2d6f1a0e33a40af90e3a1a013a1b48b0df0c8ea2
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Merge "msm_fb: display: Program source address registers correctly"
Merge "msm_fb: display: keep borderfill pipe's iommu info"
Merge "msm_fb: display: fix iommu page fault when iommu buffer freed"
Merge "msm_fb: display: Copy splash image to kernel memory"
Merge "msm_fb: Correctly setup splash screen flag in MDP probe"
Merge "msm_fb: display: calculate mdp clock including borderfill pipe"
Merge "msm_fb: display: don't enable blt mode"