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.

-------------
A. Dodd note:  Part of this patch was already in mdp4_overlay.c due to
the mako bulk updates patch.  This is the remaining part of the upstream
CAF patch.

Change-Id: I6355a7e9867d985cae229f1ef5316d2c5660abcd
Signed-off-by: Andrew Dodd <atd7@cornell.edu>
msm: rotator: Add pseudo-planar 422 H1V2 dst format for MDP4

For interleaved 422 inputs, rotator outputs MDP_Y_CRCB_H1V2
format on 90 degree rotation. Add support as destination format
for MDP4.

CRs-Fixed: 371303
Change-Id: Ie0f98d40f58bf2cb9bc3298a94cae9c4e89b2f7a
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: rotator: clear rotator bus scale handler

rotator bus client will be not registered again without handler reset.

Change-Id: Id35c4e5ad481d0a4401bdb3ee4628ffa9a891467
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm: rotator: Support Fast YUV for 8960, 8064 and 8x30 targets.

Add Fast YUV support in rotator for 8960, 8064 and 8x30 based
targets to improve performance for YUV 420P and 420PP inputs.

CRs-fixed: 415246
Change-Id: Ib4cbbd0fd45a82b8d409e7f52ae8bf8420b2c4eb
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm_fb: display: exit properly when rotator max session reached

When rotator session reach maximum, it should exit without calling
put_img since no get_img had been called.

CRs-fixed: 466462
Change-Id: I951570227ebd81da6dad19c1b897cde84f8d0451
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
board-8064-pmic: Enable RTC write.

Qualcomm's RTC crash workaround is only applicable to
CDMA MSMs - not needed on GSM devices or, as far as I know,
any device with an APQ+MDM combo.

Change-Id: Ie0b0c444e115b0cf8cf3e3d6b3b2b7b711e87308
msm_rotator: Fast YUV logic improvements from Sony kernels

This plus the other patches improves landscape videos,
but portrait orientation videos still cause issues.

Starting to look like the longterm goal needs to be a CAF rebase,
or a whole pile of cherrypicking from upstream.  We've cherrypicked
nearly all the rotator patches we can.  Other possibility is
stuff from the Sony APQ8064 kernel that wasn't in the big mako
bulk update.

Change-Id: Id321ca8290d99e9b4789b4d5f4cd048f14029545
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.

(cherry picked from commit 7bcecf0a6a6864accfa1318e33e85ad2cc23f535)

Change-Id: I4de6a6f28aee2cc9896a028164172a4c3bad950f
CRs-Fixed: 380020
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm_fb: display: Add pseudo-planar 422 H1V2 support in the MDP4

Rotator outputs pseudo-planar 422 H1V2 for interleaved inputs
on 90 degree rotation. Add changes to support MDP_Y_CRCB_H1V2
in MDP4.

CRs-Fixed: 371303
Change-Id: I8083bf44f9e2addf9e8732268147c1c3f6c0e2af
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: display: maintain smmu for secure video

Currently video maps and unmaps the secure memory.
It could be too early to unmap it.
Rotator and MDP will maintain this, only unmap it when
no more needed. Memory managr has a refence count for it.

Change-Id: I58178ecbcf8aa993837ae265bbf99dd58a23889e

Conflicts:
	drivers/char/msm_rotator.c
msm: rotator: sync point support

Add MSM_ROTATOR_IOCTL_BUFFER_SYNC ioctl interface.
Rotator will create a timeline for each session at START, wait for
input fence and create released fence in this ioctl call,
signal the timeline after rotation is done.

Change-Id: I3738f8287d804ccd94e0a16ac0afb8b41b299c75
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm: rotator: non-blocking rotate

Send request to a work queue and return right away.
Work queue will go through the commit queue to do the
rotation. wait_for_finish can be set to true to make
rotation go back to blocking.

Change-Id: Ifc2e36bd24d9681d42105f4ccbb62a8777af2a6c
Signed-off-by: Ken Zhang <kenz@codeaurora.org>

Conflicts:
	drivers/char/msm_rotator.c
msm_fb: hdmi: Resolution modes on HDMI

Add a new header file that lists all supported
HDMI resolution modes and the associated timing
information.

CRs-Fixed: 470335
Change-Id: I971422ddb97e3b219cc682032eb67212b434daab
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>