msm_fb: display: Correct dtv pipe black out

This change corrects the register values to black out
the dtv base pipe.

Change-Id: I80fefab3cc6dd006edbb673f41ccfe983af2cc3a
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: display: skip one vsync event after enabling mdp and vsync clk

Both mdp and mdp_vsync clks are disabled for command mode panel when
no new frames are being played. When they are re-enabled if new
requests come in, the first vsync event which is signaled by read
pointer interrupt arrives in a random time due to the sync between mdp
and panel, so skip it to maintain correct vsync timing.

Change-Id: I683b765e4a16d3d152b9270f5982234b94921f1e
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm_fb: display: Proper pipes solidfill

For MPQ/hdmi as primary, solid fill the pipes only during suspend.
This change also take care of the solidfill of the pipes unset
during overlay and pan display at suspend.

CRs-Fixed: 421461
Change-Id: I15096df681cbd94ae3cea63ecbfe915e01b7387f
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: display: Fix blend configuration for command mode panels

For command mode panels, blend registers does not get configured
as per the use case. This leads to incorrect blending of layers
resulting in lower layers (eg. wallpaper or buttons in video
playback) to show above the upper ones, making overall user
experience to go bad. In order to resolve the issue, blend registers
are now configured properly by as per the use case.

CRs-Fixed: 410029
CRs-Fixed: 415553
Change-Id: Ibe7d594e0ad6a6f4d75ed2e59c7382c09b65d624
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
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>
msm_fb: commit mixer stage for WFD during unset

Interfaces with Borderfill pipe as base layer needs to
be commited during unset which will reset the mixer cfg
structure. This is needed because overlay_commit will not
call stage commit as there is no buffer queued.

Change-Id: Ib3347e52ae437b20d5a85a09777f13aee2672edb
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
msm_fb: display: Do not use ION_IOMMU_UNMAP_DELAYED

Since iommu buffer will be un-mapped after two newer commits
had passed, there is no need to request iommu driver to further
delay un-mapping an iommu buffer.

Change-Id: I8cf8d406cf509908035d12c9a04f0add12f3c7c7
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: Removing extra disable irq in cmds_rx API's

Disable IRQ for DSI_CMD_TERM was already called in the isr.
Removing the extra call present in the cmds_rx API's.

Change-Id: I0000dd3166beb2a3b0c788327e1d7520e0c11a13
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: Add support for vsync driven composition on 7x30

This patch will queue multiple surfaces and commit those
surfaces into mdp at same instance so that surfaces will
be blended and displayed at same time for 7x30. Hardware vsync event
is delivered to the user space frame work via uevent. Both
queue and commit are controlled by frame work and synchonized
with vsync event. Therefore frame rate will match with vsync rate.

Change-Id: I2acb83f871f16c2278dc10cb958580a2826efe70
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
msm_fb: display: wake up system around vsync

To avoid frame drops due to power collapse,
wake up cpu right before vsync.

Change-Id: I63385eb329ae5e74cbac5256823fd3a213e0a0e1
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm_fb: display: change the location of wakeup timer call

There are two pathes (pan display and overlay commit) to commit
display buffer, so change the location of cpu timer wakup call to the
common pipe_commit function to make sure cpu get waked up around
vsync.

Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Change-Id: Idbe6049d740a7e17a6a90e28566f7a9c74e348f2
lib: genalloc: Change chunk allocation to vmalloc

Change the chunk allocation from kmalloc to vmalloc for
allocations greater than a page. This allows large
chunks to be allocated from physically non-contiguous
memory and increases the chance of the allocation
succeeding.

CRs-fixed: 387655
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
(cherry picked from commit 0614b96dc8e4c8a0dd0db41aec5a79daa3bdf091)

Conflicts:

	lib/genalloc.c

Change-Id: Ic0dedbad9d277d0842591b1f075ce3b80c8c05de
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>