Skip to content

stk1160: allocate urb buffs with the DMA noncontiguous API

Dafna Hirschfeld linux-media 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 4 repliesIn review
  2. v13 patches 12 repliesSuperseded

Changes in v2 from the cover letter

1. reduce line length to be not too longer than 80 char
2. reformulate commit log of patch 4/4 and add measurements results
3. in patch 4, invalidate the vmap range before the direct mapping range.
4. test regressions for patches 1-3 (not including patch 4) and improve vars names
5. patch 2 is a new bug fix I found
6. patch 1 is extended to fix two cases of not allocating all intended urb buffers.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4media: stk1160: fix number of buffers in case not all buffers are createddrivers/media/usb/stk1160/stk1160-video.c+3 -31 reply
2/4media: stk1160: If start stream fails, return buffers with VB2_BUF_STATE_QUEUEDdrivers/media/usb/stk1160/stk1160-core.c drivers/media/usb/stk1160/stk1160-v4l.c drivers/media/usb/stk1160/stk1160.h+7 -71 reply
3/4media: stk1160: move transfer_buffer and urb to same struct 'stk1160_urb'drivers/media/usb/stk1160/stk1160-v4l.c drivers/media/usb/stk1160/stk1160-video.c drivers/media/usb/stk1160/stk1160.h+25 -401 reply
4/4media: stk1160: use dma_alloc_noncontiguous APIdrivers/media/usb/stk1160/stk1160-v4l.c drivers/media/usb/stk1160/stk1160-video.c drivers/media/usb/stk1160/stk1160.h+84 -441 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchEzequiel Garcia
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] stk1160: allocate urb buffs with the DMA noncontiguous API

This set replaces urb buffers allocation to use the DMA noncontiguous API. Similarly to a commit sent to uvc: [1] This improves performance on ARM while not damaging performance on other platforms. The cpu performance on ARM
improves because the new API does not cause the cache disable on ARM while the coherent API do.
Measurements are shown in patch 4/4

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

Patches Summary:
* patches 1+2 are bug fixes.
* patch 3 changes the way data is stored. This is a preparation to patch 4.
* patch 4 is the change of API to use the noncontiguougs.

Changes since v1:
1. reduce line length to be not too longer than 80 char
2. reformulate commit log of patch 4/4 and add measurements results
3. in patch 4, invalidate the vmap range before the direct mapping range.
4. test regressions for patches 1-3 (not including patch 4) and improve vars names
5. patch 2 is a new bug fix I found
6. patch 1 is extended to fix two cases of not allocating all intended urb buffers.

Dafna Hirschfeld (4):
media: stk1160: fix number of buffers in case not all buffers are
created
media: stk1160: If start stream fails, return buffers with
VB2_BUF_STATE_QUEUED
media: stk1160: move transfer_buffer and urb to same struct

    'stk1160_urb'

media: stk1160: use dma_alloc_noncontiguous API

 drivers/media/usb/stk1160/stk1160-core.c  |   2 +-
 drivers/media/usb/stk1160/stk1160-v4l.c   |  16 ++-
 drivers/media/usb/stk1160/stk1160-video.c | 142 ++++++++++++----------
 drivers/media/usb/stk1160/stk1160.h       |  23 +++-
 4 files changed, 104 insertions(+), 79 deletions(-)
Signature · 1 line
2.17.1