summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorUjwal Patel <ujwalp@codeaurora.org>2014-05-22 16:24:32 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:30:18 -0700
commitfeb644b8dfbdf30775285095325b912779ae298c (patch)
tree79e6470f974bb6d84c59e1819713a852b1ba7bf4 /drivers/video/fbdev
parentdd91409d8e063e37dec88faceeecb2e2f935dc1f (diff)
msm: mdss: fix incorrect stage & un-stage when using source split
With source-split feature, a pipe can be staged across two layer mixers (LM) and/or two pipes can be staged on a LM same stage. Current implementation stages source split pipe into incorrect container index for right LM. Similarly while un-staging it calculates incorrect index if more than two pipes are staged on a single LM. Fix this to resolve MDP pipeline hangs. Change-Id: I89e0f5946cb330dc918641486728baea856de574 Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_ctl.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c
index 9f3c18969008..626547e92915 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c
@@ -2512,7 +2512,19 @@ int mdss_mdp_mixer_pipe_update(struct mdss_mdp_pipe *pipe,
mixer->params_changed++;
for (i = MDSS_MDP_STAGE_UNUSED; i < MDSS_MDP_MAX_STAGE; i++) {
j = i * MAX_PIPES_PER_STAGE;
- if (pipe->is_right_blend)
+
+ /*
+ * 1. If pipe is on the right side of the blending
+ * stage, on either left LM or right LM but it is not
+ * crossing LM boundry then left_blend index is used.
+ * 2. If pipe is on the right side of the blending
+ * stage, on left LM and it is crossing LM boundry
+ * then for left LM it is placed into right_blend
+ * index but for right LM it still placed into
+ * left_blend index.
+ */
+ if (pipe->is_right_blend && (!pipe->src_split_req ||
+ (pipe->src_split_req && !mixer->is_right_mixer)))
j++;
if (i == pipe->mixer_stage)
@@ -2569,14 +2581,16 @@ int mdss_mdp_mixer_pipe_unstage(struct mdss_mdp_pipe *pipe,
struct mdss_mdp_mixer *mixer)
{
int index;
+ u8 right_blend_index;
if (!pipe)
return -EINVAL;
if (!mixer)
return -EINVAL;
- index = (pipe->mixer_stage * MAX_PIPES_PER_STAGE) +
- (int)pipe->is_right_blend;
+ right_blend_index = pipe->is_right_blend &&
+ !(pipe->src_split_req && mixer->is_right_mixer);
+ index = (pipe->mixer_stage * MAX_PIPES_PER_STAGE) + right_blend_index;
if (pipe == mixer->stage_pipe[index]) {
pr_debug("unstage p%d from %s side of stage=%d lm=%d ndx=%d\n",