linux_dsm_epyc7002/drivers/media/usb
Matwey V. Kornilov 1161db6776 media: usb: pwc: Don't use coherent DMA buffers for ISO transfer
DMA cocherency slows the transfer down on systems without hardware
coherent DMA.
Instead we use noncocherent DMA memory and explicit sync at data receive
handler.

Based on previous commit the following performance benchmarks have been
carried out. Average memcpy() data transfer rate (rate) and handler
completion time (time) have been measured when running video stream at
640x480 resolution at 10fps.

x86_64 based system (Intel Core i5-3470). This platform has hardware
coherent DMA support and proposed change doesn't make big difference here.

 * kmalloc:            rate = (2.0 +- 0.4) GBps
                       time = (5.0 +- 3.0) usec
 * usb_alloc_coherent: rate = (3.4 +- 1.2) GBps
                       time = (3.5 +- 3.0) usec

We see that the measurements agree within error ranges in this case.
So theoretically predicted performance downgrade cannot be reliably
measured here.

armv7l based system (TI AM335x BeagleBone Black @ 300MHz). This platform
has no hardware coherent DMA support. DMA coherence is implemented via
disabled page caching that slows down memcpy() due to memory controller
behaviour.

 * kmalloc:            rate =  ( 94 +- 4) MBps
                       time =  (101 +- 4) usec
 * usb_alloc_coherent: rate = (28.1 +- 0.1) MBps
                       time =  (341 +- 2) usec

Note, that quantative difference leads (this commit leads to 3.3 times
acceleration) to qualitative behavior change in this case. As it was
stated before, the video stream cannot be successfully received at AM335x
platforms with MUSB based USB host controller due to performance issues
[1].

[1] https://www.spinics.net/lists/linux-usb/msg165735.html

Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-01-16 11:16:06 -05:00
..
airspy media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
as102 media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
au0828 media: vidioc_cropcap -> vidioc_g_pixelaspect 2018-11-20 13:57:21 -05:00
b2c2 media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
cpia2 media: cropcap/g_selection split 2018-11-20 13:37:18 -05:00
cx231xx media: vidioc_cropcap -> vidioc_g_pixelaspect 2018-11-20 13:57:21 -05:00
dvb-usb media: usb: dvb-usb: remove old friio driver 2018-12-05 03:25:41 -05:00
dvb-usb-v2 media: lmedm04: Move interrupt buffer to priv buffer. 2018-12-07 08:12:28 -05:00
em28xx media: em28xx: fix spelling mistake, "Cinnergy" -> "Cinergy" 2018-12-03 14:25:53 -05:00
go7007 media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
gspca media: gspca: fix frame overflow error 2018-11-22 13:44:38 -05:00
hackrf media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
hdpvr media: replace strcpy() by strscpy() 2018-09-11 13:32:17 -04:00
msi2500 media updates for v4.20-rc1 2018-10-31 10:53:29 -07:00
pulse8-cec media: pulse8-cec: return 0 when invalidating the logical address 2018-11-23 05:49:11 -05:00
pvrusb2 media: pvrusb2: fix spelling mistake "statuss" -> "status" 2018-12-07 08:19:19 -05:00
pwc media: usb: pwc: Don't use coherent DMA buffers for ISO transfer 2019-01-16 11:16:06 -05:00
rainshadow-cec media: replace strcpy() by strscpy() 2018-09-11 13:32:17 -04:00
s2255 media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
siano media: siano: Use kmemdup instead of duplicating its function 2018-12-07 09:42:18 -05:00
stk1160 media: replace strcpy() by strscpy() 2018-09-11 13:32:17 -04:00
stkwebcam media: stkwebcam: Bugfix for wrong return values 2018-12-05 14:10:48 -05:00
tm6000 media updates for v4.20-rc1 2018-10-31 10:53:29 -07:00
ttusb-budget media: replace strcpy() by strscpy() 2018-09-11 13:32:17 -04:00
ttusb-dec media: dvb: represent min/max/step/tolerance freqs in Hz 2018-08-02 18:10:48 -04:00
usbtv media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
usbvision media: usbvision: remove time_in_irq 2018-09-12 08:02:25 -04:00
uvc media: uvcvideo: Utilise for_each_uvc_urb iterator 2018-12-05 03:18:46 -05:00
zr364xx media: replace strcpy() by strscpy() 2018-09-11 13:32:17 -04:00
Kconfig [media] rainshadow-cec: new RainShadow Tech HDMI CEC driver 2017-04-10 12:42:10 -03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00