public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/4] media: uvcvideo: Propagate buf->error to userspace
Date: Thu, 19 Dec 2024 01:26:50 +0200	[thread overview]
Message-ID: <20241218232650.GA5518@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20241218-uvc-deprecate-v2-1-ab814139e983@chromium.org>

Hi Ricardo,

Thank you for the patch.

On Wed, Dec 18, 2024 at 09:39:08PM +0000, Ricardo Ribalda wrote:
> Now we return VB2_BUF_STATE_DONE for valid and invalid frames. Propagate
> the correct value, so the user can know if the frame is valid or not via
> struct v4l2_buffer->flags.
> 
> Reported-by: Hans de Goede <hdegoede@redhat.com>
> Closes: https://lore.kernel.org/linux-media/84b0f212-cd88-46bb-8e6f-b94ec3eccba6@redhat.com
> Fixes: 6998b6fb4b1c ("[media] uvcvideo: Use videobuf2-vmalloc")
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

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

> ---
>  drivers/media/usb/uvc/uvc_queue.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c
> index 26ee85657fc8..f8464f0aae1b 100644
> --- a/drivers/media/usb/uvc/uvc_queue.c
> +++ b/drivers/media/usb/uvc/uvc_queue.c
> @@ -479,7 +479,8 @@ static void uvc_queue_buffer_complete(struct kref *ref)
>  
>  	buf->state = buf->error ? UVC_BUF_STATE_ERROR : UVC_BUF_STATE_DONE;
>  	vb2_set_plane_payload(&buf->buf.vb2_buf, 0, buf->bytesused);
> -	vb2_buffer_done(&buf->buf.vb2_buf, VB2_BUF_STATE_DONE);
> +	vb2_buffer_done(&buf->buf.vb2_buf, buf->error ? VB2_BUF_STATE_ERROR :
> +							VB2_BUF_STATE_DONE);
>  }
>  
>  /*

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2024-12-18 23:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18 21:39 [PATCH v2 0/4] media: uvcvideo: Prepare deprecation of nodrop Ricardo Ribalda
2024-12-18 21:39 ` [PATCH v2 1/4] media: uvcvideo: Propagate buf->error to userspace Ricardo Ribalda
2024-12-18 23:26   ` Laurent Pinchart [this message]
2024-12-18 21:39 ` [PATCH v2 2/4] media: uvcvideo: Invert default value for nodrop module param Ricardo Ribalda
2024-12-18 23:26   ` Laurent Pinchart
2024-12-18 21:39 ` [PATCH v2 3/4] media: uvcvideo: Allow changing noparam on the fly Ricardo Ribalda
2024-12-18 23:27   ` Laurent Pinchart
2024-12-18 21:39 ` [PATCH v2 4/4] media: uvcvideo: Announce the user our deprecation intentions Ricardo Ribalda
2024-12-18 23:27   ` Laurent Pinchart
2024-12-18 21:52 ` [PATCH v2 0/4] media: uvcvideo: Prepare deprecation of nodrop Hans de Goede
2024-12-18 22:01   ` Ricardo Ribalda

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=20241218232650.GA5518@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.org \
    /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