msm_fb: display: Fix blend configuration for MDDI I/F

MDP4.0 blend operation registers are not double buffered and
take effect as soon as they are configured. Configuring these
registers at any place other than between dma and vsync produce
flickers as new blend values would get applied to previous
mixer configurations. Configure blend operation registers just
after dma is over, before vsync.

CRs-Fixed: 410029
Change-Id: I2d04b2edb1e6592ac192fd00d302d8941a56ad69
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
video: msm: Remove old post processing overlay integration

Remove old implementation of HSIC and QSEED smoothing/sharpening overlay
integration. Need to replace with new implementation that better integrates
the existing functions of the two APIs.

CRs-Fixed: 380750
Change-Id: Id3469fad16764ed88e74a8da75bb873f726ba366
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
(cherry picked from commit 3118cb077358e472adb0db8e207a63bd84fd267f)
video: msm: Add CSC and QSEED support to Overlay API

Add support for CSC and QSEED configuration through MSMFB_OVERLAY_SET and
MSMFB_OVERLAY_PLAY ioctls. Provide better integration than previous attempt
with the existing Overlay and PostProcessing APIs.

CRs-Fixed: 380750
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit dfe5751941ef2478c57565f8ebca09623d83a8a4)
video: msm: Move histogram disable to before panel off

Histogram expects the display to be on while running, thus moving its
disable call to before disabling the panel timing generator ensures this
assertion.

Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit 67ddb9b38b1793c297ff431ef9f650f355c4abf2)
msm_fb: Retain CSC values across suspend/resume sequence

CSC values pertaining to various H/W blocks are stored in a
global structure and will be re-applied during resume sequence.

CRs-Fixed: 376159
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
(cherry picked from commit c40f9f9bc1e83ce521759f03b6fd01d9699cd39f)
msm_fb: Handle histogram IRQ cleanly during suspend/resume

Currently, if the histogram disable IOCTL comes after panel
is turned off, we early return the IOCTL causing the interrupt
to be left enabled. This causes IPC issues during suspend. Fix
this issue by properly enabling/disabling the histogram interrupt
during suspend/resume scenario.

CRs-Fixed: 434491
Change-Id: I4d38776a43ea854aff3c10c8d9d5450af1d98c91
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: call complete for no_update timer after power flag is set

In Suspend case, after we complete for no_update timer and before
we set power down flag to false we might recyle the CABL sequence
which might cause do_hist to fail till resume
msm_fb: display: Evenly balancing load on MDP ports

Moving RGB1 and RGB2 to AXI port 1. This fixes underrun issues seen
on External display while connecting and disconnecting HDMI. This patch
evenly balancing pipe loads on each port.

Change-Id: I2dc1166d04bb938f9e233a6de52f1a8a3fdd29e2
CRs-Fixed: 435458
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
ion: Bring ion header in sync with jb_2.5 userspace [JB_MR1_CHOCOLATE]

Change-Id: I3e5d94dcdb8f56be245c7f6a6d353ef9aa44d93c
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
gpu: ion: move msm-specific ioctls to custom_ioctl

To avoid collisions with future ioctls that may be added to ion,
msm-specific ioctls should use the `custom_ioctl' interface provided
by struct ion_device, as originally intended.

Change-Id: Ic36f1ff37ce79926482942f70d466acf95c9c170
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
gpu: ion: repurpose flags field for heap_mask and caching

In the latest Ion API, userspace clients specify the heap_mask for an
allocation in the `heap_mask' field of the ion_allocation_data
structure, and they specify caching in the `flags' field. Before, the
heap_mask was in the `flags' field and caching was specified with the
O_DSYNC file open flag.

We would like to support the new API without actually updating Ion. To
do this, | the heap_mask back into the flags field on an allocation
ioctl (since the internal kernel APIs still expect to see it
there). Also make sure that caching is taken from the buffer flags
field rather than the O_DSYNC file flag.

Change-Id: I872afb40d9bf7c49bb31f19c5e9726ac714ef850
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: ion: Only return Ion flags in ion_handle_get_flags

Since the ion_buffer.flags field is shared between the actual Ion
flags as well as the Ion heap mask, make sure that we're only
returning flags. The heap_mask bits should be masked off.

Change-Id: Ibdaf0ea374b7b80a036bddd11d19c4bafa173ef6
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>