diff mbox series

[6/9] media: atomisp: Add DMABUF support

Message ID 20240217112438.15240-7-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show
Series media: atomisp: Changes for libcamera support | expand

Commit Message

Hans de Goede Feb. 17, 2024, 11:24 a.m. UTC
Add DMABUF support and while at it drop userptr support.

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

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/staging/media/atomisp/pci/atomisp_ioctl.c  | 1 +
 drivers/staging/media/atomisp/pci/atomisp_subdev.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Kieran Bingham Feb. 17, 2024, 3:21 p.m. UTC | #1
Quoting Hans de Goede (2024-02-17 11:24:35)
> Add DMABUF support and while at it drop userptr support.
> 
> Now that atomisp has been ported to videobuf2 this is trivial.

Seems 'too' easy, Nice.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/staging/media/atomisp/pci/atomisp_ioctl.c  | 1 +
>  drivers/staging/media/atomisp/pci/atomisp_subdev.c | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
> index 74cf055cb09b..fa6c9f0ea6eb 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
> @@ -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,
> diff --git a/drivers/staging/media/atomisp/pci/atomisp_subdev.c b/drivers/staging/media/atomisp/pci/atomisp_subdev.c
> index 7f1ca05ce54a..8253b6faf8cd 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp_subdev.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp_subdev.c
> @@ -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;
> -- 
> 2.43.0
>
diff mbox series

Patch

diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
index 74cf055cb09b..fa6c9f0ea6eb 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
@@ -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,
diff --git a/drivers/staging/media/atomisp/pci/atomisp_subdev.c b/drivers/staging/media/atomisp/pci/atomisp_subdev.c
index 7f1ca05ce54a..8253b6faf8cd 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_subdev.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_subdev.c
@@ -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;