Commit a8fb5fce authored by Ming Qian's avatar Ming Qian Committed by Hans Verkuil

media: imx-jpeg: Drop initial source change event if capture has been setup

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: b833b178 ("media: imx-jpeg: notify source chagne event when the first picture parsed")
Signed-off-by: default avatarMing Qian <ming.qian@nxp.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent f10edd83
...@@ -1634,6 +1634,9 @@ static int mxc_jpeg_start_streaming(struct vb2_queue *q, unsigned int count) ...@@ -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); dev_dbg(ctx->mxc_jpeg->dev, "Start streaming ctx=%p", ctx);
q_data->sequence = 0; 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); ret = pm_runtime_resume_and_get(ctx->mxc_jpeg->dev);
if (ret < 0) { if (ret < 0) {
dev_err(ctx->mxc_jpeg->dev, "Failed to power up jpeg\n"); dev_err(ctx->mxc_jpeg->dev, "Failed to power up jpeg\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment