From: Brandon Brnich <b-brnich@ti.com>
To: Nas Chung <nas.chung@chipsnmedia.com>,
Jackson Lee <jackson.lee@chipsnmedia.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
<linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Nicolas Dufresne <nicolas.dufresne@collabora.com>
Cc: Darren Etheridge <detheridge@ti.com>, Brandon Brnich <b-brnich@ti.com>
Subject: [PATCH v2 2/2] media: chips-media: wave5: Process ready frames when CMD_STOP sent to Encoder
Date: Tue, 21 Oct 2025 15:46:18 -0500 [thread overview]
Message-ID: <20251021204618.2441939-2-b-brnich@ti.com> (raw)
In-Reply-To: <20251021204618.2441939-1-b-brnich@ti.com>
CMD_STOP being sent to encoder before last job is executed by device_run
can lead to an occasional dropped frame. Ensure that remaining ready
buffers are drained by making a call to v4l2_m2m_try_schedule.
Signed-off-by: Brandon Brnich <b-brnich@ti.com>
---
drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
index 0a2eab372913..7ee77c9a30c0 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
@@ -649,6 +649,8 @@ static int wave5_vpu_enc_encoder_cmd(struct file *file, void *fh, struct v4l2_en
m2m_ctx->last_src_buf = v4l2_m2m_last_src_buf(m2m_ctx);
m2m_ctx->is_draining = true;
+
+ v4l2_m2m_try_schedule(m2m_ctx);
break;
case V4L2_ENC_CMD_START:
break;
--
2.34.1
next prev parent reply other threads:[~2025-10-21 20:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 20:46 [PATCH v2 1/2] media: chips-media: wave5: Fix conditional in start_streaming Brandon Brnich
2025-10-21 20:46 ` Brandon Brnich [this message]
2025-10-28 16:42 ` [PATCH v2 2/2] media: chips-media: wave5: Process ready frames when CMD_STOP sent to Encoder Nicolas Dufresne
2025-10-28 16:42 ` [PATCH v2 1/2] media: chips-media: wave5: Fix conditional in start_streaming Nicolas Dufresne
2025-10-29 15:08 ` Brandon Brnich
2025-12-09 20:31 ` Nicolas Dufresne
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=20251021204618.2441939-2-b-brnich@ti.com \
--to=b-brnich@ti.com \
--cc=detheridge@ti.com \
--cc=jackson.lee@chipsnmedia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nas.chung@chipsnmedia.com \
--cc=nicolas.dufresne@collabora.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®