Skip to content

Commit 04ddfcd

Browse files
ribaldaHans Verkuil
authored andcommitted
media: uvcvideo: Run uvc_ctrl_init_ctrl for all controls
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> Reviewed-by: Hans de Goede <hansg@kernel.org> Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
1 parent c01ae95 commit 04ddfcd

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

drivers/media/usb/uvc/uvc_ctrl.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3181,15 +3181,6 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain,
31813181
{
31823182
unsigned int i;
31833183

3184-
/*
3185-
* XU controls initialization requires querying the device for control
3186-
* information. As some buggy UVC devices will crash when queried
3187-
* repeatedly in a tight loop, delay XU controls initialization until
3188-
* first use.
3189-
*/
3190-
if (UVC_ENTITY_TYPE(ctrl->entity) == UVC_VC_EXTENSION_UNIT)
3191-
return;
3192-
31933184
for (i = 0; i < ARRAY_SIZE(uvc_ctrls); ++i) {
31943185
const struct uvc_control_info *info = &uvc_ctrls[i];
31953186

0 commit comments

Comments
 (0)