msm: mdss: use one dma pipe during block mode transaction

Use one dma pipe during block mode transaction instead of two pipes
for the buffer resolution greater than max mixer width

Change-Id: I2a9f1bba95bfb66d1c0168aa9b99b8b9de57cd6a
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
msm: mdss: Consider FLIP flags while optimizing pixel fetch

While calculating source and destination rect of a pipe for the
programmed ROI, consider FLIP flags set for the pipe.

Change-Id: I631453c26f443b08a23556f83195d9914e05b41d
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
msm: mdss: modify userspace src format during MSMFB_SET on rotator

The req->src.format field should be changed to the destination
format and propagated to the user so that appropriate buffer size
calculations for the destination buffer can be made. Note, this
only changes the user copy and the driver fetches the source buffer
based on source format.

CRs-fixed: 686496
Change-Id: I590829796c00aeea8e3d9b10578126dd7afe9c82
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
msm: mdss: fix asynchronous rotation of layer bigger than line buffer

If MDSS HW has more than 2 rotators and if the layer width is greater
than line buffer width then layer is divided into two and each half
can be rotated independently and asynchronously. Current implementation
sets up the configuration of both halves independently but the rotation
of second half is triggered only after first half is finished. Fix this
issue by making writeback_kickoff unblocking call and wait for the
rotation completion after all the rotations in the current session are
queued.

Change-Id: I90ff7feab7979037e596a3b8d8c9e6c138574e94
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
msm: mdss: use default cosite as default chroma site for all dst formats

When BWC is enabled and format is H1V2, downscaling hangs
with a particular cosite configuration. This workaround
avoids the particular configuration

Change-Id: Ib9cd979958cd080f3747732c14e737f0e90fbb3d
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
msm: mdss: set writeback RGBX8888 output alpha to opaque

Even though the alpha channel on RGBX format should be ignored,
even if the pixel is picked up it should still have full alpha
value so that all pixels are shown. For this reason set the
alpha value to 0xFF.

Change-Id: I244a827b5b0ea228d2b2600dba0c3a1c6d8f2392
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
Revert "msm: mdss: Fix rgb_565 format for 90 degree rotation"

This reverts commit 74dbd06df339b562465a09411248db382f68a6b7.
msm: mdss: Fix rgb_565 format for 90 degree rotation

Make rotator output format for rgb_565 and bgr_565
as rgb_888 for 90 degree rotation as expected by
MDSS.

Change-Id: I0865b5688fa662d1e88d1efebef26a38d4abfd61
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>
msm: mdss: Swap RGBA format to BGRA with bwc rotation

When BWC is enabled, rotator format needs to be swapped from
RGBA to BGRA to avoid color mismatch on the ouput image.
This is specially needed with a GPU composed FB.

Change-Id: I956a354f3fe605e2c7bda4c4331cfe5bcd6417c7
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
msm: mdss: synchronize formats across rotator output and pipe setup

The rules applied to switch formats must be the same across
rotator output and the following pipe setup. Also, yuv rotator
output format should always be set to pseudo planar for MDP
hardware optimality.

Change-Id: I3f5f09bcc599627e47495fab253ec0d9d8d5fa1c
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>