OSDN Git Service

media: amphion: add lock around vdec_g_fmt
authorMing Qian <ming.qian@nxp.com>
Tue, 1 Nov 2022 08:04:20 +0000 (16:04 +0800)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 18 Nov 2022 14:48:16 +0000 (15:48 +0100)
commit8480dd5fb3c82b5887d456b3fbe4201d99231814
tree22ea57ce0282d6a8e418c92b95b15973ada4bb36
parenta7bab6f8b73fe15a6181673149734a2756845dae
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>
drivers/media/platform/amphion/vdec.c