linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFT PATCH v3 0/6] Asynchronous UVC
@ 2018-01-12  9:19 Kieran Bingham
  2018-01-12  9:19 ` [RFT PATCH v3 1/6] uvcvideo: Refactor URB descriptors Kieran Bingham
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Kieran Bingham @ 2018-01-12  9:19 UTC (permalink / raw)
  To: linux-media, linux-kernel
  Cc: Guennadi Liakhovetski, Laurent Pinchart, Olivier BRAUN,
	Troy Kisky, Kieran Bingham

The Linux UVC driver has long provided adequate performance capabilities for
web-cams and low data rate video devices in Linux while resolutions were low.

Modern USB cameras are now capable of high data rates thanks to USB3 with
1080p, and even 4k capture resolutions supported.

Cameras such as the Stereolabs ZED (bulk transfers) or the Logitech BRIO
(isochronous transfers) can generate more data than an embedded ARM core is
able to process on a single core, resulting in frame loss.

A large part of this performance impact is from the requirement to
‘memcpy’ frames out from URB packets to destination frames. This unfortunate
requirement is due to the UVC protocol allowing a variable length header, and
thus it is not possible to provide the target frame buffers directly.

Extra throughput is possible by moving the actual memcpy actions to a work
queue, and moving the memcpy out of interrupt context thus allowing work tasks
to be scheduled across multiple cores.

This series has been tested on both the ZED and BRIO cameras on arm64
platforms, however due to the intrinsic changes in the driver I would like to
see it tested with other devices and other platforms, so I'd appreciate if
anyone can test this on a range of USB cameras.

In particular, any iSight devices, or devices which use UVC to encode data
(output device) would certainly be great to be tested with these patches.

v2:
 - Fix race reported by Guennadi

v3:
 - Fix similar race reported by Laurent
 - Only queue work if required (encode/isight do not queue work)
 - Refactor/Rename variables for clarity

Kieran Bingham (6):
  uvcvideo: Refactor URB descriptors
  uvcvideo: Convert decode functions to use new context structure
  uvcvideo: Protect queue internals with helper
  uvcvideo: queue: Simplify spin-lock usage
  uvcvideo: queue: Support asynchronous buffer handling
  uvcvideo: Move decode processing to process context

 drivers/media/usb/uvc/uvc_isight.c |   4 +-
 drivers/media/usb/uvc/uvc_queue.c  | 114 +++++++++++++----
 drivers/media/usb/uvc/uvc_video.c  | 198 ++++++++++++++++++++++--------
 drivers/media/usb/uvc/uvcvideo.h   |  56 +++++++-
 4 files changed, 296 insertions(+), 76 deletions(-)

base-commit: 6f0e5fd39143a59c22d60e7befc4f33f22aeed2f
-- 
git-series 0.9.1

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

end of thread, other threads:[~2018-11-06 15:08 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-12  9:19 [RFT PATCH v3 0/6] Asynchronous UVC Kieran Bingham
2018-01-12  9:19 ` [RFT PATCH v3 1/6] uvcvideo: Refactor URB descriptors Kieran Bingham
2018-01-12  9:19 ` [RFT PATCH v3 4/6] uvcvideo: queue: Simplify spin-lock usage Kieran Bingham
2018-01-16 17:23   ` Laurent Pinchart
2018-01-17  9:44     ` Philipp Zabel
2018-01-12  9:19 ` [RFT PATCH v3 3/6] uvcvideo: Protect queue internals with helper Kieran Bingham
2018-01-12  9:19 ` [RFT PATCH v3 5/6] uvcvideo: queue: Support asynchronous buffer handling Kieran Bingham
2018-01-16 23:45   ` Laurent Pinchart
2018-07-30 20:39     ` Laurent Pinchart
2018-11-06 15:07       ` Kieran Bingham
2018-01-12  9:19 ` [RFT PATCH v3 2/6] uvcvideo: Convert decode functions to use new context structure Kieran Bingham
2018-01-12  9:19 ` [RFT PATCH v3 6/6] uvcvideo: Move decode processing to process context Kieran Bingham
2018-01-12  9:37   ` Guennadi Liakhovetski
2018-01-13  7:32     ` Kieran Bingham
2018-01-16 23:57   ` Laurent Pinchart
2018-01-15 19:35 ` [RFT PATCH v3 0/6] Asynchronous UVC Philipp Zabel
2018-01-16 14:55   ` Kieran Bingham
2018-01-18  4:59 ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).