linux/drivers/usb/gadget/legacy
Michael Grzeschik e81e7f9a0e usb: gadget: uvc: add scatter gather support
This patch adds support for scatter gather transfers. If the underlying
gadgets sg_supported == true, then the videeobuf2-dma-sg is used and the
encode routine maps all scatter entries to separate scatterlists for the
usb gadget.

When streaming 1080p with request size of 1024 times 3 bytes top shows a
difference of about 6.4% CPU load applying this patch:

 PID USER      PR  NI    VIRT    RES  %CPU  %MEM     TIME+ S COMMAND

  64 root       0 -20    0.0m   0.0m   7.7   0.0   0:01.25 I [kworker/u5:0-uvcvideo]
  83 root       0 -20    0.0m   0.0m   4.5   0.0   0:03.71 I [kworker/u5:3-uvcvideo]
 307 root     -51   0    0.0m   0.0m   3.8   0.0   0:01.05 S [irq/51-dwc3]

vs.

  64 root       0 -20    0.0m   0.0m   5.8   0.0   0:01.79 I [kworker/u5:0-uvcvideo]
 306 root     -51   0    0.0m   0.0m   3.2   0.0   0:01.97 S [irq/51-dwc3]
  82 root       0 -20    0.0m   0.0m   0.6   0.0   0:01.86 I [kworker/u5:1-uvcvideo]

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20210628155311.16762-5-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27 15:59:19 +02:00
..
acm_ms.c USB: gadget: legacy: fix return error code in acm_ms_bind() 2020-12-28 15:45:50 +01:00
audio.c usb: gadget: audio: Fix a missing error return value in audio_bind() 2020-05-09 11:05:02 +03:00
cdc2.c usb: gadget: legacy: fix error return code in cdc_bind() 2020-05-09 11:05:08 +03:00
dbgp.c
ether.c USB: gadget: legacy: fix an error code in eth_bind() 2021-01-31 13:53:39 +01:00
g_ffs.c usb: gadget: legacy: set max_speed to super-speed 2020-01-15 10:39:21 +01:00
gmidi.c usb: gadget: legacy: gmidi: remove useless cast for driver.name 2020-02-19 11:10:24 +01:00
hid.c usb: gadget: hid: fix error return code in hid_bind() 2021-06-21 11:27:54 +02:00
inode.c usb: gadget: prevent a ternary sign expansion bug 2021-04-22 13:17:29 +02:00
Kconfig usb: gadget: uvc: add scatter gather support 2021-07-27 15:59:19 +02:00
Makefile usb: gadget: add raw-gadget interface 2020-03-15 11:34:48 +02:00
mass_storage.c usb: gadget: legacy: fix error return code of msg_bind() 2021-03-23 14:13:29 +01:00
multi.c USB: gadget: legacy: remove left-over __ref annotations 2021-03-23 12:57:10 +01:00
ncm.c usb: gadget: legacy: fix error return code in gncm_bind() 2020-05-09 11:05:08 +03:00
nokia.c usb: gadget: legacy: nokia: Remove unused static variable 'product_nokia' 2020-07-09 17:19:56 +02:00
printer.c usb: gadget: legacy: printer: Remove unused variable 'driver_desc' 2020-07-09 17:19:56 +02:00
raw_gadget.c usb: raw-gadget: add copyright 2021-01-26 18:38:45 +01:00
serial.c usb: gadget: legacy/serial: allow dynamic removal 2019-10-22 10:27:15 +03:00
tcm_usb_gadget.c usb: gadget: tcm: fix spelling mistake: "Manufactor" -> "Manufacturer" 2018-07-26 13:35:29 +03:00
webcam.c usb: webcam: Invalid size of Processing Unit Descriptor 2021-03-18 09:02:27 +01:00
zero.c USB: Fix up terminology 2020-07-01 14:04:04 +02:00