[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 <p.zabel@pengutronix.de>
[k.debski@samsung.com: Add commit description]
Signed-off-by: Kamil Debski <k.debski@samsung.com>

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
Philipp Zabel 2013-09-30 10:34:45 -03:00 committed by Mauro Carvalho Chehab
parent 0cddc7e9a0
commit eb107516ed

View file

@ -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);