* [PATCH] Revert "V4L/DVB: uvc: Enable USB autosuspend by default on uvcvideo"
@ 2013-04-24 7:57 adam.lee
2013-04-24 9:17 ` Laurent Pinchart
[not found] ` <1657156.ZjLeh8FSxj@avalon>
0 siblings, 2 replies; 5+ messages in thread
From: adam.lee @ 2013-04-24 7:57 UTC (permalink / raw)
To: linux-kernel
Cc: Laurent Pinchart, Matthew Garrett, Mauro Carvalho Chehab,
Adam Lee, open list:USB VIDEO CLASS
From: Adam Lee <adam.lee@canonical.com>
This reverts commit 3dae8b41dc5651f8eb22cf310e8b116480ba25b7.
1, I do have a Chicony webcam, implements autosuspend in a broken way,
make `poweroff` performs rebooting when its autosuspend enabled.
2, There are other webcams which don't support autosuspend too, like
https://patchwork.kernel.org/patch/2356141/
3, kernel removed USB_QUIRK_NO_AUTOSUSPEND in
a691efa9888e71232dfb4088fb8a8304ffc7b0f9, because autosuspend is
disabled by default.
So, we need to disable autosuspend in uvcvideo, maintaining a quirk list
only for uvcvideo is not a good idea.
Signed-off-by: Adam Lee <adam.lee@canonical.com>
---
drivers/media/usb/uvc/uvc_driver.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 5dbefa6..8556f7c 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -1914,7 +1914,6 @@ static int uvc_probe(struct usb_interface *intf,
}
uvc_trace(UVC_TRACE_PROBE, "UVC device initialized.\n");
- usb_enable_autosuspend(udev);
return 0;
error:
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Revert "V4L/DVB: uvc: Enable USB autosuspend by default on uvcvideo"
2013-04-24 7:57 [PATCH] Revert "V4L/DVB: uvc: Enable USB autosuspend by default on uvcvideo" adam.lee
@ 2013-04-24 9:17 ` Laurent Pinchart
2013-04-25 6:33 ` Adam Lee
[not found] ` <1657156.ZjLeh8FSxj@avalon>
1 sibling, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2013-04-24 9:17 UTC (permalink / raw)
To: adam.lee
Cc: linux-kernel, Matthew Garrett, Mauro Carvalho Chehab,
open list:USB VIDEO CLASS
Hi Adam,
Thanks for the patch.
On Wednesday 24 April 2013 15:57:19 adam.lee@canonical.com wrote:
> From: Adam Lee <adam.lee@canonical.com>
>
> This reverts commit 3dae8b41dc5651f8eb22cf310e8b116480ba25b7.
>
> 1, I do have a Chicony webcam, implements autosuspend in a broken way,
> make `poweroff` performs rebooting when its autosuspend enabled.
>
> 2, There are other webcams which don't support autosuspend too, like
> https://patchwork.kernel.org/patch/2356141/
>
> 3, kernel removed USB_QUIRK_NO_AUTOSUSPEND in
> a691efa9888e71232dfb4088fb8a8304ffc7b0f9, because autosuspend is
> disabled by default.
>
> So, we need to disable autosuspend in uvcvideo, maintaining a quirk list
> only for uvcvideo is not a good idea.
>
> Signed-off-by: Adam Lee <adam.lee@canonical.com>
I've received very few bug reports about broken auto-suspend support in UVC
devices. Most of them could be solved by setting the RESET_RESUME quirk in USB
core, only the Creative Live! Cam Optia AF required a quirk in the uvcvideo
driver. I would thus rather use the available quirks (USB_QUIRK_RESET_RESUME
if possible, UVC_QUIRK_DISABLE_AUTOSUSPEND otherwise) than killing power
management for the vast majority of webcams that behave correctly.
> ---
> drivers/media/usb/uvc/uvc_driver.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_driver.c
> b/drivers/media/usb/uvc/uvc_driver.c index 5dbefa6..8556f7c 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -1914,7 +1914,6 @@ static int uvc_probe(struct usb_interface *intf,
> }
>
> uvc_trace(UVC_TRACE_PROBE, "UVC device initialized.\n");
> - usb_enable_autosuspend(udev);
> return 0;
>
> error:
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Revert "V4L/DVB: uvc: Enable USB autosuspend by default on uvcvideo"
2013-04-24 9:17 ` Laurent Pinchart
@ 2013-04-25 6:33 ` Adam Lee
2013-06-13 9:56 ` Adam Lee
0 siblings, 1 reply; 5+ messages in thread
From: Adam Lee @ 2013-04-25 6:33 UTC (permalink / raw)
To: Laurent Pinchart
Cc: linux-kernel, Matthew Garrett, Mauro Carvalho Chehab,
open list:USB VIDEO CLASS
On Wed, Apr 24, 2013 at 11:17:52AM +0200, Laurent Pinchart wrote:
> Hi Adam,
>
> Thanks for the patch.
>
> On Wednesday 24 April 2013 15:57:19 adam.lee@canonical.com wrote:
> > From: Adam Lee <adam.lee@canonical.com>
> >
> > This reverts commit 3dae8b41dc5651f8eb22cf310e8b116480ba25b7.
> >
> > 1, I do have a Chicony webcam, implements autosuspend in a broken way,
> > make `poweroff` performs rebooting when its autosuspend enabled.
> >
> > 2, There are other webcams which don't support autosuspend too, like
> > https://patchwork.kernel.org/patch/2356141/
> >
> > 3, kernel removed USB_QUIRK_NO_AUTOSUSPEND in
> > a691efa9888e71232dfb4088fb8a8304ffc7b0f9, because autosuspend is
> > disabled by default.
> >
> > So, we need to disable autosuspend in uvcvideo, maintaining a quirk list
> > only for uvcvideo is not a good idea.
>
> I've received very few bug reports about broken auto-suspend support in UVC
> devices. Most of them could be solved by setting the RESET_RESUME quirk in USB
> core, only the Creative Live! Cam Optia AF required a quirk in the uvcvideo
> driver. I would thus rather use the available quirks (USB_QUIRK_RESET_RESUME
> if possible, UVC_QUIRK_DISABLE_AUTOSUSPEND otherwise) than killing power
> management for the vast majority of webcams that behave correctly.
Here comes another one, integrated Chicony webcam 04f2:b39f, its
autosuspend makes `poweroff` performs rebooting at the laptop I'm
working on. I tried USB_QUIRK_RESET_RESUME, not helping.
The quirks list will go longer and longer absolutely, do uvcvideo wanna
maintain that? And why only uvcvideo do this in kernel space which
against general USB module?
I still suggest we disable it by default, people can enable it in udev
just like almost all distroes do for udisks. Please consider about it.
--
Regards,
Adam Lee
Hardware Enablement
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Revert "V4L/DVB: uvc: Enable USB autosuspend by default on uvcvideo"
2013-04-25 6:33 ` Adam Lee
@ 2013-06-13 9:56 ` Adam Lee
0 siblings, 0 replies; 5+ messages in thread
From: Adam Lee @ 2013-06-13 9:56 UTC (permalink / raw)
To: Laurent Pinchart, linux-kernel, Matthew Garrett,
Mauro Carvalho Chehab, open list:USB VIDEO CLASS
On Thu, Apr 25, 2013 at 02:33:06PM +0800, Adam Lee wrote:
> On Wed, Apr 24, 2013 at 11:17:52AM +0200, Laurent Pinchart wrote:
> > Hi Adam,
> >
> > Thanks for the patch.
> >
> > On Wednesday 24 April 2013 15:57:19 adam.lee@canonical.com wrote:
> > > From: Adam Lee <adam.lee@canonical.com>
> > >
> > > This reverts commit 3dae8b41dc5651f8eb22cf310e8b116480ba25b7.
> > >
> > > 1, I do have a Chicony webcam, implements autosuspend in a broken way,
> > > make `poweroff` performs rebooting when its autosuspend enabled.
> > >
> > > 2, There are other webcams which don't support autosuspend too, like
> > > https://patchwork.kernel.org/patch/2356141/
> > >
> > > 3, kernel removed USB_QUIRK_NO_AUTOSUSPEND in
> > > a691efa9888e71232dfb4088fb8a8304ffc7b0f9, because autosuspend is
> > > disabled by default.
> > >
> > > So, we need to disable autosuspend in uvcvideo, maintaining a quirk list
> > > only for uvcvideo is not a good idea.
> >
> > I've received very few bug reports about broken auto-suspend support in UVC
> > devices. Most of them could be solved by setting the RESET_RESUME quirk in USB
> > core, only the Creative Live! Cam Optia AF required a quirk in the uvcvideo
> > driver. I would thus rather use the available quirks (USB_QUIRK_RESET_RESUME
> > if possible, UVC_QUIRK_DISABLE_AUTOSUSPEND otherwise) than killing power
> > management for the vast majority of webcams that behave correctly.
>
> Here comes another one, integrated Chicony webcam 04f2:b39f, its
> autosuspend makes `poweroff` performs rebooting at the laptop I'm
> working on. I tried USB_QUIRK_RESET_RESUME, not helping.
>
> The quirks list will go longer and longer absolutely, do uvcvideo wanna
> maintain that? And why only uvcvideo do this in kernel space which
> against general USB module?
>
> I still suggest we disable it by default, people can enable it in udev
> just like almost all distroes do for udisks. Please consider about it.
Hi, Laurent
Any comment of this? I still think it's a risk to enable autosuspend in
uvcvideo by default, there must be users meeting weird issues but didn't
report to you becaue they didn't figured out the cause.
--
Regards,
Adam Lee
Hardware Enablement
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1657156.ZjLeh8FSxj@avalon>]
end of thread, other threads:[~2013-09-30 14:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-24 7:57 [PATCH] Revert "V4L/DVB: uvc: Enable USB autosuspend by default on uvcvideo" adam.lee
2013-04-24 9:17 ` Laurent Pinchart
2013-04-25 6:33 ` Adam Lee
2013-06-13 9:56 ` Adam Lee
[not found] ` <1657156.ZjLeh8FSxj@avalon>
[not found] ` <CAA7C2qi_1yYeSYbRBFhaLLwEmFf0k4G52jwvXVk0yLpNFFPCJA@mail.gmail.com>
2013-09-30 14:49 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox