[media] coda: keep buffers on the queue in bitstream end mode
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 9 Jul 2015 10:10:15 +0000 (07:10 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 17 Jul 2015 14:14:00 +0000 (11:14 -0300)
In stream end mode the hardware will read the bitstream to its end,
overshooting the write pointer. Do not write additional data into
the bitstream in this mode.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/coda/coda-bit.c

index 47fc2f19a4a9afda31e5dc830c962cc551d3009f..0f8dcea065afa0284927ccaf8828b4756fd54f4b 100644 (file)
@@ -228,6 +228,9 @@ void coda_fill_bitstream(struct coda_ctx *ctx, bool streaming)
        struct coda_buffer_meta *meta;
        u32 start;
 
+       if (ctx->bit_stream_param & CODA_BIT_STREAM_END_FLAG)
+               return;
+
        while (v4l2_m2m_num_src_bufs_ready(ctx->fh.m2m_ctx) > 0) {
                /*
                 * Only queue a single JPEG into the bitstream buffer, except