msm: display: reduce display commit prepare waiting time

Unblock overlay_set, prepare and buffer sync ioctls when
commit thread finishes hardware programming.
Use wait_for_kickoff nstead of pan_idle for these ioctls.

Change-Id: Iefb6cbc390d2130926fdcb93688b4d92bfb26937
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
msm: display: only release kickoff when no cleanup pipe

If there is some pipe to clean up, need wait for it be done to
make sure the pipe can be used for the second cycle and recover
mode can be executed.

Change-Id: Ifb3fdb152bc4bbf367b3d272aa0c88b1a0650c19
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
CRs-Fixed: 659999
msm: display: Add pipe type selection in overlay request

Allow user to specify the type when requesting an overlay pipe.
If field is set the pipe type indication in the flags will be
ignored.
Change-Id: Iee51d24b96c7a2a987dc70a439342e6548dfc8fa
Signed-off-by: Vineet Bajaj <vbajaj@codeaurora.org>
msm: mdss: Clear the previous state of pipe during SOLID_FILL

Clear the previous state of pipe when it is being used in SOLID_FILL
operation to prevent wrong register configuration. For ex: Use case
when DMA pipe was used in BLOCK mode in previous frame, then it is
being used in LINE mode for SOLID_FILL operation in current frame.

CRs-Fixed: 655993
Change-Id: I0ed257276428b96c10a92457a16df4dfdc42c1f8
Signed-off-by: Sushil Chauhan <sushilchauhan@codeaurora.org>
msm: mdss: Increase commit count for first kickoff

During panel unblank a kickoff is done to turn on the panel so that the
first update is not delayed. It is also used to give buffer to command
mode panel prior to enabling backlight prevent junk data from appearing.
In order to prevent release fence timeline from being signaled too
early we will increase the commit count. This allow next sync point
to be added to the appropriate point on timeline, instead of relying
on frame done being called before sync/commit calls.

Change-Id: I566f90b3013b59dedbe42bbb9fdf6fa37d65e779
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
msm: mdss: add support for rotator in mdss_mdp_mixer_get

Currently ctl->mfd is not populated for rotator sessions. If
mdss_mdp_mixer_get is called by rotator session then it will always
fail the NULL check for ctl->mfd. This will flood the logs for every
rotator commit and can lead to un-predictable outcome. Fix this by
properly handling rotator case in mdss_mdp_mixer_get.

Change-Id: Ib1896149302bd60b99028ae26df2393fab30dd6e
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
msm: mdss: fix sync fence deadlock when rotator is used

In the current implementation, whenever rotator play is called, it
forces DMA pipes to be released by calling commit on video mode ctl
paths if they are using DMA pipes. Here assumption was that DMA pipes
will either be used in block mode or line mode, all or none. But this
assumption is not valid any more where we can have a use-case where
DMA0 is used for rotator and DMA1 for video mode ctl path. In this
use-case, current implementation can lead to sync fence deadlock. Fix
this by removing obsolete assumption.

Change-Id: I2d1da9dca5d958257796d617db11d93631c98f27
CRs-Fixed: 656463
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
ASoC: qcom: qdsp6v2: Initialize locks before use

Spinlock crash issue is fixed with this patch. This patch
is to initialize the locks before it is used.

Change-Id: Ib8200b5f2d89bd3e06db4a47e3682fe290fa6b3c
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
msm: Fix for APR session based callbacks

In the callback function src_port was being used
instead of dest_port for returning the callbacks.
Fixed by changing src_port to dest_port.

Change-Id: I3871d32924678fb6ed1eab1a94046a9bf22a978e
Signed-off-by: Vicky Sehrawat <vickys@codeaurora.org>
ASoC: msm: qdsp6v2: Fix ion_import failure

When ion_import_legacy api fails,we should not
destory the client instead just bail out.

CRs-Fixed: 620370
Change-Id: Icbcf4dadd5f00e1cf4d7a356ee1c0f5835dcb4c4
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Revert "Asoc:msm:Added Buffer overflow check"

This reverts commit 1599eab9c22515c014e11d03fb3f5ac4a074f268.