All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sun4i-csi: drop read/write, enable VB2_DMABUF
@ 2020-07-07 13:32 Hans Verkuil
  2020-07-07 13:36 ` Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2020-07-07 13:32 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Maxime Ripard

For no obvious reason VB2_DMABUF was not enabled. Add this.

Also both read and write file ops were set, but this was not enabled
in the vb2 io_modes or in the device_caps capabilities. Drop this.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c
index dbc9fe254ffd..2c39cd7f2862 100644
--- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c
+++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c
@@ -413,7 +413,7 @@ int sun4i_csi_dma_register(struct sun4i_csi *csi, int irq)

 	q->min_buffers_needed = 3;
 	q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
-	q->io_modes = VB2_MMAP;
+	q->io_modes = VB2_MMAP | VB2_DMABUF;
 	q->lock = &csi->lock;
 	q->drv_priv = csi;
 	q->buf_struct_size = sizeof(struct sun4i_csi_buffer);
diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
index 1721e5aee9c6..06bf0d170904 100644
--- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
+++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
@@ -256,8 +256,6 @@ static const struct v4l2_file_operations sun4i_csi_fops = {
 	.open		= sun4i_csi_open,
 	.release	= sun4i_csi_release,
 	.unlocked_ioctl	= video_ioctl2,
-	.read		= vb2_fop_read,
-	.write		= vb2_fop_write,
 	.poll		= vb2_fop_poll,
 	.mmap		= vb2_fop_mmap,
 };


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sun4i-csi: drop read/write, enable VB2_DMABUF
  2020-07-07 13:32 [PATCH] sun4i-csi: drop read/write, enable VB2_DMABUF Hans Verkuil
@ 2020-07-07 13:36 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2020-07-07 13:36 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Linux Media Mailing List

On Tue, Jul 07, 2020 at 03:32:59PM +0200, Hans Verkuil wrote:
> For no obvious reason VB2_DMABUF was not enabled. Add this.
> 
> Also both read and write file ops were set, but this was not enabled
> in the vb2 io_modes or in the device_caps capabilities. Drop this.
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Acked-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-07 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 13:32 [PATCH] sun4i-csi: drop read/write, enable VB2_DMABUF Hans Verkuil
2020-07-07 13:36 ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.