From: Philipp Zabel
Date: Thu, 9 Jul 2015 10:10:15 +0000 (-0300)
Subject: [media] coda: keep buffers on the queue in bitstream end mode
X-Git-Tag: firefly_0821_release~176^2~795^2~352
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=30a09579b2e238646bca4e7cc443db24d91436d6;p=firefly-linux-kernel-4.4.55.git
[media] coda: keep buffers on the queue in bitstream end mode
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
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
---
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index 47fc2f19a4a9..0f8dcea065af 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -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