Linux Media Controller development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: Naushir Patuck <naush@raspberrypi.com>, linux-media@vger.kernel.org
Subject: Re: [PATCH] Revert "media: videobuf2: Fix length check for single plane dmabuf queueing"
Date: Wed, 6 Jan 2021 16:42:19 +0200	[thread overview]
Message-ID: <X/XMS+53s3RDUdY0@pendragon.ideasonboard.com> (raw)
In-Reply-To: <c63d6797-d3f7-3e6d-b760-d05291dbc0ed@ideasonboard.com>

On Wed, Jan 06, 2021 at 02:35:22PM +0000, Kieran Bingham wrote:
> Hi Naush,
> 
> On 06/01/2021 13:52, Naushir Patuck wrote:
> > The updated length check for dmabuf types broke existing usage in v4l2
> > userland clients.
> 
> Indeed, my tests have indeed been failing since 5.8 or such it seems.
> 
> Thank you for this - it fixes the tests again for me.
> 
> Tested-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Cc: stable@vger.kernel.org

?

> > Fixes: 961d3b27 ("media: videobuf2: Fix length check for single plane dmabuf queueing")
> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> > ---
> >  drivers/media/common/videobuf2/videobuf2-v4l2.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c
> > index 96d3b2b2aa31..3f61f5863bf7 100644
> > --- a/drivers/media/common/videobuf2/videobuf2-v4l2.c
> > +++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c
> > @@ -118,8 +118,7 @@ static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b)
> >  				return -EINVAL;
> >  		}
> >  	} else {
> > -		length = (b->memory == VB2_MEMORY_USERPTR ||
> > -			  b->memory == VB2_MEMORY_DMABUF)
> > +		length = (b->memory == VB2_MEMORY_USERPTR)
> >  			? b->length : vb->planes[0].length;
> >  
> >  		if (b->bytesused > length)

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2021-01-06 14:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06 13:52 [PATCH] Revert "media: videobuf2: Fix length check for single plane dmabuf queueing" Naushir Patuck
2021-01-06 14:35 ` Kieran Bingham
2021-01-06 14:42   ` Laurent Pinchart [this message]
2021-01-06 14:50     ` Kieran Bingham
2021-01-06 15:16 ` [PATCH v2] " Naushir Patuck
2021-01-06 15:25   ` Laurent Pinchart

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=X/XMS+53s3RDUdY0@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=naush@raspberrypi.com \
    /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