msm_fb: display: avoid staging up two pipes at same mixer_stage
staging two pipes at same mixer stage can cause blue screen, adding
additional check to avoid this.
CRs-Fixed: 304278
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
diff --git a/drivers/video/msm/mdp4_overlay.c b/drivers/video/msm/mdp4_overlay.c
index 1aa3ddf..ecefdc3 100644
--- a/drivers/video/msm/mdp4_overlay.c
+++ b/drivers/video/msm/mdp4_overlay.c
@@ -1164,6 +1164,14 @@
void mdp4_mixer_stage_up(struct mdp4_overlay_pipe *pipe)
{
uint32 data, mask, snum, stage, mixer, pnum;
+ struct mdp4_overlay_pipe *spipe;
+
+ spipe = mdp4_overlay_stage_pipe(pipe->mixer_num, pipe->mixer_stage);
+ if ((spipe != NULL) && (spipe != pipe)) {
+ pr_err("%s: unable to stage pipe=%d at mixer_stage=%d\n",
+ __func__, pipe->pipe_ndx, pipe->mixer_stage);
+ return;
+ }
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE);