summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMing Qian <ming.qian@oss.nxp.com>2025-12-17 06:02:22 +0300
committerSasha Levin <sashal@kernel.org>2026-03-04 15:20:00 +0300
commit33dd4853fcf50a2f1b136618b501cbc8aedbb905 (patch)
treee40d66a690c0261bc14c0f981a857d87b9e9d683
parentde191af5ae6496419c8d339ddb337c1efa694edc (diff)
downloadlinux-33dd4853fcf50a2f1b136618b501cbc8aedbb905.tar.xz
media: amphion: Clear last_buffer_dequeued flag for DEC_CMD_START
[ Upstream commit d85f3207d75df6d7a08be6526b15ff398668206c ] The V4L2_DEC_CMD_START command may be used to handle the dynamic source change, which will triggers an implicit decoder drain. The last_buffer_dequeued flag is set in the implicit decoder drain, so driver need to clear it to continue the following decoding flow. Signed-off-by: Ming Qian <ming.qian@oss.nxp.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/media/platform/amphion/vdec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/amphion/vdec.c b/drivers/media/platform/amphion/vdec.c
index c0d2aabb9e0e..f25dbcebdccf 100644
--- a/drivers/media/platform/amphion/vdec.c
+++ b/drivers/media/platform/amphion/vdec.c
@@ -724,6 +724,7 @@ static int vdec_decoder_cmd(struct file *file, void *fh, struct v4l2_decoder_cmd
switch (cmd->cmd) {
case V4L2_DEC_CMD_START:
vdec_cmd_start(inst);
+ vb2_clear_last_buffer_dequeued(v4l2_m2m_get_dst_vq(inst->fh.m2m_ctx));
break;
case V4L2_DEC_CMD_STOP:
vdec_cmd_stop(inst);