media: imx-jpeg: initiate a drain of the capture queue in dynamic resolution change
authorMing Qian <ming.qian@nxp.com>
Tue, 22 Aug 2023 01:45:06 +0000 (09:45 +0800)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 27 Sep 2023 07:39:55 +0000 (09:39 +0200)
commit1c2786632e20c8f0fd4004fae3b3490276e5e5da
tree169fe96b66afcd1fd0b25d136f2cb628477a0f78
parenta805136eec48c7f0e3b7dad44ec5efb506a938d8
media: imx-jpeg: initiate a drain of the capture queue in dynamic resolution change

The last buffer from before the change must be marked,
with the V4L2_BUF_FLAG_LAST flag,
similarly to the Drain sequence above.

Meanwhile if V4L2_DEC_CMD_STOP is sent before
the source change triggered,
we need to restore the is_draing flag after
the draining in dynamic resolution change.

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