From: Philipp Zabel Date: Mon, 30 Sep 2013 13:34:45 +0000 (-0300) Subject: [media] coda: only set buffered input queue for decoder X-Git-Tag: v5.15~17577^2~1203 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb107516ed60dfcec25218e1becf66bb91eafe87;p=platform%2Fkernel%2Flinux-starfive.git [media] coda: only set buffered input queue for decoder Allow device_run with no buffers queued after streamoff only when the current instance is a decoder. Signed-off-by: Philipp Zabel [k.debski@samsung.com: Add commit description] Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 2805538..945c539 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -1928,8 +1928,9 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count) if (!(ctx->streamon_out & ctx->streamon_cap)) return 0; - /* Allow device_run with no buffers queued and after streamoff */ - v4l2_m2m_set_src_buffered(ctx->m2m_ctx, true); + /* Allow decoder device_run with no new buffers queued */ + if (ctx->inst_type == CODA_INST_DECODER) + v4l2_m2m_set_src_buffered(ctx->m2m_ctx, true); ctx->gopcounter = ctx->params.gop_size - 1; buf = v4l2_m2m_next_dst_buf(ctx->m2m_ctx);