media: imx-jpeg: notify source chagne event when the first picture parsed
authorMing Qian <ming.qian@nxp.com>
Mon, 9 Oct 2023 06:16:57 +0000 (14:16 +0800)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 13 Oct 2023 09:33:22 +0000 (11:33 +0200)
commitb833b178498dafa2156cfb6f4d3ce4581c21f1e5
tree183716aae3ec743370ae876dc40d69261cd2df42
parent63c5f1d8a8e571b2878405fa4b8e811cd0bb7f1a
media: imx-jpeg: notify source chagne event when the first picture parsed

After gstreamer rework the dynamic resolution change handling, gstreamer
stop doing capture buffer allocation based on guesses and wait for the
source change event when available. It requires driver always notify
source change event in the initialization, even if the size parsed is
equal to the size set on capture queue. otherwise, the pipeline will be
stalled.

Currently driver may not notify source change event if the parsed format
and size are equal to those previously established, but it may stall the
gstreamer pipeline.

The link of gstreamer patch is
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4437

Fixes: b4e1fb8643da ("media: imx-jpeg: Support dynamic resolution change")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h