diff options
author | Zahari Doychev <zahari.doychev@linux.com> | 2015-08-03 14:57:19 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-11 23:58:25 +0300 |
commit | 5473387b9382a35967d1fcd550482efa3a31d44f (patch) | |
tree | e2501891b0886ad16b9655e32bd16c17ff2e737f | |
parent | efb4b8b60d79f52a72e3698aa14e6ad2ad25db34 (diff) | |
download | linux-5473387b9382a35967d1fcd550482efa3a31d44f.tar.xz |
[media] coda: drop zero payload bitstream buffers
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>
-rw-r--r-- | drivers/media/platform/coda/coda-bit.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index 3d434a4ed537..fd7819d8922d 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c @@ -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; |