* [PATCH] media: imx-jpeg: Don't clear stop state in handling dynamic resolution change
@ 2022-07-26 9:04 Ming Qian
0 siblings, 0 replies; only message in thread
From: Ming Qian @ 2022-07-26 9:04 UTC (permalink / raw)
To: mchehab, mirela.rabulea, hverkuil-cisco
Cc: shawnguo, s.hauer, kernel, festevam, linux-imx, linux-media,
linux-kernel, devicetree, linux-arm-kernel
In dynamic resolution change, streamoff and streamon on the capture
queue may be called,
the V4L2_DEC_CMD_STOP cmd may be called before driver parsed the
jpeg header.
don't clear the stop state in streamoff of handling the
dynamic resolution change,
otherwise the drain may not complete.
Fixes: 4911c5acf9351 ("media: imx-jpeg: Implement drain using v4l2-mem2mem helpers")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
---
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
index fd5a65e577f4..ec13394bdddd 100644
--- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
+++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
@@ -1278,7 +1278,8 @@ static void mxc_jpeg_stop_streaming(struct vb2_queue *q)
v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR);
}
- v4l2_m2m_update_stop_streaming_state(ctx->fh.m2m_ctx, q);
+ if (V4L2_TYPE_IS_OUTPUT(q->type) || !ctx->source_change)
+ v4l2_m2m_update_stop_streaming_state(ctx->fh.m2m_ctx, q);
if (V4L2_TYPE_IS_OUTPUT(q->type) &&
v4l2_m2m_has_stopped(ctx->fh.m2m_ctx)) {
notify_eos(ctx);
--
2.36.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-26 9:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-26 9:04 [PATCH] media: imx-jpeg: Don't clear stop state in handling dynamic resolution change Ming Qian
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®