msm: mdss: double check WB done status
There are cases when WB done might be set in MDP HW but the irq trigger is delayed. Add an additional check in case of WB timeout, to check if the WB done is set. Change-Id: I1cdb2c85157d4c66718deae8e49778b9f3962f5d Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
This commit is contained in:
parent
bb01a30200
commit
b9bb2471fa
1 changed files with 28 additions and 5 deletions
|
@ -650,6 +650,7 @@ static int mdss_mdp_wb_wait4comp(struct mdss_mdp_ctl *ctl, void *arg)
|
|||
struct mdss_mdp_writeback_ctx *ctx;
|
||||
int rc = 0;
|
||||
u64 rot_time;
|
||||
u32 status, mask, isr;
|
||||
|
||||
ctx = (struct mdss_mdp_writeback_ctx *) ctl->priv_data;
|
||||
if (!ctx) {
|
||||
|
@ -666,14 +667,36 @@ static int mdss_mdp_wb_wait4comp(struct mdss_mdp_ctl *ctl, void *arg)
|
|||
NULL, NULL);
|
||||
|
||||
if (rc == 0) {
|
||||
mask = BIT(ctx->intr_type + ctx->intf_num);
|
||||
|
||||
isr = readl_relaxed(ctl->mdata->mdp_base +
|
||||
MDSS_MDP_REG_INTR_STATUS);
|
||||
status = mask & isr;
|
||||
|
||||
pr_info_once("mask: 0x%x, isr: 0x%x, status: 0x%x\n",
|
||||
mask, isr, status);
|
||||
|
||||
if (status) {
|
||||
pr_warn_once("wb done but irq not triggered\n");
|
||||
mdss_mdp_irq_clear(ctl->mdata,
|
||||
ctx->intr_type,
|
||||
ctx->intf_num);
|
||||
|
||||
mdss_mdp_writeback_intr_done(ctl);
|
||||
rc = 0;
|
||||
} else {
|
||||
mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_TIMEOUT);
|
||||
rc = -ENODEV;
|
||||
WARN(1, "writeback kickoff timed out (%d) ctl=%d\n",
|
||||
rc, ctl->num);
|
||||
}
|
||||
} else {
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
if (rc == 0) {
|
||||
ctx->end_time = ktime_get();
|
||||
mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_DONE);
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
/* once operation is done, disable traffic shaper */
|
||||
|
|
Loading…
Add table
Reference in a new issue