LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Benjamin Gaignard <benjamin.gaignard@collabora.com>
To: p.zabel@pengutronix.de, mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@collabora.com,
Benjamin Gaignard <benjamin.gaignard@collabora.com>
Subject: [PATCH] media: coda: Keep metas sync with hardware fifo
Date: Mon, 8 Nov 2021 15:24:04 +0100 [thread overview]
Message-ID: <20211108142404.598968-1-benjamin.gaignard@collabora.com> (raw)
After updating the output fifo position be sure that metas are also
synchronised with this position.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
drivers/media/platform/coda/coda-bit.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index c484c008ab02..28c56286b0de 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -2315,6 +2315,12 @@ static void coda_finish_decode(struct coda_ctx *ctx)
/* Update kfifo out pointer from coda bitstream read pointer */
coda_kfifo_sync_from_device(ctx);
+ /*
+ * After updating the read pointer, we need to check if
+ * any metas are consumed and should be released.
+ */
+ coda_decoder_drop_used_metas(ctx);
+
/*
* in stream-end mode, the read pointer can overshoot the write pointer
* by up to 512 bytes
--
2.30.2
next reply other threads:[~2021-11-08 14:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-08 14:24 Benjamin Gaignard [this message]
2021-11-11 17:03 ` Philipp Zabel
2021-11-12 8:36 ` Benjamin Gaignard
2021-11-12 9:30 ` Philipp Zabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211108142404.598968-1-benjamin.gaignard@collabora.com \
--to=benjamin.gaignard@collabora.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=p.zabel@pengutronix.de \
--subject='Re: [PATCH] media: coda: Keep metas sync with hardware fifo' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).