]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: imx-jpeg: Drop initial source change event if capture has been setup
authorMing Qian <ming.qian@nxp.com>
Thu, 19 Oct 2023 08:36:36 +0000 (16:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Aug 2024 06:59:59 +0000 (08:59 +0200)
[ Upstream commit a8fb5fce7a441d37d106c82235e1f1b57f70f5b9 ]

In section 4.5.1.5. Initialization, the step 4 may be skipped and
continue with the Capture Setup sequence, so if the capture has been
setup, there is no need to trigger the initial source change event, just
start decoding, and follow the dynamic resolution change flow if the
configured values do not match those parsed by the decoder.

And it won't fail the gstreamer pipeline.

Fixes: b833b178498d ("media: imx-jpeg: notify source chagne event when the first picture parsed")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c

index cc97790ed30f6a79bfdd3787dea0bb6f698a3d9e..b1300f15e502030cc3e24004629f362fb3da8b18 100644 (file)
@@ -1634,6 +1634,9 @@ static int mxc_jpeg_start_streaming(struct vb2_queue *q, unsigned int count)
        dev_dbg(ctx->mxc_jpeg->dev, "Start streaming ctx=%p", ctx);
        q_data->sequence = 0;
 
+       if (V4L2_TYPE_IS_CAPTURE(q->type))
+               ctx->need_initial_source_change_evt = false;
+
        ret = pm_runtime_resume_and_get(ctx->mxc_jpeg->dev);
        if (ret < 0) {
                dev_err(ctx->mxc_jpeg->dev, "Failed to power up jpeg\n");