]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
media: atomisp: Add DMABUF support
authorHans de Goede <hdegoede@redhat.com>
Fri, 2 Feb 2024 07:37:28 +0000 (08:37 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 11 Apr 2024 13:40:29 +0000 (15:40 +0200)
Add DMABUF support and while at it drop userptr support.

Now that atomisp has been ported to videobuf2 this is trivial.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_ioctl.c
drivers/staging/media/atomisp/pci/atomisp_subdev.c

index 74cf055cb09b122d16bb68a26daf492b267cb0ae..fa6c9f0ea6eb7980f39c392a687a53d39f3aebc8 100644 (file)
@@ -1666,6 +1666,7 @@ const struct v4l2_ioctl_ops atomisp_ioctl_ops = {
        .vidioc_querybuf = vb2_ioctl_querybuf,
        .vidioc_qbuf = atomisp_qbuf_wrapper,
        .vidioc_dqbuf = atomisp_dqbuf_wrapper,
+       .vidioc_expbuf = vb2_ioctl_expbuf,
        .vidioc_streamon = vb2_ioctl_streamon,
        .vidioc_streamoff = vb2_ioctl_streamoff,
        .vidioc_default = atomisp_vidioc_default,
index 7f1ca05ce54a309d719a7a2956236578c83745eb..8253b6faf8cd8b765ab193dedd7db7248faef689 100644 (file)
@@ -765,7 +765,7 @@ static int atomisp_init_subdev_pipe(struct atomisp_sub_device *asd,
 
        /* Init videobuf2 queue structure */
        pipe->vb_queue.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-       pipe->vb_queue.io_modes = VB2_MMAP | VB2_USERPTR;
+       pipe->vb_queue.io_modes = VB2_MMAP | VB2_DMABUF;
        pipe->vb_queue.buf_struct_size = sizeof(struct ia_css_frame);
        pipe->vb_queue.ops = &atomisp_vb2_ops;
        pipe->vb_queue.mem_ops = &vb2_vmalloc_memops;