msm_fb: display: Add SMP-safety for PPP Operations

Adds protection using spinlock for the variable used in
controlling the PPP operations

Change-Id: Iba6ef5e32d38668bd110ed23ee9631aa40de79e0
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
msm_fb: display: extend mutex protection for mdp pan display

When mdp commits a buffer to play, functions inside pan display, e.g.
mdp4_overlay_mdp_perf_upd are based on the current state of play, so
extending mutex to the scope of pan display to avoid race conditions.

Change-Id: I2e55567fd21de3738be066a2dee298d8122f12a3
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_cmd.c
	drivers/video/msm/mdp4_overlay_dsi_video.c
	drivers/video/msm/mdp4_overlay_lcdc.c
msm_fb: display: add satge commit without pipes queued

This patch allow satge commit without pipes queued to
allow a pipe to be un-staged from mixer immediately after
overlay_unset.

Change-Id: I03abb907c66cce3d0559743d3bb1eb26a88dc78a
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_cmd.c
	drivers/video/msm/mdp4_overlay_dsi_video.c
	drivers/video/msm/mdp4_overlay_dtv.c
	drivers/video/msm/mdp4_overlay_lcdc.c

Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_video.c
	drivers/video/msm/mdp4_overlay_lcdc.c
	drivers/video/msm/mdp4_overlay_writeback.c
bcmdhd: Enable packet filter for apsta and p2p firmware modes.
Reduce logspam.
Merge branch 'cm-10.1' of ssh://github.com/CyanogenMod/lge-kernel-iproj into cm-10.1
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>