msm_fb: hdmi: Resolution modes on HDMI

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

Change-Id: I971422ddb97e3b219cc682032eb67212b434daab
Signed-off-by: Aravind Venkateswaran <aravindh@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>

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: camera: Remove unused code used to map userspace buffers.

Remove MSM_CAM_IOCTL_SET_MEM_MAP_INFO IOCTL support, since the
usage of this IOCTL is now depreciated.

Change-Id: I8d0c99874ae9bd87aaaa10e039f2511a6dd20775
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
bluesleep: bump TX_TIMER_INTERVAL to 10 seconds

This allows bluedroid to use LPM without crashing.

Change-Id: If48bb2c166d0fe90eb852f85b538cc1be45844c4
msm: display: Clear performance request data in turning on

In resume, previous cached request data needs be cleared as
they do not reflect the current hw status.

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

Conflicts:

	drivers/video/msm/mdp4_overlay.c

Change-Id: I6e3abe09a38b4499ceb168ea7b0351672253a6cd
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4.h
msm_fb: display: allocate RGB pipes properly for external

Allocate RGB pipes for primary and external properly to avoid
HDMI connect/disconnect issue for both UI and video cases.

CRs-Fixed: 452750

Change-Id: Ice3c7837722a907433c59af7a6424bce6fccb2ba
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_mddi.c
msm: display: increase fence timeout

Increase timeout value to 900ms to allow
gfx engine to render longer.
When sync_fence_wait fails, need not put fence as
it will be handled outside the loop.

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

Conflicts:

	drivers/video/msm/msm_fb.c

Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: display: fix fence fd list be put twice

msm_fb_wait_for_fence() will put fence fd list if sync_fence_wait()
failed. After that same fd list wil be put one more time. This
cause a fd put twice and cause system crash at the time fd
was closed.

Change-Id: If6a358e051c98841e34c23d81098243003ef0836
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit 798299147ba7eef47f0cb85ff0e9c61f61b2a1e8)

Conflicts:

	drivers/video/msm/msm_fb.c

Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: Update MDP fence wait behaviour

The current fence wait times out too early in cases where the GPU
is under a heavy workload. Change this behaviour to warn and wait
for a longer time for GPU to complete it's work.

Change-Id: I8b20c22733a77c1aaea4a1fd1e4daaa14b5ec2fd
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
(cherry picked from commit c03cdb744746297d370d6b5c42e8ce82b6eebc08)

Conflicts:

	drivers/video/msm/msm_fb.c

Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: display: check active queue before signal timeline

This patch make sure active queue is not empty before signal
timeline.

Crs-fixed: 453745
Change-Id: I450c0923a67bdc90d06249e3ba83edb0b3b4b319
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: free borderfill pipe when ref_cnt reach 0

Borderfill pipe need to be kept as baselayer which is not
suppose to be freed at suspend. It only be freed when
ref_cnt reach 0 by "adb stop".

Change-Id: I2325dc1f80a8f77399e7552851b6208a6da1647e
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: lakshmi narayana p <lpatib@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_mddi.c
msm_fb: display: Add alpha enable check in blend

FIR and M/N scalar when used for downscaling, drops
alpha channel of the given layer. To notify this, alpha_drop flag
is updated accordingly. This flag need not be checked for layers
with no alpha plane. In some scenarios alpha_drop may get enabled
for the layers with no alpha plane and cause issues realted to blend
composition of layers. Check for setting alpha_drop only if source
ayer has alpha plane.

Change-Id: Ie64b30c045a78d0d68eb9efacc76902afae7850d
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: lakshmi narayana p <lpatib@codeaurora.org>
msm_fb: display: update var in display commit

Need the value of var in display commit to update the double buffers.
If not, double buffering doesn't work in minui (eg. recovery and off-charger
mode)

Change-Id: I1fba52243cc781f18742131759245911d32c9b18
Signed-off-by: Devin Kim <dojip.kim@lge.com>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: lakshmi narayana p <lpatib@codeaurora.org>
msm_fb: display: fix division-by-zero bug

Panel v_back_porch could be zero for virtual panels, so the check for
zero is added to fix the bug.

Change-Id: I6a29f3d8d771092bca2374cc9a1c11dd77ad569e
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: lakshmi narayana p <lpatib@codeaurora.org>
msm_fb: display: initialize dmap_comp before wait4dmap

blt_wait flag will be set when both two writeback buffers
are used. In this case, kickoff can not be proceeded until
next dmap_done to release writeback buffer. This patch
initialize dmap_comp before wait4dmap to make sure
wait_for_completion is enforced.

Change-Id: Ifb67c206069ef4e011c51a8820b1f63c6e70a5e2
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: lakshmi narayana p <lpatib@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_mddi.c
msm: display: reduce timeline to 1 for smart panel

For smart display, dsi command, mddi and wfd, since it has its
own buffer, the input buffer can be released once the
display commit finishes, hence the fence threshold for
creation can be smaller. This patch reduce the timeline
from 2 to 1 for samrt panels. Also, it needs to
wait4dmap/wait4ov after kicked off. Otherwise, tearing may
happen.

Change-Id: I9eca871d8d863ef23b1d67b6e1e9cffea40ae4a6
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: lakshmi narayana p <lpatib@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_cmd.c
	drivers/video/msm/mdp4_overlay_mddi.c
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: lakshmi narayana p <lpatib@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c
Revert "msm_fb: display: add stage commit without pipes queued"

This reverts commit 0a31a1753d1c977993f500faf2990770a64c92cc.

Change-Id: Ib1c3fc1f562a416ebda79c7e9de1fd604dac3387
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>