All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "media: videobuf2: Fix length check for single plane dmabuf queueing"
@ 2021-01-06 13:52 Naushir Patuck
  2021-01-06 14:35 ` Kieran Bingham
  2021-01-06 15:16 ` [PATCH v2] " Naushir Patuck
  0 siblings, 2 replies; 6+ messages in thread
From: Naushir Patuck @ 2021-01-06 13:52 UTC (permalink / raw)
  To: linux-media; +Cc: laurent.pinchart, Naushir Patuck

The updated length check for dmabuf types broke existing usage in v4l2
userland clients.

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)
-- 
2.25.1


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

* Re: [PATCH] Revert "media: videobuf2: Fix length check for single plane dmabuf queueing"
  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
  2021-01-06 15:16 ` [PATCH v2] " Naushir Patuck
  1 sibling, 1 reply; 6+ messages in thread
From: Kieran Bingham @ 2021-01-06 14:35 UTC (permalink / raw)
  To: Naushir Patuck, linux-media; +Cc: laurent.pinchart

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>


> 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)
> 


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

* Re: [PATCH] Revert "media: videobuf2: Fix length check for single plane dmabuf queueing"
  2021-01-06 14:35 ` Kieran Bingham
@ 2021-01-06 14:42   ` Laurent Pinchart
  2021-01-06 14:50     ` Kieran Bingham
  0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2021-01-06 14:42 UTC (permalink / raw)
  To: Kieran Bingham; +Cc: Naushir Patuck, linux-media

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

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

* Re: [PATCH] Revert "media: videobuf2: Fix length check for single plane dmabuf queueing"
  2021-01-06 14:42   ` Laurent Pinchart
@ 2021-01-06 14:50     ` Kieran Bingham
  0 siblings, 0 replies; 6+ messages in thread
From: Kieran Bingham @ 2021-01-06 14:50 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Naushir Patuck, linux-media

Hi Laurent,

On 06/01/2021 14:42, Laurent Pinchart wrote:
> 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

Is that still needed/used nowadays? I thought backports were picked up
automatically by the Fixes: or by AI-Magic?

Though [0] does imply it's still a preferred option.

[0] https://www.kernel.org/doc/html/v5.10/process/stable-kernel-rules.html

--
Kieran


> 
> ?
> 
>>> 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)
> 


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

* [PATCH v2] Revert "media: videobuf2: Fix length check for single plane dmabuf queueing"
  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 15:16 ` Naushir Patuck
  2021-01-06 15:25   ` Laurent Pinchart
  1 sibling, 1 reply; 6+ messages in thread
From: Naushir Patuck @ 2021-01-06 15:16 UTC (permalink / raw)
  To: linux-media; +Cc: laurent.pinchart, Naushir Patuck, stable, Kieran Bingham

The updated length check for dmabuf types broke existing usage in v4l2
userland clients.

Fixes: 961d3b27 ("media: videobuf2: Fix length check for single plane dmabuf queueing")
Cc: stable@vger.kernel.org
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Tested-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.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)
-- 
2.25.1


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

* Re: [PATCH v2] Revert "media: videobuf2: Fix length check for single plane dmabuf queueing"
  2021-01-06 15:16 ` [PATCH v2] " Naushir Patuck
@ 2021-01-06 15:25   ` Laurent Pinchart
  0 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2021-01-06 15:25 UTC (permalink / raw)
  To: Naushir Patuck
  Cc: linux-media, stable, Kieran Bingham, John Cox, Hans Verkuil

Hi Naush,

Thank you for the patch.

(CC'ing John Cox as the author of the commit being reverted, and Hans
Verkuil as he has merged it)

On Wed, Jan 06, 2021 at 03:16:57PM +0000, Naushir Patuck wrote:
> The updated length check for dmabuf types broke existing usage in v4l2
> userland clients.
> 
> Fixes: 961d3b27 ("media: videobuf2: Fix length check for single plane dmabuf queueing")
> Cc: stable@vger.kernel.org
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
> Tested-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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

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

end of thread, other threads:[~2021-01-06 15:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-01-06 14:50     ` Kieran Bingham
2021-01-06 15:16 ` [PATCH v2] " Naushir Patuck
2021-01-06 15:25   ` Laurent Pinchart

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.