mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans de Goede <hdegoede@redhat.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] media: uvcvideo: Fix event flags in uvc_ctrl_send_events
Date: Fri, 15 Nov 2024 02:34:03 +0200	[thread overview]
Message-ID: <20241115003403.GP26171@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20241114-uvc-fix-event-v1-1-6c580ccf0766@chromium.org>

Hi Ricardo,

Thank you for the patch.

On Thu, Nov 14, 2024 at 12:17:51PM +0000, Ricardo Ribalda wrote:
> If there is an event that needs the V4L2_EVENT_CTRL_CH_FLAGS flag, all
> the following events will have that flag, regardless if they need it or
> not.
> 
> This is because we keep using the same variable all the time and we do
> not reset its original value.
> 
> Cc: stable@vger.kernel.org
> Fixes: 805e9b4a06bf ("[media] uvcvideo: Send control change events for slave ctrls when the master changes")
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

Good catch.

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

> ---
>  drivers/media/usb/uvc/uvc_ctrl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
> index e59a463c2761..5314e7864c49 100644
> --- a/drivers/media/usb/uvc/uvc_ctrl.c
> +++ b/drivers/media/usb/uvc/uvc_ctrl.c
> @@ -1626,13 +1626,13 @@ static void uvc_ctrl_send_events(struct uvc_fh *handle,
>  {
>  	struct uvc_control_mapping *mapping;
>  	struct uvc_control *ctrl;
> -	u32 changes = V4L2_EVENT_CTRL_CH_VALUE;
>  	unsigned int i;
>  	unsigned int j;
>  
>  	for (i = 0; i < xctrls_count; ++i) {
> -		ctrl = uvc_find_control(handle->chain, xctrls[i].id, &mapping);
> +		u32 changes = V4L2_EVENT_CTRL_CH_VALUE;
>  
> +		ctrl = uvc_find_control(handle->chain, xctrls[i].id, &mapping);
>  		if (ctrl->info.flags & UVC_CTRL_FLAG_ASYNCHRONOUS)
>  			/* Notification will be sent from an Interrupt event. */
>  			continue;
> 
> ---
> base-commit: b14257abe7057def6127f6fb2f14f9adc8acabdb
> change-id: 20241114-uvc-fix-event-272df1585bb3

-- 
Regards,

Laurent Pinchart

      reply	other threads:[~2024-11-15  0:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14 12:17 Ricardo Ribalda
2024-11-15  0:34 ` Laurent Pinchart [this message]

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=20241115003403.GP26171@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 \
    --cc=stable@vger.kernel.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

all inboxes | Powered by JetHome®