mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hansg@kernel.org>
To: Ricardo Ribalda <ribalda@chromium.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH 3/4] media: uvcvideo: Run uvc_ctrl_init_ctrl for all controls
Date: Mon, 8 Sep 2025 13:02:32 +0200	[thread overview]
Message-ID: <e3aa47fe-938b-43f1-b221-02e3e4c74243@kernel.org> (raw)
In-Reply-To: <20250818-uvc-iq-switch-v1-3-f7ea5e740ddd@chromium.org>

Hi,

On 18-Aug-25 22:15, Ricardo Ribalda wrote:
> The function uvc_ctrl_init_ctrl() is called for every control for every
> entity, but it exits early if the entity is a extension unit. The comment
> claims that this is done to avoid querying XU controls during probe.
> 
> We only query a control if its entity GUIDs and index matches the
> uvc_ctrls list. There are only controls for the following GUIDs:
> UVC_GUID_UVC_PROCESSING, UVC_GUID_UVC_CAMERA and
> UVC_GUID_EXT_GPIO_CONTROLLER.
> 
> In other words, XU controls will not be queried even without this
> condition.
> 
> In future patches we want to add ChromeOS XU controls that need to the
> initialized. We will make sure that all cameras with ChromeOS XU can
> be queried at probe time.
> 
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hansg@kernel.org>

Regards,

Hans



> ---
>  drivers/media/usb/uvc/uvc_ctrl.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
> index efe609d7087752cb2ef516eef0fce12acd13e747..ff975f96e1325532e2299047c07de5d1b9cf09db 100644
> --- a/drivers/media/usb/uvc/uvc_ctrl.c
> +++ b/drivers/media/usb/uvc/uvc_ctrl.c
> @@ -3181,15 +3181,6 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain,
>  {
>  	unsigned int i;
>  
> -	/*
> -	 * XU controls initialization requires querying the device for control
> -	 * information. As some buggy UVC devices will crash when queried
> -	 * repeatedly in a tight loop, delay XU controls initialization until
> -	 * first use.
> -	 */
> -	if (UVC_ENTITY_TYPE(ctrl->entity) == UVC_VC_EXTENSION_UNIT)
> -		return;
> -
>  	for (i = 0; i < ARRAY_SIZE(uvc_ctrls); ++i) {
>  		const struct uvc_control_info *info = &uvc_ctrls[i];
>  
> 


  reply	other threads:[~2025-09-08 11:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 20:15 [PATCH 0/4] media: uvcvideo: Add support for UVC_CROSXU_CONTROL_IQ_PROFILE Ricardo Ribalda
2025-08-18 20:15 ` [PATCH 1/4] media: uvcvideo: Fix comments in uvc_meta_detect_msxu Ricardo Ribalda
2025-08-18 20:15 ` [PATCH 2/4] media: uvcvideo: Move MSXU_CONTROL_METADATA definition to header Ricardo Ribalda
2025-08-18 20:15 ` [PATCH 3/4] media: uvcvideo: Run uvc_ctrl_init_ctrl for all controls Ricardo Ribalda
2025-09-08 11:02   ` Hans de Goede [this message]
2025-09-13 13:42   ` Laurent Pinchart
2025-08-18 20:15 ` [PATCH 4/4] media: uvcvideo: Support UVC_CROSXU_CONTROL_IQ_PROFILE Ricardo Ribalda
2025-09-08 11:04   ` Hans de Goede
2025-09-13 14:06   ` Laurent Pinchart
2025-09-15  7:18     ` Ricardo Ribalda
2025-09-15  7:21       ` Laurent Pinchart
2025-09-08 11:13 ` [PATCH 0/4] media: uvcvideo: Add support for UVC_CROSXU_CONTROL_IQ_PROFILE Hans de Goede

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=e3aa47fe-938b-43f1-b221-02e3e4c74243@kernel.org \
    --to=hansg@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@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

all inboxes | Powered by JetHome®