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: 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>

Conflicts:
	arch/arm/mach-msm/board-8960.c
	arch/arm/mach-msm/devices-msm8x60.c
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl.h
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_utils.c
	drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c
	drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker_api.h
	drivers/video/msm/vidc/720p/resource_tracker/vcd_res_tracker.c
	drivers/video/msm/vidc/720p/resource_tracker/vcd_res_tracker_api.h
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
vidc: Adjust core timeout based on current core frequency.

Core timeout value is calculated based on the current core
clock rate during video play back.

Change-Id: I52f38560eda71dd0eaf208da68b4c3f74955661b
CRs-fixed: 354069
Signed-off-by: Mohan Kumar Gubbihalli Lachma Naik <mgubbi@codeaurora.org>

Conflicts:

	drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker_api.h

Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>

Conflicts:
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_helper.c
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.h
	drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker_api.h
vidc:1080p: Set video core timeout value for Thumbnail mode

Video core timeout value is set only for thumbnail mode.
For normal playback senario default value is set.

CRs-fixed: 367222
Signed-off-by: Mohan Kumar Gubbihalli Lachma Naik <mgubbi@codeaurora.org>
(cherry picked from commit 740d5ad28484b42ae675721a66a1bd93081712c8)
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>

Change-Id: I32ee573b21fd79d44d578a773294ba9973f1c00d
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
msm: vidc: Fixes bug in handling duplicate frames.

Fixes bug while closing encoder which supports
duplicate input frames. This fix decrements
the reference count of original frames
appropriately.

CRs-Fixed: 366268
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
(cherry picked from commit af4a0ef0c6162e89c063b04da0a037246fcc76b9)

Change-Id: Icf36d82e78588bf4b5becf480bdccd4c7cda94a5
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
(cherry picked from commit c4cee17571e07afd6c0fe0c50c8934ccfef50ae2)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
msm: vidc: Perform cache flush only for non-secured
mode.

The cache flush for secure mode is not needed as
no memset is performed. Pass the correct parameter to
cache flush to avoid kernel panic.

CRs-Fixed: 374719
Change-Id: If9bfe1025b15b24e17ec49590c21a59d77f9414c
Signed-off-by: Arun Menon <menon@codeaurora.org>

Conflicts:
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_helper.c