msm: display: Attach MDP IOMMU during first update after boot

For continuous splash support to work properly, attach the MDP IOMMU
device at a later point during boot to allow display use the
splash image from bootloader

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Ife9a2afae1e9b9140ee74af0cc7dcf7ad945d4de
msm_fb: display: Unstage video from primary mixer H/W on unset

Resolve video playback suspend/resume IOMMU page fault by
unstaging video layer on VG pipes from primary mixer H/W during
overlay_unset calls immediately at the next vsync boundary

CRs-Fixed: 350371
CRs-Fixed: 354236
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: I7fe10989a7bc3d7f379adfd18010c5e8cd655368
msm_fb: Correct mdp_iommu array size to avoid scribbling

The mdp_iommu array was undersized. This resulted in scribbling of
nearby data structures which, through a long series of events,
lead to invalid pointer dereferences in the workqueue framework's
process_one_work() function on (at least) the 8930 SoC.

CRs-Fixed: 357011
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Change-Id: Idb360e687c4cf050b6e73e575a13eba4b9d3c150
msm_fb: display: Flush pipe registers before staging the pipe

Flush pipe registers before staging the pipe for the Mixer with
pull mode panel interfaces. This fixes the IOMMU page fault/underrun
caused by pipe fetching previously unmapped buffers due to missing flush
calls

CRs-Fixed: 356484
Change-Id: I6bc2e49746a7c3773708796bc1709c75a8afaa4b
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm: Make IOMMU domains unique

4 domains have been defined for the IOMMU. However, they are all
aliased to each other.

Change so that the domains have unique value for video, camera,
display, and rotator.

Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/include/mach/iommu_domains.h

Change-Id: I5b09c1d98e04c63c718bbbf0a0dd2e3d1cc21c25
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
gpu: ion: Use standard cache routines

Instead of using custom routines for cache operations use the
standard operations for cache flush, cache clean, and cache
invalidate. In addition only call outer cache routines if
outer cache is available.

Change-Id: Idb51bf7348fd526ebdea1e6ff2e366b8a3b4de33
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
(cherry picked from commit 85c95406680ce1a959a9b8cdb5aff7afcd699038)

Conflicts:

	drivers/gpu/ion/ion_system_heap.c

Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
msm: vidc: Downloads firmware using pil_get.

Downloads video codec firmware using pil_get
for secure sessions only. Firmware is not
downloaded using pil_get for non-secure
sessions.

Conflicts:

	drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c

Change-Id: I84b7a1d70ed1f505838930a192e5d1afdbfc54c1
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
msm: Enable all IOMMU's

Enable video, camera, display, and rotator IOMMU's so
that virtual contigious memory can be used by these
devices. Physical contigious carveout regions can
be reduced so that more memory is available to the
rest of the system when not in use by multimedia.

Change-Id: Ibfad7d6a55e04490be9e39a5539780657f6727e0
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/iommu_domains.c