History

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.

Sergey Senozhatsky committed 6 years ago

Commit ac535031 parent f5f5fa74 files · +53 −2Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/videodev2.h+3−0
@@ -189,6 +189,8 @@ enum v4l2_memory { · 188 unmodified lines
189189 V4L2_MEMORY_DMABUF = 4,
190190 };
191191
192+#define V4L2_FLAG_MEMORY_NON_CONSISTENT (1 << 0)
193+
192194 /* see also http://vektor.theorem.ca/graphics/ycbcr/ */
193195 enum v4l2_colorspace {
194196 /*
@@ -954,6 +956,7 @@ struct v4l2_requestbuffers { · 759 unmodified lines
954956 #define V4L2_BUF_CAP_SUPPORTS_REQUESTS (1 << 3)
955957 #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)
956958 #define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF (1 << 5)
959+#define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS (1 << 6)
957960
958961 /**
959962 * struct v4l2_plane - plane info for multi-planar buffers

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t