Message ID | ef6958db1e5d5a9f50cf4db6056c22b49c2a1e65.1725265884.git.hverkuil-cisco@xs4all.nl (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | media: add missing wait_prepare/finish ops | expand |
On 9/2/2024 2:01 PM, Hans Verkuil wrote: > 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> > --- > drivers/media/platform/qcom/venus/vdec.c | 2 ++ > drivers/media/platform/qcom/venus/venc.c | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c > index d12089370d91..666309f684f1 100644 > --- a/drivers/media/platform/qcom/venus/vdec.c > +++ b/drivers/media/platform/qcom/venus/vdec.c > @@ -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, > }; > > diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c > index 3ec2fb8d9fab..5804a4911537 100644 > --- a/drivers/media/platform/qcom/venus/venc.c > +++ b/drivers/media/platform/qcom/venus/venc.c > @@ -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, > }; > Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index d12089370d91..666309f684f1 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -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, }; diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 3ec2fb8d9fab..5804a4911537 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -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, };
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> --- drivers/media/platform/qcom/venus/vdec.c | 2 ++ drivers/media/platform/qcom/venus/venc.c | 2 ++ 2 files changed, 4 insertions(+)