Skip to content
Snippets Groups Projects
Commit 2e92848f authored by Mirela Rabulea's avatar Mirela Rabulea Committed by Leonard Crestez
Browse files

MLK-19942: mxc-jpeg: Workaround for "Instance released before end of transaction"


The context is released after FRM_DONE interrupt is received,
but for some small images, after FRM_DONE, a HALF_BUF interrupt
keeps coming, and cannot be cleared.
A soft reset helps (resets only the decoder internal state, not registers).

Signed-off-by: default avatarMirela Rabulea <mirela.rabulea@nxp.com>
parent 04b33a10
No related branches found
No related tags found
No related merge requests found
......@@ -418,10 +418,18 @@ static irqreturn_t mxc_jpeg_dec_irq(int irq, void *priv)
spin_lock(&jpeg->hw_lock);
dec_ret = readl(reg + MXC_SLOT_OFFSET(slot, SLOT_STATUS));
writel(dec_ret, reg + MXC_SLOT_OFFSET(slot, SLOT_STATUS)); /* w1c */
ctx = v4l2_m2m_get_curr_priv(jpeg->m2m_dev);
if (!ctx) {
dev_err(dev,
"Instance released before the end of transaction.\n");
"Instance released before the end of transaction 0x%x.",
dec_ret);
/* soft reset only resets internal state, not registers */
mxc_jpeg_sw_reset(reg);
/* clear all interrupts */
writel(0xFFFFFFFF, reg + MXC_SLOT_OFFSET(slot, SLOT_STATUS));
goto job_unlock;
}
......@@ -435,9 +443,6 @@ static irqreturn_t mxc_jpeg_dec_irq(int irq, void *priv)
goto buffers_done;
}
dec_ret = readl(reg + MXC_SLOT_OFFSET(slot, SLOT_STATUS));
writel(dec_ret, reg + MXC_SLOT_OFFSET(slot, SLOT_STATUS)); /* w1c */
if (dec_ret & SLOTa_STATUS_ENC_CONFIG_ERR) {
u32 ret = readl(reg + CAST_STATUS12);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment