media: amphion: reset instance if it's aborted before codec header parsed
authorMing Qian <ming.qian@nxp.com>
Fri, 30 Sep 2022 06:40:47 +0000 (14:40 +0800)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 24 Oct 2022 17:03:53 +0000 (19:03 +0200)
commit3984ea32e83bcad06b4b034ddd4b0a934c1b2f91
treef6dadbf82a3cf96b469c0efe3afd9e1bcc872861
parent395ed025750ed9b7cab1c01eba814cbe28ac528f
media: amphion: reset instance if it's aborted before codec header parsed

there is hardware limitation that if it's aborted before
the first codec header parsed, the codec may be stalled
unless we do reset codec.

and drop the source change event if it's triggered after reset.

Fixes: 6de8d628df6e ("media: amphion: add v4l2 m2m vpu decoder stateful driver")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/amphion/vdec.c