[media] coda: drop zero payload bitstream buffers
authorZahari Doychev <zahari.doychev@linux.com>
Mon, 3 Aug 2015 11:57:19 +0000 (08:57 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 11 Aug 2015 20:58:25 +0000 (17:58 -0300)
The buffers with zero payload are now dumped in coda_fill_bitstream and not
passed to coda_bitstream_queue. This avoids unnecessary fifo addition and
buffer sequence counter increment.

Signed-off-by: Zahari Doychev <zahari.doychev@linux.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/coda/coda-bit.c

index 3d434a4ed537de747afd94ef1951164b3924f8a6..fd7819d8922da0487e8146d871ff08877552b0a7 100644 (file)
@@ -256,6 +256,13 @@ void coda_fill_bitstream(struct coda_ctx *ctx, bool streaming)
                        continue;
                }
 
+               /* Dump empty buffers */
+               if (!vb2_get_plane_payload(src_buf, 0)) {
+                       src_buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);
+                       v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE);
+                       continue;
+               }
+
                /* Buffer start position */
                start = ctx->bitstream_fifo.kfifo.in &
                        ctx->bitstream_fifo.kfifo.mask;
This page took 0.025161 seconds and 5 git commands to generate.