]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: venus: add missing wait_prepare/finish ops
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 2 Sep 2024 08:31:24 +0000 (10:31 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 12 Oct 2024 13:53:48 +0000 (15:53 +0200)
Without these ops the v4l2-compliance blocking wait test will fail.
These ops are required to ensure that when VIDIOC_DQBUF has to
wait for buffers to arrive, the queue lock is correctly released
and retaken. Otherwise the wait for a buffer would block all other
queue ioctls.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/qcom/venus/vdec.c
drivers/media/platform/qcom/venus/venc.c

index d12089370d91e714790290580821bb3e7f91c635..666309f684f138e44a513f49b2fe97e24e09f378 100644 (file)
@@ -1390,6 +1390,8 @@ static const struct vb2_ops vdec_vb2_ops = {
        .buf_prepare = venus_helper_vb2_buf_prepare,
        .start_streaming = vdec_start_streaming,
        .stop_streaming = vdec_stop_streaming,
+       .wait_prepare = vb2_ops_wait_prepare,
+       .wait_finish = vb2_ops_wait_finish,
        .buf_queue = vdec_vb2_buf_queue,
 };
 
index 3ec2fb8d9fab60a7d353a418ccf4a00418c3ca4b..5804a4911537e1ec282907b0e47def262125e589 100644 (file)
@@ -1319,6 +1319,8 @@ static const struct vb2_ops venc_vb2_ops = {
        .buf_prepare = venus_helper_vb2_buf_prepare,
        .start_streaming = venc_start_streaming,
        .stop_streaming = venus_helper_vb2_stop_streaming,
+       .wait_prepare = vb2_ops_wait_prepare,
+       .wait_finish = vb2_ops_wait_finish,
        .buf_queue = venc_vb2_buf_queue,
 };