Skip to content

Commit

Permalink
WIP: media: rkvdec: continue to gate clock when decoding finish
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Karlman <[email protected]>
  • Loading branch information
Kwiboo authored and sigmaris committed Aug 8, 2020
1 parent bbee490 commit d370c0d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/staging/media/rkvdec/rkvdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,8 @@ static irqreturn_t rkvdec_irq_handler(int irq, void *priv)
state = (status & RKVDEC_RDY_STA) ?
VB2_BUF_STATE_DONE : VB2_BUF_STATE_ERROR;

writel(0, rkvdec->regs + RKVDEC_REG_INTERRUPT);
writel(RKVDEC_CONFIG_DEC_CLK_GATE_E,
rkvdec->regs + RKVDEC_REG_INTERRUPT);
if (cancel_delayed_work(&rkvdec->watchdog_work)) {
struct rkvdec_ctx *ctx;

Expand All @@ -1112,7 +1113,8 @@ static void rkvdec_watchdog_func(struct work_struct *work)
ctx = v4l2_m2m_get_curr_priv(rkvdec->m2m_dev);
if (ctx) {
dev_err(rkvdec->dev, "Frame processing timed out!\n");
writel(RKVDEC_IRQ_DIS, rkvdec->regs + RKVDEC_REG_INTERRUPT);
writel(RKVDEC_CONFIG_DEC_CLK_GATE_E | RKVDEC_IRQ_DIS,
rkvdec->regs + RKVDEC_REG_INTERRUPT);
writel(0, rkvdec->regs + RKVDEC_REG_SYSCTRL);
rkvdec_job_finish(ctx, VB2_BUF_STATE_ERROR);
}
Expand Down

0 comments on commit d370c0d

Please sign in to comment.