osphinx.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]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget:/translations/pt_BR/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_REQBUFShNtauh1j%hjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hVIDIOC_REQBUFSh]hdesc_signature_line)}(hVIDIOC_REQBUFSh]h desc_name)}(hVIDIOC_REQBUFSh]h desc_sig_name)}(hj?h]hVIDIOC_REQBUFS}(hjOhhhNhNubah}(h]h ]nah"]h$]h&]uh1jMhjIubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jGhjChhhhhKubah}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1jAsphinx_line_type declaratorhj=hhhhhKubah}(h]j4ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j;hhhKhj8hhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jyhj8hhhhhKubeh}(h]h ](cmacroeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1j6hhhjhNhNubh)}(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&]uh1jhjubah}(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 ](xrefjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc&userspace-api/media/v4l/vidioc-reqbufs refdomainjreftypefunc 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)}(hjBh]hargp}(hjDhhhNhNubah}(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 }(hjZhhhNhNubh)}(h:c:type:`v4l2_requestbuffers`h]j)}(hjdh]hv4l2_requestbuffers}(hjfhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj$v4l2_requestbuffersuh1hhhhKhjZubh.}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjWubah}(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 refexplicitrefwarnj$mmapuh1hhhhK"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 refexplicitrefwarnj$userpuh1hhhhK"hjubh or }(hjhhhNhNubh)}(h:ref:`DMABUF `h]j)}(hj h]hDMABUF}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj$dmabufuh1hhhhK"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 }(hj2hhhNhNubh)}(h:c:type:`v4l2_requestbuffers`h]j)}(hj<h]hv4l2_requestbuffers}(hj>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj$v4l2_requestbuffersuh1hhhhK-hj2ubh structure. They set the }(hj2hhhNhNubj)}(h``type``h]htype}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh4 field to the respective stream or buffer type, the }(hj2hhhNhNubj)}(h ``count``h]hcount}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh) field to the desired number of buffers, }(hj2hhhNhNubj)}(h ``memory``h]hmemory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh1 must be set to the requested I/O method and the }(hj2hhhNhNubj)}(h ``reserved``h]hreserved}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh 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 }(hj2hhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubhX/ 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.}(hj2hhhNhNubeh}(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 refexplicitrefwarnj$vidioc_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)}(hj h]hVIDIOC_REQBUFS}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj$vidioc_reqbufsuh1hhhhK=hjubh can only succeed if the }(hjhhhNhNubj)}(h'``V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS``h]h#V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh capability is set. Otherwise }(hjhhhNhNubh)}(h:ref:`VIDIOC_REQBUFS`h]j)}(hjAh]hVIDIOC_REQBUFS}(hjChhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]refdocj refdomainjMreftyperef refexplicitrefwarnj$vidioc_reqbufsuh1hhhhK=hjubh will return the }(hjhhhNhNubj)}(h ``EBUSY``h]hEBUSY}(hjchhhNhNubah}(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}(hjuhhhNhNubah}(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}(hjhhhNhNubah}(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 refexplicitrefwarnj$vidioc_streamonuh1hhhhK=hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK=hjhhubj&)}(hhh]h}(h]h ]h"]h$]h&]entries](j2 V4L.v4l2_requestbuffers (C type)c.V4L.v4l2_requestbuffershNtauh1j%hjhhhNhNubj7)}(hhh](j<)}(hv4l2_requestbuffersh]jB)}(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&]uh1jhjhhhhhKHubjH)}(hv4l2_requestbuffersh]jN)}(hjh]hv4l2_requestbuffers}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jMhjubah}(h]h ](j`jaeh"]h$]h&]hhuh1jGhjhhhhhKHubeh}(h]h ]h"]h$]h&]hhjkuh1jAjljmhjhhhhhKHubah}(h]jah ](jqjreh"]h$]h&]jvjw)jxhuh1j;hhhKHhjhhubjz)}(hhh]h}(h]h ]h"]h$]h&]uh1jyhjhhhhhKHubeh}(h]h ](jtypeeh"]h$]h&]jjjj-jj-jjjuh1j6hhhjhNhNubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{4.4cm}|p{4.4cm}|p{8.5cm}|uh1j1hhhKJhjhhubhtable)}(hhh](h)}(hstruct v4l2_requestbuffersh]hstruct v4l2_requestbuffers}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhj@ubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjSubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjSubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjSubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShjubah}(h]h ]h"]h$]h&]uh1jhj}ubj)}(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&]uh1jhj}ubj)}(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&]uh1jhj}ubeh}(h]h ]h"]h$]h&]uh1j{hjxubj|)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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&]uh1jhjubj)}(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)}(hjh]h v4l2_format}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype 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)}(hjRh]h v4l2_buf_type}(hjThhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj$ v4l2_buf_typeuh1hhhhKXhjubh for valid values.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKXhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjxubj|)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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&]uh1jhjubj)}(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 ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj$ v4l2_memoryuh1hhhhK]hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK]hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjxubj|)}(hhh](j)}(hhh]h)}(h__u32h]h__u32}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hj8ubah}(h]h ]h"]h$]h&]uh1jhj5ubj)}(hhh]h)}(h``capabilities``h]j)}(hjTh]h capabilities}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1hhhhKahjOubah}(h]h ]h"]h$]h&]uh1jhj5ubj)}(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 }(hjrhhhNhNubj)}(h``V4L2_MEMORY_MMAP``h]hV4L2_MEMORY_MMAP}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubh and }(hjrhhhNhNubhemphasis)}(h*might*h]hmight}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubh support other }(hjrhhhNhNubh)}(h:c:type:`v4l2_memory`h]j)}(hjh]h v4l2_memory}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj$ v4l2_memoryuh1hhhhKbhjrubh3 types. It will not support any other capabilities.}(hjrhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKbhjoubh)}(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&]uh1hhhhKhhjoubeh}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1j{hjxubj|)}(hhh](j)}(hhh]h)}(h__u8h]h__u8}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhj.ubah}(h]h ]h"]h$]h&]uh1jhj+ubj)}(hhh]h)}(h ``flags``h]j)}(hjJh]hflags}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]uh1hhhhKnhjEubah}(h]h ]h"]h$]h&]uh1jhj+ubj)}(hhh]h)}(hKSpecifies additional buffer management attributes. See :ref:`memory-flags`.h](h7Specifies additional buffer management attributes. See }(hjhhhhNhNubh)}(h:ref:`memory-flags`h]j)}(hjrh]h memory-flags}(hjthhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]refdocj refdomainj~reftyperef refexplicitrefwarnj$ memory-flagsuh1hhhhKohjhubh.}(hjhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKohjeubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1j{hjxubj|)}(hhh](j)}(hhh]h)}(h__u8h]h__u8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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&]uh1jhjubj)}(hhh]h)}(hReserved for future extensions.h]hReserved for future extensions.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjxubeh}(h]h ]h"]h$]h&]uh1jvhjSubeh}(h]h ]h"]h$]h&]colsKuh1jQhj@ubeh}(h]id1ah ] longtableah"]h$]h&]uh1j>hjhhhNhNubh)}(h.. _v4l2-buf-capabilities:h]h}(h]h ]h"]h$]h&]hԌv4l2-buf-capabilitiesuh1hhKuhjhhhhubh)}(h.. _V4L2-BUF-CAP-SUPPORTS-MMAP:h]h}(h]h ]h"]h$]h&]hԌv4l2-buf-cap-supports-mmapuh1hhKvhjhhhhnjexpect_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&]hԌv4l2-buf-cap-supports-userptruh1hhKwhjhhhhj- }(v4l2-buf-cap-supports-mmapj" j/ j uj0 }(j, j" j! j uubh)}(h!.. _V4L2-BUF-CAP-SUPPORTS-DMABUF:h]h}(h]h ]h"]h$]h&]hԌv4l2-buf-cap-supports-dmabufuh1hhKxhjhhhhj- }(v4l2-buf-cap-supports-userptrj2 j> j" j/ j uj0 }(j< j2 j, j" j! j uubh)}(h#.. _V4L2-BUF-CAP-SUPPORTS-REQUESTS:h]h}(h]h ]h"]h$]h&]hԌv4l2-buf-cap-supports-requestsuh1hhKyhjhhhhj- }(v4l2-buf-cap-supports-dmabufj@ jL j2 j> j" j/ j uj0 }(jJ j@ j< j2 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-requestsjN jZ j@ jL j2 j> j" j/ j uj0 }(jX jN jJ j@ j< j2 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-bufsj\ jh jN jZ j@ jL j2 j> j" j/ j uj0 }(jf j\ jX jN jJ j@ j< j2 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-bufjj jv j\ jh jN jZ j@ jL j2 j> j" j/ j uj0 }(jt jj jf j\ jX jN jJ j@ j< j2 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-hintsjx j jj jv j\ jh jN jZ j@ jL j2 j> j" j/ j uj0 }(j jx jt jj jf j\ jX jN jJ j@ j< j2 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-buffersj j jx j jj jv j\ jh jN jZ j@ jL j2 j> j" j/ j uj0 }(j j j jx jt jj jf j\ jX jN jJ j@ j< j2 j, j" j! j uubj?)}(hhh](h)}(hV4L2 Buffer Capabilities Flagsh]hV4L2 Buffer Capabilities Flags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubjR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhj ubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhj ubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhj ubjw)}(hhh](j|)}(hhh](j)}(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&]uh1jhj ubj)}(hhh]h)}(h 0x00000001h]h 0x00000001}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(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&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj ubj|)}(hhh](j)}(hhh]h)}(h!``V4L2_BUF_CAP_SUPPORTS_USERPTR``h]j)}(hjH h]hV4L2_BUF_CAP_SUPPORTS_USERPTR}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF ubah}(h]h ]h"]h$]h&]uh1hhhhKhjC ubah}(h]h ]h"]h$]h&]uh1jhj@ ubj)}(hhh]h)}(h 0x00000002h]h 0x00000002}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjc ubah}(h]h ]h"]h$]h&]uh1jhj@ ubj)}(hhh]h)}(hEThis buffer type supports the ``V4L2_MEMORY_USERPTR`` streaming mode.h](hThis buffer type supports the }(hj} hhhNhNubj)}(h``V4L2_MEMORY_USERPTR``h]hV4L2_MEMORY_USERPTR}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj} ubh streaming mode.}(hj} hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjz ubah}(h]h ]h"]h$]h&]uh1jhj@ ubeh}(h]h ]h"]h$]h&]uh1j{hj ubj|)}(hhh](j)}(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&]uh1jhj ubj)}(hhh]h)}(h 0x00000004h]h 0x00000004}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(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&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj ubj|)}(hhh](j)}(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&]uh1jhj ubj)}(hhh]h)}(h 0x00000008h]h 0x00000008}(hj8 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj5 ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h>This buffer type supports :ref:`requests `.h](hThis buffer type supports }(hjO hhhNhNubh)}(h#:ref:`requests `h]j)}(hjY h]hrequests}(hj[ hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjW ubah}(h]h ]h"]h$]h&]refdocj refdomainje reftyperef refexplicitrefwarnj$media-request-apiuh1hhhhKhjO ubh.}(hjO hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjL ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj ubj|)}(hhh](j)}(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&]uh1jhj ubj)}(hhh]h)}(h 0x00000010h]h 0x00000010}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(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 refexplicitrefwarnj$vidioc_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&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj ubj|)}(hhh](j)}(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&]uh1jhj ubj)}(hhh]h)}(h 0x00000020h]h 0x00000020}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj+ ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(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 }(hjE hhhNhNubj)}(h&``V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF``h]h"V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE ubhU flag to hold off on returning the capture buffer until the OUTPUT timestamp changes.}(hjE hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjB ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj ubj|)}(hhh](j)}(hhh]h)}(h*``V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS``h]j)}(hjy h]h&V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS}(hj{ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw ubah}(h]h ]h"]h$]h&]uh1hhhhKhjt ubah}(h]h ]h"]h$]h&]uh1jhjq ubj)}(hhh]h)}(h 0x00000040h]h 0x00000040}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjq ubj)}(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 refexplicitrefwarnj$mmapuh1hhhhKhj 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 refexplicitrefwarnj$v4l2-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 refdomainj0 reftyperef refexplicitrefwarnj$v4l2-memory-flag-non-coherentuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjq ubeh}(h]h ]h"]h$]h&]uh1j{hj ubj|)}(hhh](j)}(hhh]h)}(h)``V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS``h]j)}(hj` h]h%V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ ubah}(h]h ]h"]h$]h&]uh1hhhhKhj[ ubah}(h]h ]h"]h$]h&]uh1jhjX ubj)}(hhh]h)}(h 0x00000080h]h 0x00000080}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{ ubah}(h]h ]h"]h$]h&]uh1jhjX ubj)}(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&]uh1jhjX ubeh}(h]h ]h"]h$]h&]uh1j{hj ubj|)}(hhh](j)}(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&]uh1jhj ubj)}(hhh]h)}(h 0x00000100h]h 0x00000100}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h1If set, then ``VIDIOC_REMOVE_BUFS`` is supported.h](h If set, then }(hj"hhhNhNubj)}(h``VIDIOC_REMOVE_BUFS``h]hVIDIOC_REMOVE_BUFS}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh is supported.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj ubeh}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]colsKuh1jQhj ubeh}(h](id2j j j jt jf jX jJ j< j, j! eh ]h"](!v4l2-buf-cap-supports-remove-bufsj j j jv jh jZ jL j> j/ eh$]h&]uh1j>hjhhhNhNj- }(j`j j j j jx j jj jv j\ jh jN jZ j@ jL j2 j> j" j/ j uj0 }(j j j j j jx jt jj jf j\ jX jN jJ j@ j< j2 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&]hԌv4l2-memory-flag-non-coherentuh1hhKhjhhhhj- } memory-flagsjesj0 }jojesubj?)}(hhh](h)}(hMemory Consistency Flagsh]hMemory Consistency Flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj~ubjR)}(hhh](jW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjubjW)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jVhjubjw)}(hhh]j|)}(hhh](j)}(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&]uh1jhjubj)}(hhh]h)}(h 0x00000001h]h 0x00000001}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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 refexplicitrefwarnj$mmapuh1hhhhKhjubh I/O and the queue reports the }(hjhhhNhNubh)}(hV:ref:`V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS `h]j)}(hjh]h&V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj*reftyperef refexplicitrefwarnj$&v4l2-buf-cap-supports-mmap-cache-hintsuh1hhhhKhjubh capability.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]colsKuh1jQhj~ubeh}(h](id3jzjoeh ]h"](v4l2-memory-flag-non-coherentj|eh$]h&]uh1j>hjhhhNhNj- }(jdjpj|jeuj0 }(jzjpjojeuubhraw)}(h \normalsizeh]h \normalsize}hjksbah}(h]h ]h"]h$]h&]formatlatexhhuh1jihhhKhjhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(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&]uh1hhhhKhjhhubj)}(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}(hj hhhNhNubah}(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&]uh1jhjhhhhhNubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhKubeh}(h](ioctl-vidioc-reqbufsheh ]h"](ioctl vidioc_reqbufsvidioc_reqbufseh$]h&]uh1hhhhhhhhKj- }jBhsj0 }hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_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_handlerjierror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _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< ]j2 ajJ ]j@ ajX ]jN ajf ]j\ ajt ]jj aj ]jx aj ]j aj ]j ajo]jeajz]jpaunameids}(jBhjAj>jjjjjjjj}j/ j! j> j, jL j< jZ jJ jh jX jv jf j jt j j j j j`j j|jojdjzj9j6u nametypes}(jBjAjjjjj/ j> jL jZ jh jv j j j j`j|jdj9uh}(hhj>hjhjjj4j=jjj}jjjj! j j, j j< j jJ j jX j jf j jt j j j j j j j joj~jzj~j6jj j@j]j jaj~u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jwKsRparse_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&]levelKtypeINFOsourcehnjlineKuh1jubj)}(hhh]h)}(hhh]h;Hyperlink target "v4l2-buf-capabilities" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehnjlineKuuh1jubj)}(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&]levelKtypejsourcehnjlineKvuh1jubj)}(hhh]h)}(hhh]hCHyperlink target "v4l2-buf-cap-supports-userptr" is not referenced.}hj.sbah}(h]h ]h"]h$]h&]uh1hhj+ubah}(h]h ]h"]h$]h&]levelKtypejsourcehnjlineKwuh1jubj)}(hhh]h)}(hhh]hBHyperlink target "v4l2-buf-cap-supports-dmabuf" is not referenced.}hjHsbah}(h]h ]h"]h$]h&]uh1hhjEubah}(h]h ]h"]h$]h&]levelKtypejsourcehnjlineKxuh1jubj)}(hhh]h)}(hhh]hDHyperlink target "v4l2-buf-cap-supports-requests" is not referenced.}hjbsbah}(h]h ]h"]h$]h&]uh1hhj_ubah}(h]h ]h"]h$]h&]levelKtypejsourcehnjlineKyuh1jubj)}(hhh]h)}(hhh]hIHyperlink target "v4l2-buf-cap-supports-orphaned-bufs" is not referenced.}hj|sbah}(h]h ]h"]h$]h&]uh1hhjyubah}(h]h ]h"]h$]h&]levelKtypejsourcehnjlineKzuh1jubj)}(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&]levelKtypejsourcehnjlineK{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&]levelKtypejsourcehnjlineK|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&]levelKtypejsourcehnjlineK}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&]levelKtypejsourcehnjlineK~uh1jubj)}(hhh]h)}(hhh]h2Hyperlink target "memory-flags" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehnjlineKuh1jubj)}(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&]levelKtypejsourcehnjlineKuh1jube transformerN include_log] decorationNhhub.