}sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget:/translations/zh_CN/userspace-api/media/v4l/vidioc-reqbufsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget:/translations/zh_TW/userspace-api/media/v4l/vidioc-reqbufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget:/translations/it_IT/userspace-api/media/v4l/vidioc-reqbufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget:/translations/ja_JP/userspace-api/media/v4l/vidioc-reqbufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget:/translations/ko_KR/userspace-api/media/v4l/vidioc-reqbufsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget:/translations/sp_SP/userspace-api/media/v4l/vidioc-reqbufsmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhT/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/vidioc-reqbufs.rsthKubhtarget)}(h.. _VIDIOC_REQBUFS:h]h}(h]h ]h"]h$]h&]refidvidioc-reqbufsuh1hhKhhhhhhubhsection)}(hhh](htitle)}(hioctl VIDIOC_REQBUFSh]hioctl VIDIOC_REQBUFS}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(hLVIDIOC_REQBUFS - Initiate Memory Mapping, User Pointer I/O or DMA buffer I/Oh]hLVIDIOC_REQBUFS - Initiate Memory Mapping, User Pointer I/O or DMA buffer I/O}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubeh}(h]nameah ]h"]nameah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSynopsish]hSynopsis}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleV4L.VIDIOC_REQBUFS (C macro)c.V4L.VIDIOC_REQBUFShNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hVIDIOC_REQBUFSh]hdesc_signature_line)}(hVIDIOC_REQBUFSh]h desc_name)}(hVIDIOC_REQBUFSh]h desc_sig_name)}(hj+h]hVIDIOC_REQBUFS}(hj;hhhNhNubah}(h]h ]nah"]h$]h&]uh1j9hj5ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j3hj/hhhhhKubah}(h]h ]h"]h$]h&]hh add_permalinkuh1j-sphinx_line_type declaratorhj)hhhhhKubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j'hhhKhj$hhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jehj$hhhhhKubeh}(h]h ](cmacroeh"]h$]h&]domainjsobjtypejtdesctypejtnoindex noindexentrynocontentsentryuh1j"hhhjhNhNubh)}(hG``int ioctl(int fd, VIDIOC_REQBUFS, struct v4l2_requestbuffers *argp)``h]hliteral)}(hjh]hCint ioctl(int fd, VIDIOC_REQBUFS, struct v4l2_requestbuffers *argp)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Argumentsh]h Arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(h5``fd`` File descriptor returned by :c:func:`open()`. h](hterm)}(h``fd``h]j)}(hjh]hfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]h)}(h-File descriptor returned by :c:func:`open()`.h](hFile descriptor returned by }(hjhhhNhNubh)}(h:c:func:`open()`h]j)}(hjh]hopen()}(hjhhhNhNubah}(h]h ](xrefjsc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc&userspace-api/media/v4l/vidioc-reqbufs refdomainjsreftypefunc refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)} identifierV4LsbNasb reftargetopenuh1hhhhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(h:``argp`` Pointer to struct :c:type:`v4l2_requestbuffers`. h](j)}(h``argp``h]j)}(hj.h]hargp}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jhhhKhj(ubj)}(hhh]h)}(h0Pointer to struct :c:type:`v4l2_requestbuffers`.h](hPointer to struct }(hjFhhhNhNubh)}(h:c:type:`v4l2_requestbuffers`h]j)}(hjPh]hv4l2_requestbuffers}(hjRhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjv4l2_requestbuffersuh1hhhhKhjFubh.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjCubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h] argumentsah ]h"] argumentsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK ubh)}(hX{This ioctl is used to initiate :ref:`memory mapped `, :ref:`user pointer ` or :ref:`DMABUF ` based I/O. Memory mapped buffers are located in device memory and must be allocated with this ioctl before they can be mapped into the application's address space. User buffers are allocated by applications themselves, and this ioctl is merely used to switch the driver into user pointer I/O mode and to setup some internal structures. Similarly, DMABUF buffers are allocated by applications through a device driver, and this ioctl only configures the driver into DMABUF I/O mode without performing any direct allocation.h](hThis ioctl is used to initiate }(hjhhhNhNubh)}(h:ref:`memory mapped `h]hinline)}(hjh]h memory mapped}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjmmapuh1hhhhK"hjubh, }(hjhhhNhNubh)}(h:ref:`user pointer `h]j)}(hjh]h user pointer}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjuserpuh1hhhhK"hjubh or }(hjhhhNhNubh)}(h:ref:`DMABUF `h]j)}(hjh]hDMABUF}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjdmabufuh1hhhhK"hjubhX  based I/O. Memory mapped buffers are located in device memory and must be allocated with this ioctl before they can be mapped into the application’s address space. User buffers are allocated by applications themselves, and this ioctl is merely used to switch the driver into user pointer I/O mode and to setup some internal structures. Similarly, DMABUF buffers are allocated by applications through a device driver, and this ioctl only configures the driver into DMABUF I/O mode without performing any direct allocation.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK"hjhhubh)}(hX5To allocate device buffers applications initialize all fields of the struct :c:type:`v4l2_requestbuffers` structure. They set the ``type`` field to the respective stream or buffer type, the ``count`` field to the desired number of buffers, ``memory`` must be set to the requested I/O method and the ``reserved`` array must be zeroed. When the ioctl is called with a pointer to this structure the driver will attempt to allocate the requested number of buffers and it stores the actual number allocated in the ``count`` field. It can be smaller than the number requested, even zero, when the driver runs out of free memory. A larger number is also possible when the driver requires more buffers to function correctly. For example video output requires at least two buffers, one displayed and one filled by the application.h](hLTo allocate device buffers applications initialize all fields of the struct }(hjhhhNhNubh)}(h:c:type:`v4l2_requestbuffers`h]j)}(hj(h]hv4l2_requestbuffers}(hj*hhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjjv4l2_requestbuffersuh1hhhhK-hjubh structure. They set the }(hjhhhNhNubj)}(h``type``h]htype}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh4 field to the respective stream or buffer type, the }(hjhhhNhNubj)}(h ``count``h]hcount}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) field to the desired number of buffers, }(hjhhhNhNubj)}(h ``memory``h]hmemory}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh1 must be set to the requested I/O method and the }(hjhhhNhNubj)}(h ``reserved``h]hreserved}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh array must be zeroed. When the ioctl is called with a pointer to this structure the driver will attempt to allocate the requested number of buffers and it stores the actual number allocated in the }(hjhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX/ field. It can be smaller than the number requested, even zero, when the driver runs out of free memory. A larger number is also possible when the driver requires more buffers to function correctly. For example video output requires at least two buffers, one displayed and one filled by the application.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK-hjhhubh)}(hPWhen the I/O method is not supported the ioctl returns an ``EINVAL`` error code.h](h:When the I/O method is not supported the ioctl returns an }(hjhhhNhNubj)}(h ``EINVAL``h]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh error code.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubh)}(hXApplications can call :ref:`VIDIOC_REQBUFS` again to change the number of buffers. Note that if any buffers are still mapped or exported via DMABUF, then :ref:`VIDIOC_REQBUFS` can only succeed if the ``V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS`` capability is set. Otherwise :ref:`VIDIOC_REQBUFS` will return the ``EBUSY`` error code. If ``V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS`` is set, then these buffers are orphaned and will be freed when they are unmapped or when the exported DMABUF fds are closed. A ``count`` value of zero frees or orphans all buffers, after aborting or finishing any DMA in progress, an implicit :ref:`VIDIOC_STREAMOFF `.h](hApplications can call }(hjhhhNhNubh)}(h:ref:`VIDIOC_REQBUFS`h]j)}(hjh]hVIDIOC_REQBUFS}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjvidioc_reqbufsuh1hhhhK=hjubho again to change the number of buffers. Note that if any buffers are still mapped or exported via DMABUF, then }(hjhhhNhNubh)}(h:ref:`VIDIOC_REQBUFS`h]j)}(hjh]hVIDIOC_REQBUFS}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjvidioc_reqbufsuh1hhhhK=hjubh can only succeed if the }(hjhhhNhNubj)}(h'``V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS``h]h#V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh capability is set. Otherwise }(hjhhhNhNubh)}(h:ref:`VIDIOC_REQBUFS`h]j)}(hj-h]hVIDIOC_REQBUFS}(hj/hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]refdocj refdomainj9reftyperef refexplicitrefwarnjvidioc_reqbufsuh1hhhhK=hjubh will return the }(hjhhhNhNubj)}(h ``EBUSY``h]hEBUSY}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh error code. If }(hjhhhNhNubj)}(h'``V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS``h]h#V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is set, then these buffers are orphaned and will be freed when they are unmapped or when the exported DMABUF fds are closed. A }(hjhhhNhNubj)}(h ``count``h]hcount}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhj value of zero frees or orphans all buffers, after aborting or finishing any DMA in progress, an implicit }(hjhhhNhNubh)}(h):ref:`VIDIOC_STREAMOFF `h]j)}(hjh]hVIDIOC_STREAMOFF}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjvidioc_streamonuh1hhhhK=hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK=hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j V4L.v4l2_requestbuffers (C type)c.V4L.v4l2_requestbuffershNtauh1jhjhhhNhNubj#)}(hhh](j()}(hv4l2_requestbuffersh]j.)}(htype v4l2_requestbuffersh](hdesc_sig_keyword)}(htypeh]htype}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhhhhKHubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhhhKHubj4)}(hv4l2_requestbuffersh]j:)}(hjh]hv4l2_requestbuffers}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j9hjubah}(h]h ](jLjMeh"]h$]h&]hhuh1j3hjhhhhhKHubeh}(h]h ]h"]h$]h&]hhjWuh1j-jXjYhjhhhhhKHubah}(h]jah ](j]j^eh"]h$]h&]jbjc)jdhuh1j'hhhKHhjhhubjf)}(hhh]h}(h]h ]h"]h$]h&]uh1jehjhhhhhKHubeh}(h]h ](jstypeeh"]h$]h&]jxjsjyjjzjj{j|j}uh1j"hhhjhNhNubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{4.4cm}|p{4.4cm}|p{8.5cm}|uh1jhhhKJhjhhubhtable)}(hhh](h)}(hstruct v4l2_requestbuffersh]hstruct v4l2_requestbuffers}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhj,ubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jBhj?ubjC)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jBhj?ubjC)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jBhj?ubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h__u32h]h__u32}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShjnubah}(h]h ]h"]h$]h&]uh1jlhjiubjm)}(hhh]h)}(h ``count``h]j)}(hjh]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKThjubah}(h]h ]h"]h$]h&]uh1jlhjiubjm)}(hhh]h)}(h+The number of buffers requested or granted.h]h+The number of buffers requested or granted.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjubah}(h]h ]h"]h$]h&]uh1jlhjiubeh}(h]h ]h"]h$]h&]uh1jghjdubjh)}(hhh](jm)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjubah}(h]h ]h"]h$]h&]uh1jlhjubjm)}(hhh]h)}(h``type``h]j)}(hjh]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKWhjubah}(h]h ]h"]h$]h&]uh1jlhjubjm)}(hhh]h)}(hType of the stream or buffers, this is the same as the struct :c:type:`v4l2_format` ``type`` field. See :c:type:`v4l2_buf_type` for valid values.h](h>Type of the stream or buffers, this is the same as the struct }(hjhhhNhNubh)}(h:c:type:`v4l2_format`h]j)}(hj h]h v4l2_format}(hj hhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_formatuh1hhhhKXhjubh }(hjhhhNhNubj)}(h``type``h]htype}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field. See }(hjhhhNhNubh)}(h:c:type:`v4l2_buf_type`h]j)}(hj>h]h v4l2_buf_type}(hj@hhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_buf_typeuh1hhhhKXhjubh for valid values.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKXhjubah}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jghjdubjh)}(hhh](jm)}(hhh]h)}(h__u32h]h__u32}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hjtubah}(h]h ]h"]h$]h&]uh1jlhjqubjm)}(hhh]h)}(h ``memory``h]j)}(hjh]hmemory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK\hjubah}(h]h ]h"]h$]h&]uh1jlhjqubjm)}(hhh]h)}(hApplications set this field to ``V4L2_MEMORY_MMAP``, ``V4L2_MEMORY_DMABUF`` or ``V4L2_MEMORY_USERPTR``. See :c:type:`v4l2_memory`.h](hApplications set this field to }(hjhhhNhNubj)}(h``V4L2_MEMORY_MMAP``h]hV4L2_MEMORY_MMAP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``V4L2_MEMORY_DMABUF``h]hV4L2_MEMORY_DMABUF}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or }(hjhhhNhNubj)}(h``V4L2_MEMORY_USERPTR``h]hV4L2_MEMORY_USERPTR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. See }(hjhhhNhNubh)}(h:c:type:`v4l2_memory`h]j)}(hjh]h v4l2_memory}(hjhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_memoryuh1hhhhK]hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK]hjubah}(h]h ]h"]h$]h&]uh1jlhjqubeh}(h]h ]h"]h$]h&]uh1jghjdubjh)}(hhh](jm)}(hhh]h)}(h__u32h]h__u32}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hj$ubah}(h]h ]h"]h$]h&]uh1jlhj!ubjm)}(hhh]h)}(h``capabilities``h]j)}(hj@h]h capabilities}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1hhhhKahj;ubah}(h]h ]h"]h$]h&]uh1jlhj!ubjm)}(hhh](h)}(hXSet by the driver. If 0, then the driver doesn't support capabilities. In that case all you know is that the driver is guaranteed to support ``V4L2_MEMORY_MMAP`` and *might* support other :c:type:`v4l2_memory` types. It will not support any other capabilities.h](hSet by the driver. If 0, then the driver doesn’t support capabilities. In that case all you know is that the driver is guaranteed to support }(hj^hhhNhNubj)}(h``V4L2_MEMORY_MMAP``h]hV4L2_MEMORY_MMAP}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubh and }(hj^hhhNhNubhemphasis)}(h*might*h]hmight}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jxhj^ubh support other }(hj^hhhNhNubh)}(h:c:type:`v4l2_memory`h]j)}(hjh]h v4l2_memory}(hjhhhNhNubah}(h]h ](jjsc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjsreftypetype refexplicitrefwarnjjj v4l2_memoryuh1hhhhKbhj^ubh3 types. It will not support any other capabilities.}(hj^hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKbhj[ubh)}(hXEIf you want to query the capabilities with a minimum of side-effects, then this can be called with ``count`` set to 0, ``memory`` set to ``V4L2_MEMORY_MMAP`` and ``type`` set to the buffer type. This will free any previously allocated buffers, so this is typically something that will be done at the start of the application.h](hcIf you want to query the capabilities with a minimum of side-effects, then this can be called with }(hjhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh set to 0, }(hjhhhNhNubj)}(h ``memory``h]hmemory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh set to }(hjhhhNhNubj)}(h``V4L2_MEMORY_MMAP``h]hV4L2_MEMORY_MMAP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``type``h]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh set to the buffer type. This will free any previously allocated buffers, so this is typically something that will be done at the start of the application.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhj[ubeh}(h]h ]h"]h$]h&]uh1jlhj!ubeh}(h]h ]h"]h$]h&]uh1jghjdubjh)}(hhh](jm)}(hhh]h)}(h__u8h]h__u8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjubah}(h]h ]h"]h$]h&]uh1jlhjubjm)}(hhh]h)}(h ``flags``h]j)}(hj6h]hflags}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1hhhhKnhj1ubah}(h]h ]h"]h$]h&]uh1jlhjubjm)}(hhh]h)}(hKSpecifies additional buffer management attributes. See :ref:`memory-flags`.h](h7Specifies additional buffer management attributes. See }(hjThhhNhNubh)}(h:ref:`memory-flags`h]j)}(hj^h]h memory-flags}(hj`hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]refdocj refdomainjjreftyperef refexplicitrefwarnj memory-flagsuh1hhhhKohjTubh.}(hjThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKohjQubah}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jghjdubjh)}(hhh](jm)}(hhh]h)}(h__u8h]h__u8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjubah}(h]h ]h"]h$]h&]uh1jlhjubjm)}(hhh]h)}(h``reserved``\ [3]h](j)}(h ``reserved``h]hreserved}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh [3]}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKrhjubah}(h]h ]h"]h$]h&]uh1jlhjubjm)}(hhh]h)}(hReserved for future extensions.h]hReserved for future extensions.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjubah}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jghjdubeh}(h]h ]h"]h$]h&]uh1jbhj?ubeh}(h]h ]h"]h$]h&]colsKuh1j=hj,ubeh}(h]id1ah ] longtableah"]h$]h&]uh1j*hjhhhNhNubh)}(h.. _v4l2-buf-capabilities:h]h}(h]h ]h"]h$]h&]hv4l2-buf-capabilitiesuh1hhKuhjhhhhubh)}(h.. _V4L2-BUF-CAP-SUPPORTS-MMAP:h]h}(h]h ]h"]h$]h&]hv4l2-buf-cap-supports-mmapuh1hhKvhjhhhhexpect_referenced_by_name}v4l2-buf-capabilitiesj sexpect_referenced_by_id}j j subh)}(h".. _V4L2-BUF-CAP-SUPPORTS-USERPTR:h]h}(h]h ]h"]h$]h&]hv4l2-buf-cap-supports-userptruh1hhKwhjhhhhj }(v4l2-buf-cap-supports-mmapj j j uj }(j j j j uubh)}(h!.. _V4L2-BUF-CAP-SUPPORTS-DMABUF:h]h}(h]h ]h"]h$]h&]hv4l2-buf-cap-supports-dmabufuh1hhKxhjhhhhj }(v4l2-buf-cap-supports-userptrj j* j j j uj }(j( j j j j j uubh)}(h#.. _V4L2-BUF-CAP-SUPPORTS-REQUESTS:h]h}(h]h ]h"]h$]h&]hv4l2-buf-cap-supports-requestsuh1hhKyhjhhhhj }(v4l2-buf-cap-supports-dmabufj, j8 j j* j j j uj }(j6 j, j( j j j j j uubh)}(h(.. _V4L2-BUF-CAP-SUPPORTS-ORPHANED-BUFS:h]h}(h]h ]h"]h$]h&]h#v4l2-buf-cap-supports-orphaned-bufsuh1hhKzhjhhhhj }(v4l2-buf-cap-supports-requestsj: jF j, j8 j j* j j j uj }(jD j: j6 j, j( j j j j j uubh)}(h/.. _V4L2-BUF-CAP-SUPPORTS-M2M-HOLD-CAPTURE-BUF:h]h}(h]h ]h"]h$]h&]h*v4l2-buf-cap-supports-m2m-hold-capture-bufuh1hhK{hjhhhhj }(#v4l2-buf-cap-supports-orphaned-bufsjH jT j: jF j, j8 j j* j j j uj }(jR jH jD j: j6 j, j( j j j j j uubh)}(h+.. _V4L2-BUF-CAP-SUPPORTS-MMAP-CACHE-HINTS:h]h}(h]h ]h"]h$]h&]h&v4l2-buf-cap-supports-mmap-cache-hintsuh1hhK|hjhhhhj }(*v4l2-buf-cap-supports-m2m-hold-capture-bufjV jb jH jT j: jF j, j8 j j* j j j uj }(j` jV jR jH jD j: j6 j, j( j j j j j uubh)}(h*.. _V4L2-BUF-CAP-SUPPORTS-MAX-NUM-BUFFERS:h]h}(h]h ]h"]h$]h&]h%v4l2-buf-cap-supports-max-num-buffersuh1hhK}hjhhhhj }(&v4l2-buf-cap-supports-mmap-cache-hintsjd jp jV jb jH jT j: jF j, j8 j j* j j j uj }(jn jd j` jV jR jH jD j: j6 j, j( j j j j j uubh)}(h&.. _V4L2-BUF-CAP-SUPPORTS-REMOVE-BUFS:h]h}(h]h ]h"]h$]h&]h!v4l2-buf-cap-supports-remove-bufsuh1hhK~hjhhhhj }(%v4l2-buf-cap-supports-max-num-buffersjr j~ jd jp jV jb jH jT j: jF j, j8 j j* j j j uj }(j| jr jn jd j` jV jR jH jD j: j6 j, j( j j j j j uubj+)}(hhh](h)}(hV4L2 Buffer Capabilities Flagsh]hV4L2 Buffer Capabilities Flags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubj>)}(hhh](jC)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jBhj ubjC)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jBhj ubjC)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jBhj ubjc)}(hhh](jh)}(hhh](jm)}(hhh]h)}(h``V4L2_BUF_CAP_SUPPORTS_MMAP``h]j)}(hj h]hV4L2_BUF_CAP_SUPPORTS_MMAP}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj ubjm)}(hhh]h)}(h 0x00000001h]h 0x00000001}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj ubjm)}(hhh]h)}(hBThis buffer type supports the ``V4L2_MEMORY_MMAP`` streaming mode.h](hThis buffer type supports the }(hj hhhNhNubj)}(h``V4L2_MEMORY_MMAP``h]hV4L2_MEMORY_MMAP}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh streaming mode.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj ubeh}(h]h ]h"]h$]h&]uh1jghj ubjh)}(hhh](jm)}(hhh]h)}(h!``V4L2_BUF_CAP_SUPPORTS_USERPTR``h]j)}(hj4 h]hV4L2_BUF_CAP_SUPPORTS_USERPTR}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2 ubah}(h]h ]h"]h$]h&]uh1hhhhKhj/ ubah}(h]h ]h"]h$]h&]uh1jlhj, ubjm)}(hhh]h)}(h 0x00000002h]h 0x00000002}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjO ubah}(h]h ]h"]h$]h&]uh1jlhj, ubjm)}(hhh]h)}(hEThis buffer type supports the ``V4L2_MEMORY_USERPTR`` streaming mode.h](hThis buffer type supports the }(hji hhhNhNubj)}(h``V4L2_MEMORY_USERPTR``h]hV4L2_MEMORY_USERPTR}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1jhji ubh streaming mode.}(hji hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjf ubah}(h]h ]h"]h$]h&]uh1jlhj, ubeh}(h]h ]h"]h$]h&]uh1jghj ubjh)}(hhh](jm)}(hhh]h)}(h ``V4L2_BUF_CAP_SUPPORTS_DMABUF``h]j)}(hj h]hV4L2_BUF_CAP_SUPPORTS_DMABUF}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj ubjm)}(hhh]h)}(h 0x00000004h]h 0x00000004}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj ubjm)}(hhh]h)}(hDThis buffer type supports the ``V4L2_MEMORY_DMABUF`` streaming mode.h](hThis buffer type supports the }(hj hhhNhNubj)}(h``V4L2_MEMORY_DMABUF``h]hV4L2_MEMORY_DMABUF}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh streaming mode.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj ubeh}(h]h ]h"]h$]h&]uh1jghj ubjh)}(hhh](jm)}(hhh]h)}(h"``V4L2_BUF_CAP_SUPPORTS_REQUESTS``h]j)}(hj h]hV4L2_BUF_CAP_SUPPORTS_REQUESTS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj ubjm)}(hhh]h)}(h 0x00000008h]h 0x00000008}(hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj! ubah}(h]h ]h"]h$]h&]uh1jlhj ubjm)}(hhh]h)}(h>This buffer type supports :ref:`requests `.h](hThis buffer type supports }(hj; hhhNhNubh)}(h#:ref:`requests `h]j)}(hjE h]hrequests}(hjG hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjC ubah}(h]h ]h"]h$]h&]refdocj refdomainjQ reftyperef refexplicitrefwarnjmedia-request-apiuh1hhhhKhj; ubh.}(hj; hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj8 ubah}(h]h ]h"]h$]h&]uh1jlhj ubeh}(h]h ]h"]h$]h&]uh1jghj ubjh)}(hhh](jm)}(hhh]h)}(h'``V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS``h]j)}(hj h]h#V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj| ubah}(h]h ]h"]h$]h&]uh1jlhjy ubjm)}(hhh]h)}(h 0x00000010h]h 0x00000010}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhjy ubjm)}(hhh]h)}(hThe kernel allows calling :ref:`VIDIOC_REQBUFS` while buffers are still mapped or exported via DMABUF. These orphaned buffers will be freed when they are unmapped or when the exported DMABUF fds are closed.h](hThe kernel allows calling }(hj hhhNhNubh)}(h:ref:`VIDIOC_REQBUFS`h]j)}(hj h]hVIDIOC_REQBUFS}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnjvidioc_reqbufsuh1hhhhKhj ubh while buffers are still mapped or exported via DMABUF. These orphaned buffers will be freed when they are unmapped or when the exported DMABUF fds are closed.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhjy ubeh}(h]h ]h"]h$]h&]uh1jghj ubjh)}(hhh](jm)}(hhh]h)}(h.``V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF``h]j)}(hj h]h*V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj ubjm)}(hhh]h)}(h 0x00000020h]h 0x00000020}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj ubjm)}(hhh]h)}(hOnly valid for stateless decoders. If set, then userspace can set the ``V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF`` flag to hold off on returning the capture buffer until the OUTPUT timestamp changes.h](hFOnly valid for stateless decoders. If set, then userspace can set the }(hj1 hhhNhNubj)}(h&``V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF``h]h"V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1 ubhU flag to hold off on returning the capture buffer until the OUTPUT timestamp changes.}(hj1 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj. ubah}(h]h ]h"]h$]h&]uh1jlhj ubeh}(h]h ]h"]h$]h&]uh1jghj ubjh)}(hhh](jm)}(hhh]h)}(h*``V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS``h]j)}(hje h]h&V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS}(hjg hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjc ubah}(h]h ]h"]h$]h&]uh1hhhhKhj` ubah}(h]h ]h"]h$]h&]uh1jlhj] ubjm)}(hhh]h)}(h 0x00000040h]h 0x00000040}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj] ubjm)}(hhh]h)}(hXThis capability is set by the driver to indicate that the queue supports cache and memory management hints. However, it's only valid when the queue is used for :ref:`memory mapping ` streaming I/O. See :ref:`V4L2_BUF_FLAG_NO_CACHE_INVALIDATE `, :ref:`V4L2_BUF_FLAG_NO_CACHE_CLEAN ` and :ref:`V4L2_MEMORY_FLAG_NON_COHERENT `.h](hThis capability is set by the driver to indicate that the queue supports cache and memory management hints. However, it’s only valid when the queue is used for }(hj hhhNhNubh)}(h:ref:`memory mapping `h]j)}(hj h]hmemory mapping}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnjmmapuh1hhhhKhj ubh streaming I/O. See }(hj hhhNhNubh)}(hL:ref:`V4L2_BUF_FLAG_NO_CACHE_INVALIDATE `h]j)}(hj h]h!V4L2_BUF_FLAG_NO_CACHE_INVALIDATE}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnj!v4l2-buf-flag-no-cache-invalidateuh1hhhhKhj ubh, }(hj hhhNhNubh)}(hB:ref:`V4L2_BUF_FLAG_NO_CACHE_CLEAN `h]j)}(hj h]hV4L2_BUF_FLAG_NO_CACHE_CLEAN}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnjv4l2-buf-flag-no-cache-cleanuh1hhhhKhj ubh and }(hj hhhNhNubh)}(hD:ref:`V4L2_MEMORY_FLAG_NON_COHERENT `h]j)}(hj h]hV4L2_MEMORY_FLAG_NON_COHERENT}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnjv4l2-memory-flag-non-coherentuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj] ubeh}(h]h ]h"]h$]h&]uh1jghj ubjh)}(hhh](jm)}(hhh]h)}(h)``V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS``h]j)}(hjL h]h%V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ ubah}(h]h ]h"]h$]h&]uh1hhhhKhjG ubah}(h]h ]h"]h$]h&]uh1jlhjD ubjm)}(hhh]h)}(h 0x00000080h]h 0x00000080}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjg ubah}(h]h ]h"]h$]h&]uh1jlhjD ubjm)}(hhh]h)}(hIf set, then the ``max_num_buffers`` field in ``struct v4l2_create_buffers`` is valid. If not set, then the maximum is ``VIDEO_MAX_FRAME`` buffers.h](hIf set, then the }(hj hhhNhNubj)}(h``max_num_buffers``h]hmax_num_buffers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh field in }(hj hhhNhNubj)}(h``struct v4l2_create_buffers``h]hstruct v4l2_create_buffers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh+ is valid. If not set, then the maximum is }(hj hhhNhNubj)}(h``VIDEO_MAX_FRAME``h]hVIDEO_MAX_FRAME}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh buffers.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj~ ubah}(h]h ]h"]h$]h&]uh1jlhjD ubeh}(h]h ]h"]h$]h&]uh1jghj ubjh)}(hhh](jm)}(hhh]h)}(h%``V4L2_BUF_CAP_SUPPORTS_REMOVE_BUFS``h]j)}(hj h]h!V4L2_BUF_CAP_SUPPORTS_REMOVE_BUFS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj ubjm)}(hhh]h)}(h 0x00000100h]h 0x00000100}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj ubjm)}(hhh]h)}(h1If set, then ``VIDIOC_REMOVE_BUFS`` is supported.h](h If set, then }(hjhhhNhNubj)}(h``VIDIOC_REMOVE_BUFS``h]hVIDIOC_REMOVE_BUFS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is supported.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jlhj ubeh}(h]h ]h"]h$]h&]uh1jghj ubeh}(h]h ]h"]h$]h&]uh1jbhj ubeh}(h]h ]h"]h$]h&]colsKuh1j=hj ubeh}(h](id2j j| jn j` jR jD j6 j( j j eh ]h"](!v4l2-buf-cap-supports-remove-bufsj j~ jp jb jT jF j8 j* j eh$]h&]uh1j*hjhhhNhNj }(jLj j jr j~ jd jp jV jb jH jT j: jF j, j8 j j* j j j uj }(j j j| jr jn jd j` jV jR jH jD j: j6 j, j( j j j j j uubh)}(h.. _memory-flags:h]h}(h]h ]h"]h$]h&]h memory-flagsuh1hhKhjhhhhubh)}(h".. _V4L2-MEMORY-FLAG-NON-COHERENT:h]h}(h]h ]h"]h$]h&]hv4l2-memory-flag-non-coherentuh1hhKhjhhhhj } memory-flagsjQsj }j[jQsubj+)}(hhh](h)}(hMemory Consistency Flagsh]hMemory Consistency Flags}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjjubj>)}(hhh](jC)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jBhj{ubjC)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jBhj{ubjC)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jBhj{ubjc)}(hhh]jh)}(hhh](jm)}(hhh]h)}(h!``V4L2_MEMORY_FLAG_NON_COHERENT``h]j)}(hjh]hV4L2_MEMORY_FLAG_NON_COHERENT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jlhjubjm)}(hhh]h)}(h 0x00000001h]h 0x00000001}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jlhjubjm)}(hhh]h)}(hXA buffer is allocated either in coherent (it will be automatically coherent between the CPU and the bus) or non-coherent memory. The latter can provide performance gains, for instance the CPU cache sync/flush operations can be avoided if the buffer is accessed by the corresponding device only and the CPU does not read/write to/from that buffer. However, this requires extra care from the driver -- it must guarantee memory consistency by issuing a cache flush/sync when consistency is needed. If this flag is set V4L2 will attempt to allocate the buffer in non-coherent memory. The flag takes effect only if the buffer is used for :ref:`memory mapping ` I/O and the queue reports the :ref:`V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS ` capability.h](hXyA buffer is allocated either in coherent (it will be automatically coherent between the CPU and the bus) or non-coherent memory. The latter can provide performance gains, for instance the CPU cache sync/flush operations can be avoided if the buffer is accessed by the corresponding device only and the CPU does not read/write to/from that buffer. However, this requires extra care from the driver -- it must guarantee memory consistency by issuing a cache flush/sync when consistency is needed. If this flag is set V4L2 will attempt to allocate the buffer in non-coherent memory. The flag takes effect only if the buffer is used for }(hjhhhNhNubh)}(h:ref:`memory mapping `h]j)}(hjh]hmemory mapping}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjmmapuh1hhhhKhjubh I/O and the queue reports the }(hjhhhNhNubh)}(hV:ref:`V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS `h]j)}(hj h]h&V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj&v4l2-buf-cap-supports-mmap-cache-hintsuh1hhhhKhjubh capability.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jghjubah}(h]h ]h"]h$]h&]uh1jbhj{ubeh}(h]h ]h"]h$]h&]colsKuh1j=hjjubeh}(h](id3jfj[eh ]h"](v4l2-memory-flag-non-coherentjheh$]h&]uh1j*hjhhhNhNj }(jPj\jhjQuj }(jfj\j[jQuubhraw)}(h \normalsizeh]h \normalsize}hjWsbah}(h]h ]h"]h$]h&]formatlatexhhuh1jUhhhKhjhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohhhhhKubh)}(hOn success 0 is returned, on error -1 and the ``errno`` variable is set appropriately. The generic error codes are described at the :ref:`Generic Error Codes ` chapter.h](h.On success 0 is returned, on error -1 and the }(hjhhhNhNubj)}(h ``errno``h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhM variable is set appropriately. The generic error codes are described at the }(hjhhhNhNubh)}(h':ref:`Generic Error Codes `h]j)}(hjh]hGeneric Error Codes}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj gen-errorsuh1hhhhKhjubh chapter.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjohhubj)}(hhh]j)}(hbEINVAL The buffer type (``type`` field) or the requested I/O method (``memory``) is not supported.h](j)}(hEINVALh]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h[The buffer type (``type`` field) or the requested I/O method (``memory``) is not supported.h](hThe buffer type (}(hjhhhNhNubj)}(h``type``h]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh% field) or the requested I/O method (}(hjhhhNhNubj)}(h ``memory``h]hmemory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) is not supported.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjohhhhhNubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhKubeh}(h](ioctl-vidioc-reqbufsheh ]h"](ioctl vidioc_reqbufsvidioc_reqbufseh$]h&]uh1hhhhhhhhKj }j.hsj }hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjlfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjUerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(h]haj ]j aj ]j aj( ]j aj6 ]j, ajD ]j: ajR ]jH aj` ]jV ajn ]jd aj| ]jr aj ]j aj[]jQajf]j\aunameids}(j.hj-j*hhjjjjjljij j j* j j8 j( jF j6 jT jD jb jR jp j` j~ jn j j| jLj jhj[jPjfj%j"u nametypes}(j.j-hjjjlj j* j8 jF jT jb jp j~ j jLjhjPj%uh}(hhj*hhhjjj j)jjjijjjj j j j j( j j6 j jD j jR j j` j jn j j| j j j j[jjjfjjj"jojj,jIj jMjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jcKsRparse_messages]transform_messages](hsystem_message)}(hhh]h)}(hhh]h4Hyperlink target "vidioc-reqbufs" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jubj)}(hhh]h)}(hhh]h;Hyperlink target "v4l2-buf-capabilities" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuuh1jubj)}(hhh]h)}(hhh]h@Hyperlink target "v4l2-buf-cap-supports-mmap" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKvuh1jubj)}(hhh]h)}(hhh]hCHyperlink target "v4l2-buf-cap-supports-userptr" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKwuh1jubj)}(hhh]h)}(hhh]hBHyperlink target "v4l2-buf-cap-supports-dmabuf" is not referenced.}hj4sbah}(h]h ]h"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKxuh1jubj)}(hhh]h)}(hhh]hDHyperlink target "v4l2-buf-cap-supports-requests" is not referenced.}hjNsbah}(h]h ]h"]h$]h&]uh1hhjKubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKyuh1jubj)}(hhh]h)}(hhh]hIHyperlink target "v4l2-buf-cap-supports-orphaned-bufs" is not referenced.}hjhsbah}(h]h ]h"]h$]h&]uh1hhjeubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKzuh1jubj)}(hhh]h)}(hhh]hPHyperlink target "v4l2-buf-cap-supports-m2m-hold-capture-buf" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineK{uh1jubj)}(hhh]h)}(hhh]hLHyperlink target "v4l2-buf-cap-supports-mmap-cache-hints" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineK|uh1jubj)}(hhh]h)}(hhh]hKHyperlink target "v4l2-buf-cap-supports-max-num-buffers" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineK}uh1jubj)}(hhh]h)}(hhh]hGHyperlink target "v4l2-buf-cap-supports-remove-bufs" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineK~uh1jubj)}(hhh]h)}(hhh]h2Hyperlink target "memory-flags" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jubj)}(hhh]h)}(hhh]hCHyperlink target "v4l2-memory-flag-non-coherent" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jube transformerN include_log] decorationNhhub.