linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	linux-media@vger.kernel.org, Sakari Ailus <sakari.ailus@iki.fi>
Subject: Re: [RFC PATCH 9/9] omap3isp/rcar_fdp1/vsp1/xilinx: drop VB2_USERPTR
Date: Fri, 21 Feb 2020 16:31:01 +0200	[thread overview]
Message-ID: <20200221143101.GI4955@pendragon.ideasonboard.com> (raw)
In-Reply-To: <6b0e13b1-77c8-1b15-6be1-3139ca471715@ideasonboard.com>

Hi Hans,

CC'ing Sakari for the omap3isp part.

On Fri, Feb 21, 2020 at 09:01:02AM +0000, Kieran Bingham wrote:
> On 21/02/2020 08:45, Hans Verkuil wrote:
> > The combination of VB2_USERPTR and dma-contig makes no sense for
> > these devices, drop it.
> > 
> > Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> 
> Agreed, the FDP1 and VSP1 expect contiguous physical memory, so a
> user-pointer doesn't make much sense to be permitted.
> 
> I haven't lokoed at the Xilinx platform in regards to this but I would
> be surprised if it wasn't the same issue there of course.
> 
> For VSP1/FDP1:
> 
> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

for the same.

For the Xilinx driver, you may want to ask Xilinx if they use USERPTR.

> > ---
> >  drivers/media/platform/omap3isp/ispvideo.c | 2 +-
> >  drivers/media/platform/rcar_fdp1.c         | 4 ++--
> >  drivers/media/platform/vsp1/vsp1_video.c   | 2 +-
> >  drivers/media/platform/xilinx/xilinx-dma.c | 2 +-
> >  4 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c
> > index e8c46ff1aeb4..1104654ba438 100644
> > --- a/drivers/media/platform/omap3isp/ispvideo.c
> > +++ b/drivers/media/platform/omap3isp/ispvideo.c
> > @@ -1319,7 +1319,7 @@ static int isp_video_open(struct file *file)
> >  
> >  	queue = &handle->queue;
> >  	queue->type = video->type;
> > -	queue->io_modes = VB2_MMAP | VB2_DMABUF | VB2_USERPTR;
> > +	queue->io_modes = VB2_MMAP | VB2_DMABUF;
> >  	queue->drv_priv = handle;
> >  	queue->ops = &isp_video_queue_ops;
> >  	queue->mem_ops = &vb2_dma_contig_memops;
> > diff --git a/drivers/media/platform/rcar_fdp1.c b/drivers/media/platform/rcar_fdp1.c
> > index 97bed45360f0..df081f66575f 100644
> > --- a/drivers/media/platform/rcar_fdp1.c
> > +++ b/drivers/media/platform/rcar_fdp1.c
> > @@ -2047,7 +2047,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq,
> >  	int ret;
> >  
> >  	src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
> > -	src_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
> > +	src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
> >  	src_vq->drv_priv = ctx;
> >  	src_vq->buf_struct_size = sizeof(struct fdp1_buffer);
> >  	src_vq->ops = &fdp1_qops;
> > @@ -2061,7 +2061,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq,
> >  		return ret;
> >  
> >  	dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
> > -	dst_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
> > +	dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
> >  	dst_vq->drv_priv = ctx;
> >  	dst_vq->buf_struct_size = sizeof(struct fdp1_buffer);
> >  	dst_vq->ops = &fdp1_qops;
> > diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
> > index 5e59ed2c3614..112e2092f6d3 100644
> > --- a/drivers/media/platform/vsp1/vsp1_video.c
> > +++ b/drivers/media/platform/vsp1/vsp1_video.c
> > @@ -1300,7 +1300,7 @@ struct vsp1_video *vsp1_video_create(struct vsp1_device *vsp1,
> >  	video_set_drvdata(&video->video, video);
> >  
> >  	video->queue.type = video->type;
> > -	video->queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
> > +	video->queue.io_modes = VB2_MMAP | VB2_DMABUF;
> >  	video->queue.lock = &video->lock;
> >  	video->queue.drv_priv = video;
> >  	video->queue.buf_struct_size = sizeof(struct vsp1_vb2_buffer);
> > diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c
> > index b211380a11f2..57e52ad720dd 100644
> > --- a/drivers/media/platform/xilinx/xilinx-dma.c
> > +++ b/drivers/media/platform/xilinx/xilinx-dma.c
> > @@ -708,7 +708,7 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma,
> >  	 * instead of 'cat' isn't really a drawback.
> >  	 */
> >  	dma->queue.type = type;
> > -	dma->queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
> > +	dma->queue.io_modes = VB2_MMAP | VB2_DMABUF;
> >  	dma->queue.lock = &dma->lock;
> >  	dma->queue.drv_priv = dma;
> >  	dma->queue.buf_struct_size = sizeof(struct xvip_dma_buffer);

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2020-02-21 14:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21  8:45 [RFC PATCH 0/9] Drop VB2_USERPTR + dma-contig combo Hans Verkuil
2020-02-21  8:45 ` [RFC PATCH 1/9] mtk-vcodec: drop VB2_USERPTR Hans Verkuil
2020-02-21  8:45 ` [RFC PATCH 2/9] solo6x10: " Hans Verkuil
2020-02-21  8:45 ` [RFC PATCH 3/9] m2m-deinterlace: " Hans Verkuil
2020-02-21  8:45 ` [RFC PATCH 4/9] mcam-core: " Hans Verkuil
2020-02-21  8:45 ` [RFC PATCH 5/9] sh_veu: " Hans Verkuil
2020-02-21  8:45 ` [RFC PATCH 6/9] mx2_emmaprp: " Hans Verkuil
2020-02-21  8:45 ` [RFC PATCH 7/9] davinci: " Hans Verkuil
2020-02-21  8:45 ` [RFC PATCH 8/9] exynos/s3c/s5p: " Hans Verkuil
2020-02-21  8:53   ` Tomasz Figa
2020-02-21 11:54     ` Hans Verkuil
2020-02-21 13:11       ` Marek Szyprowski
2020-02-21 13:34       ` Tomasz Figa
2020-02-21  8:45 ` [RFC PATCH 9/9] omap3isp/rcar_fdp1/vsp1/xilinx: " Hans Verkuil
2020-02-21  9:01   ` Kieran Bingham
2020-02-21 14:31     ` Laurent Pinchart [this message]
2020-02-21 19:46       ` Sakari Ailus
2020-02-22 10:43         ` Laurent Pinchart
2020-02-22 13:13           ` Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200221143101.GI4955@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).