vc04_services: bcm2835-codec: Allow encoder_cmd on ISP and deinterlace
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 3 Oct 2022 13:23:15 +0000 (14:23 +0100)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Mon, 3 Oct 2022 13:49:02 +0000 (14:49 +0100)
ISP and deinterlace also need a mechanism for passing effectively
an EOS through the pipeline to signal when all buffers have been
processed.

VIDIOC_ENCODER_CMD does exactly this for encoders, so reuse the same
function for ISP and deinterlace.
(VIDIOC_DECODER_CMD is slightly different in that it also passes
details of when and how to stop, so is not as relevant).

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c

index be70be1..ac563d8 100644 (file)
@@ -3639,8 +3639,6 @@ static int bcm2835_codec_create(struct bcm2835_codec_driver *drv,
                video_nr = encode_video_nr;
                break;
        case ISP:
-               v4l2_disable_ioctl(vfd, VIDIOC_ENCODER_CMD);
-               v4l2_disable_ioctl(vfd, VIDIOC_TRY_ENCODER_CMD);
                v4l2_disable_ioctl(vfd, VIDIOC_DECODER_CMD);
                v4l2_disable_ioctl(vfd, VIDIOC_TRY_DECODER_CMD);
                v4l2_disable_ioctl(vfd, VIDIOC_S_PARM);
@@ -3649,8 +3647,6 @@ static int bcm2835_codec_create(struct bcm2835_codec_driver *drv,
                video_nr = isp_video_nr;
                break;
        case DEINTERLACE:
-               v4l2_disable_ioctl(vfd, VIDIOC_ENCODER_CMD);
-               v4l2_disable_ioctl(vfd, VIDIOC_TRY_ENCODER_CMD);
                v4l2_disable_ioctl(vfd, VIDIOC_DECODER_CMD);
                v4l2_disable_ioctl(vfd, VIDIOC_TRY_DECODER_CMD);
                v4l2_disable_ioctl(vfd, VIDIOC_S_PARM);