From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([92.198.50.35]:36590 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751890AbbGIKKf (ORCPT ); Thu, 9 Jul 2015 06:10:35 -0400 From: Philipp Zabel To: Kamil Debski Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, kernel@pengutronix.de, Philipp Zabel Subject: [PATCH 04/10] [media] coda: keep buffers on the queue in bitstream end mode Date: Thu, 9 Jul 2015 12:10:15 +0200 Message-Id: <1436436621-12291-4-git-send-email-p.zabel@pengutronix.de> In-Reply-To: <1436436621-12291-1-git-send-email-p.zabel@pengutronix.de> References: <1436436621-12291-1-git-send-email-p.zabel@pengutronix.de> Sender: linux-media-owner@vger.kernel.org List-ID: 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 --- drivers/media/platform/coda/coda-bit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index 47fc2f1..0f8dcea 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 -- 2.1.4