]> git.baikalelectronics.ru Git - kernel.git/commit
media: videobuf2: add V4L2_FLAG_MEMORY_NON_CONSISTENT flag
authorSergey Senozhatsky <senozhatsky@chromium.org>
Thu, 14 May 2020 16:01:43 +0000 (18:01 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 23 Jun 2020 11:28:17 +0000 (13:28 +0200)
commit587ef51ccb6e0edf5a1f280af09001dc1cf536cc
treeb7ecc13ff0ade9fd511d5f7a788237cb0f126a00
parent3969d6647976e4abc6a4fec9aede64328daba0bc
media: videobuf2: add V4L2_FLAG_MEMORY_NON_CONSISTENT flag

By setting or clearing V4L2_FLAG_MEMORY_NON_CONSISTENT flag
user-space should be able to set or clear queue's NON_CONSISTENT
->dma_attrs. Queue's ->dma_attrs are passed to the underlying
allocator in __vb2_buf_mem_alloc(), so thus user-space is able
to request vb2 buffer's memory to be either consistent (coherent)
or non-consistent.

The patch set also adds a corresponding capability flag:
fill_buf_caps() reports V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS
when queue supports user-space cache management hints. Note,
however, that MMAP_CACHE_HINTS capability only valid when the
queue is used for memory MMAP-ed streaming I/O.

Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Documentation/userspace-api/media/v4l/buffer.rst
Documentation/userspace-api/media/v4l/vidioc-reqbufs.rst
drivers/media/common/videobuf2/videobuf2-v4l2.c
include/uapi/linux/videodev2.h