OSDN Git Service

media: amphion: lock and check m2m_ctx in event handler
authorMing Qian <ming.qian@nxp.com>
Mon, 21 Nov 2022 06:34:42 +0000 (06:34 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 25 Nov 2022 11:27:04 +0000 (11:27 +0000)
commit1ade3f3f16986cd7c6fce02feede957f03eb8a42
tree71b299d165f8f73c28b2e59415f20bebe1c4e1f4
parentb3dd974af9de342c733492565ad02d7e23372876
media: amphion: lock and check m2m_ctx in event handler

driver needs to cancel vpu before releasing the vpu instance,
so call v4l2_m2m_ctx_release() first,
to handle the redundant event triggered after m2m_ctx is released.

lock and check m2m_ctx in the event handler.

Fixes: 3cd084519c6f ("media: amphion: add vpu v4l2 m2m support")
Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/amphion/vpu_msgs.c
drivers/media/platform/amphion/vpu_v4l2.c