diff options
author | Irui Wang <irui.wang@mediatek.com> | 2022-07-20 11:57:31 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-08-30 15:32:39 +0300 |
commit | 58037ad43f2d33746d0d7d16514de44d6e8f566e (patch) | |
tree | 5aaf3389cd537362135969a045a4101b61fd670f /drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c | |
parent | cd61f3c6794bea2b717fe6083ca2ad189db75418 (diff) | |
download | linux-58037ad43f2d33746d0d7d16514de44d6e8f566e.tar.xz |
media: mediatek: vcodec: Use ctx vb2_queue mutex instead of device mutex
There is only one device mutex to lock vb2_queue when running
multi-instance encoding, it can be set by each encoder context.
[hverkuil: fix q_mutex documentation in the header]
Signed-off-by: Irui Wang <irui.wang@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c')
-rw-r--r-- | drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c index 6d8964fb4fa2..0abe1dac75b3 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.c @@ -130,6 +130,7 @@ static int fops_vcodec_open(struct file *file) INIT_LIST_HEAD(&ctx->list); ctx->dev = dev; init_waitqueue_head(&ctx->queue[0]); + mutex_init(&ctx->q_mutex); ctx->type = MTK_INST_ENCODER; ret = mtk_vcodec_enc_ctrls_setup(ctx); |