Bug 200227 - no exposure setting on webcams using uvcvideo
Summary: no exposure setting on webcams using uvcvideo
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Greg Kroah-Hartman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-23 12:03 UTC by Safocl
Modified: 2018-06-23 23:09 UTC (History)
0 users

See Also:
Kernel Version: 4.17.2
Subsystem:
Regression: No
Bisected commit-id:


Attachments
patch (566 bytes, patch)
2018-06-23 12:05 UTC, Safocl
Details | Diff

Description Safocl 2018-06-23 12:03:07 UTC
a small amount of the buffer was added to the commit https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-4.17.y&id=859086ae3636eae0bf9f0fbbce2daf4d41ae9474 in the function description uvc_ctrl_get_flags ("data = kmalloc (1, GFP_KERNEL);" and "ret = uvc_query_ctrl (dev, UVC_GET_INFO, ctrl-> entity-> id, dev-> intfnum, info-> selector, data, 1);") and it turned out that when reassigning variable ret through the specified function in function uvc_ctrl_fill_xu_info the size did not suffice what to contain exposition settings as I think. After increasing the buffer size to 2 bytes, the exposure setting appeared again.
link to the Russian-speaking forum archlinux: https://archlinux.org.ru/forum/topic/18581/. patch: https://archlinux.org.ru/forum/post/206017/
Comment 1 Safocl 2018-06-23 12:05:35 UTC
Created attachment 276767 [details]
patch
Comment 2 Safocl 2018-06-23 12:06:36 UTC
Comment on attachment 276767 [details]
patch

>--- a/drivers/media/usb/uvc/uvc_ctrl.c 2018-06-23 15:12:25.948081416 +0400
>+++ b/drivers/media/usb/uvc/uvc_ctrl.c 2018-06-23 14:57:52.462048382 +0400
>@@ -1600,12 +1600,12 @@
>u8 *data;
>int ret;
>
>-      data = kmalloc(1, GFP_KERNEL);
>+      data = kmalloc(2, GFP_KERNEL);
>if (data == NULL)
>return -ENOMEM;
>
>ret = uvc_query_ctrl(dev, UVC_GET_INFO, ctrl->entity->id, dev->intfnum,
>-      info->selector, data, 1);
>+      info->selector, data, 2);
>if (!ret)
>info->flags = UVC_CTRL_FLAG_GET_MIN | UVC_CTRL_FLAG_GET_MAX
>| UVC_CTRL_FLAG_GET_RES | UVC_CTRL_FLAG_GET_DEF
Comment 3 Safocl 2018-06-23 12:07:50 UTC
Comment on attachment 276767 [details]
patch

--- a/drivers/media/usb/uvc/uvc_ctrl.c	2018-06-23 15:12:25.948081416 +0400
+++ b/drivers/media/usb/uvc/uvc_ctrl.c	2018-06-23 14:57:52.462048382 +0400
@@ -1600,12 +1600,12 @@
u8 *data;
int ret;

-	data = kmalloc(1, GFP_KERNEL);
+	data = kmalloc(2, GFP_KERNEL);
if (data == NULL)
return -ENOMEM;

ret = uvc_query_ctrl(dev, UVC_GET_INFO, ctrl->entity->id, dev->intfnum,
-	info->selector, data, 1);
+	info->selector, data, 2);
if (!ret)
info->flags = UVC_CTRL_FLAG_GET_MIN | UVC_CTRL_FLAG_GET_MAX
| UVC_CTRL_FLAG_GET_RES | UVC_CTRL_FLAG_GET_DEF
Comment 4 Greg Kroah-Hartman 2018-06-23 23:09:36 UTC
On Sat, Jun 23, 2018 at 12:03:07PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=200227
> 
>             Bug ID: 200227
>            Summary: no exposure setting on webcams using uvcvideo
>            Product: Drivers
>            Version: 2.5
>     Kernel Version: 4.17.2

All USB bugs should be sent to the linux-usb@vger.kernel.org mailing
list, and not entered into bugzilla.  Please bring this issue up there,
if it is still a problem in the latest kernel release.

Note You need to log in before you can comment on or make changes to this bug.