mbox series

[0/8] videobuf2: support new noncontiguous DMA API

Message ID 20210302004624.31294-1-senozhatsky@chromium.org (mailing list archive)
Headers show
Series videobuf2: support new noncontiguous DMA API | expand

Message

Sergey Senozhatsky March 2, 2021, 12:46 a.m. UTC
Hello,

	RFC

	The series adds support for new noncontiguous DMA API [0] and
adds V4L2_FLAG_MEMORY_NON_COHERENT UAPI. This is similar to previous
V4L2_FLAG_MEMORY_NON_CONSISTENT (which was renamed), but the patch set
goes a bit further this time and also does some videobuf2 API
refactroings along the way.

A corresponding v4l2-compliance patch will be posted shortly.

[0] https://lore.kernel.org/lkml/20210301085236.947011-2-hch@lst.de/

Sergey Senozhatsky (8):
  videobuf2: rework vb2_mem_ops API
  videobuf2: inverse buffer cache_hints flags
  videobuf2: split buffer cache_hints initialisation
  videobuf2: move cache_hints handling to allocators
  videobuf2: add V4L2_FLAG_MEMORY_NON_COHERENT flag
  videobuf2: add queue memory coherency parameter
  videobuf2: handle V4L2_FLAG_MEMORY_NON_COHERENT flag
  videobuf2: handle non-contiguous DMA allocations

 .../userspace-api/media/v4l/buffer.rst        |  40 +++-
 .../media/v4l/vidioc-create-bufs.rst          |   7 +-
 .../media/v4l/vidioc-reqbufs.rst              |  16 +-
 .../media/common/videobuf2/videobuf2-core.c   | 135 +++++++++-----
 .../common/videobuf2/videobuf2-dma-contig.c   | 175 ++++++++++++++----
 .../media/common/videobuf2/videobuf2-dma-sg.c |  39 ++--
 .../media/common/videobuf2/videobuf2-v4l2.c   |  47 ++---
 .../common/videobuf2/videobuf2-vmalloc.c      |  30 +--
 drivers/media/dvb-core/dvb_vb2.c              |   2 +-
 drivers/media/v4l2-core/v4l2-compat-ioctl32.c |   9 +-
 drivers/media/v4l2-core/v4l2-ioctl.c          |   5 +-
 include/media/videobuf2-core.h                |  57 +++---
 include/uapi/linux/videodev2.h                |  13 +-
 13 files changed, 396 insertions(+), 179 deletions(-)

Comments

Sergey Senozhatsky March 2, 2021, 12:50 a.m. UTC | #1
On (21/03/02 09:49), Sergey Senozhatsky wrote:
> This returns back non-coherent (previously known as NON_COHERENT)
							^^^
							NON_CONSISTENT...

> memory flag and buffer cache management hints testing (for VB2_MEMORY_MMAP
> buffers).
Tomasz Figa March 24, 2021, 12:09 p.m. UTC | #2
Hi Sergey,

On Tue, Mar 02, 2021 at 09:46:16AM +0900, Sergey Senozhatsky wrote:
> Hello,
> 
> 	RFC
> 
> 	The series adds support for new noncontiguous DMA API [0] and
> adds V4L2_FLAG_MEMORY_NON_COHERENT UAPI. This is similar to previous
> V4L2_FLAG_MEMORY_NON_CONSISTENT (which was renamed), but the patch set
> goes a bit further this time and also does some videobuf2 API
> refactroings along the way.
> 
> A corresponding v4l2-compliance patch will be posted shortly.
> 
> [0] https://lore.kernel.org/lkml/20210301085236.947011-2-hch@lst.de/
> 
> Sergey Senozhatsky (8):
>   videobuf2: rework vb2_mem_ops API
>   videobuf2: inverse buffer cache_hints flags
>   videobuf2: split buffer cache_hints initialisation
>   videobuf2: move cache_hints handling to allocators
>   videobuf2: add V4L2_FLAG_MEMORY_NON_COHERENT flag
>   videobuf2: add queue memory coherency parameter
>   videobuf2: handle V4L2_FLAG_MEMORY_NON_COHERENT flag
>   videobuf2: handle non-contiguous DMA allocations
> 
>  .../userspace-api/media/v4l/buffer.rst        |  40 +++-
>  .../media/v4l/vidioc-create-bufs.rst          |   7 +-
>  .../media/v4l/vidioc-reqbufs.rst              |  16 +-
>  .../media/common/videobuf2/videobuf2-core.c   | 135 +++++++++-----
>  .../common/videobuf2/videobuf2-dma-contig.c   | 175 ++++++++++++++----
>  .../media/common/videobuf2/videobuf2-dma-sg.c |  39 ++--
>  .../media/common/videobuf2/videobuf2-v4l2.c   |  47 ++---
>  .../common/videobuf2/videobuf2-vmalloc.c      |  30 +--
>  drivers/media/dvb-core/dvb_vb2.c              |   2 +-
>  drivers/media/v4l2-core/v4l2-compat-ioctl32.c |   9 +-
>  drivers/media/v4l2-core/v4l2-ioctl.c          |   5 +-
>  include/media/videobuf2-core.h                |  57 +++---
>  include/uapi/linux/videodev2.h                |  13 +-
>  13 files changed, 396 insertions(+), 179 deletions(-)
> 
> -- 
> 2.30.1.766.gb4fecdf3b7-goog
> 

Just some minor nits for patch 8. Otherwise, with Hans's comments
addressed:

Acked-by: Tomasz Figa <tfiga@chromium.org>

Thanks for the great job.

Best regards,
Tomasz