Revert "HACK: block fbearlysuspend to not break androids crt-off animation"

This reverts commit 8faa4f7e14340e3e63701debd2e1c49f773412dd.
msm_fb: Fix blending logic for formats with per-pixel alpha

Currently if a layer with per-pixel alpha (eg. RGBA) is fed
for composition with z-order as zero (FG), per-pixel alpha
blending is applied along with the BG frame present on frame
buffer and hence we see the previous frame on the panel. Hence,
apply constant alpha blending if these formats are fed as FG.

(cherry picked from commit dd10bf1007a50b8b6956a5470ff92a2b4ddf9971)

Change-Id: I1ad8ea37b1281ad6f430ce60aa5c1dae9e5701d3
CRs-fixed: 405802
CRs-fixed: 435800
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: display: fb blend setting via MSMFB_METADATA_SET ioctl

MSMFB_METADATA_SET ioctl is added for the fb user to pass
in additional infomation rather than using reserved
fields.
User can set pre-multiplied alpha for the frame buffer via this
ioctl, overlay blend setting will take this into account.

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

Conflicts:

	drivers/video/msm/mdp4.h
	drivers/video/msm/mdp4_overlay.c
	include/linux/msm_mdp.h
msm_fb: Return ioctl on vsync interrupt disable

Before the vsync interrupt gets disabled, initialize the completion
structure and then disable the interrupt. This enables the ioctl to
return successfully in all the cases.

Change-Id: I6a7c233f818a773d00497502213d1ecf8fe9dc24
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: display: Increase MDP IOMMU buffer mapping size

Double the MDP IOMMU buffer mapping size to allow overfetching
by hardware for boundary conditions and avoid system crashes
due to page faults.

CRs-Fixed: 378108
CRs-Fixed: 364478
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Ib19af6b06ab06455acaffcca33830e0487bb0836
(cherry picked from commit 1ed0dae869f6384d23322b78691852d70c573174)
Revert "msm_fb: display: Attach and detach MDP IOMMU on suspend/resume"

This reverts commit 0ffdb09c5b079558df4af22e7d89403ed43f9bb6.

Change-Id: Ib899b768d96c90a4cf41d9e7a86ba1a5647ad69d
msm_fb: Make Vsync IOCTL during disable sequence as NO WAIT

Change to make the vsync IOCTL no wait during the disable sequence.
This is to increase the performance. Handle the synchronization of
vsync interrupt using state variables in drivers from now.

Change-Id: Ia5ec14493f233a95f21d01ea627200a6c278239f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: display: Update mdp clocks based on perf patch

MDP clock was not getting updated to the correct values
causing underrun issues.

Change-Id: I4902ede1a8dda7408384261ca352e1ca1057a69c
Crs-Fixed: 395054, 395166
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: check pipes queued before enter wait_for_completion

Timing generator will not be turned on if there have no pipes queued.
Therefore wait_for_completion may never be completed if there have
no pipes queued.

Change-Id: Iafba086e4ba20b31470c9fd385c4f5c474ecadcf
CRs-Fixed: 405421
(cherry picked from commit c15016aa0986c491b33f12af4c62e3bcd5296a79)

Conflicts:

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

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: add pipe commit ioctl

currently, pan display serves as pipe commit. However it
may spend long time pending on cosole_lock() which cause
flickering on HDMI. Add pipe commit ioctl to allow commit
from overlay in addition to pan_display.

CRs-fixed: 391564
Change-Id: I163b5d96f727b70b4d5693e9a414b59339818998
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c
	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: Send vsync events using sysfs for MDP4 targets

Replace sending of vsync timestamp using uevents with sysfs entry
as uevent result in increase in power numbers due to broadcast in
nature. Also, for smart panel, wait4vsync is removed.

Change-Id: I5219e85b837b8bab9d00a9f40c1048d2a2355194
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dtv.c

Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_cmd.c
msm_fb: display: Send vsync events using sysfs for MDP3 targets

Replace sending of vsync timestamp using uevents with sysfs entry
as uevent result in increase in power numbers due to broadcast in
nature.

Change-Id: I22cfbd68c8bcbe4a47e94074393f1cbf79920c58
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp.c

Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp.c
	drivers/video/msm/mdp_dma.c
msm_fb: display: add spinlock to protect dma status.

During dma transfer to interface host the status of the dma
needs to be protected in the smp environment.

Change-Id: I02b4f046de7f693bb098343b7345c4aa6ca395bd
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
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: Return pan_display call on Vsync interrupt

Till now, the pan_display call returns on DMA_P_DONE interrupt.
For command mode panels, the DMA transfer starts only after the
DMA engine receives a TE signal from the panel. Hence, return
pan_display ioctl on vsync interrupt to improve performance.
We still wait if the previous DMA transfer is not finished at
the beginning of next pan_display.

(cherry picked from commit 61832135cad75ef082a905fedb30d835c85611b5)

Change-Id: I2eb250c0ba87098424c03fb6ecfffcd1e62ec2c9
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Jessica Goznalez <jgaona@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp.c