Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: media: move Memory Consistency Flags

The documentation of the Memory Consistency Flags was part of the struct
v4l2_buffer documentation, but that struct doesn't use those flags. Instead
it is used by VIDIOC_CREATE_BUFS and VIDIOC_REQBUFS. Move the documentation
from buffer.rst to vidioc-reqbufs.rst which is where it belongs.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

+25 -43
-35
Documentation/userspace-api/media/v4l/buffer.rst
··· 694 694 - 4 695 695 - The buffer is used for :ref:`DMA shared buffer <dmabuf>` I/O. 696 696 697 - .. _memory-flags: 698 - 699 - Memory Consistency Flags 700 - ------------------------ 701 - 702 - .. raw:: latex 703 - 704 - \small 705 - 706 - .. tabularcolumns:: |p{7.0cm}|p{2.1cm}|p{8.4cm}| 707 - 708 - .. cssclass:: longtable 709 - 710 - .. flat-table:: 711 - :header-rows: 0 712 - :stub-columns: 0 713 - :widths: 3 1 4 714 - 715 - * .. _`V4L2-MEMORY-FLAG-NON-COHERENT`: 716 - 717 - - ``V4L2_MEMORY_FLAG_NON_COHERENT`` 718 - - 0x00000001 719 - - A buffer is allocated either in coherent (it will be automatically 720 - coherent between the CPU and the bus) or non-coherent memory. The 721 - latter can provide performance gains, for instance the CPU cache 722 - sync/flush operations can be avoided if the buffer is accessed by the 723 - corresponding device only and the CPU does not read/write to/from that 724 - buffer. However, this requires extra care from the driver -- it must 725 - guarantee memory consistency by issuing a cache flush/sync when 726 - consistency is needed. If this flag is set V4L2 will attempt to 727 - allocate the buffer in non-coherent memory. The flag takes effect 728 - only if the buffer is used for :ref:`memory mapping <mmap>` I/O and the 729 - queue reports the :ref:`V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS 730 - <V4L2-BUF-CAP-SUPPORTS-MMAP-CACHE-HINTS>` capability. 731 - 732 697 .. raw:: latex 733 698 734 699 \normalsize
+25 -8
Documentation/userspace-api/media/v4l/vidioc-reqbufs.rst
··· 73 73 74 74 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}| 75 75 76 + .. cssclass:: longtable 77 + 76 78 .. flat-table:: struct v4l2_requestbuffers 77 79 :header-rows: 0 78 80 :stub-columns: 0 ··· 125 123 .. _V4L2-BUF-CAP-SUPPORTS-MAX-NUM-BUFFERS: 126 124 .. _V4L2-BUF-CAP-SUPPORTS-REMOVE-BUFS: 127 125 128 - .. raw:: latex 129 - 130 - \footnotesize 131 - 132 - .. tabularcolumns:: |p{8.1cm}|p{2.2cm}|p{7.0cm}| 133 - 134 - .. cssclass:: longtable 135 - 136 126 .. flat-table:: V4L2 Buffer Capabilities Flags 137 127 :header-rows: 0 138 128 :stub-columns: 0 ··· 167 173 * - ``V4L2_BUF_CAP_SUPPORTS_REMOVE_BUFS`` 168 174 - 0x00000100 169 175 - If set, then ``VIDIOC_REMOVE_BUFS`` is supported. 176 + 177 + .. _memory-flags: 178 + .. _V4L2-MEMORY-FLAG-NON-COHERENT: 179 + 180 + .. flat-table:: Memory Consistency Flags 181 + :header-rows: 0 182 + :stub-columns: 0 183 + :widths: 3 1 4 184 + 185 + * - ``V4L2_MEMORY_FLAG_NON_COHERENT`` 186 + - 0x00000001 187 + - A buffer is allocated either in coherent (it will be automatically 188 + coherent between the CPU and the bus) or non-coherent memory. The 189 + latter can provide performance gains, for instance the CPU cache 190 + sync/flush operations can be avoided if the buffer is accessed by the 191 + corresponding device only and the CPU does not read/write to/from that 192 + buffer. However, this requires extra care from the driver -- it must 193 + guarantee memory consistency by issuing a cache flush/sync when 194 + consistency is needed. If this flag is set V4L2 will attempt to 195 + allocate the buffer in non-coherent memory. The flag takes effect 196 + only if the buffer is used for :ref:`memory mapping <mmap>` I/O and the 197 + queue reports the :ref:`V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS 198 + <V4L2-BUF-CAP-SUPPORTS-MMAP-CACHE-HINTS>` capability. 170 199 171 200 .. raw:: latex 172 201