[PATCH 0/3] media: stk1160: allocate urb buffs with the DMA noncontiguous API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Replace urb buffers allocation to use the DMA
noncontiguous API. Similarly to a commit sent to uvc: [1]
This improves performance on Arm.

The series was tested on rock-pi4 (Arm64) and shows about 10x
improvements:

NON_CONTIGUOUS
uS/qty: 9231963/106048 sec: 9231.963472 avg: 87.054 min: 0.291 max: 216.423 (uS)
raw decode speed: 9.217 Gbits/s
bytes 9.971904900 G
bytes/urb: 100290

COHERENT
uS/qty: 92423219/98904 sec: 92423.219509 avg: 934.474 min: 0.583 max: 2196.583 (uS)
raw decode speed: 787.698 Mbits/s
bytes 8.510250828 G
bytes/urb: 92010

On x86 there is no significant difference:

NON_CONTIGUOUS
uS/qty: 3203891/50096 sec: 3203.891724 avg: 63.955 min: 0.141 max: 11696.636 (uS)
raw decode speed: 23.783 Gbits/s
bytes 8.932543668 G
bytes/urb: 190084

COHERENT
uS/qty: 3081680/50112 sec: 3081.680438 avg: 61.495 min: 0.160 max: 482.099 (uS)
raw decode speed: 21.557 Gbits/s
bytes 7.786260844 G
bytes/urb: 165677

[1] https://lkml.org/lkml/2021/3/12/1506


Dafna Hirschfeld (3):
  media: stk1160: fix number of buffers in case not all buffers are
    created
  media: stk1160: move transfer_buffer and urb to same struct
    'stk1160_urb'
  media: stk1160: use dma_alloc_noncontiguous API

 drivers/media/usb/stk1160/stk1160-v4l.c   |   5 +-
 drivers/media/usb/stk1160/stk1160-video.c | 137 +++++++++++-----------
 drivers/media/usb/stk1160/stk1160.h       |  21 +++-
 3 files changed, 91 insertions(+), 72 deletions(-)

-- 
2.17.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux