media: amphion: add lock around vdec_g_fmt
authorMing Qian <ming.qian@nxp.com>
Tue, 1 Nov 2022 08:04:20 +0000 (08:04 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 25 Nov 2022 07:27:19 +0000 (07:27 +0000)
commite1b558cd9a735f5dc283ecdb5593ff53d398c9c6
treecdee170147ff131a91d11a894de7a56730e70c05
parentf74d3f326d1d5b8951ce263c59a121ecfa65e7c0
media: amphion: add lock around vdec_g_fmt

the capture format may be changed when
sequence header is parsed,
it may be read and write in the same time,
add lock around vdec_g_fmt to synchronize it

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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/amphion/vdec.c