All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/7] [RESEND] media: uvcvideo: Implement granular power management
@ 2022-10-26 12:06 Ricardo Ribalda
  2022-10-26 12:06 ` [PATCH v3 1/7] media: uvcvideo: Refactor streamon/streamoff Ricardo Ribalda
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Ricardo Ribalda @ 2022-10-26 12:06 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Tomasz Figa, Ricardo Ribalda, Guenter Roeck, Max Staudt,
	linux-kernel, Alan Stern, Hans Verkuil, Laurent Pinchart,
	linux-media

Instead of suspending/resume the USB device at open()/close(), do it
when the device is actually used.

This way we can reduce the power consumption when a service is holding
the video device and leaving it in an idle state.

And now that all the access to the hardware, has a common entry path,
use it to fix the race conditions to hardware disconnects.

To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Tomasz Figa <tfiga@chromium.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Max Staudt <mstaudt@chromium.org>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
Changes in v3:
- Rebase on top of uvc/next
- Reorder series, and put "controversial" patches at the end.
- Fix "use-before-set" bug. Thanks Max!
- Link to v2: https://lore.kernel.org/r/20220920-resend-powersave-v2-0-5135d1bb1c38@chromium.org

Changes in v2:
- Make access to uvc_status contitional
- Merge with Guenter race condition patchset: https://lore.kernel.org/lkml/20200917022547.198090-1-linux@roeck-us.net/
- Link to v1: https://lore.kernel.org/r/20220920-resend-powersave-v1-0-123aa2ba3836@chromium.org

---
Guenter Roeck (4):
      media: uvcvideo: Cancel async worker earlier
      media: uvcvideo: Release stream queue when unregistering video device
      media: uvcvideo: Lock video streams and queues while unregistering
      media: uvcvideo: Protect uvc queue file operations against disconnect

Ricardo Ribalda (3):
      media: uvcvideo: Refactor streamon/streamoff
      media: uvcvideo: Do power management granularly
      media: uvcvideo: Only call status ep if hw supports it

 drivers/media/usb/uvc/uvc_ctrl.c   |  11 +-
 drivers/media/usb/uvc/uvc_driver.c |  35 +++++--
 drivers/media/usb/uvc/uvc_queue.c  |  32 +++++-
 drivers/media/usb/uvc/uvc_status.c |  11 +-
 drivers/media/usb/uvc/uvc_v4l2.c   | 206 ++++++++++++++++++++++++++++++-------
 drivers/media/usb/uvc/uvcvideo.h   |   2 +
 6 files changed, 248 insertions(+), 49 deletions(-)
---
base-commit: 58540610e464d8b2ba46a11b81c3e6fcc4118fae
change-id: 20220920-resend-powersave-5981719ed267

Best regards,
-- 
Ricardo Ribalda <ribalda@chromium.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-10-27  8:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26 12:06 [PATCH v3 0/7] [RESEND] media: uvcvideo: Implement granular power management Ricardo Ribalda
2022-10-26 12:06 ` [PATCH v3 1/7] media: uvcvideo: Refactor streamon/streamoff Ricardo Ribalda
2022-10-26 12:06 ` [PATCH v3 2/7] media: uvcvideo: Do power management granularly Ricardo Ribalda
2022-10-26 12:06 ` [PATCH v3 3/7] media: uvcvideo: Only call status ep if hw supports it Ricardo Ribalda
2022-10-26 12:06 ` [PATCH v3 4/7] media: uvcvideo: Cancel async worker earlier Ricardo Ribalda
2022-10-26 12:06 ` [PATCH v3 5/7] media: uvcvideo: Release stream queue when unregistering video device Ricardo Ribalda
2022-10-26 12:06 ` [PATCH v3 6/7] media: uvcvideo: Lock video streams and queues while unregistering Ricardo Ribalda
2022-10-26 12:06 ` [PATCH v3 7/7] media: uvcvideo: Protect uvc queue file operations against disconnect Ricardo Ribalda
2022-10-27  8:45 ` [PATCH v3 0/7] [RESEND] media: uvcvideo: Implement granular power management Max Staudt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.