public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/2] media: uvcvideo: Implement granular power management
@ 2022-12-06 14:06 Ricardo Ribalda
  2022-12-06 14:06 ` [PATCH v5 1/2] media: uvcvideo: Refactor streamon/streamoff Ricardo Ribalda
  2022-12-06 14:06 ` [PATCH v5 2/2] media: uvcvideo: Do power management granularly Ricardo Ribalda
  0 siblings, 2 replies; 8+ messages in thread
From: Ricardo Ribalda @ 2022-12-06 14:06 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Guenter Roeck, Tomasz Figa, Alan Stern, linux-kernel, Max Staudt,
	Sergey Senozhatsky, Yunke Cao, Ricardo Ribalda, Laurent Pinchart,
	Hans Verkuil, 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.

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>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Yunke Cao <yunkec@chromium.org>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
Changes in v5:
- Improve uvc_fd padding (Thanks Sergey)
- Take the mutex always in the same order.
- Link to v4: https://lore.kernel.org/r/20220920-resend-powersave-v4-0-47484ae40761@chromium.org

Changes in v4:
- Remove patches to avoid crashes during device removal
- Link to v3: https://lore.kernel.org/r/20220920-resend-powersave-v3-0-c47856d8757e@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

---
Ricardo Ribalda (2):
      media: uvcvideo: Refactor streamon/streamoff
      media: uvcvideo: Do power management granularly

 drivers/media/usb/uvc/uvc_v4l2.c | 217 +++++++++++++++++++++++++++++++--------
 drivers/media/usb/uvc/uvcvideo.h |   1 +
 2 files changed, 178 insertions(+), 40 deletions(-)
---
base-commit: f599c56de2bfcf5ff791b0f4155e997e08e364f0
change-id: 20220920-resend-powersave-5981719ed267

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

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

end of thread, other threads:[~2022-12-27 23:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06 14:06 [PATCH v5 0/2] media: uvcvideo: Implement granular power management Ricardo Ribalda
2022-12-06 14:06 ` [PATCH v5 1/2] media: uvcvideo: Refactor streamon/streamoff Ricardo Ribalda
2022-12-12  1:15   ` Sergey Senozhatsky
2022-12-27 14:49   ` Laurent Pinchart
2022-12-06 14:06 ` [PATCH v5 2/2] media: uvcvideo: Do power management granularly Ricardo Ribalda
2022-12-12  2:59   ` Sergey Senozhatsky
2022-12-27 23:34   ` Laurent Pinchart
2022-12-27 23:48     ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox