msm: mdss: remove interrupt handler when pingpong is not present

Remove pingpong interrupt handler when pingpong done interrupt is
not present. This will ensure no unexpected pingpong is reported
which might lead to confliction with the destroying ctx.

Change-Id: I9a7173fb19e55344cedcfeccdaf23efaba11892c
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
This commit is contained in:
Ray Zhang 2015-12-24 17:28:51 +08:00 committed by David Keitel
parent 1a83c0c57d
commit 35ae349722

View file

@ -988,6 +988,8 @@ static void mdss_mdp_cmd_intf_recovery(void *data, int event)
pr_debug("%s: intf_num=%d\n", __func__, ctx->ctl->intf_num);
mdss_mdp_irq_disable_nosync(MDSS_MDP_IRQ_PING_PONG_COMP,
ctx->current_pp_num);
mdss_mdp_set_intr_callback_nosync(MDSS_MDP_IRQ_PING_PONG_COMP,
ctx->current_pp_num, NULL, NULL);
if (mdss_mdp_cmd_do_notifier(ctx))
notify_frame_timeout = true;
}
@ -1539,6 +1541,11 @@ static int mdss_mdp_cmd_wait4pingpong(struct mdss_mdp_ctl *ctl, void *arg)
}
ctx->pp_timeout_report_cnt++;
rc = -EPERM;
mdss_mdp_irq_disable_nosync(MDSS_MDP_IRQ_PING_PONG_COMP,
ctx->current_pp_num);
mdss_mdp_set_intr_callback_nosync(MDSS_MDP_IRQ_PING_PONG_COMP,
ctx->current_pp_num, NULL, NULL);
if (atomic_add_unless(&ctx->koff_cnt, -1, 0)
&& mdss_mdp_cmd_do_notifier(ctx))
mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_TIMEOUT);
@ -2017,6 +2024,8 @@ int mdss_mdp_cmd_ctx_stop(struct mdss_mdp_ctl *ctl,
mdss_mdp_set_intr_callback(MDSS_MDP_IRQ_PING_PONG_RD_PTR,
ctx->default_pp_num, NULL, NULL);
mdss_mdp_set_intr_callback_nosync(MDSS_MDP_IRQ_PING_PONG_COMP,
ctx->default_pp_num, NULL, NULL);
memset(ctx, 0, sizeof(*ctx));