media: rkvdec: Hook the (TRY_)DECODER_CMD stateless ioctls
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Thu, 9 Nov 2023 20:16:40 +0000 (21:16 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 23 Nov 2023 12:59:33 +0000 (13:59 +0100)
The (TRY_)DECODER_CMD ioctls are used to support flushing when holding
capture buffers is supported. This is the case of this driver but the
ioctls were never hooked to the ioctl ops.

Add them to correctly support flushing.

Fixes: ed7bb87d3d03 ("media: rkvdec: Enable capture buffer holding for H264")
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/rkvdec/rkvdec.c

index 84a41792cb4b803d52485fa6034ac47782d3bbd7..ac398b5a97360446672a8a5c40ea05bcf222f557 100644 (file)
@@ -461,6 +461,9 @@ static const struct v4l2_ioctl_ops rkvdec_ioctl_ops = {
 
        .vidioc_streamon = v4l2_m2m_ioctl_streamon,
        .vidioc_streamoff = v4l2_m2m_ioctl_streamoff,
+
+       .vidioc_decoder_cmd = v4l2_m2m_ioctl_stateless_decoder_cmd,
+       .vidioc_try_decoder_cmd = v4l2_m2m_ioctl_stateless_try_decoder_cmd,
 };
 
 static int rkvdec_queue_setup(struct vb2_queue *vq, unsigned int *num_buffers,