media: platform: Add mechanism to handle jpeg hardware's locking up
authorXia Jiang <xia.jiang@mediatek.com>
Fri, 14 Aug 2020 07:11:42 +0000 (09:11 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 28 Aug 2020 13:21:40 +0000 (15:21 +0200)
commit0058ff2befe37368f27cc9d7e21f752117722b7c
tree1b294bfe41cf14ee5b971b84e084197d28e61c91
parentf9f964519c54543476adcb792414ed7ef91963eb
media: platform: Add mechanism to handle jpeg hardware's locking up

There is a delayed work scheduled before starting the hardware and
canceled in the interrupt handler. If the delayed work is executed, it
resets the hardware and reports the failure to V4L2, so that the
execution can continue from next frames.

Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Xia Jiang <xia.jiang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h