]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: imx-jpeg: Drop the first error frames
authorMing Qian <ming.qian@oss.nxp.com>
Mon, 21 Apr 2025 07:06:12 +0000 (15:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:28 +0000 (11:07 +0100)
commit6abeaa5243b8d49293cc93f195e08f4261217c71
tree2dd571112b17817104460bcc8c76453a10a875d0
parent5d89aa42534723400fefd46e26e053b9c382b4ee
media: imx-jpeg: Drop the first error frames

commit d52b9b7e2f10d22a49468128540533e8d76910cd upstream.

When an output buffer contains error frame header,
v4l2_jpeg_parse_header() will return error, then driver will mark this
buffer and a capture buffer done with error flag in device_run().

But if the error occurs in the first frames, before setup the capture
queue, there is no chance to schedule device_run(), and there may be no
capture to mark error.

So we need to drop this buffer with error flag, and make the decoding
can continue.

Fixes: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder")
Cc: stable@vger.kernel.org
Signed-off-by: Ming Qian <ming.qian@oss.nxp.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c