From: Michael Tretter Date: Fri, 20 Jan 2017 14:00:23 +0000 (-0200) Subject: [media] coda: fix frame index to returned error X-Git-Tag: v4.11-rc1~132^2~128 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7691f821ff19af21b1768d8f347764e61f9f5d2b;p=karo-tx-linux.git [media] coda: fix frame index to returned error display_idx refers to the frame that will be returned in the next round. The currently processed frame is ctx->display_idx and errors should be reported for this frame. Signed-off-by: Michael Tretter Acked-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index b6625047250d..309eb4eb5ad1 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c @@ -2057,7 +2057,7 @@ static void coda_finish_decode(struct coda_ctx *ctx) } vb2_set_plane_payload(&dst_buf->vb2_buf, 0, payload); - coda_m2m_buf_done(ctx, dst_buf, ctx->frame_errors[display_idx] ? + coda_m2m_buf_done(ctx, dst_buf, ctx->frame_errors[ctx->display_idx] ? VB2_BUF_STATE_ERROR : VB2_BUF_STATE_DONE); v4l2_dbg(1, coda_debug, &dev->v4l2_dev,