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/driver-api/dma-bufmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/zh_TW/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/it_IT/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ja_JP/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ko_KR/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/sp_SP/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h,Buffer Sharing and Synchronization (dma-buf)h]h,Buffer Sharing and Synchronization (dma-buf)}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh@/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf.rsthKubh paragraph)}(hThe dma-buf subsystem provides the framework for sharing buffers for hardware (DMA) access across multiple device drivers and subsystems, and for synchronizing asynchronous hardware access.h]hThe dma-buf subsystem provides the framework for sharing buffers for hardware (DMA) access across multiple device drivers and subsystems, and for synchronizing asynchronous hardware access.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hAs an example, it is used extensively by the DRM subsystem to exchange buffers between processes, contexts, library APIs within the same process, and also to exchange buffers with other subsystems such as V4L2.h]hAs an example, it is used extensively by the DRM subsystem to exchange buffers between processes, contexts, library APIs within the same process, and also to exchange buffers with other subsystems such as V4L2.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThis document describes the way in which kernel subsystems can use and interact with the three main primitives offered by dma-buf:h]hThis document describes the way in which kernel subsystems can use and interact with the three main primitives offered by dma-buf:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh block_quote)}(hX- dma-buf, representing a sg_table and exposed to userspace as a file descriptor to allow passing between processes, subsystems, devices, etc; - dma-fence, providing a mechanism to signal when an asynchronous hardware operation has completed; and - dma-resv, which manages a set of dma-fences for a particular dma-buf allowing implicit (kernel-ordered) synchronization of work to preserve the illusion of coherent access h]h bullet_list)}(hhh](h list_item)}(hdma-buf, representing a sg_table and exposed to userspace as a file descriptor to allow passing between processes, subsystems, devices, etc;h]h)}(hdma-buf, representing a sg_table and exposed to userspace as a file descriptor to allow passing between processes, subsystems, devices, etc;h]hdma-buf, representing a sg_table and exposed to userspace as a file descriptor to allow passing between processes, subsystems, devices, etc;}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hedma-fence, providing a mechanism to signal when an asynchronous hardware operation has completed; andh]h)}(hedma-fence, providing a mechanism to signal when an asynchronous hardware operation has completed; andh]hedma-fence, providing a mechanism to signal when an asynchronous hardware operation has completed; and}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hdma-resv, which manages a set of dma-fences for a particular dma-buf allowing implicit (kernel-ordered) synchronization of work to preserve the illusion of coherent access h]h)}(hdma-resv, which manages a set of dma-fences for a particular dma-buf allowing implicit (kernel-ordered) synchronization of work to preserve the illusion of coherent accessh]hdma-resv, which manages a set of dma-fences for a particular dma-buf allowing implicit (kernel-ordered) synchronization of work to preserve the illusion of coherent access}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Userspace API principles and useh]h Userspace API principles and use}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhKubh)}(hFor more details on how to design your subsystem's API for dma-buf use, please see Documentation/userspace-api/dma-buf-alloc-exchange.rst.h]hFor more details on how to design your subsystem’s API for dma-buf use, please see Documentation/userspace-api/dma-buf-alloc-exchange.rst.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjFhhubeh}(h] userspace-api-principles-and-useah ]h"] userspace api principles and useah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hShared DMA Buffersh]hShared DMA Buffers}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhhhhhK"ubh)}(hThis document serves as a guide to device-driver writers on what is the dma-buf buffer sharing API, how to use it for exporting and using shared buffers.h]hThis document serves as a guide to device-driver writers on what is the dma-buf buffer sharing API, how to use it for exporting and using shared buffers.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjmhhubh)}(hAny device driver which wishes to be a part of DMA buffer sharing, can do so as either the 'exporter' of buffers, or the 'user' or 'importer' of buffers.h]hAny device driver which wishes to be a part of DMA buffer sharing, can do so as either the ‘exporter’ of buffers, or the ‘user’ or ‘importer’ of buffers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjmhhubh)}(hwSay a driver A wants to use buffers created by driver B, then we call B as the exporter, and A as buffer-user/importer.h]hwSay a driver A wants to use buffers created by driver B, then we call B as the exporter, and A as buffer-user/importer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjmhhubh)}(h The exporterh]h The exporter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjmhhubh)}(hX- implements and manages operations in :c:type:`struct dma_buf_ops ` for the buffer, - allows other users to share the buffer by using dma_buf sharing APIs, - manages the details of buffer allocation, wrapped in a :c:type:`struct dma_buf `, - decides about the actual backing storage where this allocation happens, - and takes care of any migration of scatterlist - for all (shared) users of this buffer. h]h)}(hhh](h)}(h_implements and manages operations in :c:type:`struct dma_buf_ops ` for the buffer,h]h)}(h_implements and manages operations in :c:type:`struct dma_buf_ops ` for the buffer,h](h%implements and manages operations in }(hjhhhNhNubh)}(h*:c:type:`struct dma_buf_ops `h]hliteral)}(hjh]hstruct dma_buf_ops}(hjhhhNhNubah}(h]h ](xrefcc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocdriver-api/dma-buf refdomainjreftypetype refexplicitrefwarn reftarget dma_buf_opsuh1hhhhK/hjubh for the buffer,}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hEallows other users to share the buffer by using dma_buf sharing APIs,h]h)}(hjh]hEallows other users to share the buffer by using dma_buf sharing APIs,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hZmanages the details of buffer allocation, wrapped in a :c:type:`struct dma_buf `,h]h)}(hZmanages the details of buffer allocation, wrapped in a :c:type:`struct dma_buf `,h](h7manages the details of buffer allocation, wrapped in a }(hjhhhNhNubh)}(h":c:type:`struct dma_buf `h]j)}(hj#h]hstruct dma_buf}(hj%hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hhhhK2hjubh,}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK2hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hGdecides about the actual backing storage where this allocation happens,h]h)}(hjRh]hGdecides about the actual backing storage where this allocation happens,}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjPubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXand takes care of any migration of scatterlist - for all (shared) users of this buffer. h]h)}(hWand takes care of any migration of scatterlist - for all (shared) users of this buffer.h]hWand takes care of any migration of scatterlist - for all (shared) users of this buffer.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjgubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j?uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1hhhhK/hjmhhubh)}(hThe buffer-userh]hThe buffer-user}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjmhhubh)}(hX~- is one of (many) sharing users of the buffer. - doesn't need to worry about how the buffer is allocated, or where. - and needs a mechanism to get access to the scatterlist that makes up this buffer in memory, mapped into its own address space, so it can access the same area of memory. This interface is provided by :c:type:`struct dma_buf_attachment `. h]h)}(hhh](h)}(h-is one of (many) sharing users of the buffer.h]h)}(hjh]h-is one of (many) sharing users of the buffer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hBdoesn't need to worry about how the buffer is allocated, or where.h]h)}(hjh]hDdoesn’t need to worry about how the buffer is allocated, or where.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXand needs a mechanism to get access to the scatterlist that makes up this buffer in memory, mapped into its own address space, so it can access the same area of memory. This interface is provided by :c:type:`struct dma_buf_attachment `. h]h)}(hXand needs a mechanism to get access to the scatterlist that makes up this buffer in memory, mapped into its own address space, so it can access the same area of memory. This interface is provided by :c:type:`struct dma_buf_attachment `.h](hand needs a mechanism to get access to the scatterlist that makes up this buffer in memory, mapped into its own address space, so it can access the same area of memory. This interface is provided by }(hjhhhNhNubh)}(h8:c:type:`struct dma_buf_attachment `h]j)}(hjh]hstruct dma_buf_attachment}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_buf_attachmentuh1hhhhKj?uh1hhhhK:hjubah}(h]h ]h"]h$]h&]uh1hhhhK:hjmhhubh)}(hAny exporters or users of the dma-buf buffer sharing framework must have a 'select DMA_SHARED_BUFFER' in their respective Kconfigs.h]hAny exporters or users of the dma-buf buffer sharing framework must have a ‘select DMA_SHARED_BUFFER’ in their respective Kconfigs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhjmhhubh)}(hhh](h)}(hUserspace Interface Notesh]hUserspace Interface Notes}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hhhhhKEubh)}(hMostly a DMA buffer file descriptor is simply an opaque object for userspace, and hence the generic interface exposed is very minimal. There's a few things to consider though:h]hMostly a DMA buffer file descriptor is simply an opaque object for userspace, and hence the generic interface exposed is very minimal. There’s a few things to consider though:}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhj#hhubh)}(hhh](h)}(hXSince kernel 3.12 the dma-buf FD supports the llseek system call, but only with offset=0 and whence=SEEK_END|SEEK_SET. SEEK_SET is supported to allow the usual size discover pattern size = SEEK_END(0); SEEK_SET(0). Every other llseek operation will report -EINVAL. If llseek on dma-buf FDs isn't supported the kernel will report -ESPIPE for all cases. Userspace can use this to detect support for discovering the dma-buf size using llseek. h](h)}(hXSince kernel 3.12 the dma-buf FD supports the llseek system call, but only with offset=0 and whence=SEEK_END|SEEK_SET. SEEK_SET is supported to allow the usual size discover pattern size = SEEK_END(0); SEEK_SET(0). Every other llseek operation will report -EINVAL.h]hXSince kernel 3.12 the dma-buf FD supports the llseek system call, but only with offset=0 and whence=SEEK_END|SEEK_SET. SEEK_SET is supported to allow the usual size discover pattern size = SEEK_END(0); SEEK_SET(0). Every other llseek operation will report -EINVAL.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjEubh)}(hIf llseek on dma-buf FDs isn't supported the kernel will report -ESPIPE for all cases. Userspace can use this to detect support for discovering the dma-buf size using llseek.h]hIf llseek on dma-buf FDs isn’t supported the kernel will report -ESPIPE for all cases. Userspace can use this to detect support for discovering the dma-buf size using llseek.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhjEubeh}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubh)}(hXsIn order to avoid fd leaks on exec, the FD_CLOEXEC flag must be set on the file descriptor. This is not just a resource leak, but a potential security hole. It could give the newly exec'd application access to buffers, via the leaked fd, to which it should otherwise not be permitted access. The problem with doing this via a separate fcntl() call, versus doing it atomically when the fd is created, is that this is inherently racy in a multi-threaded app[3]. The issue is made worse when it is library code opening/creating the file descriptor, as the application may not even be aware of the fd's. To avoid this problem, userspace must have a way to request O_CLOEXEC flag be set when the dma-buf fd is created. So any API provided by the exporting driver to create a dmabuf fd must provide a way to let userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd(). h](h)}(hX%In order to avoid fd leaks on exec, the FD_CLOEXEC flag must be set on the file descriptor. This is not just a resource leak, but a potential security hole. It could give the newly exec'd application access to buffers, via the leaked fd, to which it should otherwise not be permitted access.h]hX'In order to avoid fd leaks on exec, the FD_CLOEXEC flag must be set on the file descriptor. This is not just a resource leak, but a potential security hole. It could give the newly exec’d application access to buffers, via the leaked fd, to which it should otherwise not be permitted access.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjkubh)}(hX4The problem with doing this via a separate fcntl() call, versus doing it atomically when the fd is created, is that this is inherently racy in a multi-threaded app[3]. The issue is made worse when it is library code opening/creating the file descriptor, as the application may not even be aware of the fd's.h]hX6The problem with doing this via a separate fcntl() call, versus doing it atomically when the fd is created, is that this is inherently racy in a multi-threaded app[3]. The issue is made worse when it is library code opening/creating the file descriptor, as the application may not even be aware of the fd’s.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjkubh)}(hXTo avoid this problem, userspace must have a way to request O_CLOEXEC flag be set when the dma-buf fd is created. So any API provided by the exporting driver to create a dmabuf fd must provide a way to let userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd().h]hXTo avoid this problem, userspace must have a way to request O_CLOEXEC flag be set when the dma-buf fd is created. So any API provided by the exporting driver to create a dmabuf fd must provide a way to let userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjkubeh}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubh)}(hMemory mapping the contents of the DMA buffer is also supported. See the discussion below on `CPU Access to DMA Buffer Objects`_ for the full details. h]h)}(hMemory mapping the contents of the DMA buffer is also supported. See the discussion below on `CPU Access to DMA Buffer Objects`_ for the full details.h](h]Memory mapping the contents of the DMA buffer is also supported. See the discussion below on }(hjhhhNhNubh reference)}(h#`CPU Access to DMA Buffer Objects`_h]h CPU Access to DMA Buffer Objects}(hjhhhNhNubah}(h]h ]h"]h$]h&]name CPU Access to DMA Buffer Objectsrefid cpu-access-to-dma-buffer-objectsuh1jhjresolvedKubh for the full details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKehjubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubh)}(hZThe DMA buffer FD is also pollable, see `Implicit Fence Poll Support`_ below for details. h]h)}(hYThe DMA buffer FD is also pollable, see `Implicit Fence Poll Support`_ below for details.h](h(The DMA buffer FD is also pollable, see }(hjhhhNhNubj)}(h`Implicit Fence Poll Support`_h]hImplicit Fence Poll Support}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameImplicit Fence Poll Supportjimplicit-fence-poll-supportuh1jhjjKubh below for details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubh)}(hkThe DMA buffer FD also supports a few dma-buf-specific ioctls, see `DMA Buffer ioctls`_ below for details. h]h)}(hjThe DMA buffer FD also supports a few dma-buf-specific ioctls, see `DMA Buffer ioctls`_ below for details.h](hCThe DMA buffer FD also supports a few dma-buf-specific ioctls, see }(hjhhhNhNubj)}(h`DMA Buffer ioctls`_h]hDMA Buffer ioctls}(hj hhhNhNubah}(h]h ]h"]h$]h&]nameDMA Buffer ioctlsjdma-buffer-ioctlsuh1jhjjKubh below for details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKkhjubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubeh}(h]h ]h"]h$]h&]j>j?uh1hhhhKKhj#hhubeh}(h]userspace-interface-notesah ]h"]userspace interface notesah$]h&]uh1hhjmhhhhhKEubh)}(hhh](h)}(h%Basic Operation and Device DMA Accessh]h%Basic Operation and Device DMA Access}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hhhhhKoubh)}(h_For device DMA access to a shared DMA buffer the usual sequence of operations is fairly simple:h]h_For device DMA access to a shared DMA buffer the usual sequence of operations is fairly simple:}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chMAhj8hhubhenumerated_list)}(hhh](h)}(hXThe exporter defines his exporter instance using DEFINE_DMA_BUF_EXPORT_INFO() and calls dma_buf_export() to wrap a private buffer object into a :c:type:`dma_buf`. It then exports that :c:type:`dma_buf` to userspace as a file descriptor by calling dma_buf_fd(). h]h)}(hXThe exporter defines his exporter instance using DEFINE_DMA_BUF_EXPORT_INFO() and calls dma_buf_export() to wrap a private buffer object into a :c:type:`dma_buf`. It then exports that :c:type:`dma_buf` to userspace as a file descriptor by calling dma_buf_fd().h](hThe exporter defines his exporter instance using DEFINE_DMA_BUF_EXPORT_INFO() and calls dma_buf_export() to wrap a private buffer object into a }(hjahhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjkh]hdma_buf}(hjmhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chMDhjaubh. It then exports that }(hjahhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjh]hdma_buf}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hhjhMDhjaubh; to userspace as a file descriptor by calling dma_buf_fd().}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMDhj]ubah}(h]h ]h"]h$]h&]uh1hhjZubh)}(hXJUserspace passes this file-descriptors to all drivers it wants this buffer to share with: First the file descriptor is converted to a :c:type:`dma_buf` using dma_buf_get(). Then the buffer is attached to the device using dma_buf_attach(). Up to this stage the exporter is still free to migrate or reallocate the backing storage. h](h)}(hUserspace passes this file-descriptors to all drivers it wants this buffer to share with: First the file descriptor is converted to a :c:type:`dma_buf` using dma_buf_get(). Then the buffer is attached to the device using dma_buf_attach().h](hUserspace passes this file-descriptors to all drivers it wants this buffer to share with: First the file descriptor is converted to a }(hjhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjh]hdma_buf}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chMIhjubhW using dma_buf_get(). Then the buffer is attached to the device using dma_buf_attach().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMIhjubh)}(hYUp to this stage the exporter is still free to migrate or reallocate the backing storage.h]hYUp to this stage the exporter is still free to migrate or reallocate the backing storage.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chMNhjubeh}(h]h ]h"]h$]h&]uh1hhjZubh)}(hOnce the buffer is attached to all devices userspace can initiate DMA access to the shared buffer. In the kernel this is done by calling dma_buf_map_attachment() and dma_buf_unmap_attachment(). h]h)}(hOnce the buffer is attached to all devices userspace can initiate DMA access to the shared buffer. In the kernel this is done by calling dma_buf_map_attachment() and dma_buf_unmap_attachment().h]hOnce the buffer is attached to all devices userspace can initiate DMA access to the shared buffer. In the kernel this is done by calling dma_buf_map_attachment() and dma_buf_unmap_attachment().}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chMQhjubah}(h]h ]h"]h$]h&]uh1hhjZubh)}(hOnce a driver is done with a shared buffer it needs to call dma_buf_detach() (after cleaning up any mappings) and then release the reference acquired with dma_buf_get() by calling dma_buf_put(). h]h)}(hOnce a driver is done with a shared buffer it needs to call dma_buf_detach() (after cleaning up any mappings) and then release the reference acquired with dma_buf_get() by calling dma_buf_put().h]hOnce a driver is done with a shared buffer it needs to call dma_buf_detach() (after cleaning up any mappings) and then release the reference acquired with dma_buf_get() by calling dma_buf_put().}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chMUhj ubah}(h]h ]h"]h$]h&]uh1hhjZubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jXhj8hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chNubh)}(hYFor the detailed semantics exporters are expected to implement see :c:type:`dma_buf_ops`.h](hCFor the detailed semantics exporters are expected to implement see }(hjEhhhNhNubh)}(h:c:type:`dma_buf_ops`h]j)}(hjOh]h dma_buf_ops}(hjQhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chMYhjEubh.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjlhMYhj8hhubeh}(h]%basic-operation-and-device-dma-accessah ]h"]%basic operation and device dma accessah$]h&]uh1hhjmhhhhhKoubh)}(hhh](h)}(h CPU Access to DMA Buffer Objectsh]h CPU Access to DMA Buffer Objects}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKuubh)}(hLThere are multiple reasons for supporting CPU access to a dma buffer object:h]hLThere are multiple reasons for supporting CPU access to a dma buffer object:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjhhubh)}(hhh](h)}(hX3Fallback operations in the kernel, for example when a device is connected over USB and the kernel needs to shuffle the data around first before sending it away. Cache coherency is handled by bracketing any transactions with calls to dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() access. Since for most kernel internal dma-buf accesses need the entire buffer, a vmap interface is introduced. Note that on very old 32-bit architectures vmalloc space might be limited and result in vmap calls failing. Interfaces: .. code-block:: c void *dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map) void dma_buf_vunmap(struct dma_buf *dmabuf, struct iosys_map *map) The vmap call can fail if there is no vmap support in the exporter, or if it runs out of vmalloc space. Note that the dma-buf layer keeps a reference count for all vmap access and calls down into the exporter's vmap function only when no vmapping exists, and only unmaps it once. Protection against concurrent vmap/vunmap calls is provided by taking the :c:type:`dma_buf.lock ` mutex. h](h)}(hX(Fallback operations in the kernel, for example when a device is connected over USB and the kernel needs to shuffle the data around first before sending it away. Cache coherency is handled by bracketing any transactions with calls to dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() access.h]hX(Fallback operations in the kernel, for example when a device is connected over USB and the kernel needs to shuffle the data around first before sending it away. Cache coherency is handled by bracketing any transactions with calls to dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() access.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM hjubh)}(hSince for most kernel internal dma-buf accesses need the entire buffer, a vmap interface is introduced. Note that on very old 32-bit architectures vmalloc space might be limited and result in vmap calls failing.h]hSince for most kernel internal dma-buf accesses need the entire buffer, a vmap interface is introduced. Note that on very old 32-bit architectures vmalloc space might be limited and result in vmap calls failing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh)}(h Interfaces:h]h Interfaces:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh literal_block)}(hvoid *dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map) void dma_buf_vunmap(struct dma_buf *dmabuf, struct iosys_map *map)h]hvoid *dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map) void dma_buf_vunmap(struct dma_buf *dmabuf, struct iosys_map *map)}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveforcelanguagejhighlight_args}uh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh)}(hXThe vmap call can fail if there is no vmap support in the exporter, or if it runs out of vmalloc space. Note that the dma-buf layer keeps a reference count for all vmap access and calls down into the exporter's vmap function only when no vmapping exists, and only unmaps it once. Protection against concurrent vmap/vunmap calls is provided by taking the :c:type:`dma_buf.lock ` mutex.h](hXdThe vmap call can fail if there is no vmap support in the exporter, or if it runs out of vmalloc space. Note that the dma-buf layer keeps a reference count for all vmap access and calls down into the exporter’s vmap function only when no vmapping exists, and only unmaps it once. Protection against concurrent vmap/vunmap calls is provided by taking the }(hjhhhNhNubh)}(h :c:type:`dma_buf.lock `h]j)}(hjh]h dma_buf.lock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh mutex.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(hXFor full compatibility on the importer side with existing userspace interfaces, which might already support mmap'ing buffers. This is needed in many processing pipelines (e.g. feeding a software rendered image into a hardware pipeline, thumbnail creation, snapshots, ...). Also, Android's ION framework already supported this and for DMA buffer file descriptors to replace ION buffers mmap support was needed. There is no special interfaces, userspace simply calls mmap on the dma-buf fd. But like for CPU access there's a need to bracket the actual access, which is handled by the ioctl (DMA_BUF_IOCTL_SYNC). Note that DMA_BUF_IOCTL_SYNC can fail with -EAGAIN or -EINTR, in which case it must be restarted. Some systems might need some sort of cache coherency management e.g. when CPU and GPU domains are being accessed through dma-buf at the same time. To circumvent this problem there are begin/end coherency markers, that forward directly to existing dma-buf device drivers vfunc hooks. Userspace can make use of those markers through the DMA_BUF_IOCTL_SYNC ioctl. The sequence would be used like following: - mmap dma-buf fd - for each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write to mmap area 3. SYNC_END ioctl. This can be repeated as often as you want (with the new data being consumed by say the GPU or the scanout device) - munmap once you don't need the buffer any more For correctness and optimal performance, it is always required to use SYNC_START and SYNC_END before and after, respectively, when accessing the mapped address. Userspace cannot rely on coherent access, even when there are systems where it just works without calling these ioctls. h](h)}(hXFor full compatibility on the importer side with existing userspace interfaces, which might already support mmap'ing buffers. This is needed in many processing pipelines (e.g. feeding a software rendered image into a hardware pipeline, thumbnail creation, snapshots, ...). Also, Android's ION framework already supported this and for DMA buffer file descriptors to replace ION buffers mmap support was needed.h]hXFor full compatibility on the importer side with existing userspace interfaces, which might already support mmap’ing buffers. This is needed in many processing pipelines (e.g. feeding a software rendered image into a hardware pipeline, thumbnail creation, snapshots, ...). Also, Android’s ION framework already supported this and for DMA buffer file descriptors to replace ION buffers mmap support was needed.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM hj"ubh)}(hX)There is no special interfaces, userspace simply calls mmap on the dma-buf fd. But like for CPU access there's a need to bracket the actual access, which is handled by the ioctl (DMA_BUF_IOCTL_SYNC). Note that DMA_BUF_IOCTL_SYNC can fail with -EAGAIN or -EINTR, in which case it must be restarted.h]hX+There is no special interfaces, userspace simply calls mmap on the dma-buf fd. But like for CPU access there’s a need to bracket the actual access, which is handled by the ioctl (DMA_BUF_IOCTL_SYNC). Note that DMA_BUF_IOCTL_SYNC can fail with -EAGAIN or -EINTR, in which case it must be restarted.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM'hj"ubh)}(hXSome systems might need some sort of cache coherency management e.g. when CPU and GPU domains are being accessed through dma-buf at the same time. To circumvent this problem there are begin/end coherency markers, that forward directly to existing dma-buf device drivers vfunc hooks. Userspace can make use of those markers through the DMA_BUF_IOCTL_SYNC ioctl. The sequence would be used like following:h]hXSome systems might need some sort of cache coherency management e.g. when CPU and GPU domains are being accessed through dma-buf at the same time. To circumvent this problem there are begin/end coherency markers, that forward directly to existing dma-buf device drivers vfunc hooks. Userspace can make use of those markers through the DMA_BUF_IOCTL_SYNC ioctl. The sequence would be used like following:}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM-hj"ubh)}(hXE - mmap dma-buf fd - for each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write to mmap area 3. SYNC_END ioctl. This can be repeated as often as you want (with the new data being consumed by say the GPU or the scanout device) - munmap once you don't need the buffer any more For correctness and optimal performance, it is always required to use SYNC_START and SYNC_END before and after, respectively, when accessing the mapped address. Userspace cannot rely on coherent access, even when there are systems where it just works without calling these ioctls. h](h)}(hX%- mmap dma-buf fd - for each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write to mmap area 3. SYNC_END ioctl. This can be repeated as often as you want (with the new data being consumed by say the GPU or the scanout device) - munmap once you don't need the buffer any more h]h)}(hhh](h)}(hmmap dma-buf fdh]h)}(hj`h]hmmap dma-buf fd}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM4hj^ubah}(h]h ]h"]h$]h&]uh1hhj[ubh)}(hfor each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write to mmap area 3. SYNC_END ioctl. This can be repeated as often as you want (with the new data being consumed by say the GPU or the scanout device)h]h)}(hfor each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write to mmap area 3. SYNC_END ioctl. This can be repeated as often as you want (with the new data being consumed by say the GPU or the scanout device)h]hfor each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write to mmap area 3. SYNC_END ioctl. This can be repeated as often as you want (with the new data being consumed by say the GPU or the scanout device)}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM5hjvubah}(h]h ]h"]h$]h&]uh1hhj[ubh)}(h/munmap once you don't need the buffer any more h]h)}(h.munmap once you don't need the buffer any moreh]h0munmap once you don’t need the buffer any more}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM9hjubah}(h]h ]h"]h$]h&]uh1hhj[ubeh}(h]h ]h"]h$]h&]j>j?uh1hhjohM4hjWubah}(h]h ]h"]h$]h&]uh1hhjohM4hjSubh)}(hXFor correctness and optimal performance, it is always required to use SYNC_START and SYNC_END before and after, respectively, when accessing the mapped address. Userspace cannot rely on coherent access, even when there are systems where it just works without calling these ioctls.h]hXFor correctness and optimal performance, it is always required to use SYNC_START and SYNC_END before and after, respectively, when accessing the mapped address. Userspace cannot rely on coherent access, even when there are systems where it just works without calling these ioctls.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM;hjSubeh}(h]h ]h"]h$]h&]uh1hhjohM4hj"ubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(hXAnd as a CPU fallback in userspace processing pipelines. Similar to the motivation for kernel cpu access it is again important that the userspace code of a given importing subsystem can use the same interfaces with a imported dma-buf buffer object as with a native buffer object. This is especially important for drm where the userspace part of contemporary OpenGL, X, and other drivers is huge, and reworking them to use a different way to mmap a buffer rather invasive. The assumption in the current dma-buf interfaces is that redirecting the initial mmap is all that's needed. A survey of some of the existing subsystems shows that no driver seems to do any nefarious thing like syncing up with outstanding asynchronous processing on the device or allocating special resources at fault time. So hopefully this is good enough, since adding interfaces to intercept pagefaults and allow pte shootdowns would increase the complexity quite a bit. Interface: .. code-block:: c int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, unsigned long); If the importing subsystem simply provides a special-purpose mmap call to set up a mapping in userspace, calling do_mmap with :c:type:`dma_buf.file ` will equally achieve that for a dma-buf object. h](h)}(h8And as a CPU fallback in userspace processing pipelines.h]h8And as a CPU fallback in userspace processing pipelines.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM@hjubh)}(hXSimilar to the motivation for kernel cpu access it is again important that the userspace code of a given importing subsystem can use the same interfaces with a imported dma-buf buffer object as with a native buffer object. This is especially important for drm where the userspace part of contemporary OpenGL, X, and other drivers is huge, and reworking them to use a different way to mmap a buffer rather invasive.h]hXSimilar to the motivation for kernel cpu access it is again important that the userspace code of a given importing subsystem can use the same interfaces with a imported dma-buf buffer object as with a native buffer object. This is especially important for drm where the userspace part of contemporary OpenGL, X, and other drivers is huge, and reworking them to use a different way to mmap a buffer rather invasive.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMBhjubh)}(hXThe assumption in the current dma-buf interfaces is that redirecting the initial mmap is all that's needed. A survey of some of the existing subsystems shows that no driver seems to do any nefarious thing like syncing up with outstanding asynchronous processing on the device or allocating special resources at fault time. So hopefully this is good enough, since adding interfaces to intercept pagefaults and allow pte shootdowns would increase the complexity quite a bit.h]hXThe assumption in the current dma-buf interfaces is that redirecting the initial mmap is all that’s needed. A survey of some of the existing subsystems shows that no driver seems to do any nefarious thing like syncing up with outstanding asynchronous processing on the device or allocating special resources at fault time. So hopefully this is good enough, since adding interfaces to intercept pagefaults and allow pte shootdowns would increase the complexity quite a bit.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMIhjubh)}(h Interface:h]h Interface:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMQhjubj)}(hKint dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, unsigned long);h]hKint dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, unsigned long);}hjsbah}(h]h ]h"]h$]h&]jjjjjj}uh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMShjubh)}(hIf the importing subsystem simply provides a special-purpose mmap call to set up a mapping in userspace, calling do_mmap with :c:type:`dma_buf.file ` will equally achieve that for a dma-buf object.h](h~If the importing subsystem simply provides a special-purpose mmap call to set up a mapping in userspace, calling do_mmap with }(hjhhhNhNubh)}(h :c:type:`dma_buf.file `h]j)}(hj)h]h dma_buf.file}(hj+hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMWhjubh0 will equally achieve that for a dma-buf object.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhMWhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j?uh1hhjhM hjhhubeh}(h]jah ]h"] cpu access to dma buffer objectsah$]h&]uh1hhjmhhhhhKu referencedKubh)}(hhh](h)}(hImplicit Fence Poll Supporth]hImplicit Fence Poll Support}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehhhhhK{ubh)}(hX1To support cross-device and cross-driver synchronization of buffer access implicit fences (represented internally in the kernel with :c:type:`struct dma_fence `) can be attached to a :c:type:`dma_buf`. The glue for that and a few related things are provided in the :c:type:`dma_resv` structure.h](hTo support cross-device and cross-driver synchronization of buffer access implicit fences (represented internally in the kernel with }(hjvhhhNhNubh)}(h&:c:type:`struct dma_fence `h]j)}(hjh]hstruct dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chKhjvubh) can be attached to a }(hjvhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjh]hdma_buf}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hhjhKhjvubhA. The glue for that and a few related things are provided in the }(hjvhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjh]hdma_resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_resvuh1hhjhKhjvubh structure.}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjehhubh)}(hgUserspace can query the state of these implicitly tracked fences using poll() and related system calls:h]hgUserspace can query the state of these implicitly tracked fences using poll() and related system calls:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chKhjehhubh)}(hhh](h)}(hsChecking for EPOLLIN, i.e. read access, can be use to query the state of the most recent write or exclusive fence. h]h)}(hrChecking for EPOLLIN, i.e. read access, can be use to query the state of the most recent write or exclusive fence.h]hrChecking for EPOLLIN, i.e. read access, can be use to query the state of the most recent write or exclusive fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h|Checking for EPOLLOUT, i.e. write access, can be used to query the state of all attached fences, shared and exclusive ones. h]h)}(h{Checking for EPOLLOUT, i.e. write access, can be used to query the state of all attached fences, shared and exclusive ones.h]h{Checking for EPOLLOUT, i.e. write access, can be used to query the state of all attached fences, shared and exclusive ones.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chKhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j?uh1hhjhKhjehhubh)}(hNote that this only signals the completion of the respective fences, i.e. the DMA transfers are complete. Cache flushing and any other necessary preparations before CPU access can begin still need to happen.h]hNote that this only signals the completion of the respective fences, i.e. the DMA transfers are complete. Cache flushing and any other necessary preparations before CPU access can begin still need to happen.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chKhjehhubh)}(hAs an alternative to poll(), the set of fences on DMA buffer can be exported as a :c:type:`sync_file` using :c:type:`dma_buf_sync_file_export`.h](hRAs an alternative to poll(), the set of fences on DMA buffer can be exported as a }(hjGhhhNhNubh)}(h:c:type:`sync_file`h]j)}(hjQh]h sync_file}(hjShhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj sync_fileuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chKhjGubh using }(hjGhhhNhNubh)}(h":c:type:`dma_buf_sync_file_export`h]j)}(hjuh]hdma_buf_sync_file_export}(hjwhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_buf_sync_file_exportuh1hhjnhKhjGubh.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjnhKhjehhubeh}(h]jah ]h"]implicit fence poll supportah$]h&]uh1hhjmhhhhhK{jdKubh)}(hhh](h)}(hDMA-BUF statisticsh]hDMA-BUF statistics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h``/sys/kernel/debug/dma_buf/bufinfo`` provides an overview of every DMA-BUF in the system. However, since debugfs is not safe to be mounted in production, procfs and sysfs can be used to gather DMA-BUF statistics on production systems.h](j)}(h%``/sys/kernel/debug/dma_buf/bufinfo``h]h!/sys/kernel/debug/dma_buf/bufinfo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh provides an overview of every DMA-BUF in the system. However, since debugfs is not safe to be mounted in production, procfs and sysfs can be used to gather DMA-BUF statistics on production systems.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chKhjhhubh)}(hThe ``/proc//fdinfo/`` files in procfs can be used to gather information about DMA-BUF fds. Detailed documentation about the interface is present in Documentation/filesystems/proc.rst.h](hThe }(hjhhhNhNubj)}(h``/proc//fdinfo/``h]h/proc//fdinfo/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh files in procfs can be used to gather information about DMA-BUF fds. Detailed documentation about the interface is present in Documentation/filesystems/proc.rst.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chKhjhhubh)}(hX2Unfortunately, the existing procfs interfaces can only provide information about the DMA-BUFs for which processes hold fds or have the buffers mmapped into their address space. This necessitated the creation of the DMA-BUF sysfs statistics interface to provide per-buffer information on production systems.h]hX2Unfortunately, the existing procfs interfaces can only provide information about the DMA-BUFs for which processes hold fds or have the buffers mmapped into their address space. This necessitated the creation of the DMA-BUF sysfs statistics interface to provide per-buffer information on production systems.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chKhjhhubh)}(hThe interface at ``/sys/kernel/dmabuf/buffers`` exposes information about every DMA-BUF when ``CONFIG_DMABUF_SYSFS_STATS`` is enabled.h](hThe interface at }(hj hhhNhNubj)}(h``/sys/kernel/dmabuf/buffers``h]h/sys/kernel/dmabuf/buffers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh. exposes information about every DMA-BUF when }(hj hhhNhNubj)}(h``CONFIG_DMABUF_SYSFS_STATS``h]hCONFIG_DMABUF_SYSFS_STATS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is enabled.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chK"hjhhubh)}(h1The following stats are exposed by the interface:h]h1The following stats are exposed by the interface:}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chK%hjhhubh)}(hhh](h)}(h;``/sys/kernel/dmabuf/buffers//exporter_name``h]h)}(hjH h]j)}(hjH h]h7/sys/kernel/dmabuf/buffers//exporter_name}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ ubah}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chK'hjF ubah}(h]h ]h"]h$]h&]uh1hhjC ubh)}(h3``/sys/kernel/dmabuf/buffers//size`` h]h)}(h2``/sys/kernel/dmabuf/buffers//size``h]j)}(hjm h]h./sys/kernel/dmabuf/buffers//size}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk ubah}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chK(hjg ubah}(h]h ]h"]h$]h&]uh1hhjC ubeh}(h]h ]h"]h$]h&]j>*uh1hhj` hK'hjhhubh)}(hX%The information in the interface can also be used to derive per-exporter statistics. The data from the interface can be gathered on error conditions or other important events to provide a snapshot of DMA-BUF usage. It can also be collected periodically by telemetry to monitor various metrics.h]hX%The information in the interface can also be used to derive per-exporter statistics. The data from the interface can be gathered on error conditions or other important events to provide a snapshot of DMA-BUF usage. It can also be collected periodically by telemetry to monitor various metrics.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chK*hjhhubh)}(hoDetailed documentation about the interface is present in Documentation/ABI/testing/sysfs-kernel-dmabuf-buffers.h]hoDetailed documentation about the interface is present in Documentation/ABI/testing/sysfs-kernel-dmabuf-buffers.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chK/hjhhubeh}(h]dma-buf-statisticsah ]h"]dma-buf statisticsah$]h&]uh1hhjmhhhhhKjdKubh)}(hhh](h)}(hDMA Buffer ioctlsh]hDMA Buffer ioctls}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singledma_buf_sync (C struct)c.dma_buf_synchNtauh1j hj hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhNubhdesc)}(hhh](hdesc_signature)}(h dma_buf_synch]hdesc_signature_line)}(hstruct dma_buf_synch](hdesc_sig_keyword)}(hstructh]hstruct}(hj hhhNhNubah}(h]h ]kah"]h$]h&]uh1j hj hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKubhdesc_sig_space)}(h h]h }(hj hhhNhNubah}(h]h ]wah"]h$]h&]uh1j hj hhhj hKubh desc_name)}(h dma_buf_synch]h desc_sig_name)}(hj h]h dma_buf_sync}(hj hhhNhNubah}(h]h ]nah"]h$]h&]uh1j hj ubah}(h]h ](sig-namedescnameeh"]h$]h&]jjuh1j hj hhhj hKubeh}(h]h ]h"]h$]h&]jj add_permalinkuh1j sphinx_line_type declaratorhj hhhj hKubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j hj hKhj hhubh desc_content)}(hhh]h)}(hSynchronize with CPU access.h]hSynchronize with CPU access.}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjA hhubah}(h]h ]h"]h$]h&]uh1j? hj hhhj hKubeh}(h]h ](jstructeh"]h$]h&]domainjobjtypej\ desctypej\ noindex noindexentrynocontentsentryuh1j hhhj hj hNubh container)}(hX8**Definition**:: struct dma_buf_sync { __u64 flags; }; **Members** ``flags`` Set of access flags DMA_BUF_SYNC_START: Indicates the start of a map access session. DMA_BUF_SYNC_END: Indicates the end of a map access session. DMA_BUF_SYNC_READ: Indicates that the mapped DMA buffer will be read by the client via the CPU map. DMA_BUF_SYNC_WRITE: Indicates that the mapped DMA buffer will be written by the client via the CPU map. DMA_BUF_SYNC_RW: An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.h](h)}(h**Definition**::h](hstrong)}(h**Definition**h]h Definition}(hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjl ubh:}(hjl hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjh ubj)}(h)struct dma_buf_sync { __u64 flags; };h]h)struct dma_buf_sync { __u64 flags; };}hj sbah}(h]h ]h"]h$]h&]jjuh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK hjh ubh)}(h **Members**h]jq )}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK$hjh ubhdefinition_list)}(hhh]hdefinition_list_item)}(hX``flags`` Set of access flags DMA_BUF_SYNC_START: Indicates the start of a map access session. DMA_BUF_SYNC_END: Indicates the end of a map access session. DMA_BUF_SYNC_READ: Indicates that the mapped DMA buffer will be read by the client via the CPU map. DMA_BUF_SYNC_WRITE: Indicates that the mapped DMA buffer will be written by the client via the CPU map. DMA_BUF_SYNC_RW: An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.h](hterm)}(h ``flags``h]j)}(hj h]hflags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKIhj ubh definition)}(hhh](h)}(hSet of access flagsh]hSet of access flags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK9hj ubj )}(hhh](j )}(hADMA_BUF_SYNC_START: Indicates the start of a map access session. h](j )}(hDMA_BUF_SYNC_START:h]hDMA_BUF_SYNC_START:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK huh1j hjy hK8hja hhubj@ )}(hhh]h)}(hGet a sync_file from a dma-bufh]hGet a sync_file from a dma-buf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKYhj hhubah}(h]h ]h"]h$]h&]uh1j? hja hhhjy hK8ubeh}(h]h ](jstructeh"]h$]h&]j` jja j jb j jc jd je uh1j hhhj hj hNubjg )}(hX**Definition**:: struct dma_buf_export_sync_file { __u32 flags; __s32 fd; }; **Members** ``flags`` Read/write flags Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both. If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, the returned sync file waits on any writers of the dma-buf to complete. Waiting on the returned sync file is equivalent to poll() with POLLIN. If DMA_BUF_SYNC_WRITE is set, the returned sync file waits on any users of the dma-buf (read or write) to complete. Waiting on the returned sync file is equivalent to poll() with POLLOUT. If both DMA_BUF_SYNC_WRITE and DMA_BUF_SYNC_READ are set, this is equivalent to just DMA_BUF_SYNC_WRITE. ``fd`` Returned sync file descriptorh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK]hj ubj)}(hCstruct dma_buf_export_sync_file { __u32 flags; __s32 fd; };h]hCstruct dma_buf_export_sync_file { __u32 flags; __s32 fd; };}hj sbah}(h]h ]h"]h$]h&]jjuh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK_hj ubh)}(h **Members**h]jq )}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKdhj ubj )}(hhh](j )}(hXK``flags`` Read/write flags Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both. If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, the returned sync file waits on any writers of the dma-buf to complete. Waiting on the returned sync file is equivalent to poll() with POLLIN. If DMA_BUF_SYNC_WRITE is set, the returned sync file waits on any users of the dma-buf (read or write) to complete. Waiting on the returned sync file is equivalent to poll() with POLLOUT. If both DMA_BUF_SYNC_WRITE and DMA_BUF_SYNC_READ are set, this is equivalent to just DMA_BUF_SYNC_WRITE. h](j )}(h ``flags``h]j)}(hj h]hflags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj ubj )}(hhh](h)}(hRead/write flagsh]hRead/write flags}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKyhj1 ubh)}(h7Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both.h]h7Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both.}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK{hj1 ubh)}(hIf DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, the returned sync file waits on any writers of the dma-buf to complete. Waiting on the returned sync file is equivalent to poll() with POLLIN.h]hIf DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, the returned sync file waits on any writers of the dma-buf to complete. Waiting on the returned sync file is equivalent to poll() with POLLIN.}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK}hj1 ubh)}(hX%If DMA_BUF_SYNC_WRITE is set, the returned sync file waits on any users of the dma-buf (read or write) to complete. Waiting on the returned sync file is equivalent to poll() with POLLOUT. If both DMA_BUF_SYNC_WRITE and DMA_BUF_SYNC_READ are set, this is equivalent to just DMA_BUF_SYNC_WRITE.h]hX%If DMA_BUF_SYNC_WRITE is set, the returned sync file waits on any users of the dma-buf (read or write) to complete. Waiting on the returned sync file is equivalent to poll() with POLLOUT. If both DMA_BUF_SYNC_WRITE and DMA_BUF_SYNC_READ are set, this is equivalent to just DMA_BUF_SYNC_WRITE.}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj1 ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj0 hKhj ubj )}(h$``fd`` Returned sync file descriptorh](j )}(h``fd``h]j)}(hj h]hfd}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj| ubj )}(hhh]h)}(hReturned sync file descriptorh]hReturned sync file descriptor}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj ubah}(h]h ]h"]h$]h&]uh1j hj| ubeh}(h]h ]h"]h$]h&]uh1j hj hKhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj hhhj hNubh)}(h**Description**h]jq )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj hhubh)}(hX2Userspace can perform a DMA_BUF_IOCTL_EXPORT_SYNC_FILE to retrieve the current set of fences on a dma-buf file descriptor as a sync_file. CPU waits via poll() or other driver-specific mechanisms typically wait on whatever fences are on the dma-buf at the time the wait begins. This is similar except that it takes a snapshot of the current fences on the dma-buf for waiting later instead of waiting immediately. This is useful for modern graphics APIs such as Vulkan which assume an explicit synchronization model but still need to inter-operate with dma-buf.h]hX2Userspace can perform a DMA_BUF_IOCTL_EXPORT_SYNC_FILE to retrieve the current set of fences on a dma-buf file descriptor as a sync_file. CPU waits via poll() or other driver-specific mechanisms typically wait on whatever fences are on the dma-buf at the time the wait begins. This is similar except that it takes a snapshot of the current fences on the dma-buf for waiting later instead of waiting immediately. This is useful for modern graphics APIs such as Vulkan which assume an explicit synchronization model but still need to inter-operate with dma-buf.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKZhj hhubh)}(h,The intended usage pattern is the following:h]h,The intended usage pattern is the following:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKchj hhubh)}(hX1. Export a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE. 2. Submit rendering work which uses the dma-buf. The work should wait on the exported sync file before rendering and produce another sync_file when complete. 3. Import the rendering-complete sync_file into the dma-buf with flags corresponding to the GPU usage via DMA_BUF_IOCTL_IMPORT_SYNC_FILE. h]jY)}(hhh](h)}(hjExport a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE. h]h)}(hiExport a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE.h]hiExport a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKehjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hSubmit rendering work which uses the dma-buf. The work should wait on the exported sync file before rendering and produce another sync_file when complete. h]h)}(hSubmit rendering work which uses the dma-buf. The work should wait on the exported sync file before rendering and produce another sync_file when complete.h]hSubmit rendering work which uses the dma-buf. The work should wait on the exported sync file before rendering and produce another sync_file when complete.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hImport the rendering-complete sync_file into the dma-buf with flags corresponding to the GPU usage via DMA_BUF_IOCTL_IMPORT_SYNC_FILE. h]h)}(hImport the rendering-complete sync_file into the dma-buf with flags corresponding to the GPU usage via DMA_BUF_IOCTL_IMPORT_SYNC_FILE.h]hImport the rendering-complete sync_file into the dma-buf with flags corresponding to the GPU usage via DMA_BUF_IOCTL_IMPORT_SYNC_FILE.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKlhj2ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]j?j@jAhjBjCuh1jXhj ubah}(h]h ]h"]h$]h&]uh1hhjhKehj hhubh)}(hXPUnlike doing implicit synchronization via a GPU kernel driver's exec ioctl, the above is not a single atomic operation. If userspace wants to ensure ordering via these fences, it is the respnosibility of userspace to use locks or other mechanisms to ensure that no other context adds fences or submits work between steps 1 and 3 above.h]hXRUnlike doing implicit synchronization via a GPU kernel driver’s exec ioctl, the above is not a single atomic operation. If userspace wants to ensure ordering via these fences, it is the respnosibility of userspace to use locks or other mechanisms to ensure that no other context adds fences or submits work between steps 1 and 3 above.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKohj hhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_buf_import_sync_file (C struct)c.dma_buf_import_sync_filehNtauh1j hj hhhj hNubj )}(hhh](j )}(hdma_buf_import_sync_fileh]j )}(hstruct dma_buf_import_sync_fileh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKxubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{hhhjhKxubj )}(hdma_buf_import_sync_fileh]j )}(hjyh]hdma_buf_import_sync_file}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj{hhhjhKxubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjwhhhjhKxubah}(h]jrah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKxhjthhubj@ )}(hhh]h)}(h!Insert a sync_file into a dma-bufh]h!Insert a sync_file into a dma-buf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjthhhjhKxubeh}(h]h ](jstructeh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj hj hNubjg )}(hXp**Definition**:: struct dma_buf_import_sync_file { __u32 flags; __s32 fd; }; **Members** ``flags`` Read/write flags Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both. If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, this inserts the sync_file as a read-only fence. Any subsequent implicitly synchronized writes to this dma-buf will wait on this fence but reads will not. If DMA_BUF_SYNC_WRITE is set, this inserts the sync_file as a write fence. All subsequent implicitly synchronized access to this dma-buf will wait on this fence. ``fd`` Sync file descriptorh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjubj)}(hCstruct dma_buf_import_sync_file { __u32 flags; __s32 fd; };h]hCstruct dma_buf_import_sync_file { __u32 flags; __s32 fd; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjubh)}(h **Members**h]jq )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjubj )}(hhh](j )}(hX``flags`` Read/write flags Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both. If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, this inserts the sync_file as a read-only fence. Any subsequent implicitly synchronized writes to this dma-buf will wait on this fence but reads will not. If DMA_BUF_SYNC_WRITE is set, this inserts the sync_file as a write fence. All subsequent implicitly synchronized access to this dma-buf will wait on this fence. h](j )}(h ``flags``h]j)}(hj.h]hflags}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj(ubj )}(hhh](h)}(hRead/write flagsh]hRead/write flags}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjDubh)}(h7Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both.h]h7Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjDubh)}(hIf DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, this inserts the sync_file as a read-only fence. Any subsequent implicitly synchronized writes to this dma-buf will wait on this fence but reads will not.h]hIf DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, this inserts the sync_file as a read-only fence. Any subsequent implicitly synchronized writes to this dma-buf will wait on this fence but reads will not.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjDubh)}(hIf DMA_BUF_SYNC_WRITE is set, this inserts the sync_file as a write fence. All subsequent implicitly synchronized access to this dma-buf will wait on this fence.h]hIf DMA_BUF_SYNC_WRITE is set, this inserts the sync_file as a write fence. All subsequent implicitly synchronized access to this dma-buf will wait on this fence.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjDubeh}(h]h ]h"]h$]h&]uh1j hj(ubeh}(h]h ]h"]h$]h&]uh1j hjChKhj%ubj )}(h``fd`` Sync file descriptorh](j )}(h``fd``h]j)}(hjh]hfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjubj )}(hhh]h)}(hSync file descriptorh]hSync file descriptor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhj%ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj hhhj hNubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj hhubh)}(hXbUserspace can perform a DMA_BUF_IOCTL_IMPORT_SYNC_FILE to insert a sync_file into a dma-buf for the purposes of implicit synchronization with other dma-buf consumers. This allows clients using explicitly synchronized APIs such as Vulkan to inter-op with dma-buf consumers which expect implicit synchronization such as OpenGL or most media drivers/video.h]hXbUserspace can perform a DMA_BUF_IOCTL_IMPORT_SYNC_FILE to insert a sync_file into a dma-buf for the purposes of implicit synchronization with other dma-buf consumers. This allows clients using explicitly synchronized APIs such as Vulkan to inter-op with dma-buf consumers which expect implicit synchronization such as OpenGL or most media drivers/video.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj hhubeh}(h]jah ]h"]dma buffer ioctlsah$]h&]uh1hhjmhhhhhKjdKubh)}(hhh](h)}(hDMA-BUF locking conventionh]hDMA-BUF locking convention}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hIn order to avoid deadlock situations between dma-buf exports and importers, all dma-buf API users must follow the common dma-buf locking convention.h]hIn order to avoid deadlock situations between dma-buf exports and importers, all dma-buf API users must follow the common dma-buf locking convention.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM3hjhhubh)}(hConvention for importersh]hConvention for importers}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM6hjhhubjY)}(hhh](h)}(hImporters must hold the dma-buf reservation lock when calling these functions: - dma_buf_pin() - dma_buf_unpin() - dma_buf_map_attachment() - dma_buf_unmap_attachment() - dma_buf_vmap() - dma_buf_vunmap() h](h)}(hNImporters must hold the dma-buf reservation lock when calling these functions:h]hNImporters must hold the dma-buf reservation lock when calling these functions:}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM8hj6ubh)}(h~- dma_buf_pin() - dma_buf_unpin() - dma_buf_map_attachment() - dma_buf_unmap_attachment() - dma_buf_vmap() - dma_buf_vunmap() h]h)}(hhh](h)}(h dma_buf_pin()h]h)}(hjRh]h dma_buf_pin()}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM;hjPubah}(h]h ]h"]h$]h&]uh1hhjMubh)}(hdma_buf_unpin()h]h)}(hjjh]hdma_buf_unpin()}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM<hjhubah}(h]h ]h"]h$]h&]uh1hhjMubh)}(hdma_buf_map_attachment()h]h)}(hjh]hdma_buf_map_attachment()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM=hjubah}(h]h ]h"]h$]h&]uh1hhjMubh)}(hdma_buf_unmap_attachment()h]h)}(hjh]hdma_buf_unmap_attachment()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM>hjubah}(h]h ]h"]h$]h&]uh1hhjMubh)}(hdma_buf_vmap()h]h)}(hjh]hdma_buf_vmap()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM?hjubah}(h]h ]h"]h$]h&]uh1hhjMubh)}(hdma_buf_vunmap() h]h)}(hdma_buf_vunmap()h]hdma_buf_vunmap()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM@hjubah}(h]h ]h"]h$]h&]uh1hhjMubeh}(h]h ]h"]h$]h&]j>j?uh1hhjahM;hjIubah}(h]h ]h"]h$]h&]uh1hhjahM;hj6ubeh}(h]h ]h"]h$]h&]uh1hhj3ubh)}(hXImporters must not hold the dma-buf reservation lock when calling these functions: - dma_buf_attach() - dma_buf_dynamic_attach() - dma_buf_detach() - dma_buf_export() - dma_buf_fd() - dma_buf_get() - dma_buf_put() - dma_buf_mmap() - dma_buf_begin_cpu_access() - dma_buf_end_cpu_access() - dma_buf_map_attachment_unlocked() - dma_buf_unmap_attachment_unlocked() - dma_buf_vmap_unlocked() - dma_buf_vunmap_unlocked() h](h)}(hRImporters must not hold the dma-buf reservation lock when calling these functions:h]hRImporters must not hold the dma-buf reservation lock when calling these functions:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMBhjubh)}(hXL- dma_buf_attach() - dma_buf_dynamic_attach() - dma_buf_detach() - dma_buf_export() - dma_buf_fd() - dma_buf_get() - dma_buf_put() - dma_buf_mmap() - dma_buf_begin_cpu_access() - dma_buf_end_cpu_access() - dma_buf_map_attachment_unlocked() - dma_buf_unmap_attachment_unlocked() - dma_buf_vmap_unlocked() - dma_buf_vunmap_unlocked() h]h)}(hhh](h)}(hdma_buf_attach()h]h)}(hjh]hdma_buf_attach()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMEhj ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_dynamic_attach()h]h)}(hj'h]hdma_buf_dynamic_attach()}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMFhj%ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_detach()h]h)}(hj?h]hdma_buf_detach()}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMGhj=ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_export()h]h)}(hjWh]hdma_buf_export()}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMHhjUubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h dma_buf_fd()h]h)}(hjoh]h dma_buf_fd()}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMIhjmubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h dma_buf_get()h]h)}(hjh]h dma_buf_get()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMJhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h dma_buf_put()h]h)}(hjh]h dma_buf_put()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMKhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_mmap()h]h)}(hjh]hdma_buf_mmap()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMLhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_begin_cpu_access()h]h)}(hjh]hdma_buf_begin_cpu_access()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMMhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_end_cpu_access()h]h)}(hjh]hdma_buf_end_cpu_access()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMNhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h!dma_buf_map_attachment_unlocked()h]h)}(hjh]h!dma_buf_map_attachment_unlocked()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMOhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h#dma_buf_unmap_attachment_unlocked()h]h)}(hjh]h#dma_buf_unmap_attachment_unlocked()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMPhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_vmap_unlocked()h]h)}(hj/h]hdma_buf_vmap_unlocked()}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMQhj-ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_vunmap_unlocked() h]h)}(hdma_buf_vunmap_unlocked()h]hdma_buf_vunmap_unlocked()}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMRhjEubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]j>j?uh1hhjhMEhjubah}(h]h ]h"]h$]h&]uh1hhjhMEhjubeh}(h]h ]h"]h$]h&]uh1hhj3ubeh}(h]h ]h"]h$]h&]j?j@jAhjBjCuh1jXhjhhhNhNubh)}(hConvention for exportersh]hConvention for exporters}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMThjhhubjY)}(hhh](h)}(hXThese :c:type:`dma_buf_ops` callbacks are invoked with unlocked dma-buf reservation and exporter can take the lock: - :c:type:`dma_buf_ops.attach\(\) ` - :c:type:`dma_buf_ops.detach\(\) ` - :c:type:`dma_buf_ops.release\(\) ` - :c:type:`dma_buf_ops.begin_cpu_access\(\) ` - :c:type:`dma_buf_ops.end_cpu_access\(\) ` - :c:type:`dma_buf_ops.mmap\(\) ` h](h)}(hsThese :c:type:`dma_buf_ops` callbacks are invoked with unlocked dma-buf reservation and exporter can take the lock:h](hThese }(hjhhhNhNubh)}(h:c:type:`dma_buf_ops`h]j)}(hjh]h dma_buf_ops}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]sbj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMVhjubhX callbacks are invoked with unlocked dma-buf reservation and exporter can take the lock:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMVhjubh)}(hX7- :c:type:`dma_buf_ops.attach\(\) ` - :c:type:`dma_buf_ops.detach\(\) ` - :c:type:`dma_buf_ops.release\(\) ` - :c:type:`dma_buf_ops.begin_cpu_access\(\) ` - :c:type:`dma_buf_ops.end_cpu_access\(\) ` - :c:type:`dma_buf_ops.mmap\(\) ` h]h)}(hhh](h)}(h.:c:type:`dma_buf_ops.attach\(\) `h]h)}(hjh]h)}(h.:c:type:`dma_buf_ops.attach\(\) `h]j)}(hjh]hdma_buf_ops.attach()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMYhjubah}(h]h ]h"]h$]h&]uh1hhjhMYhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h.:c:type:`dma_buf_ops.detach\(\) `h]h)}(hjh]h)}(h.:c:type:`dma_buf_ops.detach\(\) `h]j)}(hj h]hdma_buf_ops.detach()}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMZhjubah}(h]h ]h"]h$]h&]uh1hhj&hMZhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h/:c:type:`dma_buf_ops.release\(\) `h]h)}(hj5h]h)}(h/:c:type:`dma_buf_ops.release\(\) `h]j)}(hj<h]hdma_buf_ops.release()}(hj>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM[hj7ubah}(h]h ]h"]h$]h&]uh1hhjYhM[hj3ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h8:c:type:`dma_buf_ops.begin_cpu_access\(\) `h]h)}(hjhh]h)}(h8:c:type:`dma_buf_ops.begin_cpu_access\(\) `h]j)}(hjoh]hdma_buf_ops.begin_cpu_access()}(hjqhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM\hjjubah}(h]h ]h"]h$]h&]uh1hhjhM\hjfubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h6:c:type:`dma_buf_ops.end_cpu_access\(\) `h]h)}(hjh]h)}(h6:c:type:`dma_buf_ops.end_cpu_access\(\) `h]j)}(hjh]hdma_buf_ops.end_cpu_access()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM]hjubah}(h]h ]h"]h$]h&]uh1hhjhM]hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h-:c:type:`dma_buf_ops.mmap\(\) ` h]h)}(h,:c:type:`dma_buf_ops.mmap\(\) `h]h)}(h,:c:type:`dma_buf_ops.mmap\(\) `h]j)}(hjh]hdma_buf_ops.mmap()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM^hjubah}(h]h ]h"]h$]h&]uh1hhjhM^hjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j?uh1hhjhMYhjubah}(h]h ]h"]h$]h&]uh1hhjhMYhjubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(hXThese :c:type:`dma_buf_ops` callbacks are invoked with locked dma-buf reservation and exporter can't take the lock: - :c:type:`dma_buf_ops.pin\(\) ` - :c:type:`dma_buf_ops.unpin\(\) ` - :c:type:`dma_buf_ops.map_dma_buf\(\) ` - :c:type:`dma_buf_ops.unmap_dma_buf\(\) ` - :c:type:`dma_buf_ops.vmap\(\) ` - :c:type:`dma_buf_ops.vunmap\(\) ` h](h)}(hsThese :c:type:`dma_buf_ops` callbacks are invoked with locked dma-buf reservation and exporter can't take the lock:h](hThese }(hjhhhNhNubh)}(h:c:type:`dma_buf_ops`h]j)}(hj h]h dma_buf_ops}(hj"hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM`hjubhZ callbacks are invoked with locked dma-buf reservation and exporter can’t take the lock:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj=hM`hjubh)}(hX,- :c:type:`dma_buf_ops.pin\(\) ` - :c:type:`dma_buf_ops.unpin\(\) ` - :c:type:`dma_buf_ops.map_dma_buf\(\) ` - :c:type:`dma_buf_ops.unmap_dma_buf\(\) ` - :c:type:`dma_buf_ops.vmap\(\) ` - :c:type:`dma_buf_ops.vunmap\(\) ` h]h)}(hhh](h)}(h+:c:type:`dma_buf_ops.pin\(\) `h]h)}(hjQh]h)}(h+:c:type:`dma_buf_ops.pin\(\) `h]j)}(hjXh]hdma_buf_ops.pin()}(hjZhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMchjSubah}(h]h ]h"]h$]h&]uh1hhjuhMchjOubah}(h]h ]h"]h$]h&]uh1hhjLubh)}(h-:c:type:`dma_buf_ops.unpin\(\) `h]h)}(hjh]h)}(h-:c:type:`dma_buf_ops.unpin\(\) `h]j)}(hjh]hdma_buf_ops.unpin()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMdhjubah}(h]h ]h"]h$]h&]uh1hhjhMdhjubah}(h]h ]h"]h$]h&]uh1hhjLubh)}(h3:c:type:`dma_buf_ops.map_dma_buf\(\) `h]h)}(hjh]h)}(h3:c:type:`dma_buf_ops.map_dma_buf\(\) `h]j)}(hjh]hdma_buf_ops.map_dma_buf()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMehjubah}(h]h ]h"]h$]h&]uh1hhjhMehjubah}(h]h ]h"]h$]h&]uh1hhjLubh)}(h5:c:type:`dma_buf_ops.unmap_dma_buf\(\) `h]h)}(hjh]h)}(h5:c:type:`dma_buf_ops.unmap_dma_buf\(\) `h]j)}(hjh]hdma_buf_ops.unmap_dma_buf()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMfhjubah}(h]h ]h"]h$]h&]uh1hhjhMfhjubah}(h]h ]h"]h$]h&]uh1hhjLubh)}(h,:c:type:`dma_buf_ops.vmap\(\) `h]h)}(hjh]h)}(h,:c:type:`dma_buf_ops.vmap\(\) `h]j)}(hj$h]hdma_buf_ops.vmap()}(hj&hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMghjubah}(h]h ]h"]h$]h&]uh1hhjAhMghjubah}(h]h ]h"]h$]h&]uh1hhjLubh)}(h/:c:type:`dma_buf_ops.vunmap\(\) ` h]h)}(h.:c:type:`dma_buf_ops.vunmap\(\) `h]h)}(h.:c:type:`dma_buf_ops.vunmap\(\) `h]j)}(hjXh]hdma_buf_ops.vunmap()}(hjZhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMhhjRubah}(h]h ]h"]h$]h&]uh1hhjuhMhhjNubah}(h]h ]h"]h$]h&]uh1hhjLubeh}(h]h ]h"]h$]h&]j>j?uh1hhjuhMchjHubah}(h]h ]h"]h$]h&]uh1hhjuhMchjubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(hiExporters must hold the dma-buf reservation lock when calling these functions: - dma_buf_move_notify() h](h)}(hNExporters must hold the dma-buf reservation lock when calling these functions:h]hNExporters must hold the dma-buf reservation lock when calling these functions:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMjhjubh)}(h- dma_buf_move_notify() h]h)}(hhh]h)}(hdma_buf_move_notify() h]h)}(hdma_buf_move_notify()h]hdma_buf_move_notify()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMmhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]j>j?uh1hhjhMmhjubah}(h]h ]h"]h$]h&]uh1hhjhMmhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j?j@jAhjBjCuh1jXhjhhhNhNubeh}(h]dma-buf-locking-conventionah ]h"]dma-buf locking conventionah$]h&]uh1hhjmhhhhhKubh)}(hhh](h)}(h)Kernel Functions and Structures Referenceh]h)Kernel Functions and Structures Reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_export (C function)c.dma_buf_exporthNtauh1j hjhhhNhNubj )}(hhh](j )}(hLstruct dma_buf * dma_buf_export (const struct dma_buf_export_info *exp_info)h]j )}(hJstruct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMqubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhjhMqubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetj2modnameN classnameNjj)}j]j ASTIdentifier)}jFdma_buf_exportsbc.dma_buf_exportasbuh1hhj hhhjhMqubj )}(h h]h }(hjThhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhjhMqubhdesc_sig_punctuation)}(hj h]h*}(hjdhhhNhNubah}(h]h ]pah"]h$]h&]uh1jbhj hhhjhMqubj )}(hdma_buf_exporth]j )}(hjQh]hdma_buf_export}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj hhhjhMqubhdesc_parameterlist)}(h,(const struct dma_buf_export_info *exp_info)h]hdesc_parameter)}(h*const struct dma_buf_export_info *exp_infoh](j )}(hconsth]hconst}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_buf_export_infoh]hdma_buf_export_info}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jOc.dma_buf_exportasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hexp_infoh]hexp_info}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj hhhjhMqubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj hhhjhMqubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMqhjhhubj@ )}(hhh]h)}(hCreates a new dma_buf, and associates an anon file with this buffer, so it can be exported. Also connect the allocator specific data and ops to the buffer. Additionally, provide a name string for exporter; useful in debugging.h]hCreates a new dma_buf, and associates an anon file with this buffer, so it can be exported. Also connect the allocator specific data and ops to the buffer. Additionally, provide a name string for exporter; useful in debugging.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM`hj/hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMqubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jJjb jJjc jd je uh1j hhhjhNhNubjg )}(hXD**Parameters** ``const struct dma_buf_export_info *exp_info`` [in] holds all the export related information provided by the exporter. see :c:type:`struct dma_buf_export_info ` for further details. **Description** Returns, on success, a newly created struct dma_buf object, which wraps the supplied private data and operations for struct dma_buf_ops. On either missing ops, or error in allocating struct dma_buf, will return negative error. For most cases the easiest way to create **exp_info** is through the ``DEFINE_DMA_BUF_EXPORT_INFO`` macro.h](h)}(h**Parameters**h]jq )}(hjTh]h Parameters}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjRubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMdhjNubj )}(hhh]j )}(h``const struct dma_buf_export_info *exp_info`` [in] holds all the export related information provided by the exporter. see :c:type:`struct dma_buf_export_info ` for further details. h](j )}(h.``const struct dma_buf_export_info *exp_info``h]j)}(hjsh]h*const struct dma_buf_export_info *exp_info}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMghjmubj )}(hhh]h)}(h[in] holds all the export related information provided by the exporter. see :c:type:`struct dma_buf_export_info ` for further details.h](hO[in] holds all the export related information provided by the exporter. see }(hjhhhNhNubh)}(h::c:type:`struct dma_buf_export_info `h]j)}(hjh]hstruct dma_buf_export_info}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_export_infouh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMehjubh for further details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMehjubah}(h]h ]h"]h$]h&]uh1j hjmubeh}(h]h ]h"]h$]h&]uh1j hjhMghjjubah}(h]h ]h"]h$]h&]uh1j hjNubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMihjNubh)}(hReturns, on success, a newly created struct dma_buf object, which wraps the supplied private data and operations for struct dma_buf_ops. On either missing ops, or error in allocating struct dma_buf, will return negative error.h]hReturns, on success, a newly created struct dma_buf object, which wraps the supplied private data and operations for struct dma_buf_ops. On either missing ops, or error in allocating struct dma_buf, will return negative error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMihjNubh)}(hjFor most cases the easiest way to create **exp_info** is through the ``DEFINE_DMA_BUF_EXPORT_INFO`` macro.h](h)For most cases the easiest way to create }(hjhhhNhNubjq )}(h **exp_info**h]hexp_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh is through the }(hjhhhNhNubj)}(h``DEFINE_DMA_BUF_EXPORT_INFO``h]hDEFINE_DMA_BUF_EXPORT_INFO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh macro.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMnhjNubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_fd (C function) c.dma_buf_fdhNtauh1j hjhhhNhNubj )}(hhh](j )}(h2int dma_buf_fd (struct dma_buf *dmabuf, int flags)h]j )}(h1int dma_buf_fd(struct dma_buf *dmabuf, int flags)h](hdesc_sig_keyword_type)}(hinth]hint}(hjLhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jJhjFhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjFhhhj[hMubj )}(h dma_buf_fdh]j )}(h dma_buf_fdh]h dma_buf_fd}(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjFhhhj[hMubj)}(h#(struct dma_buf *dmabuf, int flags)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjpsb c.dma_buf_fdasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hdmabufh]hdmabuf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h int flagsh](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hflagsh]hflags}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjFhhhj[hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjBhhhj[hMubah}(h]j=ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj[hMhj?hhubj@ )}(hhh]h)}(h6returns a file descriptor for the given struct dma_bufh]h6returns a file descriptor for the given struct dma_buf}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj?hhubah}(h]h ]h"]h$]h&]uh1j? hj?hhhj[hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jZjb jZjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] pointer to dma_buf for which fd is required. ``int flags`` [in] flags to give to fd **Description** On success, returns an associated 'fd'. Else, returns error.h](h)}(h**Parameters**h]jq )}(hjdh]h Parameters}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjbubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj^ubj )}(hhh](j )}(hP``struct dma_buf *dmabuf`` [in] pointer to dma_buf for which fd is required. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjh]hstruct dma_buf *dmabuf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj}ubj )}(hhh]h)}(h4[in] pointer to dma_buf for which fd is required.h]h4[in] pointer to dma_buf for which fd is required.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hj}ubeh}(h]h ]h"]h$]h&]uh1j hjhMhjzubj )}(h*``int flags`` [in] flags to give to fd h](j )}(h ``int flags``h]j)}(hjh]h int flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]h)}(hn] flags to give to fdh]hn] flags to give to fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjzubeh}(h]h ]h"]h$]h&]uh1j hj^ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj^ubh)}(h huh1j hjIhMhj1hhubj@ )}(hhh]h)}(h+returns the struct dma_buf related to an fdh]h+returns the struct dma_buf related to an fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hj1hhhjIhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``int fd`` [in] fd associated with the struct dma_buf to be returned **Description** On success, returns the struct dma_buf associated with an fd; uses file's refcounting done by fget to increase refcount. returns ERR_PTR otherwise.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]j )}(hH``int fd`` [in] fd associated with the struct dma_buf to be returned h](j )}(h ``int fd``h]j)}(hj=h]hint fd}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj7ubj )}(hhh]h)}(h<[in] fd associated with the struct dma_buf to be returnedh]h<[in] fd associated with the struct dma_buf to be returned}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjSubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hjRhMhj4ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjxh]h Description}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjvubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubh)}(hOn success, returns the struct dma_buf associated with an fd; uses file's refcounting done by fget to increase refcount. returns ERR_PTR otherwise.h]hOn success, returns the struct dma_buf associated with an fd; uses file’s refcounting done by fget to increase refcount. returns ERR_PTR otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_put (C function) c.dma_buf_puthNtauh1j hjhhhNhNubj )}(hhh](j )}(h)void dma_buf_put (struct dma_buf *dmabuf)h]j )}(h(void dma_buf_put(struct dma_buf *dmabuf)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(h dma_buf_puth]j )}(h dma_buf_puth]h dma_buf_put}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsb c.dma_buf_putasbuh1hhjubj )}(h h]h }(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjFhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hdmabufh]hdmabuf}(hjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h decreases refcount of the bufferh]h decreases refcount of the buffer}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjzhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to reduce refcount of **Description** Uses file's refcounting done implicitly by fput(). If, as a result of this call, the refcount becomes 0, the 'release' file operation related to this fd is called. It calls :c:type:`dma_buf_ops.release ` vfunc in turn, and frees the memory allocated for dmabuf when exported.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]j )}(h@``struct dma_buf *dmabuf`` [in] buffer to reduce refcount of h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjh]hstruct dma_buf *dmabuf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]h)}(h$[in] buffer to reduce refcount ofh]h$[in] buffer to reduce refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubh)}(h2Uses file's refcounting done implicitly by fput().h]h4Uses file’s refcounting done implicitly by fput().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubh)}(hIf, as a result of this call, the refcount becomes 0, the 'release' file operation related to this fd is called. It calls :c:type:`dma_buf_ops.release ` vfunc in turn, and frees the memory allocated for dmabuf when exported.h](h~If, as a result of this call, the refcount becomes 0, the ‘release’ file operation related to this fd is called. It calls }(hjhhhNhNubh)}(h+:c:type:`dma_buf_ops.release `h]j)}(hj(h]hdma_buf_ops.release}(hj*hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubhH vfunc in turn, and frees the memory allocated for dmabuf when exported.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjEhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_buf_dynamic_attach (C function)c.dma_buf_dynamic_attachhNtauh1j hjhhhNhNubj )}(hhh](j )}(hstruct dma_buf_attachment * dma_buf_dynamic_attach (struct dma_buf *dmabuf, struct device *dev, const struct dma_buf_attach_ops *importer_ops, void *importer_priv)h]j )}(hstruct dma_buf_attachment *dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev, const struct dma_buf_attach_ops *importer_ops, void *importer_priv)h](j )}(hj h]hstruct}(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlhhhj}hMubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_buf_dynamic_attachsbc.dma_buf_dynamic_attachasbuh1hhjlhhhj}hMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlhhhj}hMubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjlhhhj}hMubj )}(hdma_buf_dynamic_attachh]j )}(hjh]hdma_buf_dynamic_attach}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjlhhhj}hMubj)}(hp(struct dma_buf *dmabuf, struct device *dev, const struct dma_buf_attach_ops *importer_ops, void *importer_priv)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj modnameN classnameNjj)}j]jc.dma_buf_dynamic_attachasbuh1hhjubj )}(h h]h }(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj4hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hdmabufh]hdmabuf}(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct device *devh](j )}(hj h]hstruct}(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubj )}(h h]h }(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubh)}(hhh]j )}(hdeviceh]hdevice}(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjzmodnameN classnameNjj)}j]jc.dma_buf_dynamic_attachasbuh1hhjVubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjVubj )}(hdevh]hdev}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h-const struct dma_buf_attach_ops *importer_opsh](j )}(hjh]hconst}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_buf_attach_opsh]hdma_buf_attach_ops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_buf_dynamic_attachasbuh1hhjubj )}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj/hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(h importer_opsh]h importer_ops}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hvoid *importer_privh](jK)}(hvoidh]hvoid}(hjUhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjQubj )}(h h]h }(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQubjc)}(hj h]h*}(hjqhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjQubj )}(h importer_privh]h importer_priv}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjlhhhj}hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhhj}hMubah}(h]jcah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj}hMhjehhubj@ )}(hhh]h)}(h,Add the device to dma_buf's attachments listh]h.Add the device to dma_buf’s attachments list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMshjhhubah}(h]h ]h"]h$]h&]uh1j? hjehhhj}hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to attach device to. ``struct device *dev`` [in] device to be attached. ``const struct dma_buf_attach_ops *importer_ops`` [in] importer operations for the attachment ``void *importer_priv`` [in] importer private pointer for the attachment **Description** Returns struct dma_buf_attachment pointer for this attachment. Attachments must be cleaned up by calling dma_buf_detach(). Optionally this calls :c:type:`dma_buf_ops.attach ` to allow device-specific attach functionality. A pointer to newly created :c:type:`dma_buf_attachment` on success, or a negative error code wrapped into a pointer on failure. Note that this can fail if the backing storage of **dmabuf** is in a place not accessible to **dev**, and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY. **Return**h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMwhjubj )}(hhh](j )}(h?``struct dma_buf *dmabuf`` [in] buffer to attach device to. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjh]hstruct dma_buf *dmabuf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMthjubj )}(hhh]h)}(h#[in] buffer to attach device to.h]h#[in] buffer to attach device to.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMthjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMthjubj )}(h6``struct device *dev`` [in] device to be attached. h](j )}(h``struct device *dev``h]j)}(hj" h]hstruct device *dev}(hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMuhj ubj )}(hhh]h)}(h[in] device to be attached.h]h[in] device to be attached.}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7 hMuhj8 ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj7 hMuhjubj )}(ha``const struct dma_buf_attach_ops *importer_ops`` [in] importer operations for the attachment h](j )}(h1``const struct dma_buf_attach_ops *importer_ops``h]j)}(hj[ h]h-const struct dma_buf_attach_ops *importer_ops}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjY ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMvhjU ubj )}(hhh]h)}(h.[in] importer operations for the attachmenth]h.[in] importer operations for the attachment}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjp hMvhjq ubah}(h]h ]h"]h$]h&]uh1j hjU ubeh}(h]h ]h"]h$]h&]uh1j hjp hMvhjubj )}(hL``void *importer_priv`` [in] importer private pointer for the attachment h](j )}(h``void *importer_priv``h]j)}(hj h]hvoid *importer_priv}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMwhj ubj )}(hhh]h)}(h3[in] importer private pointer for the attachmenth]h3[in] importer private pointer for the attachment}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMwhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hMwhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMyhjubh)}(hzReturns struct dma_buf_attachment pointer for this attachment. Attachments must be cleaned up by calling dma_buf_detach().h]hzReturns struct dma_buf_attachment pointer for this attachment. Attachments must be cleaned up by calling dma_buf_detach().}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMyhjubh)}(hoOptionally this calls :c:type:`dma_buf_ops.attach ` to allow device-specific attach functionality.h](hOptionally this calls }(hj hhhNhNubh)}(h*:c:type:`dma_buf_ops.attach `h]j)}(hj h]hdma_buf_ops.attach}(hj!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM|hj ubh/ to allow device-specific attach functionality.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj!hM|hjubh)}(hA pointer to newly created :c:type:`dma_buf_attachment` on success, or a negative error code wrapped into a pointer on failure.h](hA pointer to newly created }(hj&!hhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hj0!h]hdma_buf_attachment}(hj2!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj.!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj&!ubhH on success, or a negative error code wrapped into a pointer on failure.}(hj&!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjM!hMhjubh)}(hNote that this can fail if the backing storage of **dmabuf** is in a place not accessible to **dev**, and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY.h](h2Note that this can fail if the backing storage of }(hjX!hhhNhNubjq )}(h **dmabuf**h]hdmabuf}(hj`!hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjX!ubh! is in a place not accessible to }(hjX!hhhNhNubjq )}(h**dev**h]hdev}(hjr!hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjX!ubh], and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY.}(hjX!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubh)}(h **Return**h]jq )}(hj!h]hReturn}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj!ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_attach (C function)c.dma_buf_attachhNtauh1j hjhhhNhNubj )}(hhh](j )}(hWstruct dma_buf_attachment * dma_buf_attach (struct dma_buf *dmabuf, struct device *dev)h]j )}(hUstruct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, struct device *dev)h](j )}(hj h]hstruct}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!hhhj!hMubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj!modnameN classnameNjj)}j]jN)}jFdma_buf_attachsbc.dma_buf_attachasbuh1hhj!hhhj!hMubj )}(h h]h }(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!hhhj!hMubjc)}(hj h]h*}(hj"hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj!hhhj!hMubj )}(hdma_buf_attachh]j )}(hj"h]hdma_buf_attach}(hj""hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj!hhhj!hMubj)}(h,(struct dma_buf *dmabuf, struct device *dev)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj="hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9"ubj )}(h h]h }(hjJ"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9"ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj["hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjX"ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj]"modnameN classnameNjj)}j]j!c.dma_buf_attachasbuh1hhj9"ubj )}(h h]h }(hjy"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9"ubjc)}(hj h]h*}(hj"hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj9"ubj )}(hdmabufh]hdmabuf}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9"ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj5"ubj)}(hstruct device *devh](j )}(hj h]hstruct}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubj )}(h h]h }(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubh)}(hhh]j )}(hdeviceh]hdevice}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj"modnameN classnameNjj)}j]j!c.dma_buf_attachasbuh1hhj"ubj )}(h h]h }(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubjc)}(hj h]h*}(hj"hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj"ubj )}(hdevh]hdev}(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj5"ubeh}(h]h ]h"]h$]h&]jjuh1jhj!hhhj!hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj!hhhj!hMubah}(h]j!ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj!hMhj!hhubj@ )}(hhh]h)}(h"Wrapper for dma_buf_dynamic_attachh]h"Wrapper for dma_buf_dynamic_attach}(hj.#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj+#hhubah}(h]h ]h"]h$]h&]uh1j? hj!hhhj!hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jF#jb jF#jc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to attach device to. ``struct device *dev`` [in] device to be attached. **Description** Wrapper to call dma_buf_dynamic_attach() for drivers which still use a static mapping.h](h)}(h**Parameters**h]jq )}(hjP#h]h Parameters}(hjR#hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjN#ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjJ#ubj )}(hhh](j )}(h?``struct dma_buf *dmabuf`` [in] buffer to attach device to. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjo#h]hstruct dma_buf *dmabuf}(hjq#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm#ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhji#ubj )}(hhh]h)}(h#[in] buffer to attach device to.h]h#[in] buffer to attach device to.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMhj#ubah}(h]h ]h"]h$]h&]uh1j hji#ubeh}(h]h ]h"]h$]h&]uh1j hj#hMhjf#ubj )}(h6``struct device *dev`` [in] device to be attached. h](j )}(h``struct device *dev``h]j)}(hj#h]hstruct device *dev}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj#ubj )}(hhh]h)}(h[in] device to be attached.h]h[in] device to be attached.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMhj#ubah}(h]h ]h"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]uh1j hj#hMhjf#ubeh}(h]h ]h"]h$]h&]uh1j hjJ#ubh)}(h**Description**h]jq )}(hj#h]h Description}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj#ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjJ#ubh)}(hVWrapper to call dma_buf_dynamic_attach() for drivers which still use a static mapping.h]hVWrapper to call dma_buf_dynamic_attach() for drivers which still use a static mapping.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjJ#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_detach (C function)c.dma_buf_detachhNtauh1j hjhhhNhNubj )}(hhh](j )}(hOvoid dma_buf_detach (struct dma_buf *dmabuf, struct dma_buf_attachment *attach)h]j )}(hNvoid dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)h](jK)}(hvoidh]hvoid}(hj($hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj$$hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj7$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$$hhhj6$hMubj )}(hdma_buf_detachh]j )}(hdma_buf_detachh]hdma_buf_detach}(hjI$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjE$ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj$$hhhj6$hMubj)}(h;(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hje$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hja$ubj )}(h h]h }(hjr$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hja$ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj$modnameN classnameNjj)}j]jN)}jFjK$sbc.dma_buf_detachasbuh1hhja$ubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hja$ubjc)}(hj h]h*}(hj$hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhja$ubj )}(hdmabufh]hdmabuf}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hja$ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj]$ubj)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj$modnameN classnameNjj)}j]j$c.dma_buf_detachasbuh1hhj$ubj )}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubjc)}(hj h]h*}(hj!%hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj$ubj )}(hattachh]hattach}(hj.%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj]$ubeh}(h]h ]h"]h$]h&]jjuh1jhj$$hhhj6$hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj $hhhj6$hMubah}(h]j$ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj6$hMhj$hhubj@ )}(hhh]h)}(h:Remove the given attachment from dmabuf's attachments listh]h` for device-specific detach.h](h)}(h**Parameters**h]jq )}(hjz%h]h Parameters}(hj|%hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjx%ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjt%ubj )}(hhh](j )}(h:``struct dma_buf *dmabuf`` [in] buffer to detach from. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj%h]hstruct dma_buf *dmabuf}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj%ubj )}(hhh]h)}(h[in] buffer to detach from.h]h[in] buffer to detach from.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hMhj%ubah}(h]h ]h"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]uh1j hj%hMhj%ubj )}(hd``struct dma_buf_attachment *attach`` [in] attachment to be detached; is free'd after this call. h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj%h]h!struct dma_buf_attachment *attach}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj%ubj )}(hhh]h)}(h=[in] attachment to be detached; is free'd after this call.h]h?[in] attachment to be detached; is free’d after this call.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hMhj%ubah}(h]h ]h"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]uh1j hj%hMhj%ubeh}(h]h ]h"]h$]h&]uh1j hjt%ubh)}(h**Description**h]jq )}(hj &h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj &ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjt%ubh)}(hBClean up a device attachment obtained by calling dma_buf_attach().h]hBClean up a device attachment obtained by calling dma_buf_attach().}(hj#&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjt%ubh)}(h\Optionally this calls :c:type:`dma_buf_ops.detach ` for device-specific detach.h](hOptionally this calls }(hj2&hhhNhNubh)}(h*:c:type:`dma_buf_ops.detach `h]j)}(hj<&h]hdma_buf_ops.detach}(hj>&hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj:&ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj2&ubh for device-specific detach.}(hj2&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjY&hMhjt%ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_pin (C function) c.dma_buf_pinhNtauh1j hjhhhNhNubj )}(hhh](j )}(h3int dma_buf_pin (struct dma_buf_attachment *attach)h]j )}(h2int dma_buf_pin(struct dma_buf_attachment *attach)h](jK)}(hinth]hint}(hj&hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj&hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM ubj )}(h h]h }(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&hhhj&hM ubj )}(h dma_buf_pinh]j )}(h dma_buf_pinh]h dma_buf_pin}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj&hhhj&hM ubj)}(h#(struct dma_buf_attachment *attach)h]j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubj )}(h h]h }(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj&modnameN classnameNjj)}j]jN)}jFj&sb c.dma_buf_pinasbuh1hhj&ubj )}(h h]h }(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubjc)}(hj h]h*}(hj 'hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj&ubj )}(hattachh]hattach}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj&ubah}(h]h ]h"]h$]h&]jjuh1jhj&hhhj&hM ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj|&hhhj&hM ubah}(h]jw&ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj&hM hjy&hhubj@ )}(hhh]h)}(hLock down the DMA-bufh]hLock down the DMA-buf}(hjD'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjA'hhubah}(h]h ]h"]h$]h&]uh1j? hjy&hhhj&hM ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j\'jb j\'jc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment which should be pinned **Description** Only dynamic importers (who set up **attach** with dma_buf_dynamic_attach()) may call this, and only for limited use cases like scanout and not for temporary pin operations. It is not permitted to allow userspace to pin arbitrary amounts of buffers through this interface. Buffers must be unpinned by calling dma_buf_unpin(). **Return** 0 on success, negative error code on failure.h](h)}(h**Parameters**h]jq )}(hjf'h]h Parameters}(hjh'hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjd'ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj`'ubj )}(hhh]j )}(hP``struct dma_buf_attachment *attach`` [in] attachment which should be pinned h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj'h]h!struct dma_buf_attachment *attach}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj'ubj )}(hhh]h)}(h)[in] attachment which should be pinnedh]h)[in] attachment which should be pinned}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hMhj'ubah}(h]h ]h"]h$]h&]uh1j hj'ubeh}(h]h ]h"]h$]h&]uh1j hj'hMhj|'ubah}(h]h ]h"]h$]h&]uh1j hj`'ubh)}(h**Description**h]jq )}(hj'h]h Description}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj'ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj`'ubh)}(hXOnly dynamic importers (who set up **attach** with dma_buf_dynamic_attach()) may call this, and only for limited use cases like scanout and not for temporary pin operations. It is not permitted to allow userspace to pin arbitrary amounts of buffers through this interface.h](h#Only dynamic importers (who set up }(hj'hhhNhNubjq )}(h **attach**h]hattach}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj'ubh with dma_buf_dynamic_attach()) may call this, and only for limited use cases like scanout and not for temporary pin operations. It is not permitted to allow userspace to pin arbitrary amounts of buffers through this interface.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj`'ubh)}(h4Buffers must be unpinned by calling dma_buf_unpin().h]h4Buffers must be unpinned by calling dma_buf_unpin().}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj`'ubh)}(h **Return**h]jq )}(hj(h]hReturn}(hj (hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj(ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj`'ubh)}(h-0 on success, negative error code on failure.h]h-0 on success, negative error code on failure.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj`'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_unpin (C function)c.dma_buf_unpinhNtauh1j hjhhhNhNubj )}(hhh](j )}(h6void dma_buf_unpin (struct dma_buf_attachment *attach)h]j )}(h5void dma_buf_unpin(struct dma_buf_attachment *attach)h](jK)}(hvoidh]hvoid}(hjM(hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjI(hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM8ubj )}(h h]h }(hj\(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjI(hhhj[(hM8ubj )}(h dma_buf_unpinh]j )}(h dma_buf_unpinh]h dma_buf_unpin}(hjn(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjj(ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjI(hhhj[(hM8ubj)}(h#(struct dma_buf_attachment *attach)h]j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubj )}(h h]h }(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj(modnameN classnameNjj)}j]jN)}jFjp(sbc.dma_buf_unpinasbuh1hhj(ubj )}(h h]h }(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubjc)}(hj h]h*}(hj(hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj(ubj )}(hattachh]hattach}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj(ubah}(h]h ]h"]h$]h&]jjuh1jhjI(hhhj[(hM8ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjE(hhhj[(hM8ubah}(h]j@(ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj[(hM8hjB(hhubj@ )}(hhh]h)}(hUnpin a DMA-bufh]hUnpin a DMA-buf}(hj )hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM1hj )hhubah}(h]h ]h"]h$]h&]uh1j? hjB(hhhj[(hM8ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j%)jb j%)jc jd je uh1j hhhjhNhNubjg )}(hXA**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment which should be unpinned **Description** This unpins a buffer pinned by dma_buf_pin() and allows the exporter to move any mapping of **attach** again and inform the importer through :c:type:`dma_buf_attach_ops.move_notify `.h](h)}(h**Parameters**h]jq )}(hj/)h]h Parameters}(hj1)hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj-)ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM5hj))ubj )}(hhh]j )}(hR``struct dma_buf_attachment *attach`` [in] attachment which should be unpinned h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hjN)h]h!struct dma_buf_attachment *attach}(hjP)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL)ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM2hjH)ubj )}(hhh]h)}(h+[in] attachment which should be unpinnedh]h+[in] attachment which should be unpinned}(hjg)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjc)hM2hjd)ubah}(h]h ]h"]h$]h&]uh1j hjH)ubeh}(h]h ]h"]h$]h&]uh1j hjc)hM2hjE)ubah}(h]h ]h"]h$]h&]uh1j hj))ubh)}(h**Description**h]jq )}(hj)h]h Description}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj)ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM4hj))ubh)}(hThis unpins a buffer pinned by dma_buf_pin() and allows the exporter to move any mapping of **attach** again and inform the importer through :c:type:`dma_buf_attach_ops.move_notify `.h](h\This unpins a buffer pinned by dma_buf_pin() and allows the exporter to move any mapping of }(hj)hhhNhNubjq )}(h **attach**h]hattach}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj)ubh' again and inform the importer through }(hj)hhhNhNubh)}(h=:c:type:`dma_buf_attach_ops.move_notify `h]j)}(hj)h]hdma_buf_attach_ops.move_notify}(hj)hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attach_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM4hj)ubh.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj)hM4hj))ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_buf_map_attachment (C function)c.dma_buf_map_attachmenthNtauh1j hjhhhNhNubj )}(hhh](j )}(hostruct sg_table * dma_buf_map_attachment (struct dma_buf_attachment *attach, enum dma_data_direction direction)h]j )}(hmstruct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j )}(hj h]hstruct}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMZubj )}(h h]h }(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)hhhj*hMZubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj"*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj$*modnameN classnameNjj)}j]jN)}jFdma_buf_map_attachmentsbc.dma_buf_map_attachmentasbuh1hhj)hhhj*hMZubj )}(h h]h }(hjC*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)hhhj*hMZubjc)}(hj h]h*}(hjQ*hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj)hhhj*hMZubj )}(hdma_buf_map_attachmenth]j )}(hj@*h]hdma_buf_map_attachment}(hjb*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^*ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj)hhhj*hMZubj)}(hF(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hj}*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjy*ubj )}(h h]h }(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjy*ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj*modnameN classnameNjj)}j]j>*c.dma_buf_map_attachmentasbuh1hhjy*ubj )}(h h]h }(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjy*ubjc)}(hj h]h*}(hj*hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjy*ubj )}(hattachh]hattach}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjy*ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhju*ubj)}(h!enum dma_data_direction directionh](j )}(henumh]henum}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubj )}(h h]h }(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj +hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj +ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj+modnameN classnameNjj)}j]j>*c.dma_buf_map_attachmentasbuh1hhj*ubj )}(h h]h }(hj*+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubj )}(h directionh]h direction}(hj8+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhju*ubeh}(h]h ]h"]h$]h&]jjuh1jhj)hhhj*hMZubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj)hhhj*hMZubah}(h]j)ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj*hMZhj)hhubj@ )}(hhh]h)}(hReturns the scatterlist table of the attachment; mapped into _device_ address space. Is a wrapper for map_dma_buf() of the dma_buf_ops.h]hReturns the scatterlist table of the attachment; mapped into _device_ address space. Is a wrapper for map_dma_buf() of the dma_buf_ops.}(hjb+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMFhj_+hhubah}(h]h ]h"]h$]h&]uh1j? hj)hhhj*hMZubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jz+jb jz+jc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment whose scatterlist is to be returned ``enum dma_data_direction direction`` [in] direction of DMA transfer **Description** Returns sg_table containing the scatterlist to be returned; returns ERR_PTR on error. May return -EINTR if it is interrupted by a signal. On success, the DMA addresses and lengths in the returned scatterlist are PAGE_SIZE aligned. A mapping must be unmapped by using dma_buf_unmap_attachment(). Note that the underlying backing storage is pinned for as long as a mapping exists, therefore users/importers should not hold onto a mapping for undue amounts of time. Important: Dynamic importers must wait for the exclusive fence of the struct dma_resv attached to the DMA-BUF first.h](h)}(h**Parameters**h]jq )}(hj+h]h Parameters}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj+ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMJhj~+ubj )}(hhh](j )}(h]``struct dma_buf_attachment *attach`` [in] attachment whose scatterlist is to be returned h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj+h]h!struct dma_buf_attachment *attach}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMIhj+ubj )}(hhh]h)}(h6[in] attachment whose scatterlist is to be returnedh]h6[in] attachment whose scatterlist is to be returned}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMIhj+ubah}(h]h ]h"]h$]h&]uh1j hj+ubeh}(h]h ]h"]h$]h&]uh1j hj+hMIhj+ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hj+h]h!enum dma_data_direction direction}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMJhj+ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMJhj+ubah}(h]h ]h"]h$]h&]uh1j hj+ubeh}(h]h ]h"]h$]h&]uh1j hj+hMJhj+ubeh}(h]h ]h"]h$]h&]uh1j hj~+ubh)}(h**Description**h]jq )}(hj,h]h Description}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj,ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMLhj~+ubh)}(hReturns sg_table containing the scatterlist to be returned; returns ERR_PTR on error. May return -EINTR if it is interrupted by a signal.h]hReturns sg_table containing the scatterlist to be returned; returns ERR_PTR on error. May return -EINTR if it is interrupted by a signal.}(hj-,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMLhj~+ubh)}(h\On success, the DMA addresses and lengths in the returned scatterlist are PAGE_SIZE aligned.h]h\On success, the DMA addresses and lengths in the returned scatterlist are PAGE_SIZE aligned.}(hj<,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMOhj~+ubh)}(hA mapping must be unmapped by using dma_buf_unmap_attachment(). Note that the underlying backing storage is pinned for as long as a mapping exists, therefore users/importers should not hold onto a mapping for undue amounts of time.h]hA mapping must be unmapped by using dma_buf_unmap_attachment(). Note that the underlying backing storage is pinned for as long as a mapping exists, therefore users/importers should not hold onto a mapping for undue amounts of time.}(hjK,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMRhj~+ubh)}(htImportant: Dynamic importers must wait for the exclusive fence of the struct dma_resv attached to the DMA-BUF first.h]htImportant: Dynamic importers must wait for the exclusive fence of the struct dma_resv attached to the DMA-BUF first.}(hjZ,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMWhj~+ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j ,dma_buf_map_attachment_unlocked (C function)!c.dma_buf_map_attachment_unlockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(hxstruct sg_table * dma_buf_map_attachment_unlocked (struct dma_buf_attachment *attach, enum dma_data_direction direction)h]j )}(hvstruct sg_table *dma_buf_map_attachment_unlocked(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j )}(hj h]hstruct}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,hhhj,hMubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj,modnameN classnameNjj)}j]jN)}jFdma_buf_map_attachment_unlockedsb!c.dma_buf_map_attachment_unlockedasbuh1hhj,hhhj,hMubj )}(h h]h }(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,hhhj,hMubjc)}(hj h]h*}(hj,hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj,hhhj,hMubj )}(hdma_buf_map_attachment_unlockedh]j )}(hj,h]hdma_buf_map_attachment_unlocked}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj,hhhj,hMubj)}(hF(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubj )}(h h]h }(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj!-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj#-modnameN classnameNjj)}j]j,!c.dma_buf_map_attachment_unlockedasbuh1hhj,ubj )}(h h]h }(hj?-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubjc)}(hj h]h*}(hjM-hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj,ubj )}(hattachh]hattach}(hjZ-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj,ubj)}(h!enum dma_data_direction directionh](j )}(hj*h]henum}(hjs-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjo-ubj )}(h h]h }(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjo-ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj-modnameN classnameNjj)}j]j,!c.dma_buf_map_attachment_unlockedasbuh1hhjo-ubj )}(h h]h }(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjo-ubj )}(h directionh]h direction}(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjo-ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj,ubeh}(h]h ]h"]h$]h&]jjuh1jhj,hhhj,hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj,hhhj,hMubah}(h]j|,ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj,hMhj~,hhubj@ )}(hhh]h)}(hReturns the scatterlist table of the attachment; mapped into _device_ address space. Is a wrapper for map_dma_buf() of the dma_buf_ops.h]hReturns the scatterlist table of the attachment; mapped into _device_ address space. Is a wrapper for map_dma_buf() of the dma_buf_ops.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj-hhubah}(h]h ]h"]h$]h&]uh1j? hj~,hhhj,hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j-jb j-jc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment whose scatterlist is to be returned ``enum dma_data_direction direction`` [in] direction of DMA transfer **Description** Unlocked variant of dma_buf_map_attachment().h](h)}(h**Parameters**h]jq )}(hj .h]h Parameters}(hj .hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj.ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj.ubj )}(hhh](j )}(h]``struct dma_buf_attachment *attach`` [in] attachment whose scatterlist is to be returned h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj(.h]h!struct dma_buf_attachment *attach}(hj*.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&.ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj".ubj )}(hhh]h)}(h6[in] attachment whose scatterlist is to be returnedh]h6[in] attachment whose scatterlist is to be returned}(hjA.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=.hMhj>.ubah}(h]h ]h"]h$]h&]uh1j hj".ubeh}(h]h ]h"]h$]h&]uh1j hj=.hMhj.ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hja.h]h!enum dma_data_direction direction}(hjc.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_.ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj[.ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hjz.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjv.hMhjw.ubah}(h]h ]h"]h$]h&]uh1j hj[.ubeh}(h]h ]h"]h$]h&]uh1j hjv.hMhj.ubeh}(h]h ]h"]h$]h&]uh1j hj.ubh)}(h**Description**h]jq )}(hj.h]h Description}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj.ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj.ubh)}(h-Unlocked variant of dma_buf_map_attachment().h]h-Unlocked variant of dma_buf_map_attachment().}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj.ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j %dma_buf_unmap_attachment (C function)c.dma_buf_unmap_attachmenthNtauh1j hjhhhNhNubj )}(hhh](j )}(hvoid dma_buf_unmap_attachment (struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h]j )}(h~void dma_buf_unmap_attachment(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h](jK)}(hvoidh]hvoid}(hj.hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj.hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.hhhj.hMubj )}(hdma_buf_unmap_attachmenth]j )}(hdma_buf_unmap_attachmenth]hdma_buf_unmap_attachment}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj.hhhj.hMubj)}(ha(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubj )}(h h]h }(hj+/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj/modnameN classnameNjj)}j]jN)}jFj/sbc.dma_buf_unmap_attachmentasbuh1hhj/ubj )}(h h]h }(hj\/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubjc)}(hj h]h*}(hjj/hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj/ubj )}(hattachh]hattach}(hjw/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj/ubj)}(hstruct sg_table *sg_tableh](j )}(hj h]hstruct}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubj )}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj/modnameN classnameNjj)}j]jX/c.dma_buf_unmap_attachmentasbuh1hhj/ubj )}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubjc)}(hj h]h*}(hj/hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj/ubj )}(hsg_tableh]hsg_table}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj/ubj)}(h!enum dma_data_direction directionh](j )}(hj*h]henum}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubj )}(h h]h }(hj 0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj 0modnameN classnameNjj)}j]jX/c.dma_buf_unmap_attachmentasbuh1hhj/ubj )}(h h]h }(hj<0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubj )}(h directionh]h direction}(hjJ0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj/ubeh}(h]h ]h"]h$]h&]jjuh1jhj.hhhj.hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj.hhhj.hMubah}(h]j.ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj.hMhj.hhubj@ )}(hhh]h)}(hunmaps and decreases usecount of the buffer;might deallocate the scatterlist associated. Is a wrapper for unmap_dma_buf() of dma_buf_ops.h]hunmaps and decreases usecount of the buffer;might deallocate the scatterlist associated. Is a wrapper for unmap_dma_buf() of dma_buf_ops.}(hjt0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjq0hhubah}(h]h ]h"]h$]h&]uh1j? hj.hhhj.hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j0jb j0jc jd je uh1j hhhjhNhNubjg )}(hX^**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from ``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap ``enum dma_data_direction direction`` [in] direction of DMA transfer **Description** This unmaps a DMA mapping for **attached** obtained by dma_buf_map_attachment().h](h)}(h**Parameters**h]jq )}(hj0h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj0ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj0ubj )}(hhh](j )}(hN``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj0h]h!struct dma_buf_attachment *attach}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj0ubj )}(hhh]h)}(h'[in] attachment to unmap buffer fromh]h'[in] attachment to unmap buffer from}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMhj0ubah}(h]h ]h"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]uh1j hj0hMhj0ubj )}(hN``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap h](j )}(h``struct sg_table *sg_table``h]j)}(hj0h]hstruct sg_table *sg_table}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj0ubj )}(hhh]h)}(h/[in] scatterlist info of the buffer to unmaph]h/[in] scatterlist info of the buffer to unmap}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMhj1ubah}(h]h ]h"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]uh1j hj1hMhj0ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hj'1h]h!enum dma_data_direction direction}(hj)1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%1ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj!1ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hj@1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<1hMhj=1ubah}(h]h ]h"]h$]h&]uh1j hj!1ubeh}(h]h ]h"]h$]h&]uh1j hj<1hMhj0ubeh}(h]h ]h"]h$]h&]uh1j hj0ubh)}(h**Description**h]jq )}(hjb1h]h Description}(hjd1hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj`1ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj0ubh)}(hPThis unmaps a DMA mapping for **attached** obtained by dma_buf_map_attachment().h](hThis unmaps a DMA mapping for }(hjx1hhhNhNubjq )}(h **attached**h]hattached}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjx1ubh& obtained by dma_buf_map_attachment().}(hjx1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj0ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j .dma_buf_unmap_attachment_unlocked (C function)#c.dma_buf_unmap_attachment_unlockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(hvoid dma_buf_unmap_attachment_unlocked (struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h]j )}(hvoid dma_buf_unmap_attachment_unlocked(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h](jK)}(hvoidh]hvoid}(hj1hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj1hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1hhhj1hMubj )}(h!dma_buf_unmap_attachment_unlockedh]j )}(h!dma_buf_unmap_attachment_unlockedh]h!dma_buf_unmap_attachment_unlocked}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj1hhhj1hMubj)}(ha(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubj )}(h h]h }(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj2modnameN classnameNjj)}j]jN)}jFj1sb#c.dma_buf_unmap_attachment_unlockedasbuh1hhj1ubj )}(h h]h }(hj42hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubjc)}(hj h]h*}(hjB2hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj1ubj )}(hattachh]hattach}(hjO2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj1ubj)}(hstruct sg_table *sg_tableh](j )}(hj h]hstruct}(hjh2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjd2ubj )}(h h]h }(hju2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjd2ubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj2modnameN classnameNjj)}j]j02#c.dma_buf_unmap_attachment_unlockedasbuh1hhjd2ubj )}(h h]h }(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjd2ubjc)}(hj h]h*}(hj2hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjd2ubj )}(hsg_tableh]hsg_table}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjd2ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj1ubj)}(h!enum dma_data_direction directionh](j )}(hj*h]henum}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubj )}(h h]h }(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj2modnameN classnameNjj)}j]j02#c.dma_buf_unmap_attachment_unlockedasbuh1hhj2ubj )}(h h]h }(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubj )}(h directionh]h direction}(hj"3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj1ubeh}(h]h ]h"]h$]h&]jjuh1jhj1hhhj1hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj1hhhj1hMubah}(h]j1ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj1hMhj1hhubj@ )}(hhh]h)}(hunmaps and decreases usecount of the buffer;might deallocate the scatterlist associated. Is a wrapper for unmap_dma_buf() of dma_buf_ops.h]hunmaps and decreases usecount of the buffer;might deallocate the scatterlist associated. Is a wrapper for unmap_dma_buf() of dma_buf_ops.}(hjL3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjI3hhubah}(h]h ]h"]h$]h&]uh1j? hj1hhhj1hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jd3jb jd3jc jd je uh1j hhhjhNhNubjg )}(hX=**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from ``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap ``enum dma_data_direction direction`` [in] direction of DMA transfer **Description** Unlocked variant of dma_buf_unmap_attachment().h](h)}(h**Parameters**h]jq )}(hjn3h]h Parameters}(hjp3hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjl3ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjh3ubj )}(hhh](j )}(hN``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj3h]h!struct dma_buf_attachment *attach}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj3ubj )}(hhh]h)}(h'[in] attachment to unmap buffer fromh]h'[in] attachment to unmap buffer from}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMhj3ubah}(h]h ]h"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]uh1j hj3hMhj3ubj )}(hN``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap h](j )}(h``struct sg_table *sg_table``h]j)}(hj3h]hstruct sg_table *sg_table}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj3ubj )}(hhh]h)}(h/[in] scatterlist info of the buffer to unmaph]h/[in] scatterlist info of the buffer to unmap}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMhj3ubah}(h]h ]h"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]uh1j hj3hMhj3ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hj3h]h!enum dma_data_direction direction}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj3ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hMhj4ubah}(h]h ]h"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]uh1j hj4hMhj3ubeh}(h]h ]h"]h$]h&]uh1j hjh3ubh)}(h**Description**h]jq )}(hj:4h]h Description}(hj<4hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj84ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjh3ubh)}(h/Unlocked variant of dma_buf_unmap_attachment().h]h/Unlocked variant of dma_buf_unmap_attachment().}(hjP4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjh3ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_move_notify (C function)c.dma_buf_move_notifyhNtauh1j hjhhhNhNubj )}(hhh](j )}(h1void dma_buf_move_notify (struct dma_buf *dmabuf)h]j )}(h0void dma_buf_move_notify(struct dma_buf *dmabuf)h](jK)}(hvoidh]hvoid}(hj4hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj{4hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{4hhhj4hMubj )}(hdma_buf_move_notifyh]j )}(hdma_buf_move_notifyh]hdma_buf_move_notify}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj{4hhhj4hMubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubj )}(h h]h }(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj4modnameN classnameNjj)}j]jN)}jFj4sbc.dma_buf_move_notifyasbuh1hhj4ubj )}(h h]h }(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubjc)}(hj h]h*}(hj5hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj4ubj )}(hdmabufh]hdmabuf}(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj4ubah}(h]h ]h"]h$]h&]jjuh1jhj{4hhhj4hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjw4hhhj4hMubah}(h]jr4ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj4hMhjt4hhubj@ )}(hhh]h)}(h)notify attachments that DMA-buf is movingh]h)notify attachments that DMA-buf is moving}(hj?5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj<5hhubah}(h]h ]h"]h$]h&]uh1j? hjt4hhhj4hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jW5jb jW5jc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer which is moving **Description** Informs all attachments that they need to destroy and recreate all their mappings.h](h)}(h**Parameters**h]jq )}(hja5h]h Parameters}(hjc5hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj_5ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj[5ubj )}(hhh]j )}(h:``struct dma_buf *dmabuf`` [in] buffer which is moving h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj5h]hstruct dma_buf *dmabuf}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~5ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjz5ubj )}(hhh]h)}(h[in] buffer which is movingh]h[in] buffer which is moving}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hMhj5ubah}(h]h ]h"]h$]h&]uh1j hjz5ubeh}(h]h ]h"]h$]h&]uh1j hj5hMhjw5ubah}(h]h ]h"]h$]h&]uh1j hj[5ubh)}(h**Description**h]jq )}(hj5h]h Description}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj5ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj[5ubh)}(hRInforms all attachments that they need to destroy and recreate all their mappings.h]hRInforms all attachments that they need to destroy and recreate all their mappings.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj[5ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j %dma_buf_begin_cpu_access (C function)c.dma_buf_begin_cpu_accesshNtauh1j hjhhhNhNubj )}(hhh](j )}(hXint dma_buf_begin_cpu_access (struct dma_buf *dmabuf, enum dma_data_direction direction)h]j )}(hWint dma_buf_begin_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction)h](jK)}(hinth]hint}(hj6hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj5hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5hhhj6hMubj )}(hdma_buf_begin_cpu_accessh]j )}(hdma_buf_begin_cpu_accessh]hdma_buf_begin_cpu_access}(hj!6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj5hhhj6hMubj)}(h;(struct dma_buf *dmabuf, enum dma_data_direction direction)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj=6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj96ubj )}(h h]h }(hjJ6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj96ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj[6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjX6ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj]6modnameN classnameNjj)}j]jN)}jFj#6sbc.dma_buf_begin_cpu_accessasbuh1hhj96ubj )}(h h]h }(hj{6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj96ubjc)}(hj h]h*}(hj6hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj96ubj )}(hdmabufh]hdmabuf}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj96ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj56ubj)}(h!enum dma_data_direction directionh](j )}(hj*h]henum}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubj )}(h h]h }(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj6modnameN classnameNjj)}j]jw6c.dma_buf_begin_cpu_accessasbuh1hhj6ubj )}(h h]h }(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubj )}(h directionh]h direction}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj56ubeh}(h]h ]h"]h$]h&]jjuh1jhj5hhhj6hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj5hhhj6hMubah}(h]j5ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj6hMhj5hhubj@ )}(hhh]h)}(hMust be called before accessing a dma_buf from the cpu in the kernel context. Calls begin_cpu_access to allow exporter-specific preparations. Coherency is only guaranteed in the specified range for the specified access direction.h]hMust be called before accessing a dma_buf from the cpu in the kernel context. Calls begin_cpu_access to allow exporter-specific preparations. Coherency is only guaranteed in the specified range for the specified access direction.}(hj#7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMphj 7hhubah}(h]h ]h"]h$]h&]uh1j? hj5hhhj6hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j;7jb j;7jc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to prepare cpu access for. ``enum dma_data_direction direction`` [in] direction of access. **Description** After the cpu access is complete the caller should call dma_buf_end_cpu_access(). Only when cpu access is bracketed by both calls is it guaranteed to be coherent with other DMA access. This function will also wait for any DMA transactions tracked through implicit synchronization in :c:type:`dma_buf.resv `. For DMA transactions with explicit synchronization this function will only ensure cache coherency, callers must ensure synchronization with such DMA transactions on their own. Can return negative error values, returns 0 on success.h](h)}(h**Parameters**h]jq )}(hjE7h]h Parameters}(hjG7hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjC7ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMthj?7ubj )}(hhh](j )}(hE``struct dma_buf *dmabuf`` [in] buffer to prepare cpu access for. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjd7h]hstruct dma_buf *dmabuf}(hjf7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjb7ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMthj^7ubj )}(hhh]h)}(h)[in] buffer to prepare cpu access for.h]h)[in] buffer to prepare cpu access for.}(hj}7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjy7hMthjz7ubah}(h]h ]h"]h$]h&]uh1j hj^7ubeh}(h]h ]h"]h$]h&]uh1j hjy7hMthj[7ubj )}(hC``enum dma_data_direction direction`` [in] direction of access. h](j )}(h%``enum dma_data_direction direction``h]j)}(hj7h]h!enum dma_data_direction direction}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMuhj7ubj )}(hhh]h)}(h[in] direction of access.h]h[in] direction of access.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMuhj7ubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hj7hMuhj[7ubeh}(h]h ]h"]h$]h&]uh1j hj?7ubh)}(h**Description**h]jq )}(hj7h]h Description}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj7ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMwhj?7ubh)}(hAfter the cpu access is complete the caller should call dma_buf_end_cpu_access(). Only when cpu access is bracketed by both calls is it guaranteed to be coherent with other DMA access.h]hAfter the cpu access is complete the caller should call dma_buf_end_cpu_access(). Only when cpu access is bracketed by both calls is it guaranteed to be coherent with other DMA access.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMwhj?7ubh)}(hX3This function will also wait for any DMA transactions tracked through implicit synchronization in :c:type:`dma_buf.resv `. For DMA transactions with explicit synchronization this function will only ensure cache coherency, callers must ensure synchronization with such DMA transactions on their own.h](hbThis function will also wait for any DMA transactions tracked through implicit synchronization in }(hj7hhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hj8h]h dma_buf.resv}(hj 8hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM{hj7ubh. For DMA transactions with explicit synchronization this function will only ensure cache coherency, callers must ensure synchronization with such DMA transactions on their own.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj$8hM{hj?7ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hj/8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj?7ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_buf_end_cpu_access (C function)c.dma_buf_end_cpu_accesshNtauh1j hjhhhNhNubj )}(hhh](j )}(hVint dma_buf_end_cpu_access (struct dma_buf *dmabuf, enum dma_data_direction direction)h]j )}(hUint dma_buf_end_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction)h](jK)}(hinth]hint}(hj^8hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjZ8hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hjm8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZ8hhhjl8hMubj )}(hdma_buf_end_cpu_accessh]j )}(hdma_buf_end_cpu_accessh]hdma_buf_end_cpu_access}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{8ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjZ8hhhjl8hMubj)}(h;(struct dma_buf *dmabuf, enum dma_data_direction direction)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubj )}(h h]h }(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj8modnameN classnameNjj)}j]jN)}jFj8sbc.dma_buf_end_cpu_accessasbuh1hhj8ubj )}(h h]h }(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubjc)}(hj h]h*}(hj8hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj8ubj )}(hdmabufh]hdmabuf}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj8ubj)}(h!enum dma_data_direction directionh](j )}(hj*h]henum}(hj 9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj 9ubj )}(h h]h }(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj 9ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj+9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(9ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj-9modnameN classnameNjj)}j]j8c.dma_buf_end_cpu_accessasbuh1hhj 9ubj )}(h h]h }(hjI9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj 9ubj )}(h directionh]h direction}(hjW9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj 9ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj8ubeh}(h]h ]h"]h$]h&]jjuh1jhjZ8hhhjl8hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjV8hhhjl8hMubah}(h]jQ8ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjl8hMhjS8hhubj@ )}(hhh]h)}(hMust be called after accessing a dma_buf from the cpu in the kernel context. Calls end_cpu_access to allow exporter-specific actions. Coherency is only guaranteed in the specified range for the specified access direction.h]hMust be called after accessing a dma_buf from the cpu in the kernel context. Calls end_cpu_access to allow exporter-specific actions. Coherency is only guaranteed in the specified range for the specified access direction.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj~9hhubah}(h]h ]h"]h$]h&]uh1j? hjS8hhhjl8hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j9jb j9jc jd je uh1j hhhjhNhNubjg )}(hX,**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to complete cpu access for. ``enum dma_data_direction direction`` [in] direction of access. **Description** This terminates CPU access started with dma_buf_begin_cpu_access(). Can return negative error values, returns 0 on success.h](h)}(h**Parameters**h]jq )}(hj9h]h Parameters}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj9ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubj )}(hhh](j )}(hF``struct dma_buf *dmabuf`` [in] buffer to complete cpu access for. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj9h]hstruct dma_buf *dmabuf}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubj )}(hhh]h)}(h*[in] buffer to complete cpu access for.h]h*[in] buffer to complete cpu access for.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj9ubah}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]uh1j hj9hMhj9ubj )}(hC``enum dma_data_direction direction`` [in] direction of access. h](j )}(h%``enum dma_data_direction direction``h]j)}(hj9h]h!enum dma_data_direction direction}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubj )}(hhh]h)}(h[in] direction of access.h]h[in] direction of access.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hMhj:ubah}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]uh1j hj:hMhj9ubeh}(h]h ]h"]h$]h&]uh1j hj9ubh)}(h**Description**h]jq )}(hj6:h]h Description}(hj8:hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj4:ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubh)}(hCThis terminates CPU access started with dma_buf_begin_cpu_access().h]hCThis terminates CPU access started with dma_buf_begin_cpu_access().}(hjL:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hj[:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_mmap (C function)c.dma_buf_mmaphNtauh1j hjhhhNhNubj )}(hhh](j )}(hZint dma_buf_mmap (struct dma_buf *dmabuf, struct vm_area_struct *vma, unsigned long pgoff)h]j )}(hYint dma_buf_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma, unsigned long pgoff)h](jK)}(hinth]hint}(hj:hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj:hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:hhhj:hMubj )}(h dma_buf_mmaph]j )}(h dma_buf_mmaph]h dma_buf_mmap}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj:hhhj:hMubj)}(hI(struct dma_buf *dmabuf, struct vm_area_struct *vma, unsigned long pgoff)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubj )}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj:modnameN classnameNjj)}j]jN)}jFj:sbc.dma_buf_mmapasbuh1hhj:ubj )}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubjc)}(hj h]h*}(hj;hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj:ubj )}(hdmabufh]hdmabuf}(hj ;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj:ubj)}(hstruct vm_area_struct *vmah](j )}(hj h]hstruct}(hj9;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5;ubj )}(h h]h }(hjF;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5;ubh)}(hhh]j )}(hvm_area_structh]hvm_area_struct}(hjW;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjT;ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjY;modnameN classnameNjj)}j]j;c.dma_buf_mmapasbuh1hhj5;ubj )}(h h]h }(hju;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5;ubjc)}(hj h]h*}(hj;hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj5;ubj )}(hvmah]hvma}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5;ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj:ubj)}(hunsigned long pgoffh](jK)}(hunsignedh]hunsigned}(hj;hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj;ubj )}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubjK)}(hlongh]hlong}(hj;hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj;ubj )}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubj )}(hpgoffh]hpgoff}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj:ubeh}(h]h ]h"]h$]h&]jjuh1jhj:hhhj:hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj:hhhj:hMubah}(h]j}:ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj:hMhj:hhubj@ )}(hhh]h)}(h,Setup up a userspace mmap with the given vmah]h,Setup up a userspace mmap with the given vma}(hj <hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj<hhubah}(h]h ]h"]h$]h&]uh1j? hj:hhhj:hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j#<jb j#<jc jd je uh1j hhhjhNhNubjg )}(hX<**Parameters** ``struct dma_buf *dmabuf`` [in] buffer that should back the vma ``struct vm_area_struct *vma`` [in] vma for the mmap ``unsigned long pgoff`` [in] offset in pages where this mmap should start within the dma-buf buffer. **Description** This function adjusts the passed in vma so that it points at the file of the dma_buf operation. It also adjusts the starting pgoff and does bounds checking on the size of the vma. Then it calls the exporters mmap function to set up the mapping. Can return negative error values, returns 0 on success.h](h)}(h**Parameters**h]jq )}(hj-<h]h Parameters}(hj/<hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj+<ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj'<ubj )}(hhh](j )}(hC``struct dma_buf *dmabuf`` [in] buffer that should back the vma h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjL<h]hstruct dma_buf *dmabuf}(hjN<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ<ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjF<ubj )}(hhh]h)}(h'[in] buffer that should back the vmah]h'[in] buffer that should back the vma}(hje<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhja<hMhjb<ubah}(h]h ]h"]h$]h&]uh1j hjF<ubeh}(h]h ]h"]h$]h&]uh1j hja<hMhjC<ubj )}(h8``struct vm_area_struct *vma`` [in] vma for the mmap h](j )}(h``struct vm_area_struct *vma``h]j)}(hj<h]hstruct vm_area_struct *vma}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj<ubj )}(hhh]h)}(h[in] vma for the mmaph]h[in] vma for the mmap}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hMhj<ubah}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hj<hMhjC<ubj )}(hh``unsigned long pgoff`` [in] offset in pages where this mmap should start within the dma-buf buffer. h](j )}(h``unsigned long pgoff``h]j)}(hj<h]hunsigned long pgoff}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj<ubj )}(hhh]h)}(hO[in] offset in pages where this mmap should start within the dma-buf buffer.h]hO[in] offset in pages where this mmap should start within the dma-buf buffer.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj<ubah}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hj<hMhjC<ubeh}(h]h ]h"]h$]h&]uh1j hj'<ubh)}(h**Description**h]jq )}(hj<h]h Description}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj<ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj'<ubh)}(hThis function adjusts the passed in vma so that it points at the file of the dma_buf operation. It also adjusts the starting pgoff and does bounds checking on the size of the vma. Then it calls the exporters mmap function to set up the mapping.h]hThis function adjusts the passed in vma so that it points at the file of the dma_buf operation. It also adjusts the starting pgoff and does bounds checking on the size of the vma. Then it calls the exporters mmap function to set up the mapping.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj'<ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj'<ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_vmap (C function)c.dma_buf_vmaphNtauh1j hjhhhNhNubj )}(hhh](j )}(h@int dma_buf_vmap (struct dma_buf *dmabuf, struct iosys_map *map)h]j )}(h?int dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map)h](jK)}(hinth]hint}(hjN=hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjJ=hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj]=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJ=hhhj\=hMubj )}(h dma_buf_vmaph]j )}(h dma_buf_vmaph]h dma_buf_vmap}(hjo=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjk=ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjJ=hhhj\=hMubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubj )}(h h]h }(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj=modnameN classnameNjj)}j]jN)}jFjq=sbc.dma_buf_vmapasbuh1hhj=ubj )}(h h]h }(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubjc)}(hj h]h*}(hj=hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj=ubj )}(hdmabufh]hdmabuf}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj=ubj)}(hstruct iosys_map *maph](j )}(hj h]hstruct}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubj )}(h h]h }(hj >hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj>ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj>modnameN classnameNjj)}j]j=c.dma_buf_vmapasbuh1hhj=ubj )}(h h]h }(hj9>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubjc)}(hj h]h*}(hjG>hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj=ubj )}(hmaph]hmap}(hjT>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj=ubeh}(h]h ]h"]h$]h&]jjuh1jhjJ=hhhj\=hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjF=hhhj\=hMubah}(h]jA=ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj\=hMhjC=hhubj@ )}(hhh]h)}(hxCreate virtual mapping for the buffer object into kernel address space. Same restrictions as for vmap and friends apply.h]hxCreate virtual mapping for the buffer object into kernel address space. Same restrictions as for vmap and friends apply.}(hj~>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj{>hhubah}(h]h ]h"]h$]h&]uh1j? hjC=hhhj\=hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j>jb j>jc jd je uh1j hhhjhNhNubjg )}(hX%**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vmap ``struct iosys_map *map`` [out] returns the vmap pointer **Description** This call may fail due to lack of virtual mapping address space. These calls are optional in drivers. The intended use for them is for mapping objects linear in kernel space for high use objects. To ensure coherency users must call dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() around any cpu access performed through this mapping. Returns 0 on success, or a negative errno code otherwise.h](h)}(h**Parameters**h]jq )}(hj>h]h Parameters}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj>ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubj )}(hhh](j )}(h2``struct dma_buf *dmabuf`` [in] buffer to vmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj>h]hstruct dma_buf *dmabuf}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubj )}(hhh]h)}(h[in] buffer to vmaph]h[in] buffer to vmap}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hMhj>ubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hj>hMhj>ubj )}(h;``struct iosys_map *map`` [out] returns the vmap pointer h](j )}(h``struct iosys_map *map``h]j)}(hj>h]hstruct iosys_map *map}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubj )}(hhh]h)}(h [out] returns the vmap pointerh]h [out] returns the vmap pointer}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ?hMhj?ubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hj ?hMhj>ubeh}(h]h ]h"]h$]h&]uh1j hj>ubh)}(h**Description**h]jq )}(hj3?h]h Description}(hj5?hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj1?ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubh)}(hThis call may fail due to lack of virtual mapping address space. These calls are optional in drivers. The intended use for them is for mapping objects linear in kernel space for high use objects.h]hThis call may fail due to lack of virtual mapping address space. These calls are optional in drivers. The intended use for them is for mapping objects linear in kernel space for high use objects.}(hjI?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubh)}(hTo ensure coherency users must call dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() around any cpu access performed through this mapping.h]hTo ensure coherency users must call dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() around any cpu access performed through this mapping.}(hjX?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubh)}(h9Returns 0 on success, or a negative errno code otherwise.h]h9Returns 0 on success, or a negative errno code otherwise.}(hjg?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_buf_vmap_unlocked (C function)c.dma_buf_vmap_unlockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(hIint dma_buf_vmap_unlocked (struct dma_buf *dmabuf, struct iosys_map *map)h]j )}(hHint dma_buf_vmap_unlocked(struct dma_buf *dmabuf, struct iosys_map *map)h](jK)}(hinth]hint}(hj?hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj?hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?hhhj?hMubj )}(hdma_buf_vmap_unlockedh]j )}(hdma_buf_vmap_unlockedh]hdma_buf_vmap_unlocked}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj?hhhj?hMubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubj )}(h h]h }(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj?modnameN classnameNjj)}j]jN)}jFj?sbc.dma_buf_vmap_unlockedasbuh1hhj?ubj )}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubjc)}(hj h]h*}(hj@hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj?ubj )}(hdmabufh]hdmabuf}(hj,@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj?ubj)}(hstruct iosys_map *maph](j )}(hj h]hstruct}(hjE@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjA@ubj )}(h h]h }(hjR@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjA@ubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hjc@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`@ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetje@modnameN classnameNjj)}j]j @c.dma_buf_vmap_unlockedasbuh1hhjA@ubj )}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjA@ubjc)}(hj h]h*}(hj@hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjA@ubj )}(hmaph]hmap}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjA@ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj?ubeh}(h]h ]h"]h$]h&]jjuh1jhj?hhhj?hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj?hhhj?hMubah}(h]j?ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj?hMhj?hhubj@ )}(hhh]h)}(hxCreate virtual mapping for the buffer object into kernel address space. Same restrictions as for vmap and friends apply.h]hxCreate virtual mapping for the buffer object into kernel address space. Same restrictions as for vmap and friends apply.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj@hhubah}(h]h ]h"]h$]h&]uh1j? hj?hhhj?hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j@jb j@jc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vmap ``struct iosys_map *map`` [out] returns the vmap pointer **Description** Unlocked version of dma_buf_vmap() Returns 0 on success, or a negative errno code otherwise.h](h)}(h**Parameters**h]jq )}(hj@h]h Parameters}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj@ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj@ubj )}(hhh](j )}(h2``struct dma_buf *dmabuf`` [in] buffer to vmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjAh]hstruct dma_buf *dmabuf}(hj AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjAubj )}(hhh]h)}(h[in] buffer to vmaph]h[in] buffer to vmap}(hj AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMhjAubah}(h]h ]h"]h$]h&]uh1j hjAubeh}(h]h ]h"]h$]h&]uh1j hjAhMhj@ubj )}(h;``struct iosys_map *map`` [out] returns the vmap pointer h](j )}(h``struct iosys_map *map``h]j)}(hj@Ah]hstruct iosys_map *map}(hjBAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>Aubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj:Aubj )}(hhh]h)}(h [out] returns the vmap pointerh]h [out] returns the vmap pointer}(hjYAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUAhMhjVAubah}(h]h ]h"]h$]h&]uh1j hj:Aubeh}(h]h ]h"]h$]h&]uh1j hjUAhMhj@ubeh}(h]h ]h"]h$]h&]uh1j hj@ubh)}(h**Description**h]jq )}(hj{Ah]h Description}(hj}AhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjyAubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj@ubh)}(h"Unlocked version of dma_buf_vmap()h]h"Unlocked version of dma_buf_vmap()}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj@ubh)}(h9Returns 0 on success, or a negative errno code otherwise.h]h9Returns 0 on success, or a negative errno code otherwise.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_vunmap (C function)c.dma_buf_vunmaphNtauh1j hjhhhNhNubj )}(hhh](j )}(hCvoid dma_buf_vunmap (struct dma_buf *dmabuf, struct iosys_map *map)h]j )}(hBvoid dma_buf_vunmap(struct dma_buf *dmabuf, struct iosys_map *map)h](jK)}(hvoidh]hvoid}(hjAhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjAhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM5ubj )}(h h]h }(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAhhhjAhM5ubj )}(hdma_buf_vunmaph]j )}(hdma_buf_vunmaph]hdma_buf_vunmap}(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjAhhhjAhM5ubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj BhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubj )}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj*BhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'Bubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj,BmodnameN classnameNjj)}j]jN)}jFjAsbc.dma_buf_vunmapasbuh1hhjBubj )}(h h]h }(hjJBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubjc)}(hj h]h*}(hjXBhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjBubj )}(hdmabufh]hdmabuf}(hjeBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjBubj)}(hstruct iosys_map *maph](j )}(hj h]hstruct}(hj~BhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzBubj )}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzBubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjBmodnameN classnameNjj)}j]jFBc.dma_buf_vunmapasbuh1hhjzBubj )}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzBubjc)}(hj h]h*}(hjBhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjzBubj )}(hmaph]hmap}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzBubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjBubeh}(h]h ]h"]h$]h&]jjuh1jhjAhhhjAhM5ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjAhhhjAhM5ubah}(h]jAah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjAhM5hjAhhubj@ )}(hhh]h)}(h&Unmap a vmap obtained by dma_buf_vmap.h]h&Unmap a vmap obtained by dma_buf_vmap.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM1hjBhhubah}(h]h ]h"]h$]h&]uh1j? hjAhhhjAhM5ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jCjb jCjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vunmap ``struct iosys_map *map`` [in] vmap pointer to vunmaph](h)}(h**Parameters**h]jq )}(hj!Ch]h Parameters}(hj#ChhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjCubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM5hjCubj )}(hhh](j )}(h4``struct dma_buf *dmabuf`` [in] buffer to vunmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj@Ch]hstruct dma_buf *dmabuf}(hjBChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>Cubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM2hj:Cubj )}(hhh]h)}(h[in] buffer to vunmaph]h[in] buffer to vunmap}(hjYChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUChM2hjVCubah}(h]h ]h"]h$]h&]uh1j hj:Cubeh}(h]h ]h"]h$]h&]uh1j hjUChM2hj7Cubj )}(h8``struct iosys_map *map`` [in] vmap pointer to vunmaph](j )}(h``struct iosys_map *map``h]j)}(hjyCh]hstruct iosys_map *map}(hj{ChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwCubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM4hjsCubj )}(hhh]h)}(h[in] vmap pointer to vunmaph]h[in] vmap pointer to vunmap}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM3hjCubah}(h]h ]h"]h$]h&]uh1j hjsCubeh}(h]h ]h"]h$]h&]uh1j hjChM4hj7Cubeh}(h]h ]h"]h$]h&]uh1j hjCubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_buf_vunmap_unlocked (C function)c.dma_buf_vunmap_unlockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(hLvoid dma_buf_vunmap_unlocked (struct dma_buf *dmabuf, struct iosys_map *map)h]j )}(hKvoid dma_buf_vunmap_unlocked(struct dma_buf *dmabuf, struct iosys_map *map)h](jK)}(hvoidh]hvoid}(hjChhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjChhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMMubj )}(h h]h }(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjChhhjChMMubj )}(hdma_buf_vunmap_unlockedh]j )}(hdma_buf_vunmap_unlockedh]hdma_buf_vunmap_unlocked}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjChhhjChMMubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj Dubj )}(h h]h }(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj Dubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj.DhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+Dubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj0DmodnameN classnameNjj)}j]jN)}jFjCsbc.dma_buf_vunmap_unlockedasbuh1hhj Dubj )}(h h]h }(hjNDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj Dubjc)}(hj h]h*}(hj\DhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj Dubj )}(hdmabufh]hdmabuf}(hjiDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj Dubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjDubj)}(hstruct iosys_map *maph](j )}(hj h]hstruct}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~Dubj )}(h h]h }(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~Dubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjDmodnameN classnameNjj)}j]jJDc.dma_buf_vunmap_unlockedasbuh1hhj~Dubj )}(h h]h }(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~Dubjc)}(hj h]h*}(hjDhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj~Dubj )}(hmaph]hmap}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~Dubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjDubeh}(h]h ]h"]h$]h&]jjuh1jhjChhhjChMMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjChhhjChMMubah}(h]jCah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjChMMhjChhubj@ )}(hhh]h)}(h&Unmap a vmap obtained by dma_buf_vmap.h]h&Unmap a vmap obtained by dma_buf_vmap.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMIhjEhhubah}(h]h ]h"]h$]h&]uh1j? hjChhhjChMMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jEjb jEjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vunmap ``struct iosys_map *map`` [in] vmap pointer to vunmaph](h)}(h**Parameters**h]jq )}(hj%Eh]h Parameters}(hj'EhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj#Eubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMMhjEubj )}(hhh](j )}(h4``struct dma_buf *dmabuf`` [in] buffer to vunmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjDEh]hstruct dma_buf *dmabuf}(hjFEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBEubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMJhj>Eubj )}(hhh]h)}(h[in] buffer to vunmaph]h[in] buffer to vunmap}(hj]EhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYEhMJhjZEubah}(h]h ]h"]h$]h&]uh1j hj>Eubeh}(h]h ]h"]h$]h&]uh1j hjYEhMJhj;Eubj )}(h8``struct iosys_map *map`` [in] vmap pointer to vunmaph](j )}(h``struct iosys_map *map``h]j)}(hj}Eh]hstruct iosys_map *map}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{Eubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMLhjwEubj )}(hhh]h)}(h[in] vmap pointer to vunmaph]h[in] vmap pointer to vunmap}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMKhjEubah}(h]h ]h"]h$]h&]uh1j hjwEubeh}(h]h ]h"]h$]h&]uh1j hjEhMLhj;Eubeh}(h]h ]h"]h$]h&]uh1j hjEubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_ops (C struct) c.dma_buf_opshNtauh1j hjhhhNhNubj )}(hhh](j )}(h dma_buf_opsh]j )}(hstruct dma_buf_opsh](j )}(hj h]hstruct}(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKubj )}(h h]h }(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEhhhjEhKubj )}(h dma_buf_opsh]j )}(hjEh]h dma_buf_ops}(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjEhhhjEhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjEhhhjEhKubah}(h]jEah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjEhKhjEhhubj@ )}(hhh]h)}(h%operations possible on struct dma_bufh]h%operations possible on struct dma_buf}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjFhhubah}(h]h ]h"]h$]h&]uh1j? hjEhhhjEhKubeh}(h]h ](jstructeh"]h$]h&]j` jja j1Fjb j1Fjc jd je uh1j hhhjhNhNubjg )}(hX,$**Definition**:: struct dma_buf_ops { bool cache_sgt_mapping; int (*attach)(struct dma_buf *, struct dma_buf_attachment *); void (*detach)(struct dma_buf *, struct dma_buf_attachment *); int (*pin)(struct dma_buf_attachment *attach); void (*unpin)(struct dma_buf_attachment *attach); struct sg_table * (*map_dma_buf)(struct dma_buf_attachment *, enum dma_data_direction); void (*unmap_dma_buf)(struct dma_buf_attachment *,struct sg_table *, enum dma_data_direction); void (*release)(struct dma_buf *); int (*begin_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*mmap)(struct dma_buf *, struct vm_area_struct *vma); int (*vmap)(struct dma_buf *dmabuf, struct iosys_map *map); void (*vunmap)(struct dma_buf *dmabuf, struct iosys_map *map); }; **Members** ``cache_sgt_mapping`` If true the framework will cache the first mapping made for each attachment. This avoids creating mappings for attachments multiple times. ``attach`` This is called from dma_buf_attach() to make sure that a given :c:type:`dma_buf_attachment.dev ` can access the provided :c:type:`dma_buf`. Exporters which support buffer objects in special locations like VRAM or device-specific carveout areas should check whether the buffer could be move to system memory (or directly accessed by the provided device), and otherwise need to fail the attach operation. The exporter should also in general check whether the current allocation fulfills the DMA constraints of the new device. If this is not the case, and the allocation cannot be moved, it should also fail the attach operation. Any exporter-private housekeeping data can be stored in the :c:type:`dma_buf_attachment.priv ` pointer. This callback is optional. Returns: 0 on success, negative error code on failure. It might return -EBUSY to signal that backing storage is already allocated and incompatible with the requirements of requesting device. ``detach`` This is called by dma_buf_detach() to release a :c:type:`dma_buf_attachment`. Provided so that exporters can clean up any housekeeping for an :c:type:`dma_buf_attachment`. This callback is optional. ``pin`` This is called by dma_buf_pin() and lets the exporter know that the DMA-buf can't be moved any more. Ideally, the exporter should pin the buffer so that it is generally accessible by all devices. This is called with the :c:type:`dmabuf.resv ` object locked and is mutual exclusive with **cache_sgt_mapping**. This is called automatically for non-dynamic importers from dma_buf_attach(). Note that similar to non-dynamic exporters in their **map_dma_buf** callback the driver must guarantee that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete. Returns: 0 on success, negative error code on failure. ``unpin`` This is called by dma_buf_unpin() and lets the exporter know that the DMA-buf can be moved again. This is called with the dmabuf->resv object locked and is mutual exclusive with **cache_sgt_mapping**. This callback is optional. ``map_dma_buf`` This is called by dma_buf_map_attachment() and is used to map a shared :c:type:`dma_buf` into device address space, and it is mandatory. It can only be called if **attach** has been called successfully. This call may sleep, e.g. when the backing storage first needs to be allocated, or moved to a location suitable for all currently attached devices. Note that any specific buffer attributes required for this function should get added to device_dma_parameters accessible via :c:type:`device.dma_params ` from the :c:type:`dma_buf_attachment`. The **attach** callback should also check these constraints. If this is being called for the first time, the exporter can now choose to scan through the list of attachments for this buffer, collate the requirements of the attached devices, and choose an appropriate backing storage for the buffer. Based on enum dma_data_direction, it might be possible to have multiple users accessing at the same time (for reading, maybe), or any other kind of sharing that the exporter might wish to make available to buffer-users. This is always called with the dmabuf->resv object locked when the dynamic_mapping flag is true. Note that for non-dynamic exporters the driver must guarantee that that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete. Dynamic exporters do not need to follow this rule: For non-dynamic importers the buffer is already pinned through **pin**, which has the same requirements. Dynamic importers otoh are required to obey the dma_resv fences. Returns: A :c:type:`sg_table` scatter list of the backing storage of the DMA buffer, already mapped into the device address space of the :c:type:`device` attached with the provided :c:type:`dma_buf_attachment`. The addresses and lengths in the scatter list are PAGE_SIZE aligned. On failure, returns a negative error value wrapped into a pointer. May also return -EINTR when a signal was received while being blocked. Note that exporters should not try to cache the scatter list, or return the same one for multiple calls. Caching is done either by the DMA-BUF code (for non-dynamic importers) or the importer. Ownership of the scatter list is transferred to the caller, and returned by **unmap_dma_buf**. ``unmap_dma_buf`` This is called by dma_buf_unmap_attachment() and should unmap and release the :c:type:`sg_table` allocated in **map_dma_buf**, and it is mandatory. For static dma_buf handling this might also unpin the backing storage if this is the last mapping of the DMA buffer. ``release`` Called after the last dma_buf_put to release the :c:type:`dma_buf`, and mandatory. ``begin_cpu_access`` This is called from dma_buf_begin_cpu_access() and allows the exporter to ensure that the memory is actually coherent for cpu access. The exporter also needs to ensure that cpu access is coherent for the access direction. The direction can be used by the exporter to optimize the cache flushing, i.e. access with a different direction (read instead of write) might return stale or even bogus data (e.g. when the exporter needs to copy the data to temporary storage). Note that this is both called through the DMA_BUF_IOCTL_SYNC IOCTL command for userspace mappings established through **mmap**, and also for kernel mappings established with **vmap**. This callback is optional. Returns: 0 on success or a negative error code on failure. This can for example fail when the backing storage can't be allocated. Can also return -ERESTARTSYS or -EINTR when the call has been interrupted and needs to be restarted. ``end_cpu_access`` This is called from dma_buf_end_cpu_access() when the importer is done accessing the CPU. The exporter can use this to flush caches and undo anything else done in **begin_cpu_access**. This callback is optional. Returns: 0 on success or a negative error code on failure. Can return -ERESTARTSYS or -EINTR when the call has been interrupted and needs to be restarted. ``mmap`` This callback is used by the dma_buf_mmap() function Note that the mapping needs to be incoherent, userspace is expected to bracket CPU access using the DMA_BUF_IOCTL_SYNC interface. Because dma-buf buffers have invariant size over their lifetime, the dma-buf core checks whether a vma is too large and rejects such mappings. The exporter hence does not need to duplicate this check. Drivers do not need to check this themselves. If an exporter needs to manually flush caches and hence needs to fake coherency for mmap support, it needs to be able to zap all the ptes pointing at the backing storage. Now linux mm needs a struct address_space associated with the struct file stored in vma->vm_file to do that with the function unmap_mapping_range. But the dma_buf framework only backs every dma_buf fd with the anon_file struct file, i.e. all dma_bufs share the same file. Hence exporters need to setup their own file (and address_space) association by setting vma->vm_file and adjusting vma->vm_pgoff in the dma_buf mmap callback. In the specific case of a gem driver the exporter could use the shmem file already provided by gem (and set vm_pgoff = 0). Exporters can then zap ptes by unmapping the corresponding range of the struct address_space associated with their own file. This callback is optional. Returns: 0 on success or a negative error code on failure. ``vmap`` [optional] creates a virtual mapping for the buffer into kernel address space. Same restrictions as for vmap and friends apply. ``vunmap`` [optional] unmaps a vmap from the bufferh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj=FhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj9Fubh:}(hj9FhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK#hj5Fubj)}(hXWstruct dma_buf_ops { bool cache_sgt_mapping; int (*attach)(struct dma_buf *, struct dma_buf_attachment *); void (*detach)(struct dma_buf *, struct dma_buf_attachment *); int (*pin)(struct dma_buf_attachment *attach); void (*unpin)(struct dma_buf_attachment *attach); struct sg_table * (*map_dma_buf)(struct dma_buf_attachment *, enum dma_data_direction); void (*unmap_dma_buf)(struct dma_buf_attachment *,struct sg_table *, enum dma_data_direction); void (*release)(struct dma_buf *); int (*begin_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*mmap)(struct dma_buf *, struct vm_area_struct *vma); int (*vmap)(struct dma_buf *dmabuf, struct iosys_map *map); void (*vunmap)(struct dma_buf *dmabuf, struct iosys_map *map); };h]hXWstruct dma_buf_ops { bool cache_sgt_mapping; int (*attach)(struct dma_buf *, struct dma_buf_attachment *); void (*detach)(struct dma_buf *, struct dma_buf_attachment *); int (*pin)(struct dma_buf_attachment *attach); void (*unpin)(struct dma_buf_attachment *attach); struct sg_table * (*map_dma_buf)(struct dma_buf_attachment *, enum dma_data_direction); void (*unmap_dma_buf)(struct dma_buf_attachment *,struct sg_table *, enum dma_data_direction); void (*release)(struct dma_buf *); int (*begin_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*mmap)(struct dma_buf *, struct vm_area_struct *vma); int (*vmap)(struct dma_buf *dmabuf, struct iosys_map *map); void (*vunmap)(struct dma_buf *dmabuf, struct iosys_map *map); };}hjVFsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK%hj5Fubh)}(h **Members**h]jq )}(hjgFh]hMembers}(hjiFhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjeFubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK5hj5Fubj )}(hhh](j )}(h``cache_sgt_mapping`` If true the framework will cache the first mapping made for each attachment. This avoids creating mappings for attachments multiple times. h](j )}(h``cache_sgt_mapping``h]j)}(hjFh]hcache_sgt_mapping}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK)hjFubj )}(hhh]h)}(hIf true the framework will cache the first mapping made for each attachment. This avoids creating mappings for attachments multiple times.h]hIf true the framework will cache the first mapping made for each attachment. This avoids creating mappings for attachments multiple times.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK'hjFubah}(h]h ]h"]h$]h&]uh1j hjFubeh}(h]h ]h"]h$]h&]uh1j hjFhK)hj}Fubj )}(hX``attach`` This is called from dma_buf_attach() to make sure that a given :c:type:`dma_buf_attachment.dev ` can access the provided :c:type:`dma_buf`. Exporters which support buffer objects in special locations like VRAM or device-specific carveout areas should check whether the buffer could be move to system memory (or directly accessed by the provided device), and otherwise need to fail the attach operation. The exporter should also in general check whether the current allocation fulfills the DMA constraints of the new device. If this is not the case, and the allocation cannot be moved, it should also fail the attach operation. Any exporter-private housekeeping data can be stored in the :c:type:`dma_buf_attachment.priv ` pointer. This callback is optional. Returns: 0 on success, negative error code on failure. It might return -EBUSY to signal that backing storage is already allocated and incompatible with the requirements of requesting device. h](j )}(h ``attach``h]j)}(hjFh]hattach}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKEhjFubj )}(hhh](h)}(hXThis is called from dma_buf_attach() to make sure that a given :c:type:`dma_buf_attachment.dev ` can access the provided :c:type:`dma_buf`. Exporters which support buffer objects in special locations like VRAM or device-specific carveout areas should check whether the buffer could be move to system memory (or directly accessed by the provided device), and otherwise need to fail the attach operation.h](h?This is called from dma_buf_attach() to make sure that a given }(hjFhhhNhNubh)}(h5:c:type:`dma_buf_attachment.dev `h]j)}(hjFh]hdma_buf_attachment.dev}(hjFhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK0hjFubh can access the provided }(hjFhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjGh]hdma_buf}(hj GhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hhjGhK0hjFubhX. Exporters which support buffer objects in special locations like VRAM or device-specific carveout areas should check whether the buffer could be move to system memory (or directly accessed by the provided device), and otherwise need to fail the attach operation.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjGhK0hjFubh)}(hThe exporter should also in general check whether the current allocation fulfills the DMA constraints of the new device. If this is not the case, and the allocation cannot be moved, it should also fail the attach operation.h]hThe exporter should also in general check whether the current allocation fulfills the DMA constraints of the new device. If this is not the case, and the allocation cannot be moved, it should also fail the attach operation.}(hj.GhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK7hjFubh)}(h{Any exporter-private housekeeping data can be stored in the :c:type:`dma_buf_attachment.priv ` pointer.h](h`h]j)}(hjGGh]hdma_buf_attachment.priv}(hjIGhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjEGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK` object locked and is mutual exclusive with **cache_sgt_mapping**. This is called automatically for non-dynamic importers from dma_buf_attach(). Note that similar to non-dynamic exporters in their **map_dma_buf** callback the driver must guarantee that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete. Returns: 0 on success, negative error code on failure. h](j )}(h``pin``h]j)}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:Hubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKjhj6Hubj )}(hhh](h)}(hThis is called by dma_buf_pin() and lets the exporter know that the DMA-buf can't be moved any more. Ideally, the exporter should pin the buffer so that it is generally accessible by all devices.h]hThis is called by dma_buf_pin() and lets the exporter know that the DMA-buf can’t be moved any more. Ideally, the exporter should pin the buffer so that it is generally accessible by all devices.}(hjUHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKWhjRHubh)}(hxThis is called with the :c:type:`dmabuf.resv ` object locked and is mutual exclusive with **cache_sgt_mapping**.h](hThis is called with the }(hjdHhhhNhNubh)}(h:c:type:`dmabuf.resv `h]j)}(hjnHh]h dmabuf.resv}(hjpHhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjlHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdmabufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK\hjdHubh, object locked and is mutual exclusive with }(hjdHhhhNhNubjq )}(h**cache_sgt_mapping**h]hcache_sgt_mapping}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjdHubh.}(hjdHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjHhK\hjRHubh)}(hMThis is called automatically for non-dynamic importers from dma_buf_attach().h]hMThis is called automatically for non-dynamic importers from dma_buf_attach().}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK_hjRHubh)}(hX/Note that similar to non-dynamic exporters in their **map_dma_buf** callback the driver must guarantee that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete.h](h4Note that similar to non-dynamic exporters in their }(hjHhhhNhNubjq )}(h**map_dma_buf**h]h map_dma_buf}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjHubh callback the driver must guarantee that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKbhjRHubh)}(hReturns:h]hReturns:}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhhjRHubh)}(h-0 on success, negative error code on failure.h]h-0 on success, negative error code on failure.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQHhKjhjRHubeh}(h]h ]h"]h$]h&]uh1j hj6Hubeh}(h]h ]h"]h$]h&]uh1j hjQHhKjhj}Fubj )}(h``unpin`` This is called by dma_buf_unpin() and lets the exporter know that the DMA-buf can be moved again. This is called with the dmabuf->resv object locked and is mutual exclusive with **cache_sgt_mapping**. This callback is optional. h](j )}(h ``unpin``h]j)}(hjIh]hunpin}(hj IhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKwhjIubj )}(hhh](h)}(haThis is called by dma_buf_unpin() and lets the exporter know that the DMA-buf can be moved again.h]haThis is called by dma_buf_unpin() and lets the exporter know that the DMA-buf can be moved again.}(hj IhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKqhjIubh)}(hfThis is called with the dmabuf->resv object locked and is mutual exclusive with **cache_sgt_mapping**.h](hPThis is called with the dmabuf->resv object locked and is mutual exclusive with }(hj/IhhhNhNubjq )}(h**cache_sgt_mapping**h]hcache_sgt_mapping}(hj7IhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj/Iubh.}(hj/IhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKthjIubh)}(hThis callback is optional.h]hThis callback is optional.}(hjPIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhKwhjIubeh}(h]h ]h"]h$]h&]uh1j hjIubeh}(h]h ]h"]h$]h&]uh1j hjIhKwhj}Fubj )}(hXU ``map_dma_buf`` This is called by dma_buf_map_attachment() and is used to map a shared :c:type:`dma_buf` into device address space, and it is mandatory. It can only be called if **attach** has been called successfully. This call may sleep, e.g. when the backing storage first needs to be allocated, or moved to a location suitable for all currently attached devices. Note that any specific buffer attributes required for this function should get added to device_dma_parameters accessible via :c:type:`device.dma_params ` from the :c:type:`dma_buf_attachment`. The **attach** callback should also check these constraints. If this is being called for the first time, the exporter can now choose to scan through the list of attachments for this buffer, collate the requirements of the attached devices, and choose an appropriate backing storage for the buffer. Based on enum dma_data_direction, it might be possible to have multiple users accessing at the same time (for reading, maybe), or any other kind of sharing that the exporter might wish to make available to buffer-users. This is always called with the dmabuf->resv object locked when the dynamic_mapping flag is true. Note that for non-dynamic exporters the driver must guarantee that that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete. Dynamic exporters do not need to follow this rule: For non-dynamic importers the buffer is already pinned through **pin**, which has the same requirements. Dynamic importers otoh are required to obey the dma_resv fences. Returns: A :c:type:`sg_table` scatter list of the backing storage of the DMA buffer, already mapped into the device address space of the :c:type:`device` attached with the provided :c:type:`dma_buf_attachment`. The addresses and lengths in the scatter list are PAGE_SIZE aligned. On failure, returns a negative error value wrapped into a pointer. May also return -EINTR when a signal was received while being blocked. Note that exporters should not try to cache the scatter list, or return the same one for multiple calls. Caching is done either by the DMA-BUF code (for non-dynamic importers) or the importer. Ownership of the scatter list is transferred to the caller, and returned by **unmap_dma_buf**. h](j )}(h``map_dma_buf``h]j)}(hjpIh]h map_dma_buf}(hjrIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnIubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjjIubj )}(hhh](h)}(hThis is called by dma_buf_map_attachment() and is used to map a shared :c:type:`dma_buf` into device address space, and it is mandatory. It can only be called if **attach** has been called successfully.h](hGThis is called by dma_buf_map_attachment() and is used to map a shared }(hjIhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjIh]hdma_buf}(hjIhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK~hjIubhJ into device address space, and it is mandatory. It can only be called if }(hjIhhhNhNubjq )}(h **attach**h]hattach}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjIubh has been called successfully.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjIhK~hjIubh)}(hThis call may sleep, e.g. when the backing storage first needs to be allocated, or moved to a location suitable for all currently attached devices.h]hThis call may sleep, e.g. when the backing storage first needs to be allocated, or moved to a location suitable for all currently attached devices.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(hXNote that any specific buffer attributes required for this function should get added to device_dma_parameters accessible via :c:type:`device.dma_params ` from the :c:type:`dma_buf_attachment`. The **attach** callback should also check these constraints.h](h}Note that any specific buffer attributes required for this function should get added to device_dma_parameters accessible via }(hjIhhhNhNubh)}(h$:c:type:`device.dma_params `h]j)}(hjIh]hdevice.dma_params}(hjIhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdeviceuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh from the }(hjIhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hj Jh]hdma_buf_attachment}(hj JhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hhjJhKhjIubh. The }(hjIhhhNhNubjq )}(h **attach**h]hattach}(hj+JhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjIubh. callback should also check these constraints.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjJhKhjIubh)}(hIf this is being called for the first time, the exporter can now choose to scan through the list of attachments for this buffer, collate the requirements of the attached devices, and choose an appropriate backing storage for the buffer.h]hIf this is being called for the first time, the exporter can now choose to scan through the list of attachments for this buffer, collate the requirements of the attached devices, and choose an appropriate backing storage for the buffer.}(hjCJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(hBased on enum dma_data_direction, it might be possible to have multiple users accessing at the same time (for reading, maybe), or any other kind of sharing that the exporter might wish to make available to buffer-users.h]hBased on enum dma_data_direction, it might be possible to have multiple users accessing at the same time (for reading, maybe), or any other kind of sharing that the exporter might wish to make available to buffer-users.}(hjRJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(h`This is always called with the dmabuf->resv object locked when the dynamic_mapping flag is true.h]h`This is always called with the dmabuf->resv object locked when the dynamic_mapping flag is true.}(hjaJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(hXNote that for non-dynamic exporters the driver must guarantee that that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete. Dynamic exporters do not need to follow this rule: For non-dynamic importers the buffer is already pinned through **pin**, which has the same requirements. Dynamic importers otoh are required to obey the dma_resv fences.h](hXNote that for non-dynamic exporters the driver must guarantee that that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete. Dynamic exporters do not need to follow this rule: For non-dynamic importers the buffer is already pinned through }(hjpJhhhNhNubjq )}(h**pin**h]hpin}(hjxJhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjpJubhc, which has the same requirements. Dynamic importers otoh are required to obey the dma_resv fences.}(hjpJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(hReturns:h]hReturns:}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(hXA :c:type:`sg_table` scatter list of the backing storage of the DMA buffer, already mapped into the device address space of the :c:type:`device` attached with the provided :c:type:`dma_buf_attachment`. The addresses and lengths in the scatter list are PAGE_SIZE aligned.h](hA }(hjJhhhNhNubh)}(h:c:type:`sg_table`h]j)}(hjJh]hsg_table}(hjJhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsg_tableuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjJubhl scatter list of the backing storage of the DMA buffer, already mapped into the device address space of the }(hjJhhhNhNubh)}(h:c:type:`device`h]j)}(hjJh]hdevice}(hjJhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdeviceuh1hhjJhKhjJubh attached with the provided }(hjJhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjJh]hdma_buf_attachment}(hjJhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hhjJhKhjJubhF. The addresses and lengths in the scatter list are PAGE_SIZE aligned.}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjJhKhjIubh)}(hOn failure, returns a negative error value wrapped into a pointer. May also return -EINTR when a signal was received while being blocked.h]hOn failure, returns a negative error value wrapped into a pointer. May also return -EINTR when a signal was received while being blocked.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(hXNote that exporters should not try to cache the scatter list, or return the same one for multiple calls. Caching is done either by the DMA-BUF code (for non-dynamic importers) or the importer. Ownership of the scatter list is transferred to the caller, and returned by **unmap_dma_buf**.h](hX Note that exporters should not try to cache the scatter list, or return the same one for multiple calls. Caching is done either by the DMA-BUF code (for non-dynamic importers) or the importer. Ownership of the scatter list is transferred to the caller, and returned by }(hj'KhhhNhNubjq )}(h**unmap_dma_buf**h]h unmap_dma_buf}(hj/KhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj'Kubh.}(hj'KhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubeh}(h]h ]h"]h$]h&]uh1j hjjIubeh}(h]h ]h"]h$]h&]uh1j hjIhKhj}Fubj )}(hX``unmap_dma_buf`` This is called by dma_buf_unmap_attachment() and should unmap and release the :c:type:`sg_table` allocated in **map_dma_buf**, and it is mandatory. For static dma_buf handling this might also unpin the backing storage if this is the last mapping of the DMA buffer. h](j )}(h``unmap_dma_buf``h]j)}(hjZKh]h unmap_dma_buf}(hj\KhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXKubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjTKubj )}(hhh]h)}(hXThis is called by dma_buf_unmap_attachment() and should unmap and release the :c:type:`sg_table` allocated in **map_dma_buf**, and it is mandatory. For static dma_buf handling this might also unpin the backing storage if this is the last mapping of the DMA buffer.h](hNThis is called by dma_buf_unmap_attachment() and should unmap and release the }(hjsKhhhNhNubh)}(h:c:type:`sg_table`h]j)}(hj}Kh]hsg_table}(hjKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj{Kubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsg_tableuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjsKubh allocated in }(hjsKhhhNhNubjq )}(h**map_dma_buf**h]h map_dma_buf}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjsKubh, and it is mandatory. For static dma_buf handling this might also unpin the backing storage if this is the last mapping of the DMA buffer.}(hjsKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjKhKhjpKubah}(h]h ]h"]h$]h&]uh1j hjTKubeh}(h]h ]h"]h$]h&]uh1j hjoKhKhj}Fubj )}(h_``release`` Called after the last dma_buf_put to release the :c:type:`dma_buf`, and mandatory. h](j )}(h ``release``h]j)}(hjKh]hrelease}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjKubj )}(hhh]h)}(hRCalled after the last dma_buf_put to release the :c:type:`dma_buf`, and mandatory.h](h1Called after the last dma_buf_put to release the }(hjKhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjKh]hdma_buf}(hjKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjKubh, and mandatory.}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj LhKhjKubah}(h]h ]h"]h$]h&]uh1j hjKubeh}(h]h ]h"]h$]h&]uh1j hjKhKhj}Fubj )}(hX``begin_cpu_access`` This is called from dma_buf_begin_cpu_access() and allows the exporter to ensure that the memory is actually coherent for cpu access. The exporter also needs to ensure that cpu access is coherent for the access direction. The direction can be used by the exporter to optimize the cache flushing, i.e. access with a different direction (read instead of write) might return stale or even bogus data (e.g. when the exporter needs to copy the data to temporary storage). Note that this is both called through the DMA_BUF_IOCTL_SYNC IOCTL command for userspace mappings established through **mmap**, and also for kernel mappings established with **vmap**. This callback is optional. Returns: 0 on success or a negative error code on failure. This can for example fail when the backing storage can't be allocated. Can also return -ERESTARTSYS or -EINTR when the call has been interrupted and needs to be restarted. h](j )}(h``begin_cpu_access``h]j)}(hj&Lh]hbegin_cpu_access}(hj(LhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$Lubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj Lubj )}(hhh](h)}(hXThis is called from dma_buf_begin_cpu_access() and allows the exporter to ensure that the memory is actually coherent for cpu access. The exporter also needs to ensure that cpu access is coherent for the access direction. The direction can be used by the exporter to optimize the cache flushing, i.e. access with a different direction (read instead of write) might return stale or even bogus data (e.g. when the exporter needs to copy the data to temporary storage).h]hXThis is called from dma_buf_begin_cpu_access() and allows the exporter to ensure that the memory is actually coherent for cpu access. The exporter also needs to ensure that cpu access is coherent for the access direction. The direction can be used by the exporter to optimize the cache flushing, i.e. access with a different direction (read instead of write) might return stale or even bogus data (e.g. when the exporter needs to copy the data to temporary storage).}(hj?LhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjvm_file to do that with the function unmap_mapping_range. But the dma_buf framework only backs every dma_buf fd with the anon_file struct file, i.e. all dma_bufs share the same file. Hence exporters need to setup their own file (and address_space) association by setting vma->vm_file and adjusting vma->vm_pgoff in the dma_buf mmap callback. In the specific case of a gem driver the exporter could use the shmem file already provided by gem (and set vm_pgoff = 0). Exporters can then zap ptes by unmapping the corresponding range of the struct address_space associated with their own file. This callback is optional. Returns: 0 on success or a negative error code on failure. h](j )}(h``mmap``h]j)}(hj9Mh]hmmap}(hj;MhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7Mubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj3Mubj )}(hhh](h)}(h4This callback is used by the dma_buf_mmap() functionh]h4This callback is used by the dma_buf_mmap() function}(hjRMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjOMubh)}(hNote that the mapping needs to be incoherent, userspace is expected to bracket CPU access using the DMA_BUF_IOCTL_SYNC interface.h]hNote that the mapping needs to be incoherent, userspace is expected to bracket CPU access using the DMA_BUF_IOCTL_SYNC interface.}(hjaMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjOMubh)}(hBecause dma-buf buffers have invariant size over their lifetime, the dma-buf core checks whether a vma is too large and rejects such mappings. The exporter hence does not need to duplicate this check. Drivers do not need to check this themselves.h]hBecause dma-buf buffers have invariant size over their lifetime, the dma-buf core checks whether a vma is too large and rejects such mappings. The exporter hence does not need to duplicate this check. Drivers do not need to check this themselves.}(hjpMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjOMubh)}(hXIf an exporter needs to manually flush caches and hence needs to fake coherency for mmap support, it needs to be able to zap all the ptes pointing at the backing storage. Now linux mm needs a struct address_space associated with the struct file stored in vma->vm_file to do that with the function unmap_mapping_range. But the dma_buf framework only backs every dma_buf fd with the anon_file struct file, i.e. all dma_bufs share the same file.h]hXIf an exporter needs to manually flush caches and hence needs to fake coherency for mmap support, it needs to be able to zap all the ptes pointing at the backing storage. Now linux mm needs a struct address_space associated with the struct file stored in vma->vm_file to do that with the function unmap_mapping_range. But the dma_buf framework only backs every dma_buf fd with the anon_file struct file, i.e. all dma_bufs share the same file.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjOMubh)}(hXHence exporters need to setup their own file (and address_space) association by setting vma->vm_file and adjusting vma->vm_pgoff in the dma_buf mmap callback. In the specific case of a gem driver the exporter could use the shmem file already provided by gem (and set vm_pgoff = 0). Exporters can then zap ptes by unmapping the corresponding range of the struct address_space associated with their own file.h]hXHence exporters need to setup their own file (and address_space) association by setting vma->vm_file and adjusting vma->vm_pgoff in the dma_buf mmap callback. In the specific case of a gem driver the exporter could use the shmem file already provided by gem (and set vm_pgoff = 0). Exporters can then zap ptes by unmapping the corresponding range of the struct address_space associated with their own file.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM hjOMubh)}(hThis callback is optional.h]hThis callback is optional.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjOMubh)}(hReturns:h]hReturns:}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjOMubh)}(h10 on success or a negative error code on failure.h]h10 on success or a negative error code on failure.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNMhMhjOMubeh}(h]h ]h"]h$]h&]uh1j hj3Mubeh}(h]h ]h"]h$]h&]uh1j hjNMhMhj}Fubj )}(h``vmap`` [optional] creates a virtual mapping for the buffer into kernel address space. Same restrictions as for vmap and friends apply. h](j )}(h``vmap``h]j)}(hjMh]hvmap}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK"hjMubj )}(hhh]h)}(h[optional] creates a virtual mapping for the buffer into kernel address space. Same restrictions as for vmap and friends apply.h]h[optional] creates a virtual mapping for the buffer into kernel address space. Same restrictions as for vmap and friends apply.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK!hjMubah}(h]h ]h"]h$]h&]uh1j hjMubeh}(h]h ]h"]h$]h&]uh1j hjMhK"hj}Fubj )}(h3``vunmap`` [optional] unmaps a vmap from the bufferh](j )}(h ``vunmap``h]j)}(hjNh]hvunmap}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK"hjNubj )}(hhh]h)}(h([optional] unmaps a vmap from the bufferh]h([optional] unmaps a vmap from the buffer}(hj.NhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK#hj+Nubah}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]uh1j hj*NhK"hj}Fubeh}(h]h ]h"]h$]h&]uh1j hj5Fubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf (C struct) c.dma_bufhNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_bufh]j )}(hstruct dma_bufh](j )}(hj h]hstruct}(hjoNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjkNhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK)ubj )}(h h]h }(hj}NhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjkNhhhj|NhK)ubj )}(hdma_bufh]j )}(hjiNh]hdma_buf}(hjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjkNhhhj|NhK)ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjgNhhhj|NhK)ubah}(h]jbNah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj|NhK)hjdNhhubj@ )}(hhh]h)}(hshared buffer objecth]hshared buffer object}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM#hjNhhubah}(h]h ]h"]h$]h&]uh1j? hjdNhhhj|NhK)ubeh}(h]h ](jstructeh"]h$]h&]j` jja jNjb jNjc jd je uh1j hhhjhNhNubjg )}(hX**Definition**:: struct dma_buf { size_t size; struct file *file; struct list_head attachments; const struct dma_buf_ops *ops; unsigned vmapping_counter; struct iosys_map vmap_ptr; const char *exp_name; const char *name; spinlock_t name_lock; struct module *owner; #if IS_ENABLED(CONFIG_DEBUG_FS); struct list_head list_node; #endif; void *priv; struct dma_resv *resv; wait_queue_head_t poll; struct dma_buf_poll_cb_t { struct dma_fence_cb cb; wait_queue_head_t *poll; __poll_t active; } cb_in, cb_out; #ifdef CONFIG_DMABUF_SYSFS_STATS; struct dma_buf_sysfs_entry { struct kobject kobj; struct dma_buf *dmabuf; } *sysfs_entry; #endif; }; **Members** ``size`` Size of the buffer; invariant over the lifetime of the buffer. ``file`` File pointer used for sharing buffers across, and for refcounting. See dma_buf_get() and dma_buf_put(). ``attachments`` List of dma_buf_attachment that denotes all devices attached, protected by :c:type:`dma_resv` lock **resv**. ``ops`` dma_buf_ops associated with this buffer object. ``vmapping_counter`` Used internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by **lock**. ``vmap_ptr`` The current vmap ptr if **vmapping_counter** > 0. Protected by **lock**. ``exp_name`` Name of the exporter; useful for debugging. Must not be NULL ``name`` Userspace-provided name. Default value is NULL. If not NULL, length cannot be longer than DMA_BUF_NAME_LEN, including NIL char. Useful for accounting and debugging. Read/Write accesses are protected by **name_lock** See the IOCTLs DMA_BUF_SET_NAME or DMA_BUF_SET_NAME_A/B ``name_lock`` Spinlock to protect name access for read access. ``owner`` Pointer to exporter module; used for refcounting when exporter is a kernel module. ``list_node`` node for dma_buf accounting and debugging. ``priv`` exporter specific private data for this buffer object. ``resv`` Reservation object linked to this dma-buf. IMPLICIT SYNCHRONIZATION RULES: Drivers which support implicit synchronization of buffer access as e.g. exposed in `Implicit Fence Poll Support`_ must follow the below rules. - Drivers must add a read fence through dma_resv_add_fence() with the DMA_RESV_USAGE_READ flag for anything the userspace API considers a read access. This highly depends upon the API and window system. - Similarly drivers must add a write fence through dma_resv_add_fence() with the DMA_RESV_USAGE_WRITE flag for anything the userspace API considers write access. - Drivers may just always add a write fence, since that only causes unnecessary synchronization, but no correctness issues. - Some drivers only expose a synchronous userspace API with no pipelining across drivers. These do not set any fences for their access. An example here is v4l. - Driver should use dma_resv_usage_rw() when retrieving fences as dependency for implicit synchronization. DYNAMIC IMPORTER RULES: Dynamic importers, see dma_buf_attachment_is_dynamic(), have additional constraints on how they set up fences: - Dynamic importers must obey the write fences and wait for them to signal before allowing access to the buffer's underlying storage through the device. - Dynamic importers should set fences for any access that they can't disable immediately from their :c:type:`dma_buf_attach_ops.move_notify ` callback. IMPORTANT: All drivers and memory management related functions must obey the struct dma_resv rules, specifically the rules for updating and obeying fences. See enum dma_resv_usage for further descriptions. ``poll`` for userspace poll support ``cb_in`` for userspace poll support ``cb_out`` for userspace poll support ``sysfs_entry`` For exposing information about this buffer in sysfs. See also `DMA-BUF statistics`_ for the uapi this enables.h](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjNubh:}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM'hjNubj)}(hXstruct dma_buf { size_t size; struct file *file; struct list_head attachments; const struct dma_buf_ops *ops; unsigned vmapping_counter; struct iosys_map vmap_ptr; const char *exp_name; const char *name; spinlock_t name_lock; struct module *owner; #if IS_ENABLED(CONFIG_DEBUG_FS); struct list_head list_node; #endif; void *priv; struct dma_resv *resv; wait_queue_head_t poll; struct dma_buf_poll_cb_t { struct dma_fence_cb cb; wait_queue_head_t *poll; __poll_t active; } cb_in, cb_out; #ifdef CONFIG_DMABUF_SYSFS_STATS; struct dma_buf_sysfs_entry { struct kobject kobj; struct dma_buf *dmabuf; } *sysfs_entry; #endif; };h]hXstruct dma_buf { size_t size; struct file *file; struct list_head attachments; const struct dma_buf_ops *ops; unsigned vmapping_counter; struct iosys_map vmap_ptr; const char *exp_name; const char *name; spinlock_t name_lock; struct module *owner; #if IS_ENABLED(CONFIG_DEBUG_FS); struct list_head list_node; #endif; void *priv; struct dma_resv *resv; wait_queue_head_t poll; struct dma_buf_poll_cb_t { struct dma_fence_cb cb; wait_queue_head_t *poll; __poll_t active; } cb_in, cb_out; #ifdef CONFIG_DMABUF_SYSFS_STATS; struct dma_buf_sysfs_entry { struct kobject kobj; struct dma_buf *dmabuf; } *sysfs_entry; #endif; };}hjNsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM)hjNubh)}(h **Members**h]jq )}(hjNh]hMembers}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMGhjNubj )}(hhh](j )}(hH``size`` Size of the buffer; invariant over the lifetime of the buffer. h](j )}(h``size``h]j)}(hjOh]hsize}(hj OhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM1hjOubj )}(hhh]h)}(h>Size of the buffer; invariant over the lifetime of the buffer.h]h>Size of the buffer; invariant over the lifetime of the buffer.}(hj7OhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3OhM1hj4Oubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1j hj3OhM1hjOubj )}(hq``file`` File pointer used for sharing buffers across, and for refcounting. See dma_buf_get() and dma_buf_put(). h](j )}(h``file``h]j)}(hjWOh]hfile}(hjYOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUOubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM9hjQOubj )}(hhh]h)}(hgFile pointer used for sharing buffers across, and for refcounting. See dma_buf_get() and dma_buf_put().h]hgFile pointer used for sharing buffers across, and for refcounting. See dma_buf_get() and dma_buf_put().}(hjpOhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM8hjmOubah}(h]h ]h"]h$]h&]uh1j hjQOubeh}(h]h ]h"]h$]h&]uh1j hjlOhM9hjOubj )}(h}``attachments`` List of dma_buf_attachment that denotes all devices attached, protected by :c:type:`dma_resv` lock **resv**. h](j )}(h``attachments``h]j)}(hjOh]h attachments}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMAhjOubj )}(hhh]h)}(hlList of dma_buf_attachment that denotes all devices attached, protected by :c:type:`dma_resv` lock **resv**.h](hKList of dma_buf_attachment that denotes all devices attached, protected by }(hjOhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjOh]hdma_resv}(hjOhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM@hjOubh lock }(hjOhhhNhNubjq )}(h**resv**h]hresv}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjOubh.}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjOhM@hjOubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1j hjOhMAhjOubj )}(h8``ops`` dma_buf_ops associated with this buffer object. h](j )}(h``ops``h]j)}(hjPh]hops}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjOubj )}(hhh]h)}(h/dma_buf_ops associated with this buffer object.h]h/dma_buf_ops associated with this buffer object.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhKhjPubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1j hjPhKhjOubj )}(hl``vmapping_counter`` Used internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by **lock**. h](j )}(h``vmapping_counter``h]j)}(hj9Ph]hvmapping_counter}(hj;PhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7Pubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMLhj3Pubj )}(hhh]h)}(hVUsed internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by **lock**.h](hMUsed internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by }(hjRPhhhNhNubjq )}(h**lock**h]hlock}(hjZPhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjRPubh.}(hjRPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMKhjOPubah}(h]h ]h"]h$]h&]uh1j hj3Pubeh}(h]h ]h"]h$]h&]uh1j hjNPhMLhjOubj )}(hV``vmap_ptr`` The current vmap ptr if **vmapping_counter** > 0. Protected by **lock**. h](j )}(h ``vmap_ptr``h]j)}(hjPh]hvmap_ptr}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMShjPubj )}(hhh]h)}(hHThe current vmap ptr if **vmapping_counter** > 0. Protected by **lock**.h](hThe current vmap ptr if }(hjPhhhNhNubjq )}(h**vmapping_counter**h]hvmapping_counter}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjPubh > 0. Protected by }(hjPhhhNhNubjq )}(h**lock**h]hlock}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjPubh.}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjPhMShjPubah}(h]h ]h"]h$]h&]uh1j hjPubeh}(h]h ]h"]h$]h&]uh1j hjPhMShjOubj )}(hJ``exp_name`` Name of the exporter; useful for debugging. Must not be NULL h](j )}(h ``exp_name``h]j)}(hjPh]hexp_name}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMYhjPubj )}(hhh]h)}(h` callback. IMPORTANT: All drivers and memory management related functions must obey the struct dma_resv rules, specifically the rules for updating and obeying fences. See enum dma_resv_usage for further descriptions. h](j )}(h``resv``h]j)}(hjVRh]hresv}(hjXRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTRubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjPRubj )}(hhh](h)}(h*Reservation object linked to this dma-buf.h]h*Reservation object linked to this dma-buf.}(hjoRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjlRubh)}(hIMPLICIT SYNCHRONIZATION RULES:h]hIMPLICIT SYNCHRONIZATION RULES:}(hj~RhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjlRubh)}(hDrivers which support implicit synchronization of buffer access as e.g. exposed in `Implicit Fence Poll Support`_ must follow the below rules.h](hSDrivers which support implicit synchronization of buffer access as e.g. exposed in }(hjRhhhNhNubj)}(h`Implicit Fence Poll Support`_h]hImplicit Fence Poll Support}(hjRhhhNhNubah}(h]h ]h"]h$]h&]nameImplicit Fence Poll Supportjjuh1jhjRjKubh must follow the below rules.}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjlRubh)}(hhh](h)}(hDrivers must add a read fence through dma_resv_add_fence() with the DMA_RESV_USAGE_READ flag for anything the userspace API considers a read access. This highly depends upon the API and window system. h]h)}(hDrivers must add a read fence through dma_resv_add_fence() with the DMA_RESV_USAGE_READ flag for anything the userspace API considers a read access. This highly depends upon the API and window system.h]hDrivers must add a read fence through dma_resv_add_fence() with the DMA_RESV_USAGE_READ flag for anything the userspace API considers a read access. This highly depends upon the API and window system.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubah}(h]h ]h"]h$]h&]uh1hhjRubh)}(hSimilarly drivers must add a write fence through dma_resv_add_fence() with the DMA_RESV_USAGE_WRITE flag for anything the userspace API considers write access. h]h)}(hSimilarly drivers must add a write fence through dma_resv_add_fence() with the DMA_RESV_USAGE_WRITE flag for anything the userspace API considers write access.h]hSimilarly drivers must add a write fence through dma_resv_add_fence() with the DMA_RESV_USAGE_WRITE flag for anything the userspace API considers write access.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubah}(h]h ]h"]h$]h&]uh1hhjRubh)}(hzDrivers may just always add a write fence, since that only causes unnecessary synchronization, but no correctness issues. h]h)}(hyDrivers may just always add a write fence, since that only causes unnecessary synchronization, but no correctness issues.h]hyDrivers may just always add a write fence, since that only causes unnecessary synchronization, but no correctness issues.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubah}(h]h ]h"]h$]h&]uh1hhjRubh)}(hSome drivers only expose a synchronous userspace API with no pipelining across drivers. These do not set any fences for their access. An example here is v4l. h]h)}(hSome drivers only expose a synchronous userspace API with no pipelining across drivers. These do not set any fences for their access. An example here is v4l.h]hSome drivers only expose a synchronous userspace API with no pipelining across drivers. These do not set any fences for their access. An example here is v4l.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubah}(h]h ]h"]h$]h&]uh1hhjRubh)}(hiDriver should use dma_resv_usage_rw() when retrieving fences as dependency for implicit synchronization. h]h)}(hhDriver should use dma_resv_usage_rw() when retrieving fences as dependency for implicit synchronization.h]hhDriver should use dma_resv_usage_rw() when retrieving fences as dependency for implicit synchronization.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjSubah}(h]h ]h"]h$]h&]uh1hhjRubeh}(h]h ]h"]h$]h&]j>j?uh1hhjRhMhjlRubh)}(hDYNAMIC IMPORTER RULES:h]hDYNAMIC IMPORTER RULES:}(hj6ShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjlRubh)}(hnDynamic importers, see dma_buf_attachment_is_dynamic(), have additional constraints on how they set up fences:h]hnDynamic importers, see dma_buf_attachment_is_dynamic(), have additional constraints on how they set up fences:}(hjEShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjlRubh)}(hhh](h)}(hDynamic importers must obey the write fences and wait for them to signal before allowing access to the buffer's underlying storage through the device. h]h)}(hDynamic importers must obey the write fences and wait for them to signal before allowing access to the buffer's underlying storage through the device.h]hDynamic importers must obey the write fences and wait for them to signal before allowing access to the buffer’s underlying storage through the device.}(hj[ShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjWSubah}(h]h ]h"]h$]h&]uh1hhjTSubh)}(hDynamic importers should set fences for any access that they can't disable immediately from their :c:type:`dma_buf_attach_ops.move_notify ` callback. h]h)}(hDynamic importers should set fences for any access that they can't disable immediately from their :c:type:`dma_buf_attach_ops.move_notify ` callback.h](hdDynamic importers should set fences for any access that they can’t disable immediately from their }(hjtShhhNhNubh)}(h=:c:type:`dma_buf_attach_ops.move_notify `h]j)}(hj~Sh]hdma_buf_attach_ops.move_notify}(hjShhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj|Subah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attach_opsuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjtSubh callback.}(hjtShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjShMhjpSubah}(h]h ]h"]h$]h&]uh1hhjTSubeh}(h]h ]h"]h$]h&]j>j?uh1hhjiShMhjlRubh)}(h IMPORTANT:h]h IMPORTANT:}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjlRubh)}(hAll drivers and memory management related functions must obey the struct dma_resv rules, specifically the rules for updating and obeying fences. See enum dma_resv_usage for further descriptions.h]hAll drivers and memory management related functions must obey the struct dma_resv rules, specifically the rules for updating and obeying fences. See enum dma_resv_usage for further descriptions.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjlRubeh}(h]h ]h"]h$]h&]uh1j hjPRubeh}(h]h ]h"]h$]h&]uh1j hjkRhMhjOubj )}(h$``poll`` for userspace poll support h](j )}(h``poll``h]j)}(hjSh]hpoll}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjSubj )}(hhh]h)}(hfor userspace poll supporth]hfor userspace poll support}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShKhjSubah}(h]h ]h"]h$]h&]uh1j hjSubeh}(h]h ]h"]h$]h&]uh1j hjShKhjOubj )}(h%``cb_in`` for userspace poll support h](j )}(h ``cb_in``h]j)}(hjTh]hcb_in}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjTubj )}(hhh]h)}(hfor userspace poll supporth]hfor userspace poll support}(hj4ThhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0ThKhj1Tubah}(h]h ]h"]h$]h&]uh1j hjTubeh}(h]h ]h"]h$]h&]uh1j hj0ThKhjOubj )}(h&``cb_out`` for userspace poll support h](j )}(h ``cb_out``h]j)}(hjTTh]hcb_out}(hjVThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRTubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjNTubj )}(hhh]h)}(hfor userspace poll supporth]hfor userspace poll support}(hjmThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjiThKhjjTubah}(h]h ]h"]h$]h&]uh1j hjNTubeh}(h]h ]h"]h$]h&]uh1j hjiThKhjOubj )}(h~``sysfs_entry`` For exposing information about this buffer in sysfs. See also `DMA-BUF statistics`_ for the uapi this enables.h](j )}(h``sysfs_entry``h]j)}(hjTh]h sysfs_entry}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjTubj )}(hhh]h)}(hnFor exposing information about this buffer in sysfs. See also `DMA-BUF statistics`_ for the uapi this enables.h](h>For exposing information about this buffer in sysfs. See also }(hjThhhNhNubj)}(h`DMA-BUF statistics`_h]hDMA-BUF statistics}(hjThhhNhNubah}(h]h ]h"]h$]h&]nameDMA-BUF statisticsjj uh1jhjTjKubh for the uapi this enables.}(hjThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjThMhjTubah}(h]h ]h"]h$]h&]uh1j hjTubeh}(h]h ]h"]h$]h&]uh1j hjThMhjOubeh}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubh)}(h**Description**h]jq )}(hjTh]h Description}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjTubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubh)}(hThis represents a shared buffer, created by calling dma_buf_export(). The userspace representation is a normal file descriptor, which can be created by calling dma_buf_fd().h]hThis represents a shared buffer, created by calling dma_buf_export(). The userspace representation is a normal file descriptor, which can be created by calling dma_buf_fd().}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM$hjhhubh)}(hOShared dma buffers are reference counted using dma_buf_put() and get_dma_buf().h]hOShared dma buffers are reference counted using dma_buf_put() and get_dma_buf().}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM(hjhhubh)}(hfDevice DMA access is handled by the separate :c:type:`struct dma_buf_attachment `.h](h-Device DMA access is handled by the separate }(hjUhhhNhNubh)}(h8:c:type:`struct dma_buf_attachment `h]j)}(hj!Uh]hstruct dma_buf_attachment}(hj#UhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM+hjUubh.}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj>UhM+hjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_attach_ops (C struct)c.dma_buf_attach_opshNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_buf_attach_opsh]j )}(hstruct dma_buf_attach_opsh](j )}(hj h]hstruct}(hjbUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^Uhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM0ubj )}(h h]h }(hjpUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^UhhhjoUhM0ubj )}(hdma_buf_attach_opsh]j )}(hj\Uh]hdma_buf_attach_ops}(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~Uubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj^UhhhjoUhM0ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjZUhhhjoUhM0ubah}(h]jUUah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjoUhM0hjWUhhubj@ )}(hhh]h)}(h%importer operations for an attachmenth]h%importer operations for an attachment}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjUhhubah}(h]h ]h"]h$]h&]uh1j? hjWUhhhjoUhM0ubeh}(h]h ](jstructeh"]h$]h&]j` jja jUjb jUjc jd je uh1j hhhjhNhNubjg )}(hX **Definition**:: struct dma_buf_attach_ops { bool allow_peer2peer; void (*move_notify)(struct dma_buf_attachment *attach); }; **Members** ``allow_peer2peer`` If this is set to true the importer must be able to handle peer resources without struct pages. ``move_notify`` [optional] notification that the DMA-buf is moving If this callback is provided the framework can avoid pinning the backing store while mappings exists. This callback is called with the lock of the reservation object associated with the dma_buf held and the mapping function must be called with this lock held as well. This makes sure that no mapping is created concurrently with an ongoing move operation. Mappings stay valid and are not directly affected by this callback. But the DMA-buf can now be in a different physical location, so all mappings should be destroyed and re-created as soon as possible. New mappings can be created after this callback returns, and will point to the new location of the DMA-buf.h](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjUubh:}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjUubj)}(htstruct dma_buf_attach_ops { bool allow_peer2peer; void (*move_notify)(struct dma_buf_attachment *attach); };h]htstruct dma_buf_attach_ops { bool allow_peer2peer; void (*move_notify)(struct dma_buf_attachment *attach); };}hjUsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjUubh)}(h **Members**h]jq )}(hjUh]hMembers}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjUubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjUubj )}(hhh](j )}(ht``allow_peer2peer`` If this is set to true the importer must be able to handle peer resources without struct pages. h](j )}(h``allow_peer2peer``h]j)}(hjVh]hallow_peer2peer}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj Vubj )}(hhh]h)}(h_If this is set to true the importer must be able to handle peer resources without struct pages.h]h_If this is set to true the importer must be able to handle peer resources without struct pages.}(hj*VhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj'Vubah}(h]h ]h"]h$]h&]uh1j hj Vubeh}(h]h ]h"]h$]h&]uh1j hj&VhMhjVubj )}(hX``move_notify`` [optional] notification that the DMA-buf is moving If this callback is provided the framework can avoid pinning the backing store while mappings exists. This callback is called with the lock of the reservation object associated with the dma_buf held and the mapping function must be called with this lock held as well. This makes sure that no mapping is created concurrently with an ongoing move operation. Mappings stay valid and are not directly affected by this callback. But the DMA-buf can now be in a different physical location, so all mappings should be destroyed and re-created as soon as possible. New mappings can be created after this callback returns, and will point to the new location of the DMA-buf.h](j )}(h``move_notify``h]j)}(hjKVh]h move_notify}(hjMVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIVubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjEVubj )}(hhh](h)}(h2[optional] notification that the DMA-buf is movingh]h2[optional] notification that the DMA-buf is moving}(hjdVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjaVubh)}(heIf this callback is provided the framework can avoid pinning the backing store while mappings exists.h]heIf this callback is provided the framework can avoid pinning the backing store while mappings exists.}(hjsVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjaVubh)}(hThis callback is called with the lock of the reservation object associated with the dma_buf held and the mapping function must be called with this lock held as well. This makes sure that no mapping is created concurrently with an ongoing move operation.h]hThis callback is called with the lock of the reservation object associated with the dma_buf held and the mapping function must be called with this lock held as well. This makes sure that no mapping is created concurrently with an ongoing move operation.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjaVubh)}(hMappings stay valid and are not directly affected by this callback. But the DMA-buf can now be in a different physical location, so all mappings should be destroyed and re-created as soon as possible.h]hMappings stay valid and are not directly affected by this callback. But the DMA-buf can now be in a different physical location, so all mappings should be destroyed and re-created as soon as possible.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjaVubh)}(hkNew mappings can be created after this callback returns, and will point to the new location of the DMA-buf.h]hkNew mappings can be created after this callback returns, and will point to the new location of the DMA-buf.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`VhMhjaVubeh}(h]h ]h"]h$]h&]uh1j hjEVubeh}(h]h ]h"]h$]h&]uh1j hj`VhMhjVubeh}(h]h ]h"]h$]h&]uh1j hjUubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubh)}(h**Description**h]jq )}(hjVh]h Description}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjVubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubh)}(h2Attachment operations implemented by the importer.h]h2Attachment operations implemented by the importer.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_attachment (C struct)c.dma_buf_attachmenthNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_buf_attachmenth]j )}(hstruct dma_buf_attachmenth](j )}(hj h]hstruct}(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjWhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMubj )}(h h]h }(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjWhhhjWhMubj )}(hdma_buf_attachmenth]j )}(hjWh]hdma_buf_attachment}(hj'WhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#Wubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjWhhhjWhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjVhhhjWhMubah}(h]jVah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjWhMhjVhhubj@ )}(hhh]h)}(h#holds device-buffer attachment datah]h#holds device-buffer attachment data}(hjIWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjFWhhubah}(h]h ]h"]h$]h&]uh1j? hjVhhhjWhMubeh}(h]h ](jstructeh"]h$]h&]j` jja jaWjb jaWjc jd je uh1j hhhjhNhNubjg )}(hX**Definition**:: struct dma_buf_attachment { struct dma_buf *dmabuf; struct device *dev; struct list_head node; struct sg_table *sgt; enum dma_data_direction dir; bool peer2peer; const struct dma_buf_attach_ops *importer_ops; void *importer_priv; void *priv; }; **Members** ``dmabuf`` buffer for this attachment. ``dev`` device attached to the buffer. ``node`` list of dma_buf_attachment, protected by dma_resv lock of the dmabuf. ``sgt`` cached mapping. ``dir`` direction of cached mapping. ``peer2peer`` true if the importer can handle peer resources without pages. ``importer_ops`` importer operations for this attachment, if provided dma_buf_map/unmap_attachment() must be called with the dma_resv lock held. ``importer_priv`` importer specific attachment data. ``priv`` exporter specific attachment data.h](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjmWhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjiWubh:}(hjiWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjeWubj)}(hXstruct dma_buf_attachment { struct dma_buf *dmabuf; struct device *dev; struct list_head node; struct sg_table *sgt; enum dma_data_direction dir; bool peer2peer; const struct dma_buf_attach_ops *importer_ops; void *importer_priv; void *priv; };h]hXstruct dma_buf_attachment { struct dma_buf *dmabuf; struct device *dev; struct list_head node; struct sg_table *sgt; enum dma_data_direction dir; bool peer2peer; const struct dma_buf_attach_ops *importer_ops; void *importer_priv; void *priv; };}hjWsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjeWubh)}(h **Members**h]jq )}(hjWh]hMembers}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjWubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjeWubj )}(hhh](j )}(h'``dmabuf`` buffer for this attachment. h](j )}(h ``dmabuf``h]j)}(hjWh]hdmabuf}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjWubj )}(hhh]h)}(hbuffer for this attachment.h]hbuffer for this attachment.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhMhjWubah}(h]h ]h"]h$]h&]uh1j hjWubeh}(h]h ]h"]h$]h&]uh1j hjWhMhjWubj )}(h'``dev`` device attached to the buffer. h](j )}(h``dev``h]j)}(hjWh]hdev}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjWubj )}(hhh]h)}(hdevice attached to the buffer.h]hdevice attached to the buffer.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhMhjXubah}(h]h ]h"]h$]h&]uh1j hjWubeh}(h]h ]h"]h$]h&]uh1j hjXhMhjWubj )}(hO``node`` list of dma_buf_attachment, protected by dma_resv lock of the dmabuf. h](j )}(h``node``h]j)}(hj(Xh]hnode}(hj*XhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&Xubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj"Xubj )}(hhh]h)}(hElist of dma_buf_attachment, protected by dma_resv lock of the dmabuf.h]hElist of dma_buf_attachment, protected by dma_resv lock of the dmabuf.}(hjAXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=XhMhj>Xubah}(h]h ]h"]h$]h&]uh1j hj"Xubeh}(h]h ]h"]h$]h&]uh1j hj=XhMhjWubj )}(h``sgt`` cached mapping. h](j )}(h``sgt``h]j)}(hjaXh]hsgt}(hjcXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_Xubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj[Xubj )}(hhh]h)}(hcached mapping.h]hcached mapping.}(hjzXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvXhMhjwXubah}(h]h ]h"]h$]h&]uh1j hj[Xubeh}(h]h ]h"]h$]h&]uh1j hjvXhMhjWubj )}(h%``dir`` direction of cached mapping. h](j )}(h``dir``h]j)}(hjXh]hdir}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjXubj )}(hhh]h)}(hdirection of cached mapping.h]hdirection of cached mapping.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhMhjXubah}(h]h ]h"]h$]h&]uh1j hjXubeh}(h]h ]h"]h$]h&]uh1j hjXhMhjWubj )}(hL``peer2peer`` true if the importer can handle peer resources without pages. h](j )}(h ``peer2peer``h]j)}(hjXh]h peer2peer}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjXubj )}(hhh]h)}(h=true if the importer can handle peer resources without pages.h]h=true if the importer can handle peer resources without pages.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhMhjXubah}(h]h ]h"]h$]h&]uh1j hjXubeh}(h]h ]h"]h$]h&]uh1j hjXhMhjWubj )}(h``importer_ops`` importer operations for this attachment, if provided dma_buf_map/unmap_attachment() must be called with the dma_resv lock held. h](j )}(h``importer_ops``h]j)}(hj Yh]h importer_ops}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj Yubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjYubj )}(hhh]h)}(himporter operations for this attachment, if provided dma_buf_map/unmap_attachment() must be called with the dma_resv lock held.h]himporter operations for this attachment, if provided dma_buf_map/unmap_attachment() must be called with the dma_resv lock held.}(hj%YhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj"Yubah}(h]h ]h"]h$]h&]uh1j hjYubeh}(h]h ]h"]h$]h&]uh1j hj!YhMhjWubj )}(h5``importer_priv`` importer specific attachment data. h](j )}(h``importer_priv``h]j)}(hjFYh]h importer_priv}(hjHYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDYubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj@Yubj )}(hhh]h)}(h"importer specific attachment data.h]h"importer specific attachment data.}(hj_YhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[YhMhj\Yubah}(h]h ]h"]h$]h&]uh1j hj@Yubeh}(h]h ]h"]h$]h&]uh1j hj[YhMhjWubj )}(h+``priv`` exporter specific attachment data.h](j )}(h``priv``h]j)}(hjYh]hpriv}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}Yubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjyYubj )}(hhh]h)}(h"exporter specific attachment data.h]h"exporter specific attachment data.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjYubah}(h]h ]h"]h$]h&]uh1j hjyYubeh}(h]h ]h"]h$]h&]uh1j hjYhMhjWubeh}(h]h ]h"]h$]h&]uh1j hjeWubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubh)}(h**Description**h]jq )}(hjYh]h Description}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjYubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubh)}(hThis structure holds the attachment information between the dma_buf buffer and its user device(s). The list contains one attachment struct per device attached to the buffer.h]hThis structure holds the attachment information between the dma_buf buffer and its user device(s). The list contains one attachment struct per device attached to the buffer.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubh)}(hAn attachment is created by calling dma_buf_attach(), and released again by calling dma_buf_detach(). The DMA mapping itself needed to initiate a transfer is created by dma_buf_map_attachment() and freed again by calling dma_buf_unmap_attachment().h]hAn attachment is created by calling dma_buf_attach(), and released again by calling dma_buf_detach(). The DMA mapping itself needed to initiate a transfer is created by dma_buf_map_attachment() and freed again by calling dma_buf_unmap_attachment().}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_export_info (C struct)c.dma_buf_export_infohNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_buf_export_infoh]j )}(hstruct dma_buf_export_infoh](j )}(hj h]hstruct}(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj Zhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMubj )}(h h]h }(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ZhhhjZhMubj )}(hdma_buf_export_infoh]j )}(hj Zh]hdma_buf_export_info}(hj/ZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+Zubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj ZhhhjZhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjZhhhjZhMubah}(h]jZah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjZhMhjZhhubj@ )}(hhh]h)}(h,holds information needed to export a dma_bufh]h,holds information needed to export a dma_buf}(hjQZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjNZhhubah}(h]h ]h"]h$]h&]uh1j? hjZhhhjZhMubeh}(h]h ](jstructeh"]h$]h&]j` jja jiZjb jiZjc jd je uh1j hhhjhNhNubjg )}(hX**Definition**:: struct dma_buf_export_info { const char *exp_name; struct module *owner; const struct dma_buf_ops *ops; size_t size; int flags; struct dma_resv *resv; void *priv; }; **Members** ``exp_name`` name of the exporter - useful for debugging. ``owner`` pointer to exporter module - used for refcounting kernel module ``ops`` Attach allocator-defined dma buf ops to the new buffer ``size`` Size of the buffer - invariant over the lifetime of the buffer ``flags`` mode flags for the file ``resv`` reservation-object, NULL to allocate default one ``priv`` Attach private data of allocator to this bufferh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjuZhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjqZubh:}(hjqZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjmZubj)}(hstruct dma_buf_export_info { const char *exp_name; struct module *owner; const struct dma_buf_ops *ops; size_t size; int flags; struct dma_resv *resv; void *priv; };h]hstruct dma_buf_export_info { const char *exp_name; struct module *owner; const struct dma_buf_ops *ops; size_t size; int flags; struct dma_resv *resv; void *priv; };}hjZsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjmZubh)}(h **Members**h]jq )}(hjZh]hMembers}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjZubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjmZubj )}(hhh](j )}(h:``exp_name`` name of the exporter - useful for debugging. h](j )}(h ``exp_name``h]j)}(hjZh]hexp_name}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjZubj )}(hhh]h)}(h,name of the exporter - useful for debugging.h]h,name of the exporter - useful for debugging.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhMhjZubah}(h]h ]h"]h$]h&]uh1j hjZubeh}(h]h ]h"]h$]h&]uh1j hjZhMhjZubj )}(hJ``owner`` pointer to exporter module - used for refcounting kernel module h](j )}(h ``owner``h]j)}(hjZh]howner}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjZubj )}(hhh]h)}(h?pointer to exporter module - used for refcounting kernel moduleh]h?pointer to exporter module - used for refcounting kernel module}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj [hMhj [ubah}(h]h ]h"]h$]h&]uh1j hjZubeh}(h]h ]h"]h$]h&]uh1j hj [hMhjZubj )}(h?``ops`` Attach allocator-defined dma buf ops to the new buffer h](j )}(h``ops``h]j)}(hj0[h]hops}(hj2[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj*[ubj )}(hhh]h)}(h6Attach allocator-defined dma buf ops to the new bufferh]h6Attach allocator-defined dma buf ops to the new buffer}(hjI[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE[hMhjF[ubah}(h]h ]h"]h$]h&]uh1j hj*[ubeh}(h]h ]h"]h$]h&]uh1j hjE[hMhjZubj )}(hH``size`` Size of the buffer - invariant over the lifetime of the buffer h](j )}(h``size``h]j)}(hji[h]hsize}(hjk[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjg[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjc[ubj )}(hhh]h)}(h>Size of the buffer - invariant over the lifetime of the bufferh]h>Size of the buffer - invariant over the lifetime of the buffer}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~[hMhj[ubah}(h]h ]h"]h$]h&]uh1j hjc[ubeh}(h]h ]h"]h$]h&]uh1j hj~[hMhjZubj )}(h"``flags`` mode flags for the file h](j )}(h ``flags``h]j)}(hj[h]hflags}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj[ubj )}(hhh]h)}(hmode flags for the fileh]hmode flags for the file}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj[ubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hj[hMhjZubj )}(h:``resv`` reservation-object, NULL to allocate default one h](j )}(h``resv``h]j)}(hj[h]hresv}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj[ubj )}(hhh]h)}(h0reservation-object, NULL to allocate default oneh]h0reservation-object, NULL to allocate default one}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj[ubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hj[hMhjZubj )}(h8``priv`` Attach private data of allocator to this bufferh](j )}(h``priv``h]j)}(hj\h]hpriv}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj\ubj )}(hhh]h)}(h/Attach private data of allocator to this bufferh]h/Attach private data of allocator to this buffer}(hj-\hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj*\ubah}(h]h ]h"]h$]h&]uh1j hj\ubeh}(h]h ]h"]h$]h&]uh1j hj)\hMhjZubeh}(h]h ]h"]h$]h&]uh1j hjmZubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubh)}(h**Description**h]jq )}(hjW\h]h Description}(hjY\hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjU\ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubh)}(hdThis structure holds the information required to export the buffer. Used with dma_buf_export() only.h]hdThis structure holds the information required to export the buffer. Used with dma_buf_export() only.}(hjm\hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $DEFINE_DMA_BUF_EXPORT_INFO (C macro)c.DEFINE_DMA_BUF_EXPORT_INFOhNtauh1j hjhhhNhNubj )}(hhh](j )}(hDEFINE_DMA_BUF_EXPORT_INFOh]j )}(hDEFINE_DMA_BUF_EXPORT_INFOh]j )}(hDEFINE_DMA_BUF_EXPORT_INFOh]j )}(hj\h]hDEFINE_DMA_BUF_EXPORT_INFO}(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj\ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj\hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM+ubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj\hhhj\hM+ubah}(h]j\ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj\hM+hj\hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hj\hhhj\hM+ubeh}(h]h ](jmacroeh"]h$]h&]j` jja j\jb j\jc jd je uh1j hhhjhNhNubh)}(h%``DEFINE_DMA_BUF_EXPORT_INFO (name)``h]j)}(hj\h]h!DEFINE_DMA_BUF_EXPORT_INFO (name)}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM-hjhhubh)}(hhelper macro for exporters h]h)}(hhelper macro for exportersh]hhelper macro for exporters}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM%hj\ubah}(h]h ]h"]h$]h&]uh1hhj\hM%hjhhubjg )}(h**Parameters** ``name`` export-info name **Description** DEFINE_DMA_BUF_EXPORT_INFO macro defines the :c:type:`struct dma_buf_export_info `, zeroes it out and pre-populates exp_name in it.h](h)}(h**Parameters**h]jq )}(hj]h]h Parameters}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj\ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM)hj\ubj )}(hhh]j )}(h``name`` export-info name h](j )}(h``name``h]j)}(hj]h]hname}(hj!]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM&hj]ubj )}(hhh]h)}(hexport-info nameh]hexport-info name}(hj8]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4]hM&hj5]ubah}(h]h ]h"]h$]h&]uh1j hj]ubeh}(h]h ]h"]h$]h&]uh1j hj4]hM&hj]ubah}(h]h ]h"]h$]h&]uh1j hj\ubh)}(h**Description**h]jq )}(hjZ]h]h Description}(hj\]hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjX]ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM(hj\ubh)}(hDEFINE_DMA_BUF_EXPORT_INFO macro defines the :c:type:`struct dma_buf_export_info `, zeroes it out and pre-populates exp_name in it.h](h-DEFINE_DMA_BUF_EXPORT_INFO macro defines the }(hjp]hhhNhNubh)}(h::c:type:`struct dma_buf_export_info `h]j)}(hjz]h]hstruct dma_buf_export_info}(hj|]hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjx]ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_export_infouh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM(hjp]ubh1, zeroes it out and pre-populates exp_name in it.}(hjp]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj]hM(hj\ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j get_dma_buf (C function) c.get_dma_bufhNtauh1j hjhhhNhNubj )}(hhh](j )}(h)void get_dma_buf (struct dma_buf *dmabuf)h]j )}(h(void get_dma_buf(struct dma_buf *dmabuf)h](jK)}(hvoidh]hvoid}(hj]hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj]hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM8ubj )}(h h]h }(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]hhhj]hM8ubj )}(h get_dma_bufh]j )}(h get_dma_bufh]h get_dma_buf}(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj]hhhj]hM8ubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubj )}(h h]h }(hj ^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj^modnameN classnameNjj)}j]jN)}jFj]sb c.get_dma_bufasbuh1hhj]ubj )}(h h]h }(hj=^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubjc)}(hj h]h*}(hjK^hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj]ubj )}(hdmabufh]hdmabuf}(hjX^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj]ubah}(h]h ]h"]h$]h&]jjuh1jhj]hhhj]hM8ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj]hhhj]hM8ubah}(h]j]ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj]hM8hj]hhubj@ )}(hhh]h)}(h!convenience wrapper for get_file.h]h!convenience wrapper for get_file.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM0hj^hhubah}(h]h ]h"]h$]h&]uh1j? hj]hhhj]hM8ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j^jb j^jc jd je uh1j hhhjhNhNubjg )}(hXe**Parameters** ``struct dma_buf *dmabuf`` [in] pointer to dma_buf **Description** Increments the reference count on the dma-buf, needed in case of drivers that either need to create additional references to the dmabuf on the kernel side. For example, an exporter that needs to keep a dmabuf ptr so that subsequent exports don't create a new dmabuf.h](h)}(h**Parameters**h]jq )}(hj^h]h Parameters}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj^ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM4hj^ubj )}(hhh]j )}(h6``struct dma_buf *dmabuf`` [in] pointer to dma_buf h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj^h]hstruct dma_buf *dmabuf}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM1hj^ubj )}(hhh]h)}(h[in] pointer to dma_bufh]h[in] pointer to dma_buf}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hM1hj^ubah}(h]h ]h"]h$]h&]uh1j hj^ubeh}(h]h ]h"]h$]h&]uh1j hj^hM1hj^ubah}(h]h ]h"]h$]h&]uh1j hj^ubh)}(h**Description**h]jq )}(hj^h]h Description}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj^ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM3hj^ubh)}(hX Increments the reference count on the dma-buf, needed in case of drivers that either need to create additional references to the dmabuf on the kernel side. For example, an exporter that needs to keep a dmabuf ptr so that subsequent exports don't create a new dmabuf.h]hX Increments the reference count on the dma-buf, needed in case of drivers that either need to create additional references to the dmabuf on the kernel side. For example, an exporter that needs to keep a dmabuf ptr so that subsequent exports don’t create a new dmabuf.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM3hj^ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_is_dynamic (C function)c.dma_buf_is_dynamichNtauh1j hjhhhNhNubj )}(hhh](j )}(h0bool dma_buf_is_dynamic (struct dma_buf *dmabuf)h]j )}(h/bool dma_buf_is_dynamic(struct dma_buf *dmabuf)h](jK)}(hboolh]hbool}(hjC_hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj?_hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMEubj )}(h h]h }(hjR_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?_hhhjQ_hMEubj )}(hdma_buf_is_dynamich]j )}(hdma_buf_is_dynamich]hdma_buf_is_dynamic}(hjd_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`_ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj?_hhhjQ_hMEubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|_ubj )}(h h]h }(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|_ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj_modnameN classnameNjj)}j]jN)}jFjf_sbc.dma_buf_is_dynamicasbuh1hhj|_ubj )}(h h]h }(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|_ubjc)}(hj h]h*}(hj_hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj|_ubj )}(hdmabufh]hdmabuf}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|_ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjx_ubah}(h]h ]h"]h$]h&]jjuh1jhj?_hhhjQ_hMEubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj;_hhhjQ_hMEubah}(h]j6_ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjQ_hMEhj8_hhubj@ )}(hhh]h)}(h)check if a DMA-buf uses dynamic mappings.h]h)check if a DMA-buf uses dynamic mappings.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM>hj`hhubah}(h]h ]h"]h$]h&]uh1j? hj8_hhhjQ_hMEubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j`jb j`jc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` the DMA-buf to check **Description** Returns true if a DMA-buf exporter wants to be called with the dma_resv locked for the map/unmap callbacks, false if it doesn't wants to be called with the lock held.h](h)}(h**Parameters**h]jq )}(hj%`h]h Parameters}(hj'`hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj#`ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMBhj`ubj )}(hhh]j )}(h0``struct dma_buf *dmabuf`` the DMA-buf to check h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjD`h]hstruct dma_buf *dmabuf}(hjF`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB`ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM?hj>`ubj )}(hhh]h)}(hthe DMA-buf to checkh]hthe DMA-buf to check}(hj]`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjY`hM?hjZ`ubah}(h]h ]h"]h$]h&]uh1j hj>`ubeh}(h]h ]h"]h$]h&]uh1j hjY`hM?hj;`ubah}(h]h ]h"]h$]h&]uh1j hj`ubh)}(h**Description**h]jq )}(hj`h]h Description}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj}`ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMAhj`ubh)}(hReturns true if a DMA-buf exporter wants to be called with the dma_resv locked for the map/unmap callbacks, false if it doesn't wants to be called with the lock held.h]hReturns true if a DMA-buf exporter wants to be called with the dma_resv locked for the map/unmap callbacks, false if it doesn’t wants to be called with the lock held.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMAhj`ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j *dma_buf_attachment_is_dynamic (C function)c.dma_buf_attachment_is_dynamichNtauh1j hjhhhNhNubj )}(hhh](j )}(hFbool dma_buf_attachment_is_dynamic (struct dma_buf_attachment *attach)h]j )}(hEbool dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach)h](jK)}(hjE_h]hbool}(hj`hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj`hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMRubj )}(h h]h }(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`hhhj`hMRubj )}(hdma_buf_attachment_is_dynamich]j )}(hdma_buf_attachment_is_dynamich]hdma_buf_attachment_is_dynamic}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj`hhhj`hMRubj)}(h#(struct dma_buf_attachment *attach)h]j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubj )}(h h]h }(hj ahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj amodnameN classnameNjj)}j]jN)}jFj`sbc.dma_buf_attachment_is_dynamicasbuh1hhj`ubj )}(h h]h }(hj>ahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubjc)}(hj h]h*}(hjLahhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj`ubj )}(hattachh]hattach}(hjYahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj`ubah}(h]h ]h"]h$]h&]jjuh1jhj`hhhj`hMRubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj`hhhj`hMRubah}(h]j`ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj`hMRhj`hhubj@ )}(hhh]h)}(h3check if a DMA-buf attachment uses dynamic mappingsh]h3check if a DMA-buf attachment uses dynamic mappings}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMKhjahhubah}(h]h ]h"]h$]h&]uh1j? hj`hhhj`hMRubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jajb jajc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf_attachment *attach`` the DMA-buf attachment to check **Description** Returns true if a DMA-buf importer wants to call the map/unmap functions with the dma_resv lock held.h](h)}(h**Parameters**h]jq )}(hjah]h Parameters}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjaubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMOhjaubj )}(hhh]j )}(hF``struct dma_buf_attachment *attach`` the DMA-buf attachment to check h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hjah]h!struct dma_buf_attachment *attach}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMMhjaubj )}(hhh]h)}(hthe DMA-buf attachment to checkh]hthe DMA-buf attachment to check}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahMMhjaubah}(h]h ]h"]h$]h&]uh1j hjaubeh}(h]h ]h"]h$]h&]uh1j hjahMMhjaubah}(h]h ]h"]h$]h&]uh1j hjaubh)}(h**Description**h]jq )}(hjah]h Description}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjaubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMOhjaubh)}(heReturns true if a DMA-buf importer wants to call the map/unmap functions with the dma_resv lock held.h]heReturns true if a DMA-buf importer wants to call the map/unmap functions with the dma_resv lock held.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMOhjaubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubeh}(h])kernel-functions-and-structures-referenceah ]h"])kernel functions and structures referenceah$]h&]uh1hhjmhhhhhKubeh}(h]shared-dma-buffersah ]h"]shared dma buffersah$]h&]uh1hhhhhhhhK"ubh)}(hhh](h)}(hReservation Objectsh]hReservation Objects}(hj>bhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;bhhhhhKubh)}(hXThe reservation object provides a mechanism to manage a container of dma_fence object associated with a resource. A reservation object can have any number of fences attaches to it. Each fence carries an usage parameter determining how the operation represented by the fence is using the resource. The RCU mechanism is used to protect read access to fences from locked write-side updates.h]hXThe reservation object provides a mechanism to manage a container of dma_fence object associated with a resource. A reservation object can have any number of fences attaches to it. Each fence carries an usage parameter determining how the operation represented by the fence is using the resource. The RCU mechanism is used to protect read access to fences from locked write-side updates.}(hjLbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:156: ./drivers/dma-buf/dma-resv.chK-hj;bhhubh)}(h%See struct dma_resv for more details.h]h%See struct dma_resv for more details.}(hj[bhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:156: ./drivers/dma-buf/dma-resv.chK4hj;bhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_init (C function)c.dma_resv_inithNtauh1j hj;bhhhNhNubj )}(hhh](j )}(h)void dma_resv_init (struct dma_resv *obj)h]j )}(h(void dma_resv_init(struct dma_resv *obj)h](jK)}(hvoidh]hvoid}(hjbhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjbhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKubj )}(h h]h }(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbhhhjbhKubj )}(h dma_resv_inith]j )}(h dma_resv_inith]h dma_resv_init}(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjbhhhjbhKubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubj )}(h h]h }(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjbmodnameN classnameNjj)}j]jN)}jFjbsbc.dma_resv_initasbuh1hhjbubj )}(h h]h }(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubjc)}(hj h]h*}(hj chhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjbubj )}(hobjh]hobj}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjbubah}(h]h ]h"]h$]h&]jjuh1jhjbhhhjbhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj{bhhhjbhKubah}(h]jvbah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjbhKhjxbhhubj@ )}(hhh]h)}(hinitialize a reservation objecth]hinitialize a reservation object}(hjCchhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj@chhubah}(h]h ]h"]h$]h&]uh1j? hjxbhhhjbhKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j[cjb j[cjc jd je uh1j hhhj;bhNhNubjg )}(hA**Parameters** ``struct dma_resv *obj`` the reservation objecth](h)}(h**Parameters**h]jq )}(hjech]h Parameters}(hjgchhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjccubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj_cubj )}(hhh]j )}(h/``struct dma_resv *obj`` the reservation objecth](j )}(h``struct dma_resv *obj``h]j)}(hjch]hstruct dma_resv *obj}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj~cubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjcubah}(h]h ]h"]h$]h&]uh1j hj~cubeh}(h]h ]h"]h$]h&]uh1j hjchKhj{cubah}(h]h ]h"]h$]h&]uh1j hj_cubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_fini (C function)c.dma_resv_finihNtauh1j hj;bhhhNhNubj )}(hhh](j )}(h)void dma_resv_fini (struct dma_resv *obj)h]j )}(h(void dma_resv_fini(struct dma_resv *obj)h](jK)}(hvoidh]hvoid}(hjchhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjchhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKubj )}(h h]h }(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjchhhjchKubj )}(h dma_resv_finih]j )}(h dma_resv_finih]h dma_resv_fini}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjchhhjchKubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubj )}(h h]h }(hj(dhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj9dhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6dubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj;dmodnameN classnameNjj)}j]jN)}jFjdsbc.dma_resv_finiasbuh1hhjdubj )}(h h]h }(hjYdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubjc)}(hj h]h*}(hjgdhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjdubj )}(hobjh]hobj}(hjtdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubah}(h]h ]h"]h$]h&]jjuh1jhjchhhjchKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjchhhjchKubah}(h]jcah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjchKhjchhubj@ )}(hhh]h)}(hdestroys a reservation objecth]hdestroys a reservation object}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjdhhubah}(h]h ]h"]h$]h&]uh1j? hjchhhjchKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jdjb jdjc jd je uh1j hhhj;bhNhNubjg )}(hA**Parameters** ``struct dma_resv *obj`` the reservation objecth](h)}(h**Parameters**h]jq )}(hjdh]h Parameters}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjdubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjdubj )}(hhh]j )}(h/``struct dma_resv *obj`` the reservation objecth](j )}(h``struct dma_resv *obj``h]j)}(hjdh]hstruct dma_resv *obj}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjdubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjdubah}(h]h ]h"]h$]h&]uh1j hjdubeh}(h]h ]h"]h$]h&]uh1j hjdhKhjdubah}(h]h ]h"]h$]h&]uh1j hjdubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_resv_reserve_fences (C function)c.dma_resv_reserve_fenceshNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hKint dma_resv_reserve_fences (struct dma_resv *obj, unsigned int num_fences)h]j )}(hJint dma_resv_reserve_fences(struct dma_resv *obj, unsigned int num_fences)h](jK)}(hinth]hint}(hj9ehhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj5ehhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKubj )}(h h]h }(hjHehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ehhhjGehKubj )}(hdma_resv_reserve_fencesh]j )}(hdma_resv_reserve_fencesh]hdma_resv_reserve_fences}(hjZehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVeubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj5ehhhjGehKubj)}(h/(struct dma_resv *obj, unsigned int num_fences)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjvehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjreubj )}(h h]h }(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjreubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjemodnameN classnameNjj)}j]jN)}jFj\esbc.dma_resv_reserve_fencesasbuh1hhjreubj )}(h h]h }(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjreubjc)}(hj h]h*}(hjehhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjreubj )}(hobjh]hobj}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjreubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjneubj)}(hunsigned int num_fencesh](jK)}(hunsignedh]hunsigned}(hjehhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjeubj )}(h h]h }(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubjK)}(hinth]hint}(hjfhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjeubj )}(h h]h }(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubj )}(h num_fencesh]h num_fences}(hj fhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjneubeh}(h]h ]h"]h$]h&]jjuh1jhj5ehhhjGehKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj1ehhhjGehKubah}(h]j,eah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjGehKhj.ehhubj@ )}(hhh]h)}(h1Reserve space to add fences to a dma_resv object.h]h1Reserve space to add fences to a dma_resv object.}(hjJfhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjGfhhubah}(h]h ]h"]h$]h&]uh1j? hj.ehhhjGehKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jbfjb jbfjc jd je uh1j hhhj;bhNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` reservation object ``unsigned int num_fences`` number of fences we want to add **Description** Should be called before dma_resv_add_fence(). Must be called with **obj** locked through dma_resv_lock(). Note that the preallocated slots need to be re-reserved if **obj** is unlocked at any time before calling dma_resv_add_fence(). This is validated when CONFIG_DEBUG_MUTEXES is enabled. RETURNS Zero for success, or -errnoh](h)}(h**Parameters**h]jq )}(hjlfh]h Parameters}(hjnfhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjjfubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjffubj )}(hhh](j )}(h,``struct dma_resv *obj`` reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjfh]hstruct dma_resv *obj}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjfubj )}(hhh]h)}(hreservation objecth]hreservation object}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhKhjfubah}(h]h ]h"]h$]h&]uh1j hjfubeh}(h]h ]h"]h$]h&]uh1j hjfhKhjfubj )}(h<``unsigned int num_fences`` number of fences we want to add h](j )}(h``unsigned int num_fences``h]j)}(hjfh]hunsigned int num_fences}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjfubj )}(hhh]h)}(hnumber of fences we want to addh]hnumber of fences we want to add}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhKhjfubah}(h]h ]h"]h$]h&]uh1j hjfubeh}(h]h ]h"]h$]h&]uh1j hjfhKhjfubeh}(h]h ]h"]h$]h&]uh1j hjffubh)}(h**Description**h]jq )}(hjfh]h Description}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjfubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjffubh)}(hjShould be called before dma_resv_add_fence(). Must be called with **obj** locked through dma_resv_lock().h](hCShould be called before dma_resv_add_fence(). Must be called with }(hjghhhNhNubjq )}(h**obj**h]hobj}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjgubh locked through dma_resv_lock().}(hjghhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjffubh)}(hNote that the preallocated slots need to be re-reserved if **obj** is unlocked at any time before calling dma_resv_add_fence(). This is validated when CONFIG_DEBUG_MUTEXES is enabled.h](h;Note that the preallocated slots need to be re-reserved if }(hj6ghhhNhNubjq )}(h**obj**h]hobj}(hj>ghhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj6gubhu is unlocked at any time before calling dma_resv_add_fence(). This is validated when CONFIG_DEBUG_MUTEXES is enabled.}(hj6ghhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjffubh)}(h#RETURNS Zero for success, or -errnoh]h#RETURNS Zero for success, or -errno}(hjWghhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjffubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j &dma_resv_reset_max_fences (C function)c.dma_resv_reset_max_fenceshNtauh1j hj;bhhhNhNubj )}(hhh](j )}(h5void dma_resv_reset_max_fences (struct dma_resv *obj)h]j )}(h4void dma_resv_reset_max_fences(struct dma_resv *obj)h](jK)}(hvoidh]hvoid}(hjghhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjghhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjghhhjghMubj )}(hdma_resv_reset_max_fencesh]j )}(hdma_resv_reset_max_fencesh]hdma_resv_reset_max_fences}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjghhhjghMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubj )}(h h]h }(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjgmodnameN classnameNjj)}j]jN)}jFjgsbc.dma_resv_reset_max_fencesasbuh1hhjgubj )}(h h]h }(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubjc)}(hj h]h*}(hjhhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjgubj )}(hobjh]hobj}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjgubah}(h]h ]h"]h$]h&]jjuh1jhjghhhjghMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj~ghhhjghMubah}(h]jygah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjghMhj{ghhubj@ )}(hhh]h)}(hreset fences for debuggingh]hreset fences for debugging}(hjFhhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjChhhubah}(h]h ]h"]h$]h&]uh1j? hj{ghhhjghMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j^hjb j^hjc jd je uh1j hhhj;bhNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the dma_resv object to reset **Description** Reset the number of pre-reserved fence slots to test that drivers do correct slot allocation using dma_resv_reserve_fences(). See also :c:type:`dma_resv_list.max_fences `.h](h)}(h**Parameters**h]jq )}(hjhhh]h Parameters}(hjjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjfhubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjbhubj )}(hhh]j )}(h6``struct dma_resv *obj`` the dma_resv object to reset h](j )}(h``struct dma_resv *obj``h]j)}(hjhh]hstruct dma_resv *obj}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjhubj )}(hhh]h)}(hthe dma_resv object to reseth]hthe dma_resv object to reset}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMhjhubah}(h]h ]h"]h$]h&]uh1j hjhubeh}(h]h ]h"]h$]h&]uh1j hjhhMhj~hubah}(h]h ]h"]h$]h&]uh1j hjbhubh)}(h**Description**h]jq )}(hjhh]h Description}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjhubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjbhubh)}(hReset the number of pre-reserved fence slots to test that drivers do correct slot allocation using dma_resv_reserve_fences(). See also :c:type:`dma_resv_list.max_fences `.h](hReset the number of pre-reserved fence slots to test that drivers do correct slot allocation using dma_resv_reserve_fences(). See also }(hjhhhhNhNubh)}(h2:c:type:`dma_resv_list.max_fences `h]j)}(hjhh]hdma_resv_list.max_fences}(hjhhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_resv_listuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjhubh.}(hjhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhhMhjbhubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_add_fence (C function)c.dma_resv_add_fencehNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hbvoid dma_resv_add_fence (struct dma_resv *obj, struct dma_fence *fence, enum dma_resv_usage usage)h]j )}(havoid dma_resv_add_fence(struct dma_resv *obj, struct dma_fence *fence, enum dma_resv_usage usage)h](jK)}(hvoidh]hvoid}(hj*ihhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj&ihhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hj9ihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ihhhj8ihMubj )}(hdma_resv_add_fenceh]j )}(hdma_resv_add_fenceh]hdma_resv_add_fence}(hjKihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjGiubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj&ihhhj8ihMubj)}(hJ(struct dma_resv *obj, struct dma_fence *fence, enum dma_resv_usage usage)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjgihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjciubj )}(h h]h }(hjtihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjciubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjimodnameN classnameNjj)}j]jN)}jFjMisbc.dma_resv_add_fenceasbuh1hhjciubj )}(h h]h }(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjciubjc)}(hj h]h*}(hjihhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjciubj )}(hobjh]hobj}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjciubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj_iubj)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubj )}(h h]h }(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjimodnameN classnameNjj)}j]jic.dma_resv_add_fenceasbuh1hhjiubj )}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubjc)}(hj h]h*}(hj#jhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjiubj )}(hfenceh]hfence}(hj0jhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj_iubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjIjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEjubj )}(h h]h }(hjVjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEjubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjgjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjijmodnameN classnameNjj)}j]jic.dma_resv_add_fenceasbuh1hhjEjubj )}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEjubj )}(husageh]husage}(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj_iubeh}(h]h ]h"]h$]h&]jjuh1jhj&ihhhj8ihMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj"ihhhj8ihMubah}(h]jiah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj8ihMhjihhubj@ )}(hhh]h)}(hAdd a fence to the dma_resv objh]hAdd a fence to the dma_resv obj}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjjhhubah}(h]h ]h"]h$]h&]uh1j? hjihhhj8ihMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjjb jjjc jd je uh1j hhhj;bhNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``struct dma_fence *fence`` the fence to add ``enum dma_resv_usage usage`` how the fence is used, see enum dma_resv_usage **Description** Add a fence to a slot, **obj** must be locked with dma_resv_lock(), and dma_resv_reserve_fences() has been called. See also :c:type:`dma_resv.fence ` for a discussion of the semantics.h](h)}(h**Parameters**h]jq )}(hjjh]h Parameters}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjjh]hstruct dma_resv *obj}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhMhjkubah}(h]h ]h"]h$]h&]uh1j hjjubeh}(h]h ]h"]h$]h&]uh1j hjkhMhjjubj )}(h-``struct dma_fence *fence`` the fence to add h](j )}(h``struct dma_fence *fence``h]j)}(hj7kh]hstruct dma_fence *fence}(hj9khhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5kubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj1kubj )}(hhh]h)}(hthe fence to addh]hthe fence to add}(hjPkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLkhMhjMkubah}(h]h ]h"]h$]h&]uh1j hj1kubeh}(h]h ]h"]h$]h&]uh1j hjLkhMhjjubj )}(hM``enum dma_resv_usage usage`` how the fence is used, see enum dma_resv_usage h](j )}(h``enum dma_resv_usage usage``h]j)}(hjpkh]henum dma_resv_usage usage}(hjrkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnkubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjjkubj )}(hhh]h)}(h.how the fence is used, see enum dma_resv_usageh]h.how the fence is used, see enum dma_resv_usage}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhMhjkubah}(h]h ]h"]h$]h&]uh1j hjjkubeh}(h]h ]h"]h$]h&]uh1j hjkhMhjjubeh}(h]h ]h"]h$]h&]uh1j hjjubh)}(h**Description**h]jq )}(hjkh]h Description}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjkubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjjubh)}(hrAdd a fence to a slot, **obj** must be locked with dma_resv_lock(), and dma_resv_reserve_fences() has been called.h](hAdd a fence to a slot, }(hjkhhhNhNubjq )}(h**obj**h]hobj}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjkubhT must be locked with dma_resv_lock(), and dma_resv_reserve_fences() has been called.}(hjkhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjjubh)}(hOSee also :c:type:`dma_resv.fence ` for a discussion of the semantics.h](h See also }(hjkhhhNhNubh)}(h#:c:type:`dma_resv.fence `h]j)}(hjkh]hdma_resv.fence}(hjkhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjkubh# for a discussion of the semantics.}(hjkhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj lhMhjjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_resv_replace_fences (C function)c.dma_resv_replace_fenceshNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hvoid dma_resv_replace_fences (struct dma_resv *obj, uint64_t context, struct dma_fence *replacement, enum dma_resv_usage usage)h]j )}(h~void dma_resv_replace_fences(struct dma_resv *obj, uint64_t context, struct dma_fence *replacement, enum dma_resv_usage usage)h](jK)}(hvoidh]hvoid}(hj4lhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj0lhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMVubj )}(h h]h }(hjClhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0lhhhjBlhMVubj )}(hdma_resv_replace_fencesh]j )}(hdma_resv_replace_fencesh]hdma_resv_replace_fences}(hjUlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQlubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj0lhhhjBlhMVubj)}(hb(struct dma_resv *obj, uint64_t context, struct dma_fence *replacement, enum dma_resv_usage usage)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjqlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmlubj )}(h h]h }(hj~lhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmlubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjlmodnameN classnameNjj)}j]jN)}jFjWlsbc.dma_resv_replace_fencesasbuh1hhjmlubj )}(h h]h }(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmlubjc)}(hj h]h*}(hjlhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjmlubj )}(hobjh]hobj}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmlubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjilubj)}(huint64_t contexth](h)}(hhh]j )}(huint64_th]huint64_t}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjlmodnameN classnameNjj)}j]jlc.dma_resv_replace_fencesasbuh1hhjlubj )}(h h]h }(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlubj )}(hcontexth]hcontext}(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjilubj)}(hstruct dma_fence *replacementh](j )}(hj h]hstruct}(hj+mhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'mubj )}(h h]h }(hj8mhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'mubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjImhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjFmubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjKmmodnameN classnameNjj)}j]jlc.dma_resv_replace_fencesasbuh1hhj'mubj )}(h h]h }(hjgmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'mubjc)}(hj h]h*}(hjumhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj'mubj )}(h replacementh]h replacement}(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'mubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjilubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubj )}(h h]h }(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmmodnameN classnameNjj)}j]jlc.dma_resv_replace_fencesasbuh1hhjmubj )}(h h]h }(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubj )}(husageh]husage}(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjilubeh}(h]h ]h"]h$]h&]jjuh1jhj0lhhhjBlhMVubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj,lhhhjBlhMVubah}(h]j'lah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjBlhMVhj)lhhubj@ )}(hhh]h)}(h"replace fences in the dma_resv objh]h"replace fences in the dma_resv obj}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMIhj nhhubah}(h]h ]h"]h$]h&]uh1j? hj)lhhhjBlhMVubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j'njb j'njc jd je uh1j hhhj;bhNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``uint64_t context`` the context of the fences to replace ``struct dma_fence *replacement`` the new fence to use instead ``enum dma_resv_usage usage`` how the new fence is used, see enum dma_resv_usage **Description** Replace fences with a specified context with a new fence. Only valid if the operation represented by the original fence has no longer access to the resources represented by the dma_resv object when the new fence completes. And example for using this is replacing a preemption fence with a page table update fence which makes the resource inaccessible.h](h)}(h**Parameters**h]jq )}(hj1nh]h Parameters}(hj3nhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj/nubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMMhj+nubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjPnh]hstruct dma_resv *obj}(hjRnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNnubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMJhjJnubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjinhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjenhMJhjfnubah}(h]h ]h"]h$]h&]uh1j hjJnubeh}(h]h ]h"]h$]h&]uh1j hjenhMJhjGnubj )}(h:``uint64_t context`` the context of the fences to replace h](j )}(h``uint64_t context``h]j)}(hjnh]huint64_t context}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMKhjnubj )}(hhh]h)}(h$the context of the fences to replaceh]h$the context of the fences to replace}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhMKhjnubah}(h]h ]h"]h$]h&]uh1j hjnubeh}(h]h ]h"]h$]h&]uh1j hjnhMKhjGnubj )}(h?``struct dma_fence *replacement`` the new fence to use instead h](j )}(h!``struct dma_fence *replacement``h]j)}(hjnh]hstruct dma_fence *replacement}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMLhjnubj )}(hhh]h)}(hthe new fence to use insteadh]hthe new fence to use instead}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhMLhjnubah}(h]h ]h"]h$]h&]uh1j hjnubeh}(h]h ]h"]h$]h&]uh1j hjnhMLhjGnubj )}(hQ``enum dma_resv_usage usage`` how the new fence is used, see enum dma_resv_usage h](j )}(h``enum dma_resv_usage usage``h]j)}(hjnh]henum dma_resv_usage usage}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMMhjnubj )}(hhh]h)}(h2how the new fence is used, see enum dma_resv_usageh]h2how the new fence is used, see enum dma_resv_usage}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohMMhjoubah}(h]h ]h"]h$]h&]uh1j hjnubeh}(h]h ]h"]h$]h&]uh1j hjohMMhjGnubeh}(h]h ]h"]h$]h&]uh1j hj+nubh)}(h**Description**h]jq )}(hj6oh]h Description}(hj8ohhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj4oubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMOhj+nubh)}(hReplace fences with a specified context with a new fence. Only valid if the operation represented by the original fence has no longer access to the resources represented by the dma_resv object when the new fence completes.h]hReplace fences with a specified context with a new fence. Only valid if the operation represented by the original fence has no longer access to the resources represented by the dma_resv object when the new fence completes.}(hjLohhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMOhj+nubh)}(hAnd example for using this is replacing a preemption fence with a page table update fence which makes the resource inaccessible.h]hAnd example for using this is replacing a preemption fence with a page table update fence which makes the resource inaccessible.}(hj[ohhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMShj+nubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j )dma_resv_iter_first_unlocked (C function)c.dma_resv_iter_first_unlockedhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hNstruct dma_fence * dma_resv_iter_first_unlocked (struct dma_resv_iter *cursor)h]j )}(hLstruct dma_fence *dma_resv_iter_first_unlocked(struct dma_resv_iter *cursor)h](j )}(hj h]hstruct}(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjohhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjohhhjohMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjoubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjomodnameN classnameNjj)}j]jN)}jFdma_resv_iter_first_unlockedsbc.dma_resv_iter_first_unlockedasbuh1hhjohhhjohMubj )}(h h]h }(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjohhhjohMubjc)}(hj h]h*}(hjohhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjohhhjohMubj )}(hdma_resv_iter_first_unlockedh]j )}(hjoh]hdma_resv_iter_first_unlocked}(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjoubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjohhhjohMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjpubj )}(h h]h }(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjpubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hj"phhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjpubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj$pmodnameN classnameNjj)}j]joc.dma_resv_iter_first_unlockedasbuh1hhjpubj )}(h h]h }(hj@phhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjpubjc)}(hj h]h*}(hjNphhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjpubj )}(hcursorh]hcursor}(hj[phhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjpubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjoubah}(h]h ]h"]h$]h&]jjuh1jhjohhhjohMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjohhhjohMubah}(h]j}oah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjohMhjohhubj@ )}(hhh]h)}(h(first fence in an unlocked dma_resv obj.h]h(first fence in an unlocked dma_resv obj.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjphhubah}(h]h ]h"]h$]h&]uh1j? hjohhhjohMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jpjb jpjc jd je uh1j hhhj;bhNhNubjg )}(hX**Parameters** ``struct dma_resv_iter *cursor`` the cursor with the current position **Description** Subsequent fences are iterated with dma_resv_iter_next_unlocked(). Beware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_first() whenever possible. Returns the first fence from an unlocked dma_resv obj.h](h)}(h**Parameters**h]jq )}(hjph]h Parameters}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjpubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjpubj )}(hhh]j )}(hF``struct dma_resv_iter *cursor`` the cursor with the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjph]hstruct dma_resv_iter *cursor}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjpubj )}(hhh]h)}(h$the cursor with the current positionh]h$the cursor with the current position}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphMhjpubah}(h]h ]h"]h$]h&]uh1j hjpubeh}(h]h ]h"]h$]h&]uh1j hjphMhjpubah}(h]h ]h"]h$]h&]uh1j hjpubh)}(h**Description**h]jq )}(hjqh]h Description}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjpubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjpubh)}(hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().h]hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjpubh)}(hBeware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_first() whenever possible.h]hBeware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_first() whenever possible.}(hj&qhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjpubh)}(h6Returns the first fence from an unlocked dma_resv obj.h]h6Returns the first fence from an unlocked dma_resv obj.}(hj5qhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjpubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j (dma_resv_iter_next_unlocked (C function)c.dma_resv_iter_next_unlockedhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hMstruct dma_fence * dma_resv_iter_next_unlocked (struct dma_resv_iter *cursor)h]j )}(hKstruct dma_fence *dma_resv_iter_next_unlocked(struct dma_resv_iter *cursor)h](j )}(hj h]hstruct}(hjdqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`qhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjrqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`qhhhjqqhMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjqmodnameN classnameNjj)}j]jN)}jFdma_resv_iter_next_unlockedsbc.dma_resv_iter_next_unlockedasbuh1hhj`qhhhjqqhMubj )}(h h]h }(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`qhhhjqqhMubjc)}(hj h]h*}(hjqhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj`qhhhjqqhMubj )}(hdma_resv_iter_next_unlockedh]j )}(hjqh]hdma_resv_iter_next_unlocked}(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj`qhhhjqqhMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubj )}(h h]h }(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjqmodnameN classnameNjj)}j]jqc.dma_resv_iter_next_unlockedasbuh1hhjqubj )}(h h]h }(hjrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubjc)}(hj h]h*}(hj(rhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjqubj )}(hcursorh]hcursor}(hj5rhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjqubah}(h]h ]h"]h$]h&]jjuh1jhj`qhhhjqqhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj\qhhhjqqhMubah}(h]jWqah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjqqhMhjYqhhubj@ )}(hhh]h)}(h'next fence in an unlocked dma_resv obj.h]h'next fence in an unlocked dma_resv obj.}(hj_rhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj\rhhubah}(h]h ]h"]h$]h&]uh1j? hjYqhhhjqqhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jwrjb jwrjc jd je uh1j hhhj;bhNhNubjg )}(hX~**Parameters** ``struct dma_resv_iter *cursor`` the cursor with the current position **Description** Beware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_next() whenever possible. Returns the next fence from an unlocked dma_resv obj.h](h)}(h**Parameters**h]jq )}(hjrh]h Parameters}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjrubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj{rubj )}(hhh]j )}(hF``struct dma_resv_iter *cursor`` the cursor with the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjrh]hstruct dma_resv_iter *cursor}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjrubj )}(hhh]h)}(h$the cursor with the current positionh]h$the cursor with the current position}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhMhjrubah}(h]h ]h"]h$]h&]uh1j hjrubeh}(h]h ]h"]h$]h&]uh1j hjrhMhjrubah}(h]h ]h"]h$]h&]uh1j hj{rubh)}(h**Description**h]jq )}(hjrh]h Description}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjrubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj{rubh)}(hBeware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_next() whenever possible.h]hBeware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_next() whenever possible.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj{rubh)}(h5Returns the next fence from an unlocked dma_resv obj.h]h5Returns the next fence from an unlocked dma_resv obj.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj{rubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_first (C function)c.dma_resv_iter_firsthNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hEstruct dma_fence * dma_resv_iter_first (struct dma_resv_iter *cursor)h]j )}(hCstruct dma_fence *dma_resv_iter_first(struct dma_resv_iter *cursor)h](j )}(hj h]hstruct}(hj/shhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+shhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hj=shhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+shhhj huh1j hj`.h](h)}(h**Parameters**h]jq )}(hjLth]h Parameters}(hjNthhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjJtubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjFtubj )}(hhh]j )}(hG``struct dma_resv_iter *cursor`` cursor to record the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjkth]hstruct dma_resv_iter *cursor}(hjmthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjitubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjetubj )}(hhh]h)}(h%cursor to record the current positionh]h%cursor to record the current position}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthMhjtubah}(h]h ]h"]h$]h&]uh1j hjetubeh}(h]h ]h"]h$]h&]uh1j hjthMhjbtubah}(h]h ]h"]h$]h&]uh1j hjFtubh)}(h**Description**h]jq )}(hjth]h Description}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjtubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjFtubh)}(hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().h]hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjFtubh)}(hcReturn the first fence in the dma_resv object while holding the :c:type:`dma_resv.lock `.h](h@Return the first fence in the dma_resv object while holding the }(hjthhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjth]h dma_resv.lock}(hjthhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjtubh.}(hjthhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjthMhjFtubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_next (C function)c.dma_resv_iter_nexthNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hDstruct dma_fence * dma_resv_iter_next (struct dma_resv_iter *cursor)h]j )}(hBstruct dma_fence *dma_resv_iter_next(struct dma_resv_iter *cursor)h](j )}(hj h]hstruct}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hj+uhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuhhhj*uhMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjumodnameN classnameNjj)}j]jN)}jFdma_resv_iter_nextsbc.dma_resv_iter_nextasbuh1hhjuhhhj*uhMubj )}(h h]h }(hj]uhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuhhhj*uhMubjc)}(hj h]h*}(hjkuhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjuhhhj*uhMubj )}(hdma_resv_iter_nexth]j )}(hjZuh]hdma_resv_iter_next}(hj|uhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjxuubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjuhhhj*uhMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubj )}(h h]h }(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjumodnameN classnameNjj)}j]jXuc.dma_resv_iter_nextasbuh1hhjuubj )}(h h]h }(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubjc)}(hj h]h*}(hjuhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjuubj )}(hcursorh]hcursor}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjuubah}(h]h ]h"]h$]h&]jjuh1jhjuhhhj*uhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjuhhhj*uhMubah}(h]juah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj*uhMhjuhhubj@ )}(hhh]h)}(h(next fence from a locked dma_resv objecth]h(next fence from a locked dma_resv object}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjvhhubah}(h]h ]h"]h$]h&]uh1j? hjuhhhj*uhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j0vjb j0vjc jd je uh1j hhhj;bhNhNubjg )}(h**Parameters** ``struct dma_resv_iter *cursor`` cursor to record the current position **Description** Return the next fences from the dma_resv object while holding the :c:type:`dma_resv.lock `.h](h)}(h**Parameters**h]jq )}(hj:vh]h Parameters}(hj`.h](hBReturn the next fences from the dma_resv object while holding the }(hjvhhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjvh]h dma_resv.lock}(hjvhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjvubh.}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjvhMhj4vubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_resv_copy_fences (C function)c.dma_resv_copy_fenceshNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hEint dma_resv_copy_fences (struct dma_resv *dst, struct dma_resv *src)h]j )}(hDint dma_resv_copy_fences(struct dma_resv *dst, struct dma_resv *src)h](jK)}(hinth]hint}(hjvhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjvhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hj whhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjvhhhj whMubj )}(hdma_resv_copy_fencesh]j )}(hdma_resv_copy_fencesh]hdma_resv_copy_fences}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjvhhhj whMubj)}(h,(struct dma_resv *dst, struct dma_resv *src)h](j)}(hstruct dma_resv *dsth](j )}(hj h]hstruct}(hj9whhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5wubj )}(h h]h }(hjFwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5wubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjWwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjTwubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjYwmodnameN classnameNjj)}j]jN)}jFjwsbc.dma_resv_copy_fencesasbuh1hhj5wubj )}(h h]h }(hjwwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5wubjc)}(hj h]h*}(hjwhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj5wubj )}(hdsth]hdst}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5wubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj1wubj)}(hstruct dma_resv *srch](j )}(hj h]hstruct}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubj )}(h h]h }(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjwmodnameN classnameNjj)}j]jswc.dma_resv_copy_fencesasbuh1hhjwubj )}(h h]h }(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubjc)}(hj h]h*}(hjwhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjwubj )}(hsrch]hsrc}(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj1wubeh}(h]h ]h"]h$]h&]jjuh1jhjvhhhj whMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjvhhhj whMubah}(h]jvah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj whMhjvhhubj@ )}(hhh]h)}(h Copy all fences from src to dst.h]h Copy all fences from src to dst.}(hj,xhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj)xhhubah}(h]h ]h"]h$]h&]uh1j? hjvhhhj whMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jDxjb jDxjc jd je uh1j hhhj;bhNhNubjg )}(h**Parameters** ``struct dma_resv *dst`` the destination reservation object ``struct dma_resv *src`` the source reservation object **Description** Copy all fences from src to dst. dst-lock must be held.h](h)}(h**Parameters**h]jq )}(hjNxh]h Parameters}(hjPxhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjLxubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjHxubj )}(hhh](j )}(h<``struct dma_resv *dst`` the destination reservation object h](j )}(h``struct dma_resv *dst``h]j)}(hjmxh]hstruct dma_resv *dst}(hjoxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkxubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjgxubj )}(hhh]h)}(h"the destination reservation objecth]h"the destination reservation object}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhMhjxubah}(h]h ]h"]h$]h&]uh1j hjgxubeh}(h]h ]h"]h$]h&]uh1j hjxhMhjdxubj )}(h7``struct dma_resv *src`` the source reservation object h](j )}(h``struct dma_resv *src``h]j)}(hjxh]hstruct dma_resv *src}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjxubj )}(hhh]h)}(hthe source reservation objecth]hthe source reservation object}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhMhjxubah}(h]h ]h"]h$]h&]uh1j hjxubeh}(h]h ]h"]h$]h&]uh1j hjxhMhjdxubeh}(h]h ]h"]h$]h&]uh1j hjHxubh)}(h**Description**h]jq )}(hjxh]h Description}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjxubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjHxubh)}(h7Copy all fences from src to dst. dst-lock must be held.h]h7Copy all fences from src to dst. dst-lock must be held.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjHxubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_get_fences (C function)c.dma_resv_get_fenceshNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hint dma_resv_get_fences (struct dma_resv *obj, enum dma_resv_usage usage, unsigned int *num_fences, struct dma_fence ***fences)h]j )}(h~int dma_resv_get_fences(struct dma_resv *obj, enum dma_resv_usage usage, unsigned int *num_fences, struct dma_fence ***fences)h](jK)}(hinth]hint}(hj&yhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj"yhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM8ubj )}(h h]h }(hj5yhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"yhhhj4yhM8ubj )}(hdma_resv_get_fencesh]j )}(hdma_resv_get_fencesh]hdma_resv_get_fences}(hjGyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCyubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj"yhhhj4yhM8ubj)}(hg(struct dma_resv *obj, enum dma_resv_usage usage, unsigned int *num_fences, struct dma_fence ***fences)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjcyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_yubj )}(h h]h }(hjpyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_yubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~yubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjymodnameN classnameNjj)}j]jN)}jFjIysbc.dma_resv_get_fencesasbuh1hhj_yubj )}(h h]h }(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_yubjc)}(hj h]h*}(hjyhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj_yubj )}(hobjh]hobj}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_yubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[yubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubj )}(h h]h }(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjymodnameN classnameNjj)}j]jyc.dma_resv_get_fencesasbuh1hhjyubj )}(h h]h }(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubj )}(husageh]husage}(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[yubj)}(hunsigned int *num_fencesh](jK)}(hunsignedh]hunsigned}(hj8zhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj4zubj )}(h h]h }(hjFzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4zubjK)}(hinth]hint}(hjTzhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj4zubj )}(h h]h }(hjbzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4zubjc)}(hj h]h*}(hjpzhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj4zubj )}(h num_fencesh]h num_fences}(hj}zhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4zubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[yubj)}(hstruct dma_fence ***fencesh](j )}(hj h]hstruct}(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubj )}(h h]h }(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjzmodnameN classnameNjj)}j]jyc.dma_resv_get_fencesasbuh1hhjzubj )}(h h]h }(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubjc)}(hj h]h*}(hjzhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjzubjc)}(hj h]h*}(hjzhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjzubjc)}(hj h]h*}(hjzhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjzubj )}(hfencesh]hfences}(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[yubeh}(h]h ]h"]h$]h&]jjuh1jhj"yhhhj4yhM8ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjyhhhj4yhM8ubah}(h]jyah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj4yhM8hjyhhubj@ )}(hhh]h)}(h;Get an object's fences fences without update side lock heldh]h=Get an object’s fences fences without update side lock held}(hj1{hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM-hj.{hhubah}(h]h ]h"]h$]h&]uh1j? hjyhhhj4yhM8ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jI{jb jI{jc jd je uh1j hhhj;bhNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. ``unsigned int *num_fences`` the number of fences returned ``struct dma_fence ***fences`` the array of fence ptrs returned (array is krealloc'd to the required size, and must be freed by caller) **Description** Retrieve all fences from the reservation object. Returns either zero or -ENOMEM.h](h)}(h**Parameters**h]jq )}(hjS{h]h Parameters}(hjU{hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjQ{ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM1hjM{ubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjr{h]hstruct dma_resv *obj}(hjt{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp{ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM/hjl{ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hM/hj{ubah}(h]h ]h"]h$]h&]uh1j hjl{ubeh}(h]h ]h"]h$]h&]uh1j hj{hM/hji{ubj )}(hY``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. h](j )}(h``enum dma_resv_usage usage``h]j)}(hj{h]henum dma_resv_usage usage}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM0hj{ubj )}(hhh]h)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hM0hj{ubah}(h]h ]h"]h$]h&]uh1j hj{ubeh}(h]h ]h"]h$]h&]uh1j hj{hM0hji{ubj )}(h;``unsigned int *num_fences`` the number of fences returned h](j )}(h``unsigned int *num_fences``h]j)}(hj{h]hunsigned int *num_fences}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM1hj{ubj )}(hhh]h)}(hthe number of fences returnedh]hthe number of fences returned}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hM1hj{ubah}(h]h ]h"]h$]h&]uh1j hj{ubeh}(h]h ]h"]h$]h&]uh1j hj{hM1hji{ubj )}(h``struct dma_fence ***fences`` the array of fence ptrs returned (array is krealloc'd to the required size, and must be freed by caller) h](j )}(h``struct dma_fence ***fences``h]j)}(hj|h]hstruct dma_fence ***fences}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM3hj|ubj )}(hhh]h)}(hhthe array of fence ptrs returned (array is krealloc'd to the required size, and must be freed by caller)h]hjthe array of fence ptrs returned (array is krealloc’d to the required size, and must be freed by caller)}(hj6|hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM2hj3|ubah}(h]h ]h"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]uh1j hj2|hM3hji{ubeh}(h]h ]h"]h$]h&]uh1j hjM{ubh)}(h**Description**h]jq )}(hjY|h]h Description}(hj[|hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjW|ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM5hjM{ubh)}(hPRetrieve all fences from the reservation object. Returns either zero or -ENOMEM.h]hPRetrieve all fences from the reservation object. Returns either zero or -ENOMEM.}(hjo|hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM5hjM{ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_resv_get_singleton (C function)c.dma_resv_get_singletonhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hfint dma_resv_get_singleton (struct dma_resv *obj, enum dma_resv_usage usage, struct dma_fence **fence)h]j )}(heint dma_resv_get_singleton(struct dma_resv *obj, enum dma_resv_usage usage, struct dma_fence **fence)h](jK)}(hinth]hint}(hj|hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj|hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMrubj )}(h h]h }(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|hhhj|hMrubj )}(hdma_resv_get_singletonh]j )}(hdma_resv_get_singletonh]hdma_resv_get_singleton}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj|hhhj|hMrubj)}(hK(struct dma_resv *obj, enum dma_resv_usage usage, struct dma_fence **fence)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubj )}(h h]h }(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj|modnameN classnameNjj)}j]jN)}jFj|sbc.dma_resv_get_singletonasbuh1hhj|ubj )}(h h]h }(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubjc)}(hj h]h*}(hj'}hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj|ubj )}(hobjh]hobj}(hj4}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj|ubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjM}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjI}ubj )}(h h]h }(hjZ}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjI}ubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjk}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh}ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjm}modnameN classnameNjj)}j]j}c.dma_resv_get_singletonasbuh1hhjI}ubj )}(h h]h }(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjI}ubj )}(husageh]husage}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjI}ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj|ubj)}(hstruct dma_fence **fenceh](j )}(hj h]hstruct}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubj )}(h h]h }(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj}modnameN classnameNjj)}j]j}c.dma_resv_get_singletonasbuh1hhj}ubj )}(h h]h }(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubjc)}(hj h]h*}(hj}hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj}ubjc)}(hj h]h*}(hj~hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj}ubj )}(hfenceh]hfence}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj|ubeh}(h]h ]h"]h$]h&]jjuh1jhj|hhhj|hMrubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj|hhhj|hMrubah}(h]j|ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj|hMrhj|hhubj@ )}(hhh]h)}(h%Get a single fence for all the fencesh]h%Get a single fence for all the fences}(hj>~hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMdhj;~hhubah}(h]h ]h"]h$]h&]uh1j? hj|hhhj|hMrubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jV~jb jV~jc jd je uh1j hhhj;bhNhNubjg )}(hX1**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. ``struct dma_fence **fence`` the resulting fence **Description** Get a single fence representing all the fences inside the resv object. Returns either 0 for success or -ENOMEM. Warning: This can't be used like this when adding the fence back to the resv object since that can lead to stack corruption when finalizing the dma_fence_array. Returns 0 on success and negative error values on failure.h](h)}(h**Parameters**h]jq )}(hj`~h]h Parameters}(hjb~hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj^~ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhhjZ~ubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj~h]hstruct dma_resv *obj}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}~ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMehjy~ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hMehj~ubah}(h]h ]h"]h$]h&]uh1j hjy~ubeh}(h]h ]h"]h$]h&]uh1j hj~hMehjv~ubj )}(hY``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. h](j )}(h``enum dma_resv_usage usage``h]j)}(hj~h]henum dma_resv_usage usage}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMfhj~ubj )}(hhh]h)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hMfhj~ubah}(h]h ]h"]h$]h&]uh1j hj~ubeh}(h]h ]h"]h$]h&]uh1j hj~hMfhjv~ubj )}(h1``struct dma_fence **fence`` the resulting fence h](j )}(h``struct dma_fence **fence``h]j)}(hj~h]hstruct dma_fence **fence}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMghj~ubj )}(hhh]h)}(hthe resulting fenceh]hthe resulting fence}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMghjubah}(h]h ]h"]h$]h&]uh1j hj~ubeh}(h]h ]h"]h$]h&]uh1j hjhMghjv~ubeh}(h]h ]h"]h$]h&]uh1j hjZ~ubh)}(h**Description**h]jq )}(hj,h]h Description}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj*ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMihjZ~ubh)}(hoGet a single fence representing all the fences inside the resv object. Returns either 0 for success or -ENOMEM.h]hoGet a single fence representing all the fences inside the resv object. Returns either 0 for success or -ENOMEM.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMihjZ~ubh)}(hWarning: This can't be used like this when adding the fence back to the resv object since that can lead to stack corruption when finalizing the dma_fence_array.h]hWarning: This can’t be used like this when adding the fence back to the resv object since that can lead to stack corruption when finalizing the dma_fence_array.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMlhjZ~ubh)}(h:Returns 0 on success and negative error values on failure.h]h:Returns 0 on success and negative error values on failure.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMphjZ~ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_resv_wait_timeout (C function)c.dma_resv_wait_timeouthNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hnlong dma_resv_wait_timeout (struct dma_resv *obj, enum dma_resv_usage usage, bool intr, unsigned long timeout)h]j )}(hmlong dma_resv_wait_timeout(struct dma_resv *obj, enum dma_resv_usage usage, bool intr, unsigned long timeout)h](jK)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_resv_wait_timeouth]j )}(hdma_resv_wait_timeouth]hdma_resv_wait_timeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(hS(struct dma_resv *obj, enum dma_resv_usage usage, bool intr, unsigned long timeout)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_resv_wait_timeoutasbuh1hhjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubj )}(h h]h }(hjKhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjYubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj^modnameN classnameNjj)}j]jc.dma_resv_wait_timeoutasbuh1hhj:ubj )}(h h]h }(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubj )}(husageh]husage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h bool intrh](jK)}(hjE_h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hintrh]hintr}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned long timeouth](jK)}(hunsignedh]hunsigned}(hjՀhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjрubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjрubjK)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjрubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjрubj )}(htimeouth]htimeout}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjрubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h$Wait on reservation's objects fencesh]h&Wait on reservation’s objects fences}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj4hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jOjb jOjc jd je uh1j hhhj;bhNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. ``bool intr`` if true, do interruptible wait ``unsigned long timeout`` timeout value in jiffies or zero to return immediately **Description** Callers are not required to hold specific locks, but maybe hold dma_resv_lock() already RETURNS Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or greater than zero on success.h](h)}(h**Parameters**h]jq )}(hjYh]h Parameters}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjWubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjSubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjxh]hstruct dma_resv *obj}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjrubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjrubeh}(h]h ]h"]h$]h&]uh1j hjhMhjoubj )}(hY``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. h](j )}(h``enum dma_resv_usage usage``h]j)}(hjh]henum dma_resv_usage usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(hjʁhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjƁhMhjǁubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjƁhMhjoubj )}(h-``bool intr`` if true, do interruptible wait h](j )}(h ``bool intr``h]j)}(hjh]h bool intr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(hif true, do interruptible waith]hif true, do interruptible wait}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjoubj )}(hQ``unsigned long timeout`` timeout value in jiffies or zero to return immediately h](j )}(h``unsigned long timeout``h]j)}(hj#h]hunsigned long timeout}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(h6timeout value in jiffies or zero to return immediatelyh]h6timeout value in jiffies or zero to return immediately}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMhj9ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj8hMhjoubeh}(h]h ]h"]h$]h&]uh1j hjSubh)}(h**Description**h]jq )}(hj^h]h Description}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj\ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjSubh)}(hCallers are not required to hold specific locks, but maybe hold dma_resv_lock() already RETURNS Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or greater than zero on success.h]hCallers are not required to hold specific locks, but maybe hold dma_resv_lock() already RETURNS Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or greater than zero on success.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjSubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_resv_set_deadline (C function)c.dma_resv_set_deadlinehNtauh1j hj;bhhhNhNubj )}(hhh](j )}(h^void dma_resv_set_deadline (struct dma_resv *obj, enum dma_resv_usage usage, ktime_t deadline)h]j )}(h]void dma_resv_set_deadline(struct dma_resv *obj, enum dma_resv_usage usage, ktime_t deadline)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_resv_set_deadlineh]j )}(hdma_resv_set_deadlineh]hdma_resv_set_deadline}(hjĂhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(hC(struct dma_resv *obj, enum dma_resv_usage usage, ktime_t deadline)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj܂ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj܂ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjƂsbc.dma_resv_set_deadlineasbuh1hhj܂ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj܂ubjc)}(hj h]h*}(hj,hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj܂ubj )}(hobjh]hobj}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj܂ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj؂ubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNubj )}(h h]h }(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjrmodnameN classnameNjj)}j]jc.dma_resv_set_deadlineasbuh1hhjNubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNubj )}(husageh]husage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj؂ubj)}(hktime_t deadlineh](h)}(hhh]j )}(hktime_th]hktime_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_resv_set_deadlineasbuh1hhjubj )}(h h]h }(hjփhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hdeadlineh]hdeadline}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj؂ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h.Set a deadline on reservation's objects fencesh]h0Set a deadline on reservation’s objects fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j&jb j&jc jd je uh1j hhhj;bhNhNubjg )}(hXS**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. ``ktime_t deadline`` the requested deadline (MONOTONIC) **Description** May be called without holding the dma_resv lock. Sets **deadline** on all fences filtered by **usage**.h](h)}(h**Parameters**h]jq )}(hj0h]h Parameters}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj.ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj*ubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjOh]hstruct dma_resv *obj}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjIubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhMhjeubah}(h]h ]h"]h$]h&]uh1j hjIubeh}(h]h ]h"]h$]h&]uh1j hjdhMhjFubj )}(hY``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. h](j )}(h``enum dma_resv_usage usage``h]j)}(hjh]henum dma_resv_usage usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjFubj )}(h8``ktime_t deadline`` the requested deadline (MONOTONIC) h](j )}(h``ktime_t deadline``h]j)}(hjh]hktime_t deadline}(hjÄhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(h"the requested deadline (MONOTONIC)h]h"the requested deadline (MONOTONIC)}(hjڄhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjքhMhjׄubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjքhMhjFubeh}(h]h ]h"]h$]h&]uh1j hj*ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj*ubh)}(hhMay be called without holding the dma_resv lock. Sets **deadline** on all fences filtered by **usage**.h](h7May be called without holding the dma_resv lock. Sets }(hjhhhNhNubjq )}(h **deadline**h]hdeadline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh on all fences filtered by }(hjhhhNhNubjq )}(h **usage**h]husage}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_resv_test_signaled (C function)c.dma_resv_test_signaledhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hMbool dma_resv_test_signaled (struct dma_resv *obj, enum dma_resv_usage usage)h]j )}(hLbool dma_resv_test_signaled(struct dma_resv *obj, enum dma_resv_usage usage)h](jK)}(hjE_h]hbool}(hjehhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjahhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjahhhjrhMubj )}(hdma_resv_test_signaledh]j )}(hdma_resv_test_signaledh]hdma_resv_test_signaled}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjahhhjrhMubj)}(h1(struct dma_resv *obj, enum dma_resv_usage usage)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_resv_test_signaledasbuh1hhjubj )}(h h]h }(hj߅hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj3modnameN classnameNjj)}j]jۅc.dma_resv_test_signaledasbuh1hhjubj )}(h h]h }(hjOhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(husageh]husage}(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjahhhjrhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj]hhhjrhMubah}(h]jXah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjrhMhjZhhubj@ )}(hhh]h)}(h9Test if a reservation object's fences have been signaled.h]h;Test if a reservation object’s fences have been signaled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjZhhhjrhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(hX;**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. **Description** Callers are not required to hold specific locks, but maybe hold dma_resv_lock() already. RETURNS True if all fences signaled, else false.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjȆh]hstruct dma_resv *obj}(hjʆhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjƆubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj†ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj݆hMhjކubah}(h]h ]h"]h$]h&]uh1j hj†ubeh}(h]h ]h"]h$]h&]uh1j hj݆hMhjubj )}(hY``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. h](j )}(h``enum dma_resv_usage usage``h]j)}(hjh]henum dma_resv_usage usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj<h]h Description}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj:ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubh)}(hXCallers are not required to hold specific locks, but maybe hold dma_resv_lock() already.h]hXCallers are not required to hold specific locks, but maybe hold dma_resv_lock() already.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubh)}(hRETURNSh]hRETURNS}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubh)}(h(True if all fences signaled, else false.h]h(True if all fences signaled, else false.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_describe (C function)c.dma_resv_describehNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hCvoid dma_resv_describe (struct dma_resv *obj, struct seq_file *seq)h]j )}(hBvoid dma_resv_describe(struct dma_resv *obj, struct seq_file *seq)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_resv_describeh]j )}(hdma_resv_describeh]hdma_resv_describe}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h,(struct dma_resv *obj, struct seq_file *seq)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hj܇hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj؇ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj؇ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFj‡sbc.dma_resv_describeasbuh1hhj؇ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj؇ubjc)}(hj h]h*}(hj(hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj؇ubj )}(hobjh]hobj}(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj؇ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjԇubj)}(hstruct seq_file *seqh](j )}(hj h]hstruct}(hjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubj )}(h h]h }(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubh)}(hhh]j )}(hseq_fileh]hseq_file}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjnmodnameN classnameNjj)}j]jc.dma_resv_describeasbuh1hhjJubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjJubj )}(hseqh]hseq}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjԇubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h1Dump description of the resv object into seq_fileh]h1Dump description of the resv object into seq_file}(hjψhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj̈hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(h**Parameters** ``struct dma_resv *obj`` the reservation object ``struct seq_file *seq`` the seq_file to dump the description into **Description** Dump a textual description of the fences inside an dma_resv object into the seq_file.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hMhj&ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj%hMhjubj )}(hC``struct seq_file *seq`` the seq_file to dump the description into h](j )}(h``struct seq_file *seq``h]j)}(hjIh]hstruct seq_file *seq}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjCubj )}(hhh]h)}(h)the seq_file to dump the description intoh]h)the seq_file to dump the description into}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hMhj_ubah}(h]h ]h"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]uh1j hj^hMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubh)}(hUDump a textual description of the fences inside an dma_resv object into the seq_file.h]hUDump a textual description of the fences inside an dma_resv object into the seq_file.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_usage (C enum)c.dma_resv_usagehNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hdma_resv_usageh]j )}(henum dma_resv_usageh](j )}(hj*h]henum}(hjɉhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjʼnhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hj׉hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjʼnhhhj։hKubj )}(hdma_resv_usageh]j )}(hjÉh]hdma_resv_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjʼnhhhj։hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhj։hKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj։hKhjhhubj@ )}(hhh]h)}(h+how the fences from a dma_resv obj are usedh]h+how the fences from a dma_resv obj are used}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK5hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj։hKubeh}(h]h ](jenumeh"]h$]h&]j` jja j#jb j#jc jd je uh1j hhhj;bhNhNubjg )}(hX**Constants** ``DMA_RESV_USAGE_KERNEL`` For in kernel memory management only. This should only be used for things like copying or clearing memory with a DMA hardware engine for the purpose of kernel memory management. Drivers *always* must wait for those fences before accessing the resource protected by the dma_resv object. The only exception for that is when the resource is known to be locked down in place by pinning it previously. ``DMA_RESV_USAGE_WRITE`` Implicit write synchronization. This should only be used for userspace command submissions which add an implicit write dependency. ``DMA_RESV_USAGE_READ`` Implicit read synchronization. This should only be used for userspace command submissions which add an implicit read dependency. ``DMA_RESV_USAGE_BOOKKEEP`` No implicit sync. This should be used by submissions which don't want to participate in any implicit synchronization. The most common cases are preemption fences, page table updates, TLB flushes as well as explicitly synced user submissions. Explicitly synced user submissions can be promoted to DMA_RESV_USAGE_READ or DMA_RESV_USAGE_WRITE as needed using dma_buf_import_sync_file() when implicit synchronization should become necessary after initial adding of the fence.h](h)}(h **Constants**h]jq )}(hj-h]h Constants}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj+ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK9hj'ubj )}(hhh](j )}(hX``DMA_RESV_USAGE_KERNEL`` For in kernel memory management only. This should only be used for things like copying or clearing memory with a DMA hardware engine for the purpose of kernel memory management. Drivers *always* must wait for those fences before accessing the resource protected by the dma_resv object. The only exception for that is when the resource is known to be locked down in place by pinning it previously. h](j )}(h``DMA_RESV_USAGE_KERNEL``h]j)}(hjLh]hDMA_RESV_USAGE_KERNEL}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKEhjFubj )}(hhh](h)}(h%For in kernel memory management only.h]h%For in kernel memory management only.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjbubh)}(hDrivers *always* must wait for those fences before accessing the resource protected by the dma_resv object. The only exception for that is when the resource is known to be locked down in place by pinning it previously.h](hDrivers }(hjhhhNhNubhemphasis)}(h*always*h]halways}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh must wait for those fences before accessing the resource protected by the dma_resv object. The only exception for that is when the resource is known to be locked down in place by pinning it previously.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKBhjbubeh}(h]h ]h"]h$]h&]uh1j hjFubeh}(h]h ]h"]h$]h&]uh1j hjahKEhjCubj )}(h``DMA_RESV_USAGE_WRITE`` Implicit write synchronization. This should only be used for userspace command submissions which add an implicit write dependency. h](j )}(h``DMA_RESV_USAGE_WRITE``h]j)}(hjh]hDMA_RESV_USAGE_WRITE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKKhjubj )}(hhh](h)}(hImplicit write synchronization.h]hImplicit write synchronization.}(hjъhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKHhjΊubh)}(hbThis should only be used for userspace command submissions which add an implicit write dependency.h]hbThis should only be used for userspace command submissions which add an implicit write dependency.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKJhjΊubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj͊hKKhjCubj )}(h``DMA_RESV_USAGE_READ`` Implicit read synchronization. This should only be used for userspace command submissions which add an implicit read dependency. h](j )}(h``DMA_RESV_USAGE_READ``h]j)}(hjh]hDMA_RESV_USAGE_READ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKQhjubj )}(hhh](h)}(hImplicit read synchronization.h]hImplicit read synchronization.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKNhjubh)}(haThis should only be used for userspace command submissions which add an implicit read dependency.h]haThis should only be used for userspace command submissions which add an implicit read dependency.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKPhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKQhjCubj )}(hX``DMA_RESV_USAGE_BOOKKEEP`` No implicit sync. This should be used by submissions which don't want to participate in any implicit synchronization. The most common cases are preemption fences, page table updates, TLB flushes as well as explicitly synced user submissions. Explicitly synced user submissions can be promoted to DMA_RESV_USAGE_READ or DMA_RESV_USAGE_WRITE as needed using dma_buf_import_sync_file() when implicit synchronization should become necessary after initial adding of the fence.h](j )}(h``DMA_RESV_USAGE_BOOKKEEP``h]j)}(hjJh]hDMA_RESV_USAGE_BOOKKEEP}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK^hjDubj )}(hhh](h)}(hNo implicit sync.h]hNo implicit sync.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKThj`ubh)}(hcThis should be used by submissions which don't want to participate in any implicit synchronization.h]heThis should be used by submissions which don’t want to participate in any implicit synchronization.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKVhj`ubh)}(h{The most common cases are preemption fences, page table updates, TLB flushes as well as explicitly synced user submissions.h]h{The most common cases are preemption fences, page table updates, TLB flushes as well as explicitly synced user submissions.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKYhj`ubh)}(hExplicitly synced user submissions can be promoted to DMA_RESV_USAGE_READ or DMA_RESV_USAGE_WRITE as needed using dma_buf_import_sync_file() when implicit synchronization should become necessary after initial adding of the fence.h]hExplicitly synced user submissions can be promoted to DMA_RESV_USAGE_READ or DMA_RESV_USAGE_WRITE as needed using dma_buf_import_sync_file() when implicit synchronization should become necessary after initial adding of the fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK\hj`ubeh}(h]h ]h"]h$]h&]uh1j hjDubeh}(h]h ]h"]h$]h&]uh1j hj_hK^hjCubeh}(h]h ]h"]h$]h&]uh1j hj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKbhj;bhhubh)}(hvThis enum describes the different use cases for a dma_resv object and controls which fences are returned when queried.h]hvThis enum describes the different use cases for a dma_resv object and controls which fences are returned when queried.}(hjЋhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK6hj;bhhubh)}(hAn important fact is that there is the order KERNEL huh1j hj2hK~hjhhubj@ )}(hhh]h)}(hhelper for implicit synch]hhelper for implicit sync}(hj׌hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKxhjԌhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj2hK~ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(h**Parameters** ``bool write`` true if we create a new implicit sync write **Description** This returns the implicit synchronization usage for write or read accesses, see enum dma_resv_usage and :c:type:`dma_buf.resv `.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK|hjubj )}(hhh]j )}(h;``bool write`` true if we create a new implicit sync write h](j )}(h``bool write``h]j)}(hjh]h bool write}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKyhjubj )}(hhh]h)}(h+true if we create a new implicit sync writeh]h+true if we create a new implicit sync write}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hKyhj.ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj-hKyhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjSh]h Description}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjQubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK{hjubh)}(hThis returns the implicit synchronization usage for write or read accesses, see enum dma_resv_usage and :c:type:`dma_buf.resv `.h](hhThis returns the implicit synchronization usage for write or read accesses, see enum dma_resv_usage and }(hjihhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hjsh]h dma_buf.resv}(hjuhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK{hjiubh.}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK{hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv (C struct) c.dma_resvhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hdma_resvh]j )}(hstruct dma_resvh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hjɍhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjȍhKubj )}(hdma_resvh]j )}(hjh]hdma_resv}(hjۍhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj׍ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjȍhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjȍhKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjȍhKhjhhubj@ )}(hhh]h)}(h0a reservation object manages fences for a bufferh]h0a reservation object manages fences for a buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjȍhKubeh}(h]h ](jstructeh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(hX**Definition**:: struct dma_resv { struct ww_mutex lock; struct dma_resv_list __rcu *fences; }; **Members** ``lock`` Update side lock. Don't use directly, instead use the wrapper functions like dma_resv_lock() and dma_resv_unlock(). Drivers which use the reservation object to manage memory dynamically also use this lock to protect buffer object state like placement, allocation policies or throughout command submission. ``fences`` Array of fences which where added to the dma_resv object A new fence is added by calling dma_resv_add_fence(). Since this often needs to be done past the point of no return in command submission it cannot fail, and therefore sufficient slots need to be reserved by calling dma_resv_reserve_fences().h](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj)}(hVstruct dma_resv { struct ww_mutex lock; struct dma_resv_list __rcu *fences; };h]hVstruct dma_resv { struct ww_mutex lock; struct dma_resv_list __rcu *fences; };}hj:sbah}(h]h ]h"]h$]h&]jjuh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubh)}(h **Members**h]jq )}(hjKh]hMembers}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjIubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh](j )}(hX<``lock`` Update side lock. Don't use directly, instead use the wrapper functions like dma_resv_lock() and dma_resv_unlock(). Drivers which use the reservation object to manage memory dynamically also use this lock to protect buffer object state like placement, allocation policies or throughout command submission. h](j )}(h``lock``h]j)}(hjjh]hlock}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjdubj )}(hhh](h)}(hsUpdate side lock. Don't use directly, instead use the wrapper functions like dma_resv_lock() and dma_resv_unlock().h]huUpdate side lock. Don’t use directly, instead use the wrapper functions like dma_resv_lock() and dma_resv_unlock().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubh)}(hDrivers which use the reservation object to manage memory dynamically also use this lock to protect buffer object state like placement, allocation policies or throughout command submission.h]hDrivers which use the reservation object to manage memory dynamically also use this lock to protect buffer object state like placement, allocation policies or throughout command submission.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubeh}(h]h ]h"]h$]h&]uh1j hjdubeh}(h]h ]h"]h$]h&]uh1j hjhKhjaubj )}(hX7``fences`` Array of fences which where added to the dma_resv object A new fence is added by calling dma_resv_add_fence(). Since this often needs to be done past the point of no return in command submission it cannot fail, and therefore sufficient slots need to be reserved by calling dma_resv_reserve_fences().h](j )}(h ``fences``h]j)}(hjh]hfences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh](h)}(h8Array of fences which where added to the dma_resv objecth]h8Array of fences which where added to the dma_resv object}(hj̎hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjɎubh)}(hA new fence is added by calling dma_resv_add_fence(). Since this often needs to be done past the point of no return in command submission it cannot fail, and therefore sufficient slots need to be reserved by calling dma_resv_reserve_fences().h]hA new fence is added by calling dma_resv_add_fence(). Since this often needs to be done past the point of no return in command submission it cannot fail, and therefore sufficient slots need to be reserved by calling dma_resv_reserve_fences().}(hjێhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjɎubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjȎhKhjaubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj;bhhubh)}(hSThis is a container for dma_fence objects which needs to handle multiple use cases.h]hSThis is a container for dma_fence objects which needs to handle multiple use cases.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj;bhhubh)}(hX One use is to synchronize cross-driver access to a struct dma_buf, either for dynamic buffer management or just to handle implicit synchronization between different users of the buffer in userspace. See :c:type:`dma_buf.resv ` for a more in-depth discussion.h](hOne use is to synchronize cross-driver access to a struct dma_buf, either for dynamic buffer management or just to handle implicit synchronization between different users of the buffer in userspace. See }(hj*hhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hj4h]h dma_buf.resv}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj*ubh for a more in-depth discussion.}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjQhKhj;bhhubh)}(hX?The other major use is to manage access and locking within a driver in a buffer based memory manager. struct ttm_buffer_object is the canonical example here, since this is where reservation objects originated from. But use in drivers is spreading and some drivers also manage struct drm_gem_object with the same scheme.h]hX?The other major use is to manage access and locking within a driver in a buffer based memory manager. struct ttm_buffer_object is the canonical example here, since this is where reservation objects originated from. But use in drivers is spreading and some drivers also manage struct drm_gem_object with the same scheme.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj;bhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter (C struct)c.dma_resv_iterhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(h dma_resv_iterh]j )}(hstruct dma_resv_iterh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubj )}(h dma_resv_iterh]j )}(hj~h]h dma_resv_iter}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj|hhhjhKubah}(h]jwah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjyhhubj@ )}(hhh]h)}(h)current position into the dma_resv fencesh]h)current position into the dma_resv fences}(hjƏhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjÏhhubah}(h]h ]h"]h$]h&]uh1j? hjyhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j` jja jޏjb jޏjc jd je uh1j hhhj;bhNhNubjg )}(hX**Definition**:: struct dma_resv_iter { struct dma_resv *obj; enum dma_resv_usage usage; struct dma_fence *fence; enum dma_resv_usage fence_usage; unsigned int index; struct dma_resv_list *fences; unsigned int num_fences; bool is_restarted; }; **Members** ``obj`` The dma_resv object we iterate over ``usage`` Return fences with this usage or lower. ``fence`` the currently handled fence ``fence_usage`` the usage of the current fence ``index`` index into the shared fences ``fences`` the shared fences; private, *MUST* not dereference ``num_fences`` number of fences ``is_restarted`` true if this is the first returned fenceh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj)}(hXstruct dma_resv_iter { struct dma_resv *obj; enum dma_resv_usage usage; struct dma_fence *fence; enum dma_resv_usage fence_usage; unsigned int index; struct dma_resv_list *fences; unsigned int num_fences; bool is_restarted; };h]hXstruct dma_resv_iter { struct dma_resv *obj; enum dma_resv_usage usage; struct dma_fence *fence; enum dma_resv_usage fence_usage; unsigned int index; struct dma_resv_list *fences; unsigned int num_fences; bool is_restarted; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubh)}(h **Members**h]jq )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh](j )}(h,``obj`` The dma_resv object we iterate over h](j )}(h``obj``h]j)}(hj3h]hobj}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj-ubj )}(hhh]h)}(h#The dma_resv object we iterate overh]h#The dma_resv object we iterate over}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhKhjIubah}(h]h ]h"]h$]h&]uh1j hj-ubeh}(h]h ]h"]h$]h&]uh1j hjHhKhj*ubj )}(h2``usage`` Return fences with this usage or lower. h](j )}(h ``usage``h]j)}(hjlh]husage}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjfubj )}(hhh]h)}(h'Return fences with this usage or lower.h]h'Return fences with this usage or lower.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjfubeh}(h]h ]h"]h$]h&]uh1j hjhKhj*ubj )}(h&``fence`` the currently handled fence h](j )}(h ``fence``h]j)}(hjh]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(hthe currently handled fenceh]hthe currently handled fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhj*ubj )}(h/``fence_usage`` the usage of the current fence h](j )}(h``fence_usage``h]j)}(hjސh]h fence_usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjܐubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjؐubj )}(hhh]h)}(hthe usage of the current fenceh]hthe usage of the current fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjؐubeh}(h]h ]h"]h$]h&]uh1j hjhKhj*ubj )}(h'``index`` index into the shared fences h](j )}(h ``index``h]j)}(hjh]hindex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(hindex into the shared fencesh]hindex into the shared fences}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hKhj-ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj,hKhj*ubj )}(h>``fences`` the shared fences; private, *MUST* not dereference h](j )}(h ``fences``h]j)}(hjPh]hfences}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjJubj )}(hhh]h)}(h2the shared fences; private, *MUST* not dereferenceh](hthe shared fences; private, }(hjihhhNhNubj)}(h*MUST*h]hMUST}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh not dereference}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjehKhjfubah}(h]h ]h"]h$]h&]uh1j hjJubeh}(h]h ]h"]h$]h&]uh1j hjehKhj*ubj )}(h ``num_fences`` number of fences h](j )}(h``num_fences``h]j)}(hjh]h num_fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(hnumber of fencesh]hnumber of fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhj*ubj )}(h9``is_restarted`` true if this is the first returned fenceh](j )}(h``is_restarted``h]j)}(hjԑh]h is_restarted}(hj֑hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjґubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjΑubj )}(hhh]h)}(h(true if this is the first returned fenceh]h(true if this is the first returned fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjΑubeh}(h]h ]h"]h$]h&]uh1j hjhKhj*ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj;bhhubh)}(hKDon't touch this directly in the driver, use the accessor function instead.h]hMDon’t touch this directly in the driver, use the accessor function instead.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj;bhhubh)}(h IMPORTANTh]h IMPORTANT}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj;bhhubh)}(hWhen using the lockless iterators like dma_resv_iter_next_unlocked() or dma_resv_for_each_fence_unlocked() beware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted().h]hWhen using the lockless iterators like dma_resv_iter_next_unlocked() or dma_resv_for_each_fence_unlocked() beware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted().}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj;bhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_begin (C function)c.dma_resv_iter_beginhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hhvoid dma_resv_iter_begin (struct dma_resv_iter *cursor, struct dma_resv *obj, enum dma_resv_usage usage)h]j )}(hgvoid dma_resv_iter_begin(struct dma_resv_iter *cursor, struct dma_resv *obj, enum dma_resv_usage usage)h](jK)}(hvoidh]hvoid}(hjshhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjohhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjohhhjhKubj )}(hdma_resv_iter_beginh]j )}(hdma_resv_iter_beginh]hdma_resv_iter_begin}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjohhhjhKubj)}(hO(struct dma_resv_iter *cursor, struct dma_resv *obj, enum dma_resv_usage usage)h](j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjΒhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj˒ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjВmodnameN classnameNjj)}j]jN)}jFjsbc.dma_resv_iter_beginasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hcursorh]hcursor}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjBmodnameN classnameNjj)}j]jc.dma_resv_iter_beginasbuh1hhjubj )}(h h]h }(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjlhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_resv_iter_beginasbuh1hhjubj )}(h h]h }(hjΓhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(husageh]husage}(hjܓhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjohhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjkhhhjhKubah}(h]jfah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjhhhubj@ )}(hhh]h)}(h!initialize a dma_resv_iter objecth]h!initialize a dma_resv_iter object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(hX**Parameters** ``struct dma_resv_iter *cursor`` The dma_resv_iter object to initialize ``struct dma_resv *obj`` The dma_resv object which we want to iterate over ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage.h](h)}(h**Parameters**h]jq )}(hj(h]h Parameters}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj&ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj"ubj )}(hhh](j )}(hH``struct dma_resv_iter *cursor`` The dma_resv_iter object to initialize h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjGh]hstruct dma_resv_iter *cursor}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjAubj )}(hhh]h)}(h&The dma_resv_iter object to initializeh]h&The dma_resv_iter object to initialize}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hKhj]ubah}(h]h ]h"]h$]h&]uh1j hjAubeh}(h]h ]h"]h$]h&]uh1j hj\hKhj>ubj )}(hK``struct dma_resv *obj`` The dma_resv object which we want to iterate over h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjzubj )}(hhh]h)}(h1The dma_resv object which we want to iterate overh]h1The dma_resv object which we want to iterate over}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjzubeh}(h]h ]h"]h$]h&]uh1j hjhKhj>ubj )}(hX``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage.h](j )}(h``enum dma_resv_usage usage``h]j)}(hjh]henum dma_resv_usage usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(hjҔhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjϔubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjΔhKhj>ubeh}(h]h ]h"]h$]h&]uh1j hj"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_end (C function)c.dma_resv_iter_endhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(h5void dma_resv_iter_end (struct dma_resv_iter *cursor)h]j )}(h4void dma_resv_iter_end(struct dma_resv_iter *cursor)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj!hKubj )}(hdma_resv_iter_endh]j )}(hdma_resv_iter_endh]hdma_resv_iter_end}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhj!hKubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hjPhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjLubj )}(h h]h }(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjLubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjkubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjpmodnameN classnameNjj)}j]jN)}jFj6sbc.dma_resv_iter_endasbuh1hhjLubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjLubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjLubj )}(hcursorh]hcursor}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjLubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjHubah}(h]h ]h"]h$]h&]jjuh1jhjhhhj!hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj hhhj!hKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj!hKhjhhubj@ )}(hhh]h)}(hcleanup a dma_resv_iter objecth]hcleanup a dma_resv_iter object}(hjӕhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjЕhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj!hKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(h**Parameters** ``struct dma_resv_iter *cursor`` the dma_resv_iter object which should be cleaned up **Description** Make sure that the reference to the fence in the cursor is properly dropped.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]j )}(hU``struct dma_resv_iter *cursor`` the dma_resv_iter object which should be cleaned up h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjh]hstruct dma_resv_iter *cursor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(h3the dma_resv_iter object which should be cleaned uph]h3the dma_resv_iter object which should be cleaned up}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hKhj*ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj)hKhj ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjOh]h Description}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjMubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubh)}(hLMake sure that the reference to the fence in the cursor is properly dropped.h]hLMake sure that the reference to the fence in the cursor is properly dropped.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_usage (C function)c.dma_resv_iter_usagehNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hFenum dma_resv_usage dma_resv_iter_usage (struct dma_resv_iter *cursor)h]j )}(hEenum dma_resv_usage dma_resv_iter_usage(struct dma_resv_iter *cursor)h](j )}(hj*h]henum}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_resv_iter_usagesbc.dma_resv_iter_usageasbuh1hhjhhhjhMubj )}(h h]h }(hjԖhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_resv_iter_usageh]j )}(hjіh]hdma_resv_iter_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj!modnameN classnameNjj)}j]jϖc.dma_resv_iter_usageasbuh1hhjubj )}(h h]h }(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjKhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hcursorh]hcursor}(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h%Return the usage of the current fenceh]h%Return the usage of the current fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(h**Parameters** ``struct dma_resv_iter *cursor`` the cursor of the current position **Description** Returns the usage of the currently processed fence.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]j )}(hD``struct dma_resv_iter *cursor`` the cursor of the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hj×h]hstruct dma_resv_iter *cursor}(hjŗhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(h"the cursor of the current positionh]h"the cursor of the current position}(hjܗhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjؗhKhjٗubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjؗhKhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubh)}(h3Returns the usage of the currently processed fence.h]h3Returns the usage of the currently processed fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_resv_iter_is_restarted (C function)c.dma_resv_iter_is_restartedhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(h>bool dma_resv_iter_is_restarted (struct dma_resv_iter *cursor)h]j )}(h=bool dma_resv_iter_is_restarted(struct dma_resv_iter *cursor)h](jK)}(hjE_h]hbool}(hjChhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj?hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM ubj )}(h h]h }(hjQhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?hhhjPhM ubj )}(hdma_resv_iter_is_restartedh]j )}(hdma_resv_iter_is_restartedh]hdma_resv_iter_is_restarted}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj?hhhjPhM ubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjesbc.dma_resv_iter_is_restartedasbuh1hhj{ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubjc)}(hj h]h*}(hj˘hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj{ubj )}(hcursorh]hcursor}(hjؘhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjwubah}(h]h ]h"]h$]h&]jjuh1jhj?hhhjPhM ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj;hhhjPhM ubah}(h]j6ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjPhM hj8hhubj@ )}(hhh]h)}(h/test if this is the first fence after a restarth]h/test if this is the first fence after a restart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hj8hhhjPhM ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(h**Parameters** ``struct dma_resv_iter *cursor`` the cursor with the current position **Description** Return true if this is the first fence in an iteration after a restart.h](h)}(h**Parameters**h]jq )}(hj$h]h Parameters}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj"ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM hjubj )}(hhh]j )}(hF``struct dma_resv_iter *cursor`` the cursor with the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjCh]hstruct dma_resv_iter *cursor}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM hj=ubj )}(hhh]h)}(h$the cursor with the current positionh]h$the cursor with the current position}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhM hjYubah}(h]h ]h"]h$]h&]uh1j hj=ubeh}(h]h ]h"]h$]h&]uh1j hjXhM hj:ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj~h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj|ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM hjubh)}(hGReturn true if this is the first fence in an iteration after a restart.h]hGReturn true if this is the first fence in an iteration after a restart.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j *dma_resv_for_each_fence_unlocked (C macro)"c.dma_resv_for_each_fence_unlockedhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(h dma_resv_for_each_fence_unlockedh]j )}(h dma_resv_for_each_fence_unlockedh]j )}(h dma_resv_for_each_fence_unlockedh]j )}(hjh]h dma_resv_for_each_fence_unlocked}(hjǙhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjÙubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM!ubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjڙhM!ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjڙhM!hjhhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hjhhhjڙhM!ubeh}(h]h ](jmacroeh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubh)}(h4``dma_resv_for_each_fence_unlocked (cursor, fence)``h]j)}(hjh]h0dma_resv_for_each_fence_unlocked (cursor, fence)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM#hj;bhhubh)}(hunlocked fence iterator h]h)}(hunlocked fence iteratorh]hunlocked fence iterator}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubah}(h]h ]h"]h$]h&]uh1hhj!hMhj;bhhubjg )}(hX**Parameters** ``cursor`` a struct dma_resv_iter pointer ``fence`` the current fence **Description** Iterate over the fences in a struct dma_resv object without holding the :c:type:`dma_resv.lock ` and using RCU instead. The cursor needs to be initialized with dma_resv_iter_begin() and cleaned up with dma_resv_iter_end(). Inside the iterator a reference to the dma_fence is held and the RCU lock dropped. Beware that the iterator can be restarted when the struct dma_resv for **cursor** is modified. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the lock iterator dma_resv_for_each_fence() whenever possible.h](h)}(h**Parameters**h]jq )}(hj.h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj,ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj(ubj )}(hhh](j )}(h*``cursor`` a struct dma_resv_iter pointer h](j )}(h ``cursor``h]j)}(hjMh]hcursor}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjGubj )}(hhh]h)}(ha struct dma_resv_iter pointerh]ha struct dma_resv_iter pointer}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhMhjcubah}(h]h ]h"]h$]h&]uh1j hjGubeh}(h]h ]h"]h$]h&]uh1j hjbhMhjDubj )}(h``fence`` the current fence h](j )}(h ``fence``h]j)}(hjh]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjDubeh}(h]h ]h"]h$]h&]uh1j hj(ubh)}(h**Description**h]jq )}(hjh]h Description}(hjÚhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj(ubh)}(hX;Iterate over the fences in a struct dma_resv object without holding the :c:type:`dma_resv.lock ` and using RCU instead. The cursor needs to be initialized with dma_resv_iter_begin() and cleaned up with dma_resv_iter_end(). Inside the iterator a reference to the dma_fence is held and the RCU lock dropped.h](hHIterate over the fences in a struct dma_resv object without holding the }(hjךhhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjh]h dma_resv.lock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjߚubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjךubh and using RCU instead. The cursor needs to be initialized with dma_resv_iter_begin() and cleaned up with dma_resv_iter_end(). Inside the iterator a reference to the dma_fence is held and the RCU lock dropped.}(hjךhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhj(ubh)}(hXBeware that the iterator can be restarted when the struct dma_resv for **cursor** is modified. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the lock iterator dma_resv_for_each_fence() whenever possible.h](hGBeware that the iterator can be restarted when the struct dma_resv for }(hj hhhNhNubjq )}(h **cursor**h]hcursor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubh is modified. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the lock iterator dma_resv_for_each_fence() whenever possible.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_resv_for_each_fence (C macro)c.dma_resv_for_each_fencehNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hdma_resv_for_each_fenceh]j )}(hdma_resv_for_each_fenceh]j )}(hdma_resv_for_each_fenceh]j )}(hjDh]hdma_resv_for_each_fence}(hjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjFhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM2ubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjBhhhjahM2ubah}(h]j=ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjahM2hj?hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hj?hhhjahM2ubeh}(h]h ](jmacroeh"]h$]h&]j` jja jzjb jzjc jd je uh1j hhhj;bhNhNubh)}(h7``dma_resv_for_each_fence (cursor, obj, usage, fence)``h]j)}(hjh]h3dma_resv_for_each_fence (cursor, obj, usage, fence)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM4hj;bhhubh)}(hfence iterator h]h)}(hfence iteratorh]hfence iterator}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM&hjubah}(h]h ]h"]h$]h&]uh1hhjhM&hj;bhhubjg )}(hX**Parameters** ``cursor`` a struct dma_resv_iter pointer ``obj`` a dma_resv object pointer ``usage`` controls which fences to return ``fence`` the current fence **Description** Iterate over the fences in a struct dma_resv object while holding the :c:type:`dma_resv.lock `. **all_fences** controls if the shared fences are returned as well. The cursor initialisation is part of the iterator and the fence stays valid as long as the lock is held and so no extra reference to the fence is taken.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM*hjubj )}(hhh](j )}(h*``cursor`` a struct dma_resv_iter pointer h](j )}(h ``cursor``h]j)}(hjԛh]hcursor}(hj֛hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjқubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM'hjΛubj )}(hhh]h)}(ha struct dma_resv_iter pointerh]ha struct dma_resv_iter pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM'hjubah}(h]h ]h"]h$]h&]uh1j hjΛubeh}(h]h ]h"]h$]h&]uh1j hjhM'hj˛ubj )}(h"``obj`` a dma_resv object pointer h](j )}(h``obj``h]j)}(hj h]hobj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM(hjubj )}(hhh]h)}(ha dma_resv object pointerh]ha dma_resv object pointer}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hM(hj#ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj"hM(hj˛ubj )}(h*``usage`` controls which fences to return h](j )}(h ``usage``h]j)}(hjFh]husage}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM)hj@ubj )}(hhh]h)}(hcontrols which fences to returnh]hcontrols which fences to return}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hM)hj\ubah}(h]h ]h"]h$]h&]uh1j hj@ubeh}(h]h ]h"]h$]h&]uh1j hj[hM)hj˛ubj )}(h``fence`` the current fence h](j )}(h ``fence``h]j)}(hjh]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM*hjyubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM*hjubah}(h]h ]h"]h$]h&]uh1j hjyubeh}(h]h ]h"]h$]h&]uh1j hjhM*hj˛ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM,hjubh)}(hXEIterate over the fences in a struct dma_resv object while holding the :c:type:`dma_resv.lock `. **all_fences** controls if the shared fences are returned as well. The cursor initialisation is part of the iterator and the fence stays valid as long as the lock is held and so no extra reference to the fence is taken.h](hFIterate over the fences in a struct dma_resv object while holding the }(hjМhhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjڜh]h dma_resv.lock}(hjܜhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj؜ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM,hjМubh. }(hjМhhhNhNubjq )}(h**all_fences**h]h all_fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjМubh controls if the shared fences are returned as well. The cursor initialisation is part of the iterator and the fence stays valid as long as the lock is held and so no extra reference to the fence is taken.}(hjМhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM,hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_lock (C function)c.dma_resv_lockhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hDint dma_resv_lock (struct dma_resv *obj, struct ww_acquire_ctx *ctx)h]j )}(hCint dma_resv_lock(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](jK)}(hinth]hint}(hj4hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj0hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMVubj )}(h h]h }(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0hhhjBhMVubj )}(h dma_resv_lockh]j )}(h dma_resv_lockh]h dma_resv_lock}(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj0hhhjBhMVubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubj )}(h h]h }(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjWsbc.dma_resv_lockasbuh1hhjmubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjmubj )}(hobjh]hobj}(hjʝhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjiubj)}(hstruct ww_acquire_ctx *ctxh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjߝubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjߝubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_resv_lockasbuh1hhjߝubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjߝubjc)}(hj h]h*}(hj-hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjߝubj )}(hctxh]hctx}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjߝubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjiubeh}(h]h ]h"]h$]h&]jjuh1jhj0hhhjBhMVubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj,hhhjBhMVubah}(h]j'ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjBhMVhj)hhubj@ )}(hhh]h)}(hlock the reservation objecth]hlock the reservation object}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMAhjahhubah}(h]h ]h"]h$]h&]uh1j? hj)hhhjBhMVubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j|jb j|jc jd je uh1j hhhj;bhNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``struct ww_acquire_ctx *ctx`` the locking context **Description** Locks the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer. As the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as **ctx**. When a die situation is indicated by returning -EDEADLK all locks held by **ctx** must be unlocked and then dma_resv_lock_slow() called on **obj**. Unlocked by calling dma_resv_unlock(). See also dma_resv_lock_interruptible() for the interruptible variant.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMEhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMBhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMBhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMBhjubj )}(h3``struct ww_acquire_ctx *ctx`` the locking context h](j )}(h``struct ww_acquire_ctx *ctx``h]j)}(hjޞh]hstruct ww_acquire_ctx *ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjܞubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMChj؞ubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMChjubah}(h]h ]h"]h$]h&]uh1j hj؞ubeh}(h]h ]h"]h$]h&]uh1j hjhMChjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMEhjubh)}(hLocks the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer.h]hLocks the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMEhjubh)}(hXAs the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as **ctx**.h](hAs the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as }(hj>hhhNhNubjq )}(h**ctx**h]hctx}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj>ubh.}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMJhjubh)}(hWhen a die situation is indicated by returning -EDEADLK all locks held by **ctx** must be unlocked and then dma_resv_lock_slow() called on **obj**.h](hJWhen a die situation is indicated by returning -EDEADLK all locks held by }(hj_hhhNhNubjq )}(h**ctx**h]hctx}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj_ubh: must be unlocked and then dma_resv_lock_slow() called on }(hj_hhhNhNubjq )}(h**obj**h]hobj}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj_ubh.}(hj_hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMOhjubh)}(h&Unlocked by calling dma_resv_unlock().h]h&Unlocked by calling dma_resv_unlock().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMRhjubh)}(hESee also dma_resv_lock_interruptible() for the interruptible variant.h]hESee also dma_resv_lock_interruptible() for the interruptible variant.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMThjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j (dma_resv_lock_interruptible (C function)c.dma_resv_lock_interruptiblehNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hRint dma_resv_lock_interruptible (struct dma_resv *obj, struct ww_acquire_ctx *ctx)h]j )}(hQint dma_resv_lock_interruptible(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](jK)}(hinth]hint}(hjПhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj̟hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMqubj )}(h h]h }(hjߟhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj̟hhhjޟhMqubj )}(hdma_resv_lock_interruptibleh]j )}(hdma_resv_lock_interruptibleh]hdma_resv_lock_interruptible}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj̟hhhjޟhMqubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj-modnameN classnameNjj)}j]jN)}jFjsbc.dma_resv_lock_interruptibleasbuh1hhj ubj )}(h h]h }(hjKhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjc)}(hj h]h*}(hjYhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj ubj )}(hobjh]hobj}(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct ww_acquire_ctx *ctxh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jGc.dma_resv_lock_interruptibleasbuh1hhj{ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubjc)}(hj h]h*}(hjɠhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj{ubj )}(hctxh]hctx}(hj֠hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhj̟hhhjޟhMqubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjȟhhhjޟhMqubah}(h]jßah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjޟhMqhjşhhubj@ )}(hhh]h)}(hlock the reservation objecth]hlock the reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM]hjhhubah}(h]h ]h"]h$]h&]uh1j? hjşhhhjޟhMqubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(hX[**Parameters** ``struct dma_resv *obj`` the reservation object ``struct ww_acquire_ctx *ctx`` the locking context **Description** Locks the reservation object interruptible for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer. As the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as **ctx**. When a die situation is indicated by returning -EDEADLK all locks held by **ctx** must be unlocked and then dma_resv_lock_slow_interruptible() called on **obj**. Unlocked by calling dma_resv_unlock().h](h)}(h**Parameters**h]jq )}(hj"h]h Parameters}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMahjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjAh]hstruct dma_resv *obj}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM^hj;ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhM^hjWubah}(h]h ]h"]h$]h&]uh1j hj;ubeh}(h]h ]h"]h$]h&]uh1j hjVhM^hj8ubj )}(h3``struct ww_acquire_ctx *ctx`` the locking context h](j )}(h``struct ww_acquire_ctx *ctx``h]j)}(hjzh]hstruct ww_acquire_ctx *ctx}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM_hjtubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM_hjubah}(h]h ]h"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]uh1j hjhM_hj8ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMahjubh)}(hXLocks the reservation object interruptible for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer.h]hXLocks the reservation object interruptible for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer.}(hjˡhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMahjubh)}(hXAs the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as **ctx**.h](hAs the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as }(hjڡhhhNhNubjq )}(h**ctx**h]hctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjڡubh.}(hjڡhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMfhjubh)}(hWhen a die situation is indicated by returning -EDEADLK all locks held by **ctx** must be unlocked and then dma_resv_lock_slow_interruptible() called on **obj**.h](hJWhen a die situation is indicated by returning -EDEADLK all locks held by }(hjhhhNhNubjq )}(h**ctx**h]hctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubhH must be unlocked and then dma_resv_lock_slow_interruptible() called on }(hjhhhNhNubjq )}(h**obj**h]hobj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMkhjubh)}(h&Unlocked by calling dma_resv_unlock().h]h&Unlocked by calling dma_resv_unlock().}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMohjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_lock_slow (C function)c.dma_resv_lock_slowhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hJvoid dma_resv_lock_slow (struct dma_resv *obj, struct ww_acquire_ctx *ctx)h]j )}(hIvoid dma_resv_lock_slow(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](jK)}(hvoidh]hvoid}(hj]hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjYhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjYhhhjkhMubj )}(hdma_resv_lock_slowh]j )}(hdma_resv_lock_slowh]hdma_resv_lock_slow}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjYhhhjkhMubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_resv_lock_slowasbuh1hhjubj )}(h h]h }(hjآhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct ww_acquire_ctx *ctxh](j )}(hj h]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj,modnameN classnameNjj)}j]jԢc.dma_resv_lock_slowasbuh1hhjubj )}(h h]h }(hjHhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjVhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hctxh]hctx}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjYhhhjkhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjUhhhjkhMubah}(h]jPah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjkhMhjRhhubj@ )}(hhh]h)}(h$slowpath lock the reservation objecth]h$slowpath lock the reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMxhjhhubah}(h]h ]h"]h$]h&]uh1j? hjRhhhjkhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(hX_**Parameters** ``struct dma_resv *obj`` the reservation object ``struct ww_acquire_ctx *ctx`` the locking context **Description** Acquires the reservation object after a die case. This function will sleep until the lock becomes available. See dma_resv_lock() as well. See also dma_resv_lock_slow_interruptible() for the interruptible variant.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM|hjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjΣh]hstruct dma_resv *obj}(hjУhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj̣ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMyhjȣubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMyhjubah}(h]h ]h"]h$]h&]uh1j hjȣubeh}(h]h ]h"]h$]h&]uh1j hjhMyhjţubj )}(h3``struct ww_acquire_ctx *ctx`` the locking context h](j )}(h``struct ww_acquire_ctx *ctx``h]j)}(hjh]hstruct ww_acquire_ctx *ctx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMzhjubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMzhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMzhjţubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjBh]h Description}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj@ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM|hjubh)}(hAcquires the reservation object after a die case. This function will sleep until the lock becomes available. See dma_resv_lock() as well.h]hAcquires the reservation object after a die case. This function will sleep until the lock becomes available. See dma_resv_lock() as well.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM|hjubh)}(hJSee also dma_resv_lock_slow_interruptible() for the interruptible variant.h]hJSee also dma_resv_lock_slow_interruptible() for the interruptible variant.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j -dma_resv_lock_slow_interruptible (C function)"c.dma_resv_lock_slow_interruptiblehNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hWint dma_resv_lock_slow_interruptible (struct dma_resv *obj, struct ww_acquire_ctx *ctx)h]j )}(hVint dma_resv_lock_slow_interruptible(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(h dma_resv_lock_slow_interruptibleh]j )}(h dma_resv_lock_slow_interruptibleh]h dma_resv_lock_slow_interruptible}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjӤhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjϤubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjϤubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsb"c.dma_resv_lock_slow_interruptibleasbuh1hhjϤubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjϤubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjϤubj )}(hobjh]hobj}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjϤubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjˤubj)}(hstruct ww_acquire_ctx *ctxh](j )}(hj h]hstruct}(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubj )}(h h]h }(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjemodnameN classnameNjj)}j]j "c.dma_resv_lock_slow_interruptibleasbuh1hhjAubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjAubj )}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjˤubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h3slowpath lock the reservation object, interruptibleh]h3slowpath lock the reservation object, interruptible}(hjƥhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjåhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jޥjb jޥjc jd je uh1j hhhj;bhNhNubjg )}(hX/**Parameters** ``struct dma_resv *obj`` the reservation object ``struct ww_acquire_ctx *ctx`` the locking context **Description** Acquires the reservation object interruptible after a die case. This function will sleep until the lock becomes available. See dma_resv_lock_interruptible() as well.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h3``struct ww_acquire_ctx *ctx`` the locking context h](j )}(h``struct ww_acquire_ctx *ctx``h]j)}(hj@h]hstruct ww_acquire_ctx *ctx}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj:ubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhMhjVubah}(h]h ]h"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]uh1j hjUhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj{h]h Description}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjyubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubh)}(hAcquires the reservation object interruptible after a die case. This function will sleep until the lock becomes available. See dma_resv_lock_interruptible() as well.h]hAcquires the reservation object interruptible after a die case. This function will sleep until the lock becomes available. See dma_resv_lock_interruptible() as well.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_trylock (C function)c.dma_resv_trylockhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(h,bool dma_resv_trylock (struct dma_resv *obj)h]j )}(h+bool dma_resv_trylock(struct dma_resv *obj)h](jK)}(hjE_h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hjΦhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjͦhMubj )}(hdma_resv_trylockh]j )}(hdma_resv_trylockh]hdma_resv_trylock}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjܦubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjͦhMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_resv_trylockasbuh1hhjubj )}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjHhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjͦhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjͦhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjͦhMhjhhubj@ )}(hhh]h)}(htrylock the reservation objecth]htrylock the reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj|hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjͦhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Tries to lock the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer. Also note that since no context is provided, no deadlock protection is possible, which is also not needed for a trylock. Returns true if the lock was acquired, false otherwise.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hj§hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj٧hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjէhMhj֧ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjէhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubh)}(hTries to lock the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer.h]hTries to lock the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubh)}(hxAlso note that since no context is provided, no deadlock protection is possible, which is also not needed for a trylock.h]hxAlso note that since no context is provided, no deadlock protection is possible, which is also not needed for a trylock.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubh)}(h7Returns true if the lock was acquired, false otherwise.h]h7Returns true if the lock was acquired, false otherwise.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_is_locked (C function)c.dma_resv_is_lockedhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(h.bool dma_resv_is_locked (struct dma_resv *obj)h]j )}(h-bool dma_resv_is_locked(struct dma_resv *obj)h](jK)}(hjE_h]hbool}(hj^hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjZhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZhhhjkhMubj )}(hdma_resv_is_lockedh]j )}(hdma_resv_is_lockedh]hdma_resv_is_locked}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjZhhhjkhMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_resv_is_lockedasbuh1hhjubj )}(h h]h }(hjبhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjZhhhjkhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjVhhhjkhMubah}(h]jQah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjkhMhjShhubj@ )}(hhh]h)}(h is the reservation object lockedh]h is the reservation object locked}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjShhhjkhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j5jb j5jc jd je uh1j hhhj;bhNhNubjg )}(h**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Returns true if the mutex is locked, false if unlocked.h](h)}(h**Parameters**h]jq )}(hj?h]h Parameters}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj=ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj9ubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj^h]hstruct dma_resv *obj}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjXubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshMhjtubah}(h]h ]h"]h$]h&]uh1j hjXubeh}(h]h ]h"]h$]h&]uh1j hjshMhjUubah}(h]h ]h"]h$]h&]uh1j hj9ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj9ubh)}(h7Returns true if the mutex is locked, false if unlocked.h]h7Returns true if the mutex is locked, false if unlocked.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_resv_locking_ctx (C function)c.dma_resv_locking_ctxhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(hCstruct ww_acquire_ctx * dma_resv_locking_ctx (struct dma_resv *obj)h]j )}(hAstruct ww_acquire_ctx *dma_resv_locking_ctx(struct dma_resv *obj)h](j )}(hj h]hstruct}(hjީhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjکhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjکhhhjhMubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_resv_locking_ctxsbc.dma_resv_locking_ctxasbuh1hhjکhhhjhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjکhhhjhMubjc)}(hj h]h*}(hj,hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjکhhhjhMubj )}(hdma_resv_locking_ctxh]j )}(hjh]hdma_resv_locking_ctx}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjکhhhjhMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjTubj )}(h h]h }(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjTubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjxmodnameN classnameNjj)}j]jc.dma_resv_locking_ctxasbuh1hhjTubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjTubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjTubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjTubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjPubah}(h]h ]h"]h$]h&]jjuh1jhjکhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj֩hhhjhMubah}(h]jѩah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjөhhubj@ )}(hhh]h)}(h+returns the context used to lock the objecth]h+returns the context used to lock the object}(hj٪hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj֪hhubah}(h]h ]h"]h$]h&]uh1j? hjөhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Returns the context used to lock a reservation object or NULL if no context was used or the object is not locked at all. WARNING: This interface is pretty horrible, but TTM needs it because it doesn't pass the struct ww_acquire_ctx around in some very long callchains. Everyone else just uses it to check whether they're holding a reservation or not.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hMhj0ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj/hMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjUh]h Description}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjSubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubh)}(hxReturns the context used to lock a reservation object or NULL if no context was used or the object is not locked at all.h]hxReturns the context used to lock a reservation object or NULL if no context was used or the object is not locked at all.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubh)}(hWARNING: This interface is pretty horrible, but TTM needs it because it doesn't pass the struct ww_acquire_ctx around in some very long callchains. Everyone else just uses it to check whether they're holding a reservation or not.h]hWARNING: This interface is pretty horrible, but TTM needs it because it doesn’t pass the struct ww_acquire_ctx around in some very long callchains. Everyone else just uses it to check whether they’re holding a reservation or not.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_unlock (C function)c.dma_resv_unlockhNtauh1j hj;bhhhNhNubj )}(hhh](j )}(h+void dma_resv_unlock (struct dma_resv *obj)h]j )}(h*void dma_resv_unlock(struct dma_resv *obj)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_resv_unlockh]j )}(hdma_resv_unlockh]hdma_resv_unlock}(hjʫhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjƫubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFj̫sbc.dma_resv_unlockasbuh1hhjubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj2hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjޫubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(hunlock the reservation objecth]hunlock the reservation object}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjfhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj;bhNhNubjg )}(h**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Unlocks the reservation object following exclusive access.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjìhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubh)}(h:Unlocks the reservation object following exclusive access.h]h:Unlocks the reservation object following exclusive access.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj;bhhhNhNubeh}(h]reservation-objectsah ]h"]reservation objectsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h DMA Fencesh]h DMA Fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hDMA fences, represented by :c:type:`struct dma_fence `, are the kernel internal synchronization primitive for DMA operations like GPU rendering, video encoding/decoding, or displaying buffers on a screen.h](hDMA fences, represented by }(hj*hhhNhNubh)}(h&:c:type:`struct dma_fence `h]j)}(hj4h]hstruct dma_fence}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:168: ./drivers/dma-buf/dma-fence.chK'hj*ubh, are the kernel internal synchronization primitive for DMA operations like GPU rendering, video encoding/decoding, or displaying buffers on a screen.}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjQhK'hjhhubh)}(hA fence is initialized using dma_fence_init() and completed using dma_fence_signal(). Fences are associated with a context, allocated through dma_fence_context_alloc(), and all fences on the same context are fully ordered.h]hA fence is initialized using dma_fence_init() and completed using dma_fence_signal(). Fences are associated with a context, allocated through dma_fence_context_alloc(), and all fences on the same context are fully ordered.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:168: ./drivers/dma-buf/dma-fence.chK+hjhhubh)}(hSince the purposes of fences is to facilitate cross-device and cross-application synchronization, there's multiple ways to use one:h]hSince the purposes of fences is to facilitate cross-device and cross-application synchronization, there’s multiple ways to use one:}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:168: ./drivers/dma-buf/dma-fence.chK0hjhhubh)}(hhh](h)}(hIndividual fences can be exposed as a :c:type:`sync_file`, accessed as a file descriptor from userspace, created by calling sync_file_create(). This is called explicit fencing, since userspace passes around explicit synchronization points. h]h)}(hIndividual fences can be exposed as a :c:type:`sync_file`, accessed as a file descriptor from userspace, created by calling sync_file_create(). This is called explicit fencing, since userspace passes around explicit synchronization points.h](h&Individual fences can be exposed as a }(hjhhhNhNubh)}(h:c:type:`sync_file`h]j)}(hjh]h sync_file}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj sync_fileuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:168: ./drivers/dma-buf/dma-fence.chK3hjubh, accessed as a file descriptor from userspace, created by calling sync_file_create(). This is called explicit fencing, since userspace passes around explicit synchronization points.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK3hj}ubah}(h]h ]h"]h$]h&]uh1hhjzubh)}(hSome subsystems also have their own explicit fencing primitives, like :c:type:`drm_syncobj`. Compared to :c:type:`sync_file`, a :c:type:`drm_syncobj` allows the underlying fence to be updated. h]h)}(hSome subsystems also have their own explicit fencing primitives, like :c:type:`drm_syncobj`. Compared to :c:type:`sync_file`, a :c:type:`drm_syncobj` allows the underlying fence to be updated.h](hFSome subsystems also have their own explicit fencing primitives, like }(hjhhhNhNubh)}(h:c:type:`drm_syncobj`h]j)}(hjǭh]h drm_syncobj}(hjɭhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjŭubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj drm_syncobjuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:168: ./drivers/dma-buf/dma-fence.chK8hjubh. Compared to }(hjhhhNhNubh)}(h:c:type:`sync_file`h]j)}(hjh]h sync_file}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj sync_fileuh1hhjhK8hjubh, a }(hjhhhNhNubh)}(h:c:type:`drm_syncobj`h]j)}(hjh]h drm_syncobj}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj drm_syncobjuh1hhjhK8hjubh+ allows the underlying fence to be updated.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK8hjubah}(h]h ]h"]h$]h&]uh1hhjzubh)}(hXThen there's also implicit fencing, where the synchronization points are implicitly passed around as part of shared :c:type:`dma_buf` instances. Such implicit fences are stored in :c:type:`struct dma_resv ` through the :c:type:`dma_buf.resv ` pointer. h]h)}(hXThen there's also implicit fencing, where the synchronization points are implicitly passed around as part of shared :c:type:`dma_buf` instances. Such implicit fences are stored in :c:type:`struct dma_resv ` through the :c:type:`dma_buf.resv ` pointer.h](hvThen there’s also implicit fencing, where the synchronization points are implicitly passed around as part of shared }(hj?hhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjIh]hdma_buf}(hjKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:168: ./drivers/dma-buf/dma-fence.chK`h]j)}(hjmh]hstruct dma_resv}(hjohhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hhjfhK`h]j)}(hjh]h dma_buf.resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hhjfhKj?uh1hhjhK3hjhhubh)}(hhh](h)}(hDMA Fence Cross-Driver Contracth]hDMA Fence Cross-Driver Contract}(hjƮhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjîhhhhhKubh)}(hbSince :c:type:`dma_fence` provide a cross driver contract, all drivers must follow the same rules:h](hSince }(hjԮhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjޮh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjܮubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKEhjԮubhI provide a cross driver contract, all drivers must follow the same rules:}(hjԮhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKEhjîhhubh)}(hhh](h)}(hX Fences must complete in a reasonable time. Fences which represent kernels and shaders submitted by userspace, which could run forever, must be backed up by timeout and gpu hang recovery code. Minimally that code must prevent further command submission and force complete all in-flight fences, e.g. when the driver or hardware do not support gpu reset, or if the gpu reset failed for some reason. Ideally the driver supports gpu recovery which only affects the offending userspace context, and no other userspace submissions. h]h)}(hX Fences must complete in a reasonable time. Fences which represent kernels and shaders submitted by userspace, which could run forever, must be backed up by timeout and gpu hang recovery code. Minimally that code must prevent further command submission and force complete all in-flight fences, e.g. when the driver or hardware do not support gpu reset, or if the gpu reset failed for some reason. Ideally the driver supports gpu recovery which only affects the offending userspace context, and no other userspace submissions.h]hX Fences must complete in a reasonable time. Fences which represent kernels and shaders submitted by userspace, which could run forever, must be backed up by timeout and gpu hang recovery code. Minimally that code must prevent further command submission and force complete all in-flight fences, e.g. when the driver or hardware do not support gpu reset, or if the gpu reset failed for some reason. Ideally the driver supports gpu recovery which only affects the offending userspace context, and no other userspace submissions.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKHhj ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hX*Drivers may have different ideas of what completion within a reasonable time means. Some hang recovery code uses a fixed timeout, others a mix between observing forward progress and increasingly strict timeouts. Drivers should not try to second guess timeout handling of fences from other drivers. h]h)}(hX)Drivers may have different ideas of what completion within a reasonable time means. Some hang recovery code uses a fixed timeout, others a mix between observing forward progress and increasingly strict timeouts. Drivers should not try to second guess timeout handling of fences from other drivers.h]hX)Drivers may have different ideas of what completion within a reasonable time means. Some hang recovery code uses a fixed timeout, others a mix between observing forward progress and increasingly strict timeouts. Drivers should not try to second guess timeout handling of fences from other drivers.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKQhj"ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hTo ensure there's no deadlocks of dma_fence_wait() against other locks drivers should annotate all code required to reach dma_fence_signal(), which completes the fences, with dma_fence_begin_signalling() and dma_fence_end_signalling(). h]h)}(hTo ensure there's no deadlocks of dma_fence_wait() against other locks drivers should annotate all code required to reach dma_fence_signal(), which completes the fences, with dma_fence_begin_signalling() and dma_fence_end_signalling().h]hTo ensure there’s no deadlocks of dma_fence_wait() against other locks drivers should annotate all code required to reach dma_fence_signal(), which completes the fences, with dma_fence_begin_signalling() and dma_fence_end_signalling().}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKWhj;ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXDrivers are allowed to call dma_fence_wait() while holding dma_resv_lock(). This means any code required for fence completion cannot acquire a :c:type:`dma_resv` lock. Note that this also pulls in the entire established locking hierarchy around dma_resv_lock() and dma_resv_unlock(). h]h)}(hXDrivers are allowed to call dma_fence_wait() while holding dma_resv_lock(). This means any code required for fence completion cannot acquire a :c:type:`dma_resv` lock. Note that this also pulls in the entire established locking hierarchy around dma_resv_lock() and dma_resv_unlock().h](hDrivers are allowed to call dma_fence_wait() while holding dma_resv_lock(). This means any code required for fence completion cannot acquire a }(hjXhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjbh]hdma_resv}(hjdhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chK\hjXubhz lock. Note that this also pulls in the entire established locking hierarchy around dma_resv_lock() and dma_resv_unlock().}(hjXhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK\hjTubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hDrivers are allowed to call dma_fence_wait() from their :c:type:`shrinker` callbacks. This means any code required for fence completion cannot allocate memory with GFP_KERNEL. h]h)}(hDrivers are allowed to call dma_fence_wait() from their :c:type:`shrinker` callbacks. This means any code required for fence completion cannot allocate memory with GFP_KERNEL.h](h8Drivers are allowed to call dma_fence_wait() from their }(hjhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hjh]hshrinker}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKahjubhe callbacks. This means any code required for fence completion cannot allocate memory with GFP_KERNEL.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKahjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXDrivers are allowed to call dma_fence_wait() from their :c:type:`mmu_notifier` respectively :c:type:`mmu_interval_notifier` callbacks. This means any code required for fence completion cannot allocate memory with GFP_NOFS or GFP_NOIO. Only GFP_ATOMIC is permissible, which might fail. h]h)}(hXDrivers are allowed to call dma_fence_wait() from their :c:type:`mmu_notifier` respectively :c:type:`mmu_interval_notifier` callbacks. This means any code required for fence completion cannot allocate memory with GFP_NOFS or GFP_NOIO. Only GFP_ATOMIC is permissible, which might fail.h](h8Drivers are allowed to call dma_fence_wait() from their }(hjЯhhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hjگh]h mmu_notifier}(hjܯhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjدubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKehjЯubh respectively }(hjЯhhhNhNubh)}(h:c:type:`mmu_interval_notifier`h]j)}(hjh]hmmu_interval_notifier}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmmu_interval_notifieruh1hhjhKehjЯubh callbacks. This means any code required for fence completion cannot allocate memory with GFP_NOFS or GFP_NOIO. Only GFP_ATOMIC is permissible, which might fail.}(hjЯhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKehj̯ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j uh1hhjhKHhjîhhubh)}(hX5Note that only GPU drivers have a reasonable excuse for both requiring :c:type:`mmu_interval_notifier` and :c:type:`shrinker` callbacks at the same time as having to track asynchronous compute work using :c:type:`dma_fence`. No driver outside of drivers/gpu should ever call dma_fence_wait() in such contexts.h](hGNote that only GPU drivers have a reasonable excuse for both requiring }(hj1hhhNhNubh)}(h:c:type:`mmu_interval_notifier`h]j)}(hj;h]hmmu_interval_notifier}(hj=hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmmu_interval_notifieruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKjhj1ubh and }(hj1hhhNhNubh)}(h:c:type:`shrinker`h]j)}(hj_h]hshrinker}(hjahhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hhjXhKjhj1ubhO callbacks at the same time as having to track asynchronous compute work using }(hj1hhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhjXhKjhj1ubhV. No driver outside of drivers/gpu should ever call dma_fence_wait() in such contexts.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjXhKjhjîhhubeh}(h]dma-fence-cross-driver-contractah ]h"]dma fence cross-driver contractah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h DMA Fence Signalling Annotationsh]h DMA Fence Signalling Annotations}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hProving correctness of all the kernel code around :c:type:`dma_fence` through code review and testing is tricky for a few reasons:h](h2Proving correctness of all the kernel code around }(hj°hhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hj̰h]h dma_fence}(hjΰhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjʰubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhj°ubh= through code review and testing is tricky for a few reasons:}(hj°hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjhhubh)}(hhh](h)}(hXIt is a cross-driver contract, and therefore all drivers must follow the same rules for lock nesting order, calling contexts for various functions and anything else significant for in-kernel interfaces. But it is also impossible to test all drivers in a single machine, hence brute-force N vs. N testing of all combinations is impossible. Even just limiting to the possible combinations is infeasible. h]h)}(hXIt is a cross-driver contract, and therefore all drivers must follow the same rules for lock nesting order, calling contexts for various functions and anything else significant for in-kernel interfaces. But it is also impossible to test all drivers in a single machine, hence brute-force N vs. N testing of all combinations is impossible. Even just limiting to the possible combinations is infeasible.h]hXIt is a cross-driver contract, and therefore all drivers must follow the same rules for lock nesting order, calling contexts for various functions and anything else significant for in-kernel interfaces. But it is also impossible to test all drivers in a single machine, hence brute-force N vs. N testing of all combinations is impossible. Even just limiting to the possible combinations is infeasible.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXThere is an enormous amount of driver code involved. For render drivers there's the tail of command submission, after fences are published, scheduler code, interrupt and workers to process job completion, and timeout, gpu reset and gpu hang recovery code. Plus for integration with core mm with have :c:type:`mmu_notifier`, respectively :c:type:`mmu_interval_notifier`, and :c:type:`shrinker`. For modesetting drivers there's the commit tail functions between when fences for an atomic modeset are published, and when the corresponding vblank completes, including any interrupt processing and related workers. Auditing all that code, across all drivers, is not feasible. h]h)}(hXThere is an enormous amount of driver code involved. For render drivers there's the tail of command submission, after fences are published, scheduler code, interrupt and workers to process job completion, and timeout, gpu reset and gpu hang recovery code. Plus for integration with core mm with have :c:type:`mmu_notifier`, respectively :c:type:`mmu_interval_notifier`, and :c:type:`shrinker`. For modesetting drivers there's the commit tail functions between when fences for an atomic modeset are published, and when the corresponding vblank completes, including any interrupt processing and related workers. Auditing all that code, across all drivers, is not feasible.h](hX.There is an enormous amount of driver code involved. For render drivers there’s the tail of command submission, after fences are published, scheduler code, interrupt and workers to process job completion, and timeout, gpu reset and gpu hang recovery code. Plus for integration with core mm with have }(hjhhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hjh]h mmu_notifier}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjubh, respectively }(hjhhhNhNubh)}(h:c:type:`mmu_interval_notifier`h]j)}(hjBh]hmmu_interval_notifier}(hjDhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmmu_interval_notifieruh1hhj;hKhjubh, and }(hjhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hjeh]hshrinker}(hjghhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hhj;hKhjubhX. For modesetting drivers there’s the commit tail functions between when fences for an atomic modeset are published, and when the corresponding vblank completes, including any interrupt processing and related workers. Auditing all that code, across all drivers, is not feasible.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj;hKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXDue to how many other subsystems are involved and the locking hierarchies this pulls in there is extremely thin wiggle-room for driver-specific differences. :c:type:`dma_fence` interacts with almost all of the core memory handling through page fault handlers via :c:type:`dma_resv`, dma_resv_lock() and dma_resv_unlock(). On the other side it also interacts through all allocation sites through :c:type:`mmu_notifier` and :c:type:`shrinker`. h]h)}(hXDue to how many other subsystems are involved and the locking hierarchies this pulls in there is extremely thin wiggle-room for driver-specific differences. :c:type:`dma_fence` interacts with almost all of the core memory handling through page fault handlers via :c:type:`dma_resv`, dma_resv_lock() and dma_resv_unlock(). On the other side it also interacts through all allocation sites through :c:type:`mmu_notifier` and :c:type:`shrinker`.h](hDue to how many other subsystems are involved and the locking hierarchies this pulls in there is extremely thin wiggle-room for driver-specific differences. }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjubhW interacts with almost all of the core memory handling through page fault handlers via }(hjhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjıh]hdma_resv}(hjƱhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj±ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hhjhKhjubhr, dma_resv_lock() and dma_resv_unlock(). On the other side it also interacts through all allocation sites through }(hjhhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hjh]h mmu_notifier}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hhjhKhjubh and }(hjhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hj h]hshrinker}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hhjhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j uh1hhj hKhjhhubh)}(hXFurthermore lockdep does not handle cross-release dependencies, which means any deadlocks between dma_fence_wait() and dma_fence_signal() can't be caught at runtime with some quick testing. The simplest example is one thread waiting on a :c:type:`dma_fence` while holding a lock::h](hFurthermore lockdep does not handle cross-release dependencies, which means any deadlocks between dma_fence_wait() and dma_fence_signal() can’t be caught at runtime with some quick testing. The simplest example is one thread waiting on a }(hj=hhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjGh]h dma_fence}(hjIhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhj=ubh while holding a lock:}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjdhKhjhhubj)}(h&lock(A); dma_fence_wait(B); unlock(A);h]h&lock(A); dma_fence_wait(B); unlock(A);}hjosbah}(h]h ]h"]h$]h&]jjuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjhhubh)}(hwhile the other thread is stuck trying to acquire the same lock, which prevents it from signalling the fence the previous thread is stuck waiting on::h]hwhile the other thread is stuck trying to acquire the same lock, which prevents it from signalling the fence the previous thread is stuck waiting on:}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjhhubj)}(h(lock(A); unlock(A); dma_fence_signal(B);h]h(lock(A); unlock(A); dma_fence_signal(B);}hjsbah}(h]h ]h"]h$]h&]jjuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjhhubh)}(hBy manually annotating all code relevant to signalling a :c:type:`dma_fence` we can teach lockdep about these dependencies, which also helps with the validation headache since now lockdep can check all the rules for us::h](h9By manually annotating all code relevant to signalling a }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjubh we can teach lockdep about these dependencies, which also helps with the validation headache since now lockdep can check all the rules for us:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjòhKhjhhubj)}(hqcookie = dma_fence_begin_signalling(); lock(A); unlock(A); dma_fence_signal(B); dma_fence_end_signalling(cookie);h]hqcookie = dma_fence_begin_signalling(); lock(A); unlock(A); dma_fence_signal(B); dma_fence_end_signalling(cookie);}hjβsbah}(h]h ]h"]h$]h&]jjuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjhhubh)}(hFor using dma_fence_begin_signalling() and dma_fence_end_signalling() to annotate critical sections the following rules need to be observed:h]hFor using dma_fence_begin_signalling() and dma_fence_end_signalling() to annotate critical sections the following rules need to be observed:}(hjݲhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjhhubh)}(hhh](h)}(hXgAll code necessary to complete a :c:type:`dma_fence` must be annotated, from the point where a fence is accessible to other threads, to the point where dma_fence_signal() is called. Un-annotated code can contain deadlock issues, and due to the very strict rules and many corner cases it is infeasible to catch these just with review or normal stress testing. h]h)}(hXfAll code necessary to complete a :c:type:`dma_fence` must be annotated, from the point where a fence is accessible to other threads, to the point where dma_fence_signal() is called. Un-annotated code can contain deadlock issues, and due to the very strict rules and many corner cases it is infeasible to catch these just with review or normal stress testing.h](h!All code necessary to complete a }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjubhX2 must be annotated, from the point where a fence is accessible to other threads, to the point where dma_fence_signal() is called. Un-annotated code can contain deadlock issues, and due to the very strict rules and many corner cases it is infeasible to catch these just with review or normal stress testing.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h:c:type:`struct dma_resv ` deserves a special note, since the readers are only protected by rcu. This means the signalling critical section starts as soon as the new fences are installed, even before dma_resv_unlock() is called. h]h)}(h:c:type:`struct dma_resv ` deserves a special note, since the readers are only protected by rcu. This means the signalling critical section starts as soon as the new fences are installed, even before dma_resv_unlock() is called.h](h)}(h$:c:type:`struct dma_resv `h]j)}(hj5h]hstruct dma_resv}(hj7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chMhj/ubh deserves a special note, since the readers are only protected by rcu. This means the signalling critical section starts as soon as the new fences are installed, even before dma_resv_unlock() is called.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjRhMhj+ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXqThe only exception are fast paths and opportunistic signalling code, which calls dma_fence_signal() purely as an optimization, but is not required to guarantee completion of a :c:type:`dma_fence`. The usual example is a wait IOCTL which calls dma_fence_signal(), while the mandatory completion path goes through a hardware interrupt and possible job completion worker. h]h)}(hXpThe only exception are fast paths and opportunistic signalling code, which calls dma_fence_signal() purely as an optimization, but is not required to guarantee completion of a :c:type:`dma_fence`. The usual example is a wait IOCTL which calls dma_fence_signal(), while the mandatory completion path goes through a hardware interrupt and possible job completion worker.h](hThe only exception are fast paths and opportunistic signalling code, which calls dma_fence_signal() purely as an optimization, but is not required to guarantee completion of a }(hjghhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjqh]h dma_fence}(hjshhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chMhjgubh. The usual example is a wait IOCTL which calls dma_fence_signal(), while the mandatory completion path goes through a hardware interrupt and possible job completion worker.}(hjghhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjcubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXMTo aid composability of code, the annotations can be freely nested, as long as the overall locking hierarchy is consistent. The annotations also work both in interrupt and process context. Due to implementation details this requires that callers pass an opaque cookie from dma_fence_begin_signalling() to dma_fence_end_signalling(). h]h)}(hXLTo aid composability of code, the annotations can be freely nested, as long as the overall locking hierarchy is consistent. The annotations also work both in interrupt and process context. Due to implementation details this requires that callers pass an opaque cookie from dma_fence_begin_signalling() to dma_fence_end_signalling().h]hXLTo aid composability of code, the annotations can be freely nested, as long as the overall locking hierarchy is consistent. The annotations also work both in interrupt and process context. Due to implementation details this requires that callers pass an opaque cookie from dma_fence_begin_signalling() to dma_fence_end_signalling().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chM hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hX&Validation against the cross driver contract is implemented by priming lockdep with the relevant hierarchy at boot-up. This means even just testing with a single device is enough to validate a driver, at least as far as deadlocks with dma_fence_wait() against dma_fence_signal() are concerned. h]h)}(hX%Validation against the cross driver contract is implemented by priming lockdep with the relevant hierarchy at boot-up. This means even just testing with a single device is enough to validate a driver, at least as far as deadlocks with dma_fence_wait() against dma_fence_signal() are concerned.h]hX%Validation against the cross driver contract is implemented by priming lockdep with the relevant hierarchy at boot-up. This means even just testing with a single device is enough to validate a driver, at least as far as deadlocks with dma_fence_wait() against dma_fence_signal() are concerned.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j uh1hhjhKhjhhubeh}(h] dma-fence-signalling-annotationsah ]h"] dma fence signalling annotationsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fence Deadline Hintsh]hDMA Fence Deadline Hints}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj߳hhhhhKubh)}(hX`In an ideal world, it would be possible to pipeline a workload sufficiently that a utilization based device frequency governor could arrive at a minimum frequency that meets the requirements of the use-case, in order to minimize power consumption. But in the real world there are many workloads which defy this ideal. For example, but not limited to:h]hX`In an ideal world, it would be possible to pipeline a workload sufficiently that a utilization based device frequency governor could arrive at a minimum frequency that meets the requirements of the use-case, in order to minimize power consumption. But in the real world there are many workloads which defy this ideal. For example, but not limited to:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhj߳hhubh)}(hhh](h)}(hWorkloads that ping-pong between device and CPU, with alternating periods of CPU waiting for device, and device waiting on CPU. This can result in devfreq and cpufreq seeing idle time in their respective domains and in result reduce frequency. h]h)}(hWorkloads that ping-pong between device and CPU, with alternating periods of CPU waiting for device, and device waiting on CPU. This can result in devfreq and cpufreq seeing idle time in their respective domains and in result reduce frequency.h]hWorkloads that ping-pong between device and CPU, with alternating periods of CPU waiting for device, and device waiting on CPU. This can result in devfreq and cpufreq seeing idle time in their respective domains and in result reduce frequency.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hX}Workloads that interact with a periodic time based deadline, such as double buffered GPU rendering vs vblank sync'd page flipping. In this scenario, missing a vblank deadline results in an *increase* in idle time on the GPU (since it has to wait an additional vblank period), sending a signal to the GPU's devfreq to reduce frequency, when in fact the opposite is what is needed. h]h)}(hX|Workloads that interact with a periodic time based deadline, such as double buffered GPU rendering vs vblank sync'd page flipping. In this scenario, missing a vblank deadline results in an *increase* in idle time on the GPU (since it has to wait an additional vblank period), sending a signal to the GPU's devfreq to reduce frequency, when in fact the opposite is what is needed.h](hWorkloads that interact with a periodic time based deadline, such as double buffered GPU rendering vs vblank sync’d page flipping. In this scenario, missing a vblank deadline results in an }(hjhhhNhNubj)}(h *increase*h]hincrease}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh in idle time on the GPU (since it has to wait an additional vblank period), sending a signal to the GPU’s devfreq to reduce frequency, when in fact the opposite is what is needed.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j uh1hhjhMhj߳hhubh)}(hX>To this end, deadline hint(s) can be set on a :c:type:`dma_fence` via :c:type:`dma_fence_set_deadline` (or indirectly via userspace facing ioctls like :c:type:`sync_set_deadline`). The deadline hint provides a way for the waiting driver, or userspace, to convey an appropriate sense of urgency to the signaling driver.h](h.To this end, deadline hint(s) can be set on a }(hjLhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjVh]h dma_fence}(hjXhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhjLubh via }(hjLhhhNhNubh)}(h :c:type:`dma_fence_set_deadline`h]j)}(hjzh]hdma_fence_set_deadline}(hj|hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_fence_set_deadlineuh1hhjshMhjLubh1 (or indirectly via userspace facing ioctls like }(hjLhhhNhNubh)}(h:c:type:`sync_set_deadline`h]j)}(hjh]hsync_set_deadline}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsync_set_deadlineuh1hhjshMhjLubh). The deadline hint provides a way for the waiting driver, or userspace, to convey an appropriate sense of urgency to the signaling driver.}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjshMhj߳hhubh)}(hXrA deadline hint is given in absolute ktime (CLOCK_MONOTONIC for userspace facing APIs). The time could either be some point in the future (such as the vblank based deadline for page-flipping, or the start of a compositor's composition cycle), or the current time to indicate an immediate deadline hint (Ie. forward progress cannot be made until this fence is signaled).h]hXtA deadline hint is given in absolute ktime (CLOCK_MONOTONIC for userspace facing APIs). The time could either be some point in the future (such as the vblank based deadline for page-flipping, or the start of a compositor’s composition cycle), or the current time to indicate an immediate deadline hint (Ie. forward progress cannot be made until this fence is signaled).}(hjĴhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhj߳hhubh)}(hMultiple deadlines may be set on a given fence, even in parallel. See the documentation for :c:type:`dma_fence_ops.set_deadline `.h](h]Multiple deadlines may be set on a given fence, even in parallel. See the documentation for }(hjӴhhhNhNubh)}(h4:c:type:`dma_fence_ops.set_deadline `h]j)}(hjݴh]hdma_fence_ops.set_deadline}(hjߴhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj۴ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhjӴubh.}(hjӴhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhj߳hhubh)}(hThe deadline hint is just that, a hint. The driver that created the fence may react by increasing frequency, making different scheduling choices, etc. Or doing nothing at all.h]hThe deadline hint is just that, a hint. The driver that created the fence may react by increasing frequency, making different scheduling choices, etc. Or doing nothing at all.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhj߳hhubeh}(h]dma-fence-deadline-hintsah ]h"]dma fence deadline hintsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fences Functions Referenceh]hDMA Fences Functions Reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_get_stub (C function)c.dma_fence_get_stubhNtauh1j hjhhhNhNubj )}(hhh](j )}(h,struct dma_fence * dma_fence_get_stub (void)h]j )}(h*struct dma_fence *dma_fence_get_stub(void)h](j )}(hj h]hstruct}(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKubj )}(h h]h }(hjThhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBhhhjShKubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjgmodnameN classnameNjj)}j]jN)}jFdma_fence_get_stubsbc.dma_fence_get_stubasbuh1hhjBhhhjShKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBhhhjShKubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjBhhhjShKubj )}(hdma_fence_get_stubh]j )}(hjh]hdma_fence_get_stub}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjBhhhjShKubj)}(h(void)h]j)}(hvoidh]jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubah}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjBhhhjShKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj>hhhjShKubah}(h]j9ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjShKhj;hhubj@ )}(hhh]h)}(hreturn a signaled fenceh]hreturn a signaled fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chK}hjhhubah}(h]h ]h"]h$]h&]uh1j? hj;hhhjShKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``void`` no arguments **Description** Return a stub fence which is already signaled. The fence's timestamp corresponds to the first time after boot this function is called.h](h)}(h**Parameters**h]jq )}(hj h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]j )}(h``void`` no arguments h](j )}(h``void``h]j)}(hj+h]hvoid}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhj%ubj )}(hhh]h)}(h no argumentsh]h no arguments}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hKhjAubah}(h]h ]h"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]uh1j hj@hKhj"ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjfh]h Description}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjdubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubh)}(hReturn a stub fence which is already signaled. The fence's timestamp corresponds to the first time after boot this function is called.h]hReturn a stub fence which is already signaled. The fence’s timestamp corresponds to the first time after boot this function is called.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chK~hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j ,dma_fence_allocate_private_stub (C function)!c.dma_fence_allocate_private_stubhNtauh1j hjhhhNhNubj )}(hhh](j )}(hFstruct dma_fence * dma_fence_allocate_private_stub (ktime_t timestamp)h]j )}(hDstruct dma_fence *dma_fence_allocate_private_stub(ktime_t timestamp)h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjʶhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjǶubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj̶modnameN classnameNjj)}j]jN)}jFdma_fence_allocate_private_stubsb!c.dma_fence_allocate_private_stubasbuh1hhjhhhjhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjhhhjhKubj )}(hdma_fence_allocate_private_stubh]j )}(hjh]hdma_fence_allocate_private_stub}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKubj)}(h(ktime_t timestamp)h]j)}(hktime_t timestamph](h)}(hhh]j )}(hktime_th]hktime_t}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj*modnameN classnameNjj)}j]j!c.dma_fence_allocate_private_stubasbuh1hhj!ubj )}(h h]h }(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubj )}(h timestamph]h timestamp}(hjThhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjhhubj@ )}(hhh]h)}(h return a private, signaled fenceh]h return a private, signaled fence}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhj{hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``ktime_t timestamp`` timestamp when the fence was signaled **Description** Return a newly allocated and signaled stub fence.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]j )}(h<``ktime_t timestamp`` timestamp when the fence was signaled h](j )}(h``ktime_t timestamp``h]j)}(hjh]hktime_t timestamp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]h)}(h%timestamp when the fence was signaledh]h%timestamp when the fence was signaled}(hjطhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjԷhKhjշubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjԷhKhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubh)}(h1Return a newly allocated and signaled stub fence.h]h1Return a newly allocated and signaled stub fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_fence_context_alloc (C function)c.dma_fence_context_allochNtauh1j hjhhhNhNubj )}(hhh](j )}(h*u64 dma_fence_context_alloc (unsigned num)h]j )}(h)u64 dma_fence_context_alloc(unsigned num)h](h)}(hhh]j )}(hu64h]hu64}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjDmodnameN classnameNjj)}j]jN)}jFdma_fence_context_allocsbc.dma_fence_context_allocasbuh1hhj;hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKubj )}(h h]h }(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;hhhjchKubj )}(hdma_fence_context_alloch]j )}(hj`h]hdma_fence_context_alloc}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj;hhhjchKubj)}(h(unsigned num)h]j)}(h unsigned numh](jK)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hnumh]hnum}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj;hhhjchKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj7hhhjchKubah}(h]j2ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjchKhj4hhubj@ )}(hhh]h)}(h#allocate an array of fence contextsh]h#allocate an array of fence contexts}(hj׸hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjԸhhubah}(h]h ]h"]h$]h&]uh1j? hj4hhhjchKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX6**Parameters** ``unsigned num`` amount of contexts to allocate **Description** This function will return the first index of the number of fence contexts allocated. The fence context is used for setting :c:type:`dma_fence.context ` to a unique number by passing the context to dma_fence_init().h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]j )}(h0``unsigned num`` amount of contexts to allocate h](j )}(h``unsigned num``h]j)}(hjh]h unsigned num}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]h)}(hamount of contexts to allocateh]hamount of contexts to allocate}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hKhj.ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj-hKhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjSh]h Description}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjQubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubh)}(hThis function will return the first index of the number of fence contexts allocated. The fence context is used for setting :c:type:`dma_fence.context ` to a unique number by passing the context to dma_fence_init().h](h|This function will return the first index of the number of fence contexts allocated. The fence context is used for setting }(hjihhhNhNubh)}(h':c:type:`dma_fence.context `h]j)}(hjsh]hdma_fence.context}(hjuhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjiubh? to a unique number by passing the context to dma_fence_init().}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_begin_signalling (C function)c.dma_fence_begin_signallinghNtauh1j hjhhhNhNubj )}(hhh](j )}(h&bool dma_fence_begin_signalling (void)h]j )}(h%bool dma_fence_begin_signalling(void)h](jK)}(hjE_h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM.ubj )}(h h]h }(hjɹhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjȹhM.ubj )}(hdma_fence_begin_signallingh]j )}(hdma_fence_begin_signallingh]hdma_fence_begin_signalling}(hj۹hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj׹ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjȹhM.ubj)}(h(void)h]j)}(hvoidh]jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubah}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjȹhM.ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjȹhM.ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjȹhM.hjhhubj@ )}(hhh]h)}(h-begin a critical DMA fence signalling sectionh]h-begin a critical DMA fence signalling section}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM!hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjȹhM.ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j9jb j9jc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``void`` no arguments **Description** Drivers should use this to annotate the beginning of any code section required to eventually complete :c:type:`dma_fence` by calling dma_fence_signal(). The end of these critical sections are annotated with dma_fence_end_signalling(). Opaque cookie needed by the implementation, which needs to be passed to dma_fence_end_signalling(). **Return**h](h)}(h**Parameters**h]jq )}(hjCh]h Parameters}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjAubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM%hj=ubj )}(hhh]j )}(h``void`` no arguments h](j )}(h``void``h]j)}(hjbh]hvoid}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM(hj\ubj )}(hhh]h)}(h no argumentsh]h no arguments}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhM(hjxubah}(h]h ]h"]h$]h&]uh1j hj\ubeh}(h]h ]h"]h$]h&]uh1j hjwhM(hjYubah}(h]h ]h"]h$]h&]uh1j hj=ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM*hj=ubh)}(hDrivers should use this to annotate the beginning of any code section required to eventually complete :c:type:`dma_fence` by calling dma_fence_signal().h](hfDrivers should use this to annotate the beginning of any code section required to eventually complete }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM"hjubh by calling dma_fence_signal().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjںhM"hj=ubh)}(hQThe end of these critical sections are annotated with dma_fence_end_signalling().h]hQThe end of these critical sections are annotated with dma_fence_end_signalling().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM%hj=ubh)}(hcOpaque cookie needed by the implementation, which needs to be passed to dma_fence_end_signalling().h]hcOpaque cookie needed by the implementation, which needs to be passed to dma_fence_end_signalling().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM(hj=ubh)}(h **Return**h]jq )}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM+hj=ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j %dma_fence_end_signalling (C function)c.dma_fence_end_signallinghNtauh1j hjhhhNhNubj )}(hhh](j )}(h+void dma_fence_end_signalling (bool cookie)h]j )}(h*void dma_fence_end_signalling(bool cookie)h](jK)}(hvoidh]hvoid}(hj;hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj7hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMEubj )}(h h]h }(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7hhhjIhMEubj )}(hdma_fence_end_signallingh]j )}(hdma_fence_end_signallingh]hdma_fence_end_signalling}(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjXubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj7hhhjIhMEubj)}(h (bool cookie)h]j)}(h bool cookieh](jK)}(hjE_h]hbool}(hjxhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjtubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubj )}(hcookieh]hcookie}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjpubah}(h]h ]h"]h$]h&]jjuh1jhj7hhhjIhMEubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj3hhhjIhMEubah}(h]j.ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjIhMEhj0hhubj@ )}(hhh]h)}(h+end a critical DMA fence signalling sectionh]h+end a critical DMA fence signalling section}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM@hjhhubah}(h]h ]h"]h$]h&]uh1j? hj0hhhjIhMEubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jջjb jջjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``bool cookie`` opaque cookie from dma_fence_begin_signalling() **Description** Closes a critical section annotation opened by dma_fence_begin_signalling().h](h)}(h**Parameters**h]jq )}(hj߻h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjݻubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMDhjٻubj )}(hhh]j )}(h@``bool cookie`` opaque cookie from dma_fence_begin_signalling() h](j )}(h``bool cookie``h]j)}(hjh]h bool cookie}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMAhjubj )}(hhh]h)}(h/opaque cookie from dma_fence_begin_signalling()h]h/opaque cookie from dma_fence_begin_signalling()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMAhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMAhjubah}(h]h ]h"]h$]h&]uh1j hjٻubh)}(h**Description**h]jq )}(hj9h]h Description}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj7ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMChjٻubh)}(hLCloses a critical section annotation opened by dma_fence_begin_signalling().h]hLCloses a critical section annotation opened by dma_fence_begin_signalling().}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMChjٻubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j .dma_fence_signal_timestamp_locked (C function)#c.dma_fence_signal_timestamp_lockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(hRint dma_fence_signal_timestamp_locked (struct dma_fence *fence, ktime_t timestamp)h]j )}(hQint dma_fence_signal_timestamp_locked(struct dma_fence *fence, ktime_t timestamp)h](jK)}(hinth]hint}(hj~hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjzhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMoubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzhhhjhMoubj )}(h!dma_fence_signal_timestamp_lockedh]j )}(h!dma_fence_signal_timestamp_lockedh]h!dma_fence_signal_timestamp_locked}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjzhhhjhMoubj)}(h,(struct dma_fence *fence, ktime_t timestamp)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjȼhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjټhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjּubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjۼmodnameN classnameNjj)}j]jN)}jFjsb#c.dma_fence_signal_timestamp_lockedasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hktime_t timestamph](h)}(hhh]j )}(hktime_th]hktime_t}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj2modnameN classnameNjj)}j]j#c.dma_fence_signal_timestamp_lockedasbuh1hhj)ubj )}(h h]h }(hjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubj )}(h timestamph]h timestamp}(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjzhhhjhMoubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjvhhhjhMoubah}(h]jqah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMohjshhubj@ )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM^hjhhubah}(h]h ]h"]h$]h&]uh1j? hjshhhjhMoubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to signal ``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain **Description** Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp. Unlike dma_fence_signal_timestamp(), this function must be called with :c:type:`dma_fence.lock ` held. Returns 0 on success and a negative error value when **fence** has been signalled already.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMbhjubj )}(hhh](j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hjǽh]hstruct dma_fence *fence}(hjɽhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjŽubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM_hjubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjܽhM_hjݽubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjܽhM_hjubj )}(hU``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain h](j )}(h``ktime_t timestamp``h]j)}(hjh]hktime_t timestamp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM`hjubj )}(hhh]h)}(h>fence signal timestamp in kernel's CLOCK_MONOTONIC time domainh]h@fence signal timestamp in kernel’s CLOCK_MONOTONIC time domain}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM`hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM`hjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj;h]h Description}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj9ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMbhjubh)}(hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.h]hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMbhjubh)}(hqUnlike dma_fence_signal_timestamp(), this function must be called with :c:type:`dma_fence.lock ` held.h](hGUnlike dma_fence_signal_timestamp(), this function must be called with }(hj`hhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjjh]hdma_fence.lock}(hjlhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMihj`ubh held.}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMihjubh)}(hZReturns 0 on success and a negative error value when **fence** has been signalled already.h](h5Returns 0 on success and a negative error value when }(hjhhhNhNubjq )}(h **fence**h]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh has been signalled already.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMlhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_signal_timestamp (C function)c.dma_fence_signal_timestamphNtauh1j hjhhhNhNubj )}(hhh](j )}(hKint dma_fence_signal_timestamp (struct dma_fence *fence, ktime_t timestamp)h]j )}(hJint dma_fence_signal_timestamp(struct dma_fence *fence, ktime_t timestamp)h](jK)}(hinth]hint}(hjӾhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjϾhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjϾhhhjhMubj )}(hdma_fence_signal_timestamph]j )}(hdma_fence_signal_timestamph]hdma_fence_signal_timestamp}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjϾhhhjhMubj)}(h,(struct dma_fence *fence, ktime_t timestamp)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj0modnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_signal_timestampasbuh1hhj ubj )}(h h]h }(hjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjc)}(hj h]h*}(hj\hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj ubj )}(hfenceh]hfence}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hktime_t timestamph](h)}(hhh]j )}(hktime_th]hktime_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jJc.dma_fence_signal_timestampasbuh1hhj~ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~ubj )}(h timestamph]h timestamp}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjϾhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj˾hhhjhMubah}(h]jƾah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjȾhhubj@ )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hjۿhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjؿhhubah}(h]h ]h"]h$]h&]uh1j? hjȾhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX|**Parameters** ``struct dma_fence *fence`` the fence to signal ``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain **Description** Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp. Returns 0 on success and a negative error value when **fence** has been signalled already.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh](j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMhj2ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj1hMhjubj )}(hU``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain h](j )}(h``ktime_t timestamp``h]j)}(hjUh]hktime_t timestamp}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjOubj )}(hhh]h)}(h>fence signal timestamp in kernel's CLOCK_MONOTONIC time domainh]h@fence signal timestamp in kernel’s CLOCK_MONOTONIC time domain}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhMhjkubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1j hjjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.h]hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hZReturns 0 on success and a negative error value when **fence** has been signalled already.h](h5Returns 0 on success and a negative error value when }(hjhhhNhNubjq )}(h **fence**h]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh has been signalled already.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_fence_signal_locked (C function)c.dma_fence_signal_lockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(h5int dma_fence_signal_locked (struct dma_fence *fence)h]j )}(h4int dma_fence_signal_locked(struct dma_fence *fence)h](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_signal_lockedh]j )}(hdma_fence_signal_lockedh]hdma_fence_signal_locked}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubj )}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjQhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjSmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_signal_lockedasbuh1hhj/ubj )}(h h]h }(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj/ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hXS**Parameters** ``struct dma_fence *fence`` the fence to signal **Description** Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Unlike dma_fence_signal(), this function must be called with :c:type:`dma_fence.lock ` held. Returns 0 on success and a negative error value when **fence** has been signalled already.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj hMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj2h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj0ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.h]hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hgUnlike dma_fence_signal(), this function must be called with :c:type:`dma_fence.lock ` held.h](h=Unlike dma_fence_signal(), this function must be called with }(hjWhhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjah]hdma_fence.lock}(hjchhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjWubh held.}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj~hMhjubh)}(hZReturns 0 on success and a negative error value when **fence** has been signalled already.h](h5Returns 0 on success and a negative error value when }(hjhhhNhNubjq )}(h **fence**h]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh has been signalled already.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_signal (C function)c.dma_fence_signalhNtauh1j hjhhhNhNubj )}(hhh](j )}(h.int dma_fence_signal (struct dma_fence *fence)h]j )}(h-int dma_fence_signal(struct dma_fence *fence)h](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_signalh]j )}(hdma_fence_signalh]hdma_fence_signal}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj'modnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_signalasbuh1hhjubj )}(h h]h }(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjShhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to signal **Description** Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Returns 0 on success and a negative error value when **fence** has been signalled already.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.h]hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hZReturns 0 on success and a negative error value when **fence** has been signalled already.h](h5Returns 0 on success and a negative error value when }(hj+hhhNhNubjq )}(h **fence**h]hfence}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj+ubh has been signalled already.}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_wait_timeout (C function)c.dma_fence_wait_timeouthNtauh1j hjhhhNhNubj )}(hhh](j )}(h\signed long dma_fence_wait_timeout (struct dma_fence *fence, bool intr, signed long timeout)h]j )}(h[signed long dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout)h](jK)}(hsignedh]hsigned}(hjlhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhhjzhMubjK)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhhhjzhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhhjzhMubj )}(hdma_fence_wait_timeouth]j )}(hdma_fence_wait_timeouth]hdma_fence_wait_timeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhhjzhMubj)}(h9(struct dma_fence *fence, bool intr, signed long timeout)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_wait_timeoutasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h bool intrh](jK)}(hjE_h]hbool}(hj7hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj3ubj )}(h h]h }(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubj )}(hintrh]hintr}(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hsigned long timeouth](jK)}(hsignedh]hsigned}(hjkhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjgubj )}(h h]h }(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubjK)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjgubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubj )}(htimeouth]htimeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhhjzhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjdhhhjzhMubah}(h]j_ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjzhMhjahhubj@ )}(hhh]h)}(h huh1j hj,hMhjhhubj@ )}(hhh]h)}(h#default release function for fencesh]h#default release function for fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj,hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct kref *kref`` :c:type:`dma_fence.recfount ` **Description** This is the default release functions for :c:type:`dma_fence`. Drivers shouldn't call this directly, but instead call dma_fence_put().h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h?``struct kref *kref`` :c:type:`dma_fence.recfount ` h](j )}(h``struct kref *kref``h]j)}(hjh]hstruct kref *kref}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h(:c:type:`dma_fence.recfount `h]h)}(hj:h]j)}(hj:h]hdma_fence.recfount}(hj?hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhj4hMhj8ubah}(h]h ]h"]h$]h&]uh1hhj4hMhj5ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj4hMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjth]h Description}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjrubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hThis is the default release functions for :c:type:`dma_fence`. Drivers shouldn't call this directly, but instead call dma_fence_put().h](h*This is the default release functions for }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubhK. Drivers shouldn’t call this directly, but instead call dma_fence_put().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_free (C function)c.dma_fence_freehNtauh1j hjhhhNhNubj )}(hhh](j )}(h-void dma_fence_free (struct dma_fence *fence)h]j )}(h,void dma_fence_free(struct dma_fence *fence)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM=ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhM=ubj )}(hdma_fence_freeh]j )}(hdma_fence_freeh]hdma_fence_free}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhM=ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj9modnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_freeasbuh1hhjubj )}(h h]h }(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjehhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM=ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhM=ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhM=hjhhubj@ )}(hhh]h)}(h1default release function for :c:type:`dma_fence`.h](hdefault release function for }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjj)}j]jSc.dma_fence_freeasbj dma_fenceuh1hhjShKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM7hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhM=ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` fence to release **Description** This is the default implementation for :c:type:`dma_fence_ops.release `. It calls kfree_rcu() on **fence**.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM;hjubj )}(hhh]j )}(h-``struct dma_fence *fence`` fence to release h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM8hjubj )}(hhh]h)}(hfence to releaseh]hfence to release}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM8hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM8hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj@h]h Description}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj>ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM:hjubh)}(hzThis is the default implementation for :c:type:`dma_fence_ops.release `. It calls kfree_rcu() on **fence**.h](h'This is the default implementation for }(hjVhhhNhNubh)}(h/:c:type:`dma_fence_ops.release `h]j)}(hj`h]hdma_fence_ops.release}(hjbhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM:hjVubh. It calls kfree_rcu() on }(hjVhhhNhNubjq )}(h **fence**h]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjVubh.}(hjVhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj}hM:hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j *dma_fence_enable_sw_signaling (C function)c.dma_fence_enable_sw_signalinghNtauh1j hjhhhNhNubj )}(hhh](j )}(h huh1j hjhMchjhhubj@ )}(hhh]h)}(henable signaling on fenceh]henable signaling on fence}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM\hjwhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMcubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to enable **Description** This will request for sw signaling to be enabled, to make the fence complete as soon as possible. This calls :c:type:`dma_fence_ops.enable_signaling ` internally.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM`hjubj )}(hhh]j )}(h0``struct dma_fence *fence`` the fence to enable h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM]hjubj )}(hhh]h)}(hthe fence to enableh]hthe fence to enable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM]hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM]hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM_hjubh)}(hThis will request for sw signaling to be enabled, to make the fence complete as soon as possible. This calls :c:type:`dma_fence_ops.enable_signaling ` internally.h](hmThis will request for sw signaling to be enabled, to make the fence complete as soon as possible. This calls }(hj hhhNhNubh)}(h8:c:type:`dma_fence_ops.enable_signaling `h]j)}(hjh]hdma_fence_ops.enable_signaling}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM_hj ubh internally.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj3hM_hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_add_callback (C function)c.dma_fence_add_callbackhNtauh1j hjhhhNhNubj )}(hhh](j )}(hdint dma_fence_add_callback (struct dma_fence *fence, struct dma_fence_cb *cb, dma_fence_func_t func)h]j )}(hcint dma_fence_add_callback(struct dma_fence *fence, struct dma_fence_cb *cb, dma_fence_func_t func)h](jK)}(hinth]hint}(hj^hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjZhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZhhhjlhMubj )}(hdma_fence_add_callbackh]j )}(hdma_fence_add_callbackh]hdma_fence_add_callback}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjZhhhjlhMubj)}(hI(struct dma_fence *fence, struct dma_fence_cb *cb, dma_fence_func_t func)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_add_callbackasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence_cb *cbh](j )}(hj h]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j )}(h dma_fence_cbh]h dma_fence_cb}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj-modnameN classnameNjj)}j]jc.dma_fence_add_callbackasbuh1hhj ubj )}(h h]h }(hjIhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjc)}(hj h]h*}(hjWhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj ubj )}(hcbh]hcb}(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hdma_fence_func_t funch](h)}(hhh]j )}(hdma_fence_func_th]hdma_fence_func_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_fence_add_callbackasbuh1hhjyubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubj )}(hfunch]hfunc}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjZhhhjlhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjVhhhjlhMubah}(h]jQah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjlhMhjShhubj@ )}(hhh]h)}(h6add a callback to be called when the fence is signaledh]h6add a callback to be called when the fence is signaled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMnhjhhubah}(h]h ]h"]h$]h&]uh1j? hjShhhjlhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to wait on ``struct dma_fence_cb *cb`` the callback to register ``dma_fence_func_t func`` the function to call **Description** Add a software callback to the fence. The caller should keep a reference to the fence. **cb** will be initialized by dma_fence_add_callback(), no initialization by the caller is required. Any number of callbacks can be registered to a fence, but a callback can only be registered to one fence at a time. If fence is already signaled, this function will return -ENOENT (and *not* call the callback). Note that the callback can be called from an atomic context or irq context. Returns 0 in case of success, -ENOENT if the fence is already signaled and -EINVAL in case of error.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMrhjubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMphjubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hMphj-ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj,hMphjubj )}(h5``struct dma_fence_cb *cb`` the callback to register h](j )}(h``struct dma_fence_cb *cb``h]j)}(hjPh]hstruct dma_fence_cb *cb}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMqhjJubj )}(hhh]h)}(hthe callback to registerh]hthe callback to register}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehMqhjfubah}(h]h ]h"]h$]h&]uh1j hjJubeh}(h]h ]h"]h$]h&]uh1j hjehMqhjubj )}(h/``dma_fence_func_t func`` the function to call h](j )}(h``dma_fence_func_t func``h]j)}(hjh]hdma_fence_func_t func}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMrhjubj )}(hhh]h)}(hthe function to callh]hthe function to call}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMrhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMrhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMthjubh)}(hVAdd a software callback to the fence. The caller should keep a reference to the fence.h]hVAdd a software callback to the fence. The caller should keep a reference to the fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMthjubh)}(h**cb** will be initialized by dma_fence_add_callback(), no initialization by the caller is required. Any number of callbacks can be registered to a fence, but a callback can only be registered to one fence at a time.h](jq )}(h**cb**h]hcb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh will be initialized by dma_fence_add_callback(), no initialization by the caller is required. Any number of callbacks can be registered to a fence, but a callback can only be registered to one fence at a time.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMwhjubh)}(h^If fence is already signaled, this function will return -ENOENT (and *not* call the callback).h](hEIf fence is already signaled, this function will return -ENOENT (and }(hjhhhNhNubj)}(h*not*h]hnot}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh call the callback).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM{hjubh)}(hKNote that the callback can be called from an atomic context or irq context.h]hKNote that the callback can be called from an atomic context or irq context.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM~hjubh)}(hdReturns 0 in case of success, -ENOENT if the fence is already signaled and -EINVAL in case of error.h]hdReturns 0 in case of success, -ENOENT if the fence is already signaled and -EINVAL in case of error.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_fence_get_status (C function)c.dma_fence_get_statushNtauh1j hjhhhNhNubj )}(hhh](j )}(h2int dma_fence_get_status (struct dma_fence *fence)h]j )}(h1int dma_fence_get_status(struct dma_fence *fence)h](jK)}(hinth]hint}(hjehhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjahhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjahhhjshMubj )}(hdma_fence_get_statush]j )}(hdma_fence_get_statush]hdma_fence_get_status}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjahhhjshMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_get_statusasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjahhhjshMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj]hhhjshMubah}(h]jXah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjshMhjZhhubj@ )}(hhh]h)}(h"returns the status upon completionh]h"returns the status upon completion}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj"hhubah}(h]h ]h"]h$]h&]uh1j? hjZhhhjshMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j=jb j=jc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the dma_fence to query **Description** This wraps dma_fence_get_status_locked() to return the error status condition on a signaled fence. See dma_fence_get_status_locked() for more details. Returns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.h](h)}(h**Parameters**h]jq )}(hjGh]h Parameters}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjEubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjAubj )}(hhh]j )}(h3``struct dma_fence *fence`` the dma_fence to query h](j )}(h``struct dma_fence *fence``h]j)}(hjfh]hstruct dma_fence *fence}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj`ubj )}(hhh]h)}(hthe dma_fence to queryh]hthe dma_fence to query}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hMhj|ubah}(h]h ]h"]h$]h&]uh1j hj`ubeh}(h]h ]h"]h$]h&]uh1j hj{hMhj]ubah}(h]h ]h"]h$]h&]uh1j hjAubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjAubh)}(hThis wraps dma_fence_get_status_locked() to return the error status condition on a signaled fence. See dma_fence_get_status_locked() for more details.h]hThis wraps dma_fence_get_status_locked() to return the error status condition on a signaled fence. See dma_fence_get_status_locked() for more details.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjAubh)}(hReturns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.h]hReturns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjAubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j &dma_fence_remove_callback (C function)c.dma_fence_remove_callbackhNtauh1j hjhhhNhNubj )}(hhh](j )}(hQbool dma_fence_remove_callback (struct dma_fence *fence, struct dma_fence_cb *cb)h]j )}(hPbool dma_fence_remove_callback(struct dma_fence *fence, struct dma_fence_cb *cb)h](jK)}(hjE_h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_remove_callbackh]j )}(hdma_fence_remove_callbackh]hdma_fence_remove_callback}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h2(struct dma_fence *fence, struct dma_fence_cb *cb)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubj )}(h h]h }(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjOhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjLubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjQmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_remove_callbackasbuh1hhj-ubj )}(h h]h }(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubjc)}(hj h]h*}(hj}hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj-ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj)ubj)}(hstruct dma_fence_cb *cbh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fence_cbh]h dma_fence_cb}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jkc.dma_fence_remove_callbackasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hcbh]hcb}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj)ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h)remove a callback from the signaling listh]h)remove a callback from the signaling list}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj!hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j<jb j<jc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to wait on ``struct dma_fence_cb *cb`` the callback to remove **Description** Remove a previously queued callback from the fence. This function returns true if the callback is successfully removed, or false if the fence has already been signaled. *WARNING*: Cancelling a callback should only be done if you really know what you're doing, since deadlocks and race conditions could occur all too easily. For this reason, it should only ever be done on hardware lockup recovery, with a reference held to the fence. Behaviour is undefined if **cb** has not been added to **fence** using dma_fence_add_callback() beforehand.h](h)}(h**Parameters**h]jq )}(hjFh]h Parameters}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjDubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj@ubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hjeh]hstruct dma_fence *fence}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj_ubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhMhj{ubah}(h]h ]h"]h$]h&]uh1j hj_ubeh}(h]h ]h"]h$]h&]uh1j hjzhMhj\ubj )}(h3``struct dma_fence_cb *cb`` the callback to remove h](j )}(h``struct dma_fence_cb *cb``h]j)}(hjh]hstruct dma_fence_cb *cb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe callback to removeh]hthe callback to remove}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhj\ubeh}(h]h ]h"]h$]h&]uh1j hj@ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj@ubh)}(hRemove a previously queued callback from the fence. This function returns true if the callback is successfully removed, or false if the fence has already been signaled.h]hRemove a previously queued callback from the fence. This function returns true if the callback is successfully removed, or false if the fence has already been signaled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj@ubh)}(hX*WARNING*: Cancelling a callback should only be done if you really know what you're doing, since deadlocks and race conditions could occur all too easily. For this reason, it should only ever be done on hardware lockup recovery, with a reference held to the fence.h](j)}(h *WARNING*h]hWARNING}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX: Cancelling a callback should only be done if you really know what you’re doing, since deadlocks and race conditions could occur all too easily. For this reason, it should only ever be done on hardware lockup recovery, with a reference held to the fence.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj@ubh)}(hkBehaviour is undefined if **cb** has not been added to **fence** using dma_fence_add_callback() beforehand.h](hBehaviour is undefined if }(hjhhhNhNubjq )}(h**cb**h]hcb}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh has not been added to }(hjhhhNhNubjq )}(h **fence**h]hfence}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh+ using dma_fence_add_callback() beforehand.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_default_wait (C function)c.dma_fence_default_waithNtauh1j hjhhhNhNubj )}(hhh](j )}(h\signed long dma_fence_default_wait (struct dma_fence *fence, bool intr, signed long timeout)h]j )}(h[signed long dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)h](jK)}(hsignedh]hsigned}(hjnhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjhhhj|hMubjK)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjjhhhj|hMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjhhhj|hMubj )}(hdma_fence_default_waith]j )}(hdma_fence_default_waith]hdma_fence_default_wait}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjjhhhj|hMubj)}(h9(struct dma_fence *fence, bool intr, signed long timeout)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_default_waitasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h bool intrh](jK)}(hjE_h]hbool}(hj9hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj5ubj )}(h h]h }(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubj )}(hintrh]hintr}(hjThhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hsigned long timeouth](jK)}(hsignedh]hsigned}(hjmhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjiubj )}(h h]h }(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubjK)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjiubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubj )}(htimeouth]htimeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjjhhhj|hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjfhhhj|hMubah}(h]jaah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj|hMhjchhubj@ )}(hhh]h)}(hDdefault sleep until the fence gets signaled or until timeout elapsesh]hDdefault sleep until the fence gets signaled or until timeout elapses}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjchhhj|hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to wait on ``bool intr`` if true, do an interruptible wait ``signed long timeout`` timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT **Description** Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success. If timeout is zero the value one is returned if the fence is already signaled for consistency with other functions taking a jiffies timeout.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj ubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hMhj&ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj%hMhjubj )}(h0``bool intr`` if true, do an interruptible wait h](j )}(h ``bool intr``h]j)}(hjIh]h bool intr}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjCubj )}(hhh]h)}(h!if true, do an interruptible waith]h!if true, do an interruptible wait}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hMhj_ubah}(h]h ]h"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]uh1j hj^hMhjubj )}(hJ``signed long timeout`` timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT h](j )}(h``signed long timeout``h]j)}(hjh]hsigned long timeout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj|ubj )}(hhh]h)}(h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUTh]h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hReturns -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success. If timeout is zero the value one is returned if the fence is already signaled for consistency with other functions taking a jiffies timeout.h]hReturns -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success. If timeout is zero the value one is returned if the fence is already signaled for consistency with other functions taking a jiffies timeout.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_wait_any_timeout (C function)c.dma_fence_wait_any_timeouthNtauh1j hjhhhNhNubj )}(hhh](j )}(hsigned long dma_fence_wait_any_timeout (struct dma_fence **fences, uint32_t count, bool intr, signed long timeout, uint32_t *idx)h]j )}(hsigned long dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count, bool intr, signed long timeout, uint32_t *idx)h](jK)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMOubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMOubjK)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhhjhMOubj )}(h h]h }(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMOubj )}(hdma_fence_wait_any_timeouth]j )}(hdma_fence_wait_any_timeouth]hdma_fence_wait_any_timeout}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMOubj)}(hZ(struct dma_fence **fences, uint32_t count, bool intr, signed long timeout, uint32_t *idx)h](j)}(hstruct dma_fence **fencesh](j )}(hj h]hstruct}(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjWubj )}(h h]h }(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjWubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjvubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj{modnameN classnameNjj)}j]jN)}jFjAsbc.dma_fence_wait_any_timeoutasbuh1hhjWubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjWubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjWubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjWubj )}(hfencesh]hfences}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjWubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjSubj)}(huint32_t counth](h)}(hhh]j )}(huint32_th]huint32_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_fence_wait_any_timeoutasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hcounth]hcount}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjSubj)}(h bool intrh](jK)}(hjE_h]hbool}(hj"hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hintrh]hintr}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjSubj)}(hsigned long timeouth](jK)}(hsignedh]hsigned}(hjVhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjRubj )}(h h]h }(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubjK)}(hlongh]hlong}(hjrhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjRubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubj )}(htimeouth]htimeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjSubj)}(h uint32_t *idxh](h)}(hhh]j )}(huint32_th]huint32_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_fence_wait_any_timeoutasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hidxh]hidx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjSubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMOubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMOubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMOhjhhubj@ )}(hhh]h)}(hhjHubj )}(hhh]h)}(harray of fences to wait onh]harray of fences to wait on}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchM>hjdubah}(h]h ]h"]h$]h&]uh1j hjHubeh}(h]h ]h"]h$]h&]uh1j hjchM>hjEubj )}(h/``uint32_t count`` number of fences to wait on h](j )}(h``uint32_t count``h]j)}(hjh]huint32_t count}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM?hjubj )}(hhh]h)}(hnumber of fences to wait onh]hnumber of fences to wait on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM?hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM?hjEubj )}(h0``bool intr`` if true, do an interruptible wait h](j )}(h ``bool intr``h]j)}(hjh]h bool intr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM@hjubj )}(hhh]h)}(h!if true, do an interruptible waith]h!if true, do an interruptible wait}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM@hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM@hjEubj )}(hJ``signed long timeout`` timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT h](j )}(h``signed long timeout``h]j)}(hjh]hsigned long timeout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMAhjubj )}(hhh]h)}(h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUTh]h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMAhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMAhjEubj )}(hc``uint32_t *idx`` used to store the first signaled fence index, meaningful only on positive return h](j )}(h``uint32_t *idx``h]j)}(hj2h]h uint32_t *idx}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMChj,ubj )}(hhh]h)}(hPused to store the first signaled fence index, meaningful only on positive returnh]hPused to store the first signaled fence index, meaningful only on positive return}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMBhjHubah}(h]h ]h"]h$]h&]uh1j hj,ubeh}(h]h ]h"]h$]h&]uh1j hjGhMChjEubeh}(h]h ]h"]h$]h&]uh1j hj)ubh)}(h**Description**h]jq )}(hjnh]h Description}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjlubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMEhj)ubh)}(hReturns -EINVAL on custom fence wait implementation, -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success.h]hReturns -EINVAL on custom fence wait implementation, -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMEhj)ubh)}(hSynchronous waits for the first fence in the array to be signaled. The caller needs to hold a reference to all fences in the array, otherwise a fence might be freed before return, resulting in undefined behavior.h]hSynchronous waits for the first fence in the array to be signaled. The caller needs to hold a reference to all fences in the array, otherwise a fence might be freed before return, resulting in undefined behavior.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMIhj)ubh)}(h7See also dma_fence_wait() and dma_fence_wait_timeout().h]h7See also dma_fence_wait() and dma_fence_wait_timeout().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMMhj)ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_set_deadline (C function)c.dma_fence_set_deadlinehNtauh1j hjhhhNhNubj )}(hhh](j )}(hGvoid dma_fence_set_deadline (struct dma_fence *fence, ktime_t deadline)h]j )}(hFvoid dma_fence_set_deadline(struct dma_fence *fence, ktime_t deadline)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_set_deadlineh]j )}(hdma_fence_set_deadlineh]hdma_fence_set_deadline}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h+(struct dma_fence *fence, ktime_t deadline)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj.modnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_set_deadlineasbuh1hhj ubj )}(h h]h }(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjc)}(hj h]h*}(hjZhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj ubj )}(hfenceh]hfence}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hktime_t deadlineh](h)}(hhh]j )}(hktime_th]hktime_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jHc.dma_fence_set_deadlineasbuh1hhj|ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubj )}(hdeadlineh]hdeadline}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h$set desired fence-wait deadline hinth]h$set desired fence-wait deadline hint}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence that is to be waited on ``ktime_t deadline`` the time by which the waiter hopes for the fence to be signaled **Description** Give the fence signaler a hint about an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency if a periodic vblank deadline is approaching but the fence is not yet signaled..h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh](j )}(h>``struct dma_fence *fence`` the fence that is to be waited on h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h!the fence that is to be waited onh]h!the fence that is to be waited on}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hMhj0ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj/hMhjubj )}(hU``ktime_t deadline`` the time by which the waiter hopes for the fence to be signaled h](j )}(h``ktime_t deadline``h]j)}(hjSh]hktime_t deadline}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjMubj )}(hhh]h)}(h?the time by which the waiter hopes for the fence to be signaledh]h?the time by which the waiter hopes for the fence to be signaled}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjiubah}(h]h ]h"]h$]h&]uh1j hjMubeh}(h]h ]h"]h$]h&]uh1j hjhhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hX]Give the fence signaler a hint about an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency if a periodic vblank deadline is approaching but the fence is not yet signaled..h]hX]Give the fence signaler a hint about an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency if a periodic vblank deadline is approaching but the fence is not yet signaled..}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_describe (C function)c.dma_fence_describehNtauh1j hjhhhNhNubj )}(hhh](j )}(hGvoid dma_fence_describe (struct dma_fence *fence, struct seq_file *seq)h]j )}(hFvoid dma_fence_describe(struct dma_fence *fence, struct seq_file *seq)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_describeh]j )}(hdma_fence_describeh]hdma_fence_describe}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h/(struct dma_fence *fence, struct seq_file *seq)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj1modnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_describeasbuh1hhj ubj )}(h h]h }(hjOhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjc)}(hj h]h*}(hj]hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj ubj )}(hfenceh]hfence}(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hstruct seq_file *seqh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hseq_fileh]hseq_file}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jKc.dma_fence_describeasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hseqh]hseq}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h$Dump fence description into seq_fileh]h$Dump fence description into seq_file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` the fence to describe ``struct seq_file *seq`` the seq_file to put the textual description into **Description** Dump a textual description of the fence and it's state into the seq_file.h](h)}(h**Parameters**h]jq )}(hj&h]h Parameters}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj$ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj ubj )}(hhh](j )}(h2``struct dma_fence *fence`` the fence to describe h](j )}(h``struct dma_fence *fence``h]j)}(hjEh]hstruct dma_fence *fence}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj?ubj )}(hhh]h)}(hthe fence to describeh]hthe fence to describe}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhMhj[ubah}(h]h ]h"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]uh1j hjZhMhj<ubj )}(hJ``struct seq_file *seq`` the seq_file to put the textual description into h](j )}(h``struct seq_file *seq``h]j)}(hj~h]hstruct seq_file *seq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjxubj )}(hhh]h)}(h0the seq_file to put the textual description intoh]h0the seq_file to put the textual description into}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjxubeh}(h]h ]h"]h$]h&]uh1j hjhMhj<ubeh}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj ubh)}(hIDump a textual description of the fence and it's state into the seq_file.h]hKDump a textual description of the fence and it’s state into the seq_file.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_init (C function)c.dma_fence_inithNtauh1j hjhhhNhNubj )}(hhh](j )}(hxvoid dma_fence_init (struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h]j )}(hwvoid dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj hMubj )}(hdma_fence_inith]j )}(hdma_fence_inith]hdma_fence_init}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhj hMubj)}(hd(struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubj )}(h h]h }(hjHhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj[modnameN classnameNjj)}j]jN)}jFj!sbc.dma_fence_initasbuh1hhj7ubj )}(h h]h }(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj7ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj3ubj)}(hconst struct dma_fence_ops *opsh](j )}(hjh]hconst}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fence_opsh]h dma_fence_ops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]juc.dma_fence_initasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hopsh]hops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj3ubj)}(hspinlock_t *lockh](h)}(hhh]j )}(h spinlock_th]h spinlock_t}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj=modnameN classnameNjj)}j]juc.dma_fence_initasbuh1hhj4ubj )}(h h]h }(hjYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubjc)}(hj h]h*}(hjghhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj4ubj )}(hlockh]hlock}(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj3ubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]juc.dma_fence_initasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hcontexth]hcontext}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj3ubj)}(h u64 seqnoh](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]juc.dma_fence_initasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hseqnoh]hseqno}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj3ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhj hMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj hMhjhhubj@ )}(hhh]h)}(hInitialize a custom fence.h]hInitialize a custom fence.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj+hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jFjb jFjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to initialize ``const struct dma_fence_ops *ops`` the dma_fence_ops for operations on this fence ``spinlock_t *lock`` the irqsafe spinlock to use for locking this fence ``u64 context`` the execution context this fence is run on ``u64 seqno`` a linear increasing sequence number for this context **Description** Initializes an allocated fence, the caller doesn't have to keep its refcount after committing with this fence, but it will need to hold a refcount again if :c:type:`dma_fence_ops.enable_signaling ` gets called. context and seqno are used for easy comparison between fences, allowing to check which fence is later by simply using dma_fence_later().h](h)}(h**Parameters**h]jq )}(hjPh]h Parameters}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjJubj )}(hhh](j )}(h4``struct dma_fence *fence`` the fence to initialize h](j )}(h``struct dma_fence *fence``h]j)}(hjoh]hstruct dma_fence *fence}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjiubj )}(hhh]h)}(hthe fence to initializeh]hthe fence to initialize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjiubeh}(h]h ]h"]h$]h&]uh1j hjhMhjfubj )}(hS``const struct dma_fence_ops *ops`` the dma_fence_ops for operations on this fence h](j )}(h#``const struct dma_fence_ops *ops``h]j)}(hjh]hconst struct dma_fence_ops *ops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h.the dma_fence_ops for operations on this fenceh]h.the dma_fence_ops for operations on this fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjfubj )}(hH``spinlock_t *lock`` the irqsafe spinlock to use for locking this fence h](j )}(h``spinlock_t *lock``h]j)}(hjh]hspinlock_t *lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h2the irqsafe spinlock to use for locking this fenceh]h2the irqsafe spinlock to use for locking this fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjfubj )}(h;``u64 context`` the execution context this fence is run on h](j )}(h``u64 context``h]j)}(hjh]h u64 context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h*the execution context this fence is run onh]h*the execution context this fence is run on}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hMhj0ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj/hMhjfubj )}(hC``u64 seqno`` a linear increasing sequence number for this context h](j )}(h ``u64 seqno``h]j)}(hjSh]h u64 seqno}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjMubj )}(hhh]h)}(h4a linear increasing sequence number for this contexth]h4a linear increasing sequence number for this context}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMhjiubah}(h]h ]h"]h$]h&]uh1j hjMubeh}(h]h ]h"]h$]h&]uh1j hjhhMhjfubeh}(h]h ]h"]h$]h&]uh1j hjJubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjJubh)}(hInitializes an allocated fence, the caller doesn't have to keep its refcount after committing with this fence, but it will need to hold a refcount again if :c:type:`dma_fence_ops.enable_signaling ` gets called.h](hInitializes an allocated fence, the caller doesn’t have to keep its refcount after committing with this fence, but it will need to hold a refcount again if }(hjhhhNhNubh)}(h8:c:type:`dma_fence_ops.enable_signaling `h]j)}(hjh]hdma_fence_ops.enable_signaling}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh gets called.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjJubh)}(hcontext and seqno are used for easy comparison between fences, allowing to check which fence is later by simply using dma_fence_later().h]hcontext and seqno are used for easy comparison between fences, allowing to check which fence is later by simply using dma_fence_later().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjJubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence (C struct) c.dma_fencehNtauh1j hjhhhNhNubj )}(hhh](j )}(h dma_fenceh]j )}(hstruct dma_fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubj )}(h dma_fenceh]j )}(hjh]h dma_fence}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjhhubj@ )}(hhh]h)}(h"software synchronization primitiveh]h"software synchronization primitive}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjDhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j` jja j_jb j_jc jd je uh1j hhhjhNhNubjg )}(hXQ**Definition**:: struct dma_fence { spinlock_t *lock; const struct dma_fence_ops *ops; union { struct list_head cb_list; ktime_t timestamp; struct rcu_head rcu; }; u64 context; u64 seqno; unsigned long flags; struct kref refcount; int error; }; **Members** ``lock`` spin_lock_irqsave used for locking ``ops`` dma_fence_ops associated with this fence ``{unnamed_union}`` anonymous ``cb_list`` list of all callbacks to call ``timestamp`` Timestamp when the fence was signaled. ``rcu`` used for releasing fence with kfree_rcu ``context`` execution context this fence belongs to, returned by dma_fence_context_alloc() ``seqno`` the sequence number of this fence inside the execution context, can be compared to decide which fence would be signaled later. ``flags`` A mask of DMA_FENCE_FLAG_* defined below ``refcount`` refcount for this fence ``error`` Optional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.h](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjgubh:}(hjghhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK#hjcubj)}(hXstruct dma_fence { spinlock_t *lock; const struct dma_fence_ops *ops; union { struct list_head cb_list; ktime_t timestamp; struct rcu_head rcu; }; u64 context; u64 seqno; unsigned long flags; struct kref refcount; int error; };h]hXstruct dma_fence { spinlock_t *lock; const struct dma_fence_ops *ops; union { struct list_head cb_list; ktime_t timestamp; struct rcu_head rcu; }; u64 context; u64 seqno; unsigned long flags; struct kref refcount; int error; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK%hjcubh)}(h **Members**h]jq )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK4hjcubj )}(hhh](j )}(h,``lock`` spin_lock_irqsave used for locking h](j )}(h``lock``h]j)}(hjh]hlock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK%hjubj )}(hhh]h)}(h"spin_lock_irqsave used for lockingh]h"spin_lock_irqsave used for locking}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK%hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK%hjubj )}(h1``ops`` dma_fence_ops associated with this fence h](j )}(h``ops``h]j)}(hjh]hops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK"hjubj )}(hhh]h)}(h(dma_fence_ops associated with this fenceh]h(dma_fence_ops associated with this fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK"hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK"hjubj )}(h``{unnamed_union}`` anonymous h](j )}(h``{unnamed_union}``h]j)}(hj&h]h{unnamed_union}}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK%hj ubj )}(hhh]h)}(h anonymoush]h anonymous}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hK%hj<ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj;hK%hjubj )}(h*``cb_list`` list of all callbacks to call h](j )}(h ``cb_list``h]j)}(hj_h]hcb_list}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK$hjYubj )}(hhh]h)}(hlist of all callbacks to callh]hlist of all callbacks to call}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthK$hjuubah}(h]h ]h"]h$]h&]uh1j hjYubeh}(h]h ]h"]h$]h&]uh1j hjthK$hjubj )}(h5``timestamp`` Timestamp when the fence was signaled. h](j )}(h ``timestamp``h]j)}(hjh]h timestamp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK+hjubj )}(hhh]h)}(h&Timestamp when the fence was signaled.h]h&Timestamp when the fence was signaled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK+hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK+hjubj )}(h0``rcu`` used for releasing fence with kfree_rcu h](j )}(h``rcu``h]j)}(hjh]hrcu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK#hjubj )}(hhh]h)}(h'used for releasing fence with kfree_rcuh]h'used for releasing fence with kfree_rcu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK#hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK#hjubj )}(h[``context`` execution context this fence belongs to, returned by dma_fence_context_alloc() h](j )}(h ``context``h]j)}(hj h]hcontext}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK'hjubj )}(hhh]h)}(hNexecution context this fence belongs to, returned by dma_fence_context_alloc()h]hNexecution context this fence belongs to, returned by dma_fence_context_alloc()}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK&hj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK'hjubj )}(h``seqno`` the sequence number of this fence inside the execution context, can be compared to decide which fence would be signaled later. h](j )}(h ``seqno``h]j)}(hjDh]hseqno}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK)hj>ubj )}(hhh]h)}(h~the sequence number of this fence inside the execution context, can be compared to decide which fence would be signaled later.h]h~the sequence number of this fence inside the execution context, can be compared to decide which fence would be signaled later.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK(hjZubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hjYhK)hjubj )}(h3``flags`` A mask of DMA_FENCE_FLAG_* defined below h](j )}(h ``flags``h]j)}(hj~h]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK*hjxubj )}(hhh]h)}(h(A mask of DMA_FENCE_FLAG_* defined belowh]h(A mask of DMA_FENCE_FLAG_* defined below}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK*hjubah}(h]h ]h"]h$]h&]uh1j hjxubeh}(h]h ]h"]h$]h&]uh1j hjhK*hjubj )}(h%``refcount`` refcount for this fence h](j )}(h ``refcount``h]j)}(hjh]hrefcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK!hjubj )}(hhh]h)}(hrefcount for this fenceh]hrefcount for this fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK!hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK!hjubj )}(h``error`` Optional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.h](j )}(h ``error``h]j)}(hjh]herror}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK,hjubj )}(hhh]h)}(hOptional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.h]hOptional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK,hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK,hjubeh}(h]h ]h"]h$]h&]uh1j hjcubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubh)}(h**Description**h]jq )}(hj2h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj0ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK0hjhhubh)}(hthe flags member must be manipulated and read using the appropriate atomic ops (bit_*), so taking the spinlock will not be needed most of the time.h]hthe flags member must be manipulated and read using the appropriate atomic ops (bit_*), so taking the spinlock will not be needed most of the time.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK.hjhhubh)}(hXDMA_FENCE_FLAG_SIGNALED_BIT - fence is already signaled DMA_FENCE_FLAG_TIMESTAMP_BIT - timestamp recorded for fence signaling DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT - enable_signaling might have been called DMA_FENCE_FLAG_USER_BITS - start of the unused bits, can be used by the implementer of the fence for its own purposes. Can be used in different ways by different fence implementers, so do not rely on this.h]hXDMA_FENCE_FLAG_SIGNALED_BIT - fence is already signaled DMA_FENCE_FLAG_TIMESTAMP_BIT - timestamp recorded for fence signaling DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT - enable_signaling might have been called DMA_FENCE_FLAG_USER_BITS - start of the unused bits, can be used by the implementer of the fence for its own purposes. Can be used in different ways by different fence implementers, so do not rely on this.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK2hjhhubh)}(hXSince atomic bitops are used, this is not guaranteed to be the case. Particularly, if the bit was set, but dma_fence_signal was called right before this bit was set, it would have been able to set the DMA_FENCE_FLAG_SIGNALED_BIT, before enable_signaling was called. Adding a check for DMA_FENCE_FLAG_SIGNALED_BIT after setting DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT closes this race, and makes sure that after dma_fence_signal was called, any enable_signaling call will have either been completed, or never called at all.h]hXSince atomic bitops are used, this is not guaranteed to be the case. Particularly, if the bit was set, but dma_fence_signal was called right before this bit was set, it would have been able to set the DMA_FENCE_FLAG_SIGNALED_BIT, before enable_signaling was called. Adding a check for DMA_FENCE_FLAG_SIGNALED_BIT after setting DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT closes this race, and makes sure that after dma_fence_signal was called, any enable_signaling call will have either been completed, or never called at all.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK9hjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_cb (C struct)c.dma_fence_cbhNtauh1j hjhhhNhNubj )}(hhh](j )}(h dma_fence_cbh]j )}(hstruct dma_fence_cbh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKEubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKEubj )}(h dma_fence_cbh]j )}(hjh]h dma_fence_cb}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKEubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKEubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKEhjhhubj@ )}(hhh]h)}(h%callback for dma_fence_add_callback()h]h%callback for dma_fence_add_callback()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKnhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKEubeh}(h]h ](jstructeh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Definition**:: struct dma_fence_cb { struct list_head node; dma_fence_func_t func; }; **Members** ``node`` used by dma_fence_add_callback() to append this struct to fence::cb_list ``func`` dma_fence_func_t to callh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKrhjubj)}(hNstruct dma_fence_cb { struct list_head node; dma_fence_func_t func; };h]hNstruct dma_fence_cb { struct list_head node; dma_fence_func_t func; };}hj sbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKthjubh)}(h **Members**h]jq )}(hjh]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKyhjubj )}(hhh](j )}(hR``node`` used by dma_fence_add_callback() to append this struct to fence::cb_list h](j )}(h``node``h]j)}(hj=h]hnode}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKphj7ubj )}(hhh]h)}(hHused by dma_fence_add_callback() to append this struct to fence::cb_listh]hHused by dma_fence_add_callback() to append this struct to fence::cb_list}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhKphjSubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hjRhKphj4ubj )}(h!``func`` dma_fence_func_t to callh](j )}(h``func``h]j)}(hjvh]hfunc}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKphjpubj )}(hhh]h)}(hdma_fence_func_t to callh]hdma_fence_func_t to call}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKqhjubah}(h]h ]h"]h$]h&]uh1j hjpubeh}(h]h ]h"]h$]h&]uh1j hjhKphj4ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKthjhhubh)}(hThis struct will be initialized by dma_fence_add_callback(), additional data can be passed along by embedding dma_fence_cb in another struct.h]hThis struct will be initialized by dma_fence_add_callback(), additional data can be passed along by embedding dma_fence_cb in another struct.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKrhjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_ops (C struct)c.dma_fence_opshNtauh1j hjhhhNhNubj )}(hhh](j )}(h dma_fence_opsh]j )}(hstruct dma_fence_opsh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKxubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKxubj )}(h dma_fence_opsh]j )}(hjh]h dma_fence_ops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKxubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKxubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKxhjhhubj@ )}(hhh]h)}(h operations implemented for fenceh]h operations implemented for fence}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK{hj6hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKxubeh}(h]h ](jstructeh"]h$]h&]j` jja jQjb jQjc jd je uh1j hhhjhNhNubjg )}(hX**Definition**:: struct dma_fence_ops { bool use_64bit_seqno; const char * (*get_driver_name)(struct dma_fence *fence); const char * (*get_timeline_name)(struct dma_fence *fence); bool (*enable_signaling)(struct dma_fence *fence); bool (*signaled)(struct dma_fence *fence); signed long (*wait)(struct dma_fence *fence, bool intr, signed long timeout); void (*release)(struct dma_fence *fence); void (*fence_value_str)(struct dma_fence *fence, char *str, int size); void (*timeline_value_str)(struct dma_fence *fence, char *str, int size); void (*set_deadline)(struct dma_fence *fence, ktime_t deadline); }; **Members** ``use_64bit_seqno`` True if this dma_fence implementation uses 64bit seqno, false otherwise. ``get_driver_name`` Returns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. ``get_timeline_name`` Return the name of the context this fence belongs to. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. ``enable_signaling`` Enable software signaling of fence. For fence implementations that have the capability for hw->hw signaling, they can implement this op to enable the necessary interrupts, or insert commands into cmdstream, etc, to avoid these costly operations for the common case where only hw->hw synchronization is required. This is called in the first dma_fence_wait() or dma_fence_add_callback() path to let the fence implementation know that there is another driver waiting on the signal (ie. hw->sw case). This function can be called from atomic context, but not from irq context, so normal spinlocks can be used. A return value of false indicates the fence already passed, or some failure occurred that made it impossible to enable signaling. True indicates successful enabling. :c:type:`dma_fence.error ` may be set in enable_signaling, but only when false is returned. Since many implementations can call dma_fence_signal() even when before **enable_signaling** has been called there's a race window, where the dma_fence_signal() might result in the final fence reference being released and its memory freed. To avoid this, implementations of this callback should grab their own reference using dma_fence_get(), to be released when the fence is signalled (through e.g. the interrupt handler). This callback is optional. If this callback is not present, then the driver must always have signaling enabled. ``signaled`` Peek whether the fence is signaled, as a fastpath optimization for e.g. dma_fence_wait() or dma_fence_add_callback(). Note that this callback does not need to make any guarantees beyond that a fence once indicates as signalled must always return true from this callback. This callback may return false even if the fence has completed already, in this case information hasn't propogated throug the system yet. See also dma_fence_is_signaled(). May set :c:type:`dma_fence.error ` if returning true. This callback is optional. ``wait`` Custom wait implementation, defaults to dma_fence_default_wait() if not set. Deprecated and should not be used by new implementations. Only used by existing implementations which need special handling for their hardware reset procedure. Must return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that. ``release`` Called on destruction of fence to release additional resources. Can be called from irq context. This callback is optional. If it is NULL, then dma_fence_free() is instead called as the default implementation. ``fence_value_str`` Callback to fill in free-form debug info specific to this fence, like the sequence number. This callback is optional. ``timeline_value_str`` Fills in the current value of the timeline as a string, like the sequence number. Note that the specific fence passed to this function should not matter, drivers should only use it to look up the corresponding timeline structures. ``set_deadline`` Callback to allow a fence waiter to inform the fence signaler of an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency. This is called without :c:type:`dma_fence.lock ` held, it can be called multiple times and from any context. Locking is up to the callee if it has some state to manage. If multiple deadlines are set, the expectation is to track the soonest one. If the deadline is before the current time, it should be interpreted as an immediate deadline. This callback is optional.h](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjYubh:}(hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjUubj)}(hXustruct dma_fence_ops { bool use_64bit_seqno; const char * (*get_driver_name)(struct dma_fence *fence); const char * (*get_timeline_name)(struct dma_fence *fence); bool (*enable_signaling)(struct dma_fence *fence); bool (*signaled)(struct dma_fence *fence); signed long (*wait)(struct dma_fence *fence, bool intr, signed long timeout); void (*release)(struct dma_fence *fence); void (*fence_value_str)(struct dma_fence *fence, char *str, int size); void (*timeline_value_str)(struct dma_fence *fence, char *str, int size); void (*set_deadline)(struct dma_fence *fence, ktime_t deadline); };h]hXustruct dma_fence_ops { bool use_64bit_seqno; const char * (*get_driver_name)(struct dma_fence *fence); const char * (*get_timeline_name)(struct dma_fence *fence); bool (*enable_signaling)(struct dma_fence *fence); bool (*signaled)(struct dma_fence *fence); signed long (*wait)(struct dma_fence *fence, bool intr, signed long timeout); void (*release)(struct dma_fence *fence); void (*fence_value_str)(struct dma_fence *fence, char *str, int size); void (*timeline_value_str)(struct dma_fence *fence, char *str, int size); void (*set_deadline)(struct dma_fence *fence, ktime_t deadline); };}hjvsbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjUubh)}(h **Members**h]jq )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjUubj )}(hhh](j )}(h]``use_64bit_seqno`` True if this dma_fence implementation uses 64bit seqno, false otherwise. h](j )}(h``use_64bit_seqno``h]j)}(hjh]huse_64bit_seqno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj )}(hhh]h)}(hHTrue if this dma_fence implementation uses 64bit seqno, false otherwise.h]hHTrue if this dma_fence implementation uses 64bit seqno, false otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h``get_driver_name`` Returns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. h](j )}(h``get_driver_name``h]j)}(hjh]hget_driver_name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj )}(hhh](h)}(hReturns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort.h]hReturns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hThis callback is mandatory.h]hThis callback is mandatory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(hX``get_timeline_name`` Return the name of the context this fence belongs to. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. h](j )}(h``get_timeline_name``h]j)}(hj(h]hget_timeline_name}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhj"ubj )}(hhh](h)}(hReturn the name of the context this fence belongs to. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort.h]hReturn the name of the context this fence belongs to. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhj>ubh)}(hThis callback is mandatory.h]hThis callback is mandatory.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hKhj>ubeh}(h]h ]h"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]uh1j hj=hKhjubj )}(hX``enable_signaling`` Enable software signaling of fence. For fence implementations that have the capability for hw->hw signaling, they can implement this op to enable the necessary interrupts, or insert commands into cmdstream, etc, to avoid these costly operations for the common case where only hw->hw synchronization is required. This is called in the first dma_fence_wait() or dma_fence_add_callback() path to let the fence implementation know that there is another driver waiting on the signal (ie. hw->sw case). This function can be called from atomic context, but not from irq context, so normal spinlocks can be used. A return value of false indicates the fence already passed, or some failure occurred that made it impossible to enable signaling. True indicates successful enabling. :c:type:`dma_fence.error ` may be set in enable_signaling, but only when false is returned. Since many implementations can call dma_fence_signal() even when before **enable_signaling** has been called there's a race window, where the dma_fence_signal() might result in the final fence reference being released and its memory freed. To avoid this, implementations of this callback should grab their own reference using dma_fence_get(), to be released when the fence is signalled (through e.g. the interrupt handler). This callback is optional. If this callback is not present, then the driver must always have signaling enabled. h](j )}(h``enable_signaling``h]j)}(hjph]henable_signaling}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjjubj )}(hhh](h)}(h#Enable software signaling of fence.h]h#Enable software signaling of fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hXFor fence implementations that have the capability for hw->hw signaling, they can implement this op to enable the necessary interrupts, or insert commands into cmdstream, etc, to avoid these costly operations for the common case where only hw->hw synchronization is required. This is called in the first dma_fence_wait() or dma_fence_add_callback() path to let the fence implementation know that there is another driver waiting on the signal (ie. hw->sw case).h]hXFor fence implementations that have the capability for hw->hw signaling, they can implement this op to enable the necessary interrupts, or insert commands into cmdstream, etc, to avoid these costly operations for the common case where only hw->hw synchronization is required. This is called in the first dma_fence_wait() or dma_fence_add_callback() path to let the fence implementation know that there is another driver waiting on the signal (ie. hw->sw case).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hkThis function can be called from atomic context, but not from irq context, so normal spinlocks can be used.h]hkThis function can be called from atomic context, but not from irq context, so normal spinlocks can be used.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hA return value of false indicates the fence already passed, or some failure occurred that made it impossible to enable signaling. True indicates successful enabling.h]hA return value of false indicates the fence already passed, or some failure occurred that made it impossible to enable signaling. True indicates successful enabling.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hf:c:type:`dma_fence.error ` may be set in enable_signaling, but only when false is returned.h](h)}(h%:c:type:`dma_fence.error `h]j)}(hjh]hdma_fence.error}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubhA may be set in enable_signaling, but only when false is returned.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubh)}(hXSince many implementations can call dma_fence_signal() even when before **enable_signaling** has been called there's a race window, where the dma_fence_signal() might result in the final fence reference being released and its memory freed. To avoid this, implementations of this callback should grab their own reference using dma_fence_get(), to be released when the fence is signalled (through e.g. the interrupt handler).h](hHSince many implementations can call dma_fence_signal() even when before }(hjhhhNhNubjq )}(h**enable_signaling**h]henable_signaling}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubhXM has been called there’s a race window, where the dma_fence_signal() might result in the final fence reference being released and its memory freed. To avoid this, implementations of this callback should grab their own reference using dma_fence_get(), to be released when the fence is signalled (through e.g. the interrupt handler).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hoThis callback is optional. If this callback is not present, then the driver must always have signaling enabled.h]hoThis callback is optional. If this callback is not present, then the driver must always have signaling enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubeh}(h]h ]h"]h$]h&]uh1j hjjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(hX&``signaled`` Peek whether the fence is signaled, as a fastpath optimization for e.g. dma_fence_wait() or dma_fence_add_callback(). Note that this callback does not need to make any guarantees beyond that a fence once indicates as signalled must always return true from this callback. This callback may return false even if the fence has completed already, in this case information hasn't propogated throug the system yet. See also dma_fence_is_signaled(). May set :c:type:`dma_fence.error ` if returning true. This callback is optional. h](j )}(h ``signaled``h]j)}(hj5h]hsignaled}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhj/ubj )}(hhh](h)}(hXPeek whether the fence is signaled, as a fastpath optimization for e.g. dma_fence_wait() or dma_fence_add_callback(). Note that this callback does not need to make any guarantees beyond that a fence once indicates as signalled must always return true from this callback. This callback may return false even if the fence has completed already, in this case information hasn't propogated throug the system yet. See also dma_fence_is_signaled().h]hXPeek whether the fence is signaled, as a fastpath optimization for e.g. dma_fence_wait() or dma_fence_add_callback(). Note that this callback does not need to make any guarantees beyond that a fence once indicates as signalled must always return true from this callback. This callback may return false even if the fence has completed already, in this case information hasn’t propogated throug the system yet. See also dma_fence_is_signaled().}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjKubh)}(h@May set :c:type:`dma_fence.error ` if returning true.h](hMay set }(hj]hhhNhNubh)}(h%:c:type:`dma_fence.error `h]j)}(hjgh]hdma_fence.error}(hjihhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhj]ubh if returning true.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjKubh)}(hThis callback is optional.h]hThis callback is optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhKhjKubeh}(h]h ]h"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]uh1j hjJhKhjubj )}(hX=``wait`` Custom wait implementation, defaults to dma_fence_default_wait() if not set. Deprecated and should not be used by new implementations. Only used by existing implementations which need special handling for their hardware reset procedure. Must return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that. h](j )}(h``wait``h]j)}(hjh]hwait}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj )}(hhh](h)}(hLCustom wait implementation, defaults to dma_fence_default_wait() if not set.h]hLCustom wait implementation, defaults to dma_fence_default_wait() if not set.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hDeprecated and should not be used by new implementations. Only used by existing implementations which need special handling for their hardware reset procedure.h]hDeprecated and should not be used by new implementations. Only used by existing implementations which need special handling for their hardware reset procedure.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hXDMust return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that.h]hXDMust return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h``release`` Called on destruction of fence to release additional resources. Can be called from irq context. This callback is optional. If it is NULL, then dma_fence_free() is instead called as the default implementation. h](j )}(h ``release``h]j)}(hjh]hrelease}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj )}(hhh]h)}(hCalled on destruction of fence to release additional resources. Can be called from irq context. This callback is optional. If it is NULL, then dma_fence_free() is instead called as the default implementation.h]hCalled on destruction of fence to release additional resources. Can be called from irq context. This callback is optional. If it is NULL, then dma_fence_free() is instead called as the default implementation.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h``fence_value_str`` Callback to fill in free-form debug info specific to this fence, like the sequence number. This callback is optional. h](j )}(h``fence_value_str``h]j)}(hjAh]hfence_value_str}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhj;ubj )}(hhh](h)}(hZCallback to fill in free-form debug info specific to this fence, like the sequence number.h]hZCallback to fill in free-form debug info specific to this fence, like the sequence number.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjWubh)}(hThis callback is optional.h]hThis callback is optional.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhKhjWubeh}(h]h ]h"]h$]h&]uh1j hj;ubeh}(h]h ]h"]h$]h&]uh1j hjVhKhjubj )}(h``timeline_value_str`` Fills in the current value of the timeline as a string, like the sequence number. Note that the specific fence passed to this function should not matter, drivers should only use it to look up the corresponding timeline structures. h](j )}(h``timeline_value_str``h]j)}(hjh]htimeline_value_str}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hFills in the current value of the timeline as a string, like the sequence number. Note that the specific fence passed to this function should not matter, drivers should only use it to look up the corresponding timeline structures.h]hFills in the current value of the timeline as a string, like the sequence number. Note that the specific fence passed to this function should not matter, drivers should only use it to look up the corresponding timeline structures.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(hX``set_deadline`` Callback to allow a fence waiter to inform the fence signaler of an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency. This is called without :c:type:`dma_fence.lock ` held, it can be called multiple times and from any context. Locking is up to the callee if it has some state to manage. If multiple deadlines are set, the expectation is to track the soonest one. If the deadline is before the current time, it should be interpreted as an immediate deadline. This callback is optional.h](j )}(h``set_deadline``h]j)}(hjh]h set_deadline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh](h)}(hX)Callback to allow a fence waiter to inform the fence signaler of an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency.h]hX)Callback to allow a fence waiter to inform the fence signaler of an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hXaThis is called without :c:type:`dma_fence.lock ` held, it can be called multiple times and from any context. Locking is up to the callee if it has some state to manage. If multiple deadlines are set, the expectation is to track the soonest one. If the deadline is before the current time, it should be interpreted as an immediate deadline.h](hThis is called without }(hjhhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjh]hdma_fence.lock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubhX& held, it can be called multiple times and from any context. Locking is up to the callee if it has some state to manage. If multiple deadlines are set, the expectation is to track the soonest one. If the deadline is before the current time, it should be interpreted as an immediate deadline.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubh)}(hThis callback is optional.h]hThis callback is optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjUubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_put (C function)c.dma_fence_puthNtauh1j hjhhhNhNubj )}(hhh](j )}(h,void dma_fence_put (struct dma_fence *fence)h]j )}(h+void dma_fence_put(struct dma_fence *fence)h](jK)}(hvoidh]hvoid}(hj^hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjZhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM&ubj )}(h h]h }(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZhhhjlhM&ubj )}(h dma_fence_puth]j )}(h dma_fence_puth]h dma_fence_put}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjZhhhjlhM&ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_putasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjZhhhjlhM&ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjVhhhjlhM&ubah}(h]jQah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjlhM&hjShhubj@ )}(hhh]h)}(hdecreases refcount of the fenceh]hdecreases refcount of the fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM#hjhhubah}(h]h ]h"]h$]h&]uh1j? hjShhhjlhM&ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j6jb j6jc jd je uh1j hhhjhNhNubjg )}(hI**Parameters** ``struct dma_fence *fence`` fence to reduce refcount ofh](h)}(h**Parameters**h]jq )}(hj@h]h Parameters}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj>ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM'hj:ubj )}(hhh]j )}(h7``struct dma_fence *fence`` fence to reduce refcount ofh](j )}(h``struct dma_fence *fence``h]j)}(hj_h]hstruct dma_fence *fence}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM)hjYubj )}(hhh]h)}(hfence to reduce refcount ofh]hfence to reduce refcount of}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM$hjuubah}(h]h ]h"]h$]h&]uh1j hjYubeh}(h]h ]h"]h$]h&]uh1j hjthM)hjVubah}(h]h ]h"]h$]h&]uh1j hj:ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_get (C function)c.dma_fence_gethNtauh1j hjhhhNhNubj )}(hhh](j )}(h:struct dma_fence * dma_fence_get (struct dma_fence *fence)h]j )}(h8struct dma_fence *dma_fence_get(struct dma_fence *fence)h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM2ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhM2ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jF dma_fence_getsbc.dma_fence_getasbuh1hhjhhhjhM2ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhM2ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjhhhjhM2ubj )}(h dma_fence_geth]j )}(hjh]h dma_fence_get}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhM2ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubj )}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjQhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjSmodnameN classnameNjj)}j]jc.dma_fence_getasbuh1hhj/ubj )}(h h]h }(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubjc)}(hj h]h*}(hj}hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj/ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM2ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhM2ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhM2hjhhubj@ )}(hhh]h)}(hincreases refcount of the fenceh]hincreases refcount of the fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM-hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhM2ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` fence to increase refcount of **Description** Returns the same fence, with refcount increased by 1.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM1hjubj )}(hhh]j )}(h:``struct dma_fence *fence`` fence to increase refcount of h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM.hjubj )}(hhh]h)}(hfence to increase refcount ofh]hfence to increase refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hM.hj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj hM.hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj0h]h Description}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj.ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM0hjubh)}(h5Returns the same fence, with refcount increased by 1.h]h5Returns the same fence, with refcount increased by 1.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM0hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_get_rcu (C function)c.dma_fence_get_rcuhNtauh1j hjhhhNhNubj )}(hhh](j )}(h>struct dma_fence * dma_fence_get_rcu (struct dma_fence *fence)h]j )}(h huh1j hjhM@hjjhhubj@ )}(hhh]h)}(h3get a fence from a dma_resv_list with rcu read lockh]h3get a fence from a dma_resv_list with rcu read lock}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM:hjmhhubah}(h]h ]h"]h$]h&]uh1j? hjjhhhjhM@ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` fence to increase refcount of **Description** Function returns NULL if no refcount could be obtained, or the fence.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM>hjubj )}(hhh]j )}(h:``struct dma_fence *fence`` fence to increase refcount of h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM<hjubj )}(hhh]h)}(hfence to increase refcount ofh]hfence to increase refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM<hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM<hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM>hjubh)}(hEFunction returns NULL if no refcount could be obtained, or the fence.h]hEFunction returns NULL if no refcount could be obtained, or the fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM>hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_get_rcu_safe (C function)c.dma_fence_get_rcu_safehNtauh1j hjhhhNhNubj )}(hhh](j )}(hKstruct dma_fence * dma_fence_get_rcu_safe (struct dma_fence __rcu **fencep)h]j )}(hIstruct dma_fence *dma_fence_get_rcu_safe(struct dma_fence __rcu **fencep)h](j )}(hj h]hstruct}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMXubj )}(h h]h }(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-hhhj>hMXubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjPhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjMubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjRmodnameN classnameNjj)}j]jN)}jFdma_fence_get_rcu_safesbc.dma_fence_get_rcu_safeasbuh1hhj-hhhj>hMXubj )}(h h]h }(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-hhhj>hMXubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj-hhhj>hMXubj )}(hdma_fence_get_rcu_safeh]j )}(hjnh]hdma_fence_get_rcu_safe}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj-hhhj>hMXubj)}(h!(struct dma_fence __rcu **fencep)h]j)}(hstruct dma_fence __rcu **fenceph](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jlc.dma_fence_get_rcu_safeasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh__rcu}(hjhhhNhNubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceph]hfencep}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj-hhhj>hMXubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj)hhhj>hMXubah}(h]j$ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj>hMXhj&hhubj@ )}(hhh]h)}(h+acquire a reference to an RCU tracked fenceh]h+acquire a reference to an RCU tracked fence}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMIhjHhhubah}(h]h ]h"]h$]h&]uh1j? hj&hhhj>hMXubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jcjb jcjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence __rcu **fencep`` pointer to fence to increase refcount of **Description** Function returns NULL if no refcount could be obtained, or the fence. This function handles acquiring a reference to a fence that may be reallocated within the RCU grace period (such as with SLAB_TYPESAFE_BY_RCU), so long as the caller is using RCU on the pointer to the fence. An alternative mechanism is to employ a seqlock to protect a bunch of fences, such as used by struct dma_resv. When using a seqlock, the seqlock must be taken before and checked after a reference to the fence is acquired (as shown here). The caller is required to hold the RCU read lock.h](h)}(h**Parameters**h]jq )}(hjmh]h Parameters}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjkubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMMhjgubj )}(hhh]j )}(hM``struct dma_fence __rcu **fencep`` pointer to fence to increase refcount of h](j )}(h#``struct dma_fence __rcu **fencep``h]j)}(hjh]hstruct dma_fence __rcu **fencep}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMJhjubj )}(hhh]h)}(h(pointer to fence to increase refcount ofh]h(pointer to fence to increase refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMJhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMJhjubah}(h]h ]h"]h$]h&]uh1j hjgubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMLhjgubh)}(hXFunction returns NULL if no refcount could be obtained, or the fence. This function handles acquiring a reference to a fence that may be reallocated within the RCU grace period (such as with SLAB_TYPESAFE_BY_RCU), so long as the caller is using RCU on the pointer to the fence.h]hXFunction returns NULL if no refcount could be obtained, or the fence. This function handles acquiring a reference to a fence that may be reallocated within the RCU grace period (such as with SLAB_TYPESAFE_BY_RCU), so long as the caller is using RCU on the pointer to the fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMLhjgubh)}(hAn alternative mechanism is to employ a seqlock to protect a bunch of fences, such as used by struct dma_resv. When using a seqlock, the seqlock must be taken before and checked after a reference to the fence is acquired (as shown here).h]hAn alternative mechanism is to employ a seqlock to protect a bunch of fences, such as used by struct dma_resv. When using a seqlock, the seqlock must be taken before and checked after a reference to the fence is acquired (as shown here).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMQhjgubh)}(h1The caller is required to hold the RCU read lock.h]h1The caller is required to hold the RCU read lock.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMVhjgubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j )dma_fence_is_signaled_locked (C function)c.dma_fence_is_signaled_lockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(h;bool dma_fence_is_signaled_locked (struct dma_fence *fence)h]j )}(h:bool dma_fence_is_signaled_locked(struct dma_fence *fence)h](jK)}(hjE_h]hbool}(hj*hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj&hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&hhhj7hMubj )}(hdma_fence_is_signaled_lockedh]j )}(hdma_fence_is_signaled_lockedh]hdma_fence_is_signaled_locked}(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjFubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj&hhhj7hMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubj )}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjLsbc.dma_fence_is_signaled_lockedasbuh1hhjbubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjbubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj^ubah}(h]h ]h"]h$]h&]jjuh1jhj&hhhj7hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj"hhhj7hMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj7hMhjhhubj@ )}(hhh]h)}(h2Return an indication if the fence is signaled yet.h]h2Return an indication if the fence is signaled yet.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj7hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to check **Description** Returns true if the fence was already signaled, false if not. Since this function doesn't enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven't been called before. This function requires :c:type:`dma_fence.lock ` to be held. See also dma_fence_is_signaled().h](h)}(h**Parameters**h]jq )}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h/``struct dma_fence *fence`` the fence to check h](j )}(h``struct dma_fence *fence``h]j)}(hj*h]hstruct dma_fence *fence}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj$ubj )}(hhh]h)}(hthe fence to checkh]hthe fence to check}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hMhj@ubah}(h]h ]h"]h$]h&]uh1j hj$ubeh}(h]h ]h"]h$]h&]uh1j hj?hMhj!ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjeh]h Description}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjcubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hXReturns true if the fence was already signaled, false if not. Since this function doesn't enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven't been called before.h]hXReturns true if the fence was already signaled, false if not. Since this function doesn’t enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven’t been called before.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hGThis function requires :c:type:`dma_fence.lock ` to be held.h](hThis function requires }(hjhhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjh]hdma_fence.lock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh to be held.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubh)}(h!See also dma_fence_is_signaled().h]h!See also dma_fence_is_signaled().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_fence_is_signaled (C function)c.dma_fence_is_signaledhNtauh1j hjhhhNhNubj )}(hhh](j )}(h4bool dma_fence_is_signaled (struct dma_fence *fence)h]j )}(h3bool dma_fence_is_signaled(struct dma_fence *fence)h](jK)}(hjE_h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_is_signaledh]j )}(hdma_fence_is_signaledh]hdma_fence_is_signaled}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubj )}(h h]h }(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjGmodnameN classnameNjj)}j]jN)}jFj sbc.dma_fence_is_signaledasbuh1hhj#ubj )}(h h]h }(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubjc)}(hj h]h*}(hjshhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj#ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h2Return an indication if the fence is signaled yet.h]h2Return an indication if the fence is signaled yet.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to check **Description** Returns true if the fence was already signaled, false if not. Since this function doesn't enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven't been called before. It's recommended for seqno fences to call dma_fence_signal when the operation is complete, it makes it possible to prevent issues from wraparound between time of issue and time of use by checking the return value of this function before calling hardware-specific wait instructions. See also dma_fence_is_signaled_locked().h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h/``struct dma_fence *fence`` the fence to check h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe fence to checkh]hthe fence to check}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj&h]h Description}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj$ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hXReturns true if the fence was already signaled, false if not. Since this function doesn't enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven't been called before.h]hXReturns true if the fence was already signaled, false if not. Since this function doesn’t enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven’t been called before.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hXIt's recommended for seqno fences to call dma_fence_signal when the operation is complete, it makes it possible to prevent issues from wraparound between time of issue and time of use by checking the return value of this function before calling hardware-specific wait instructions.h]hXIt’s recommended for seqno fences to call dma_fence_signal when the operation is complete, it makes it possible to prevent issues from wraparound between time of issue and time of use by checking the return value of this function before calling hardware-specific wait instructions.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(h(See also dma_fence_is_signaled_locked().h]h(See also dma_fence_is_signaled_locked().}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !__dma_fence_is_later (C function)c.__dma_fence_is_laterhNtauh1j hjhhhNhNubj )}(hhh](j )}(hKbool __dma_fence_is_later (u64 f1, u64 f2, const struct dma_fence_ops *ops)h]j )}(hJbool __dma_fence_is_later(u64 f1, u64 f2, const struct dma_fence_ops *ops)h](jK)}(hjE_h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(h__dma_fence_is_laterh]j )}(h__dma_fence_is_laterh]h__dma_fence_is_later}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h1(u64 f1, u64 f2, const struct dma_fence_ops *ops)h](j)}(hu64 f1h](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.__dma_fence_is_laterasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hf1h]hf1}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hu64 f2h](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.__dma_fence_is_laterasbuh1hhj ubj )}(h h]h }(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hf2h]hf2}(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hconst struct dma_fence_ops *opsh](j )}(hjh]hconst}(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubj )}(h h]h }(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubj )}(hj h]hstruct}(hjrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubh)}(hhh]j )}(h dma_fence_opsh]h dma_fence_ops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.__dma_fence_is_laterasbuh1hhjSubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjSubj )}(hopsh]hops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]j|ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhj~hhubj@ )}(hhh]h)}(h-return if f1 is chronologically later than f2h]h-return if f1 is chronologically later than f2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hj~hhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j jb j jc jd je uh1j hhhjhNhNubjg )}(hX_**Parameters** ``u64 f1`` the first fence's seqno ``u64 f2`` the second fence's seqno from the same context ``const struct dma_fence_ops *ops`` dma_fence_ops associated with the seqno **Description** Returns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not common across contexts.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh](j )}(h#``u64 f1`` the first fence's seqno h](j )}(h ``u64 f1``h]j)}(hj4h]hu64 f1}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj.ubj )}(hhh]h)}(hthe first fence's seqnoh]hthe first fence’s seqno}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhMhjJubah}(h]h ]h"]h$]h&]uh1j hj.ubeh}(h]h ]h"]h$]h&]uh1j hjIhMhj+ubj )}(h:``u64 f2`` the second fence's seqno from the same context h](j )}(h ``u64 f2``h]j)}(hjmh]hu64 f2}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjgubj )}(hhh]h)}(h.the second fence's seqno from the same contexth]h0the second fence’s seqno from the same context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]uh1j hjhMhj+ubj )}(hL``const struct dma_fence_ops *ops`` dma_fence_ops associated with the seqno h](j )}(h#``const struct dma_fence_ops *ops``h]j)}(hjh]hconst struct dma_fence_ops *ops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h'dma_fence_ops associated with the seqnoh]h'dma_fence_ops associated with the seqno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhj+ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hReturns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not common across contexts.h]hReturns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not common across contexts.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_is_later (C function)c.dma_fence_is_laterhNtauh1j hjhhhNhNubj )}(hhh](j )}(hDbool dma_fence_is_later (struct dma_fence *f1, struct dma_fence *f2)h]j )}(hCbool dma_fence_is_later(struct dma_fence *f1, struct dma_fence *f2)h](jK)}(hjE_h]hbool}(hj&hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj"hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"hhhj3hMubj )}(hdma_fence_is_laterh]j )}(hdma_fence_is_laterh]hdma_fence_is_later}(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj"hhhj3hMubj)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hstruct dma_fence *f1h](j )}(hj h]hstruct}(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubj )}(h h]h }(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjHsbc.dma_fence_is_laterasbuh1hhj^ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj^ubj )}(hf1h]hf1}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjZubj)}(hstruct dma_fence *f2h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_fence_is_laterasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hf2h]hf2}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjZubeh}(h]h ]h"]h$]h&]jjuh1jhj"hhhj3hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhj3hMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj3hMhjhhubj@ )}(hhh]h)}(h-return if f1 is chronologically later than f2h]h-return if f1 is chronologically later than f2}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjRhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj3hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jmjb jmjc jd je uh1j hhhjhNhNubjg )}(hX3**Parameters** ``struct dma_fence *f1`` the first fence from the same context ``struct dma_fence *f2`` the second fence from the same context **Description** Returns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not re-used across contexts.h](h)}(h**Parameters**h]jq )}(hjwh]h Parameters}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjuubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjqubj )}(hhh](j )}(h?``struct dma_fence *f1`` the first fence from the same context h](j )}(h``struct dma_fence *f1``h]j)}(hjh]hstruct dma_fence *f1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h%the first fence from the same contexth]h%the first fence from the same context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h@``struct dma_fence *f2`` the second fence from the same context h](j )}(h``struct dma_fence *f2``h]j)}(hjh]hstruct dma_fence *f2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h&the second fence from the same contexth]h&the second fence from the same context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjqubh)}(h**Description**h]jq )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjqubh)}(hReturns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not re-used across contexts.h]hReturns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not re-used across contexts.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjqubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_is_later_or_same (C function)c.dma_fence_is_later_or_samehNtauh1j hjhhhNhNubj )}(hhh](j )}(hLbool dma_fence_is_later_or_same (struct dma_fence *f1, struct dma_fence *f2)h]j )}(hKbool dma_fence_is_later_or_same(struct dma_fence *f1, struct dma_fence *f2)h](jK)}(hjE_h]hbool}(hjOhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjKhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjKhhhj\hMubj )}(hdma_fence_is_later_or_sameh]j )}(hdma_fence_is_later_or_sameh]hdma_fence_is_later_or_same}(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjkubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjKhhhj\hMubj)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hstruct dma_fence *f1h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjqsbc.dma_fence_is_later_or_sameasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hf1h]hf1}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence *f2h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_fence_is_later_or_sameasbuh1hhjubj )}(h h]h }(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjGhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hf2h]hf2}(hjThhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjKhhhj\hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjGhhhj\hMubah}(h]jBah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj\hMhjDhhubj@ )}(hhh]h)}(h(return true if f1 is later or same as f2h]h(return true if f1 is later or same as f2}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj{hhubah}(h]h ]h"]h$]h&]uh1j? hjDhhhj\hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hXE**Parameters** ``struct dma_fence *f1`` the first fence from the same context ``struct dma_fence *f2`` the second fence from the same context **Description** Returns true if f1 is chronologically later than f2 or the same fence. Both fences must be from the same context, since a seqno is not re-used across contexts.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh](j )}(h?``struct dma_fence *f1`` the first fence from the same context h](j )}(h``struct dma_fence *f1``h]j)}(hjh]hstruct dma_fence *f1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h%the first fence from the same contexth]h%the first fence from the same context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h@``struct dma_fence *f2`` the second fence from the same context h](j )}(h``struct dma_fence *f2``h]j)}(hjh]hstruct dma_fence *f2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h&the second fence from the same contexth]h&the second fence from the same context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj hMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj3h]h Description}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj1ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hReturns true if f1 is chronologically later than f2 or the same fence. Both fences must be from the same context, since a seqno is not re-used across contexts.h]hReturns true if f1 is chronologically later than f2 or the same fence. Both fences must be from the same context, since a seqno is not re-used across contexts.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_later (C function)c.dma_fence_laterhNtauh1j hjhhhNhNubj )}(hhh](j )}(hOstruct dma_fence * dma_fence_later (struct dma_fence *f1, struct dma_fence *f2)h]j )}(hMstruct dma_fence *dma_fence_later(struct dma_fence *f1, struct dma_fence *f2)h](j )}(hj h]hstruct}(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjthhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjthhhjhMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_fence_latersbc.dma_fence_laterasbuh1hhjthhhjhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjthhhjhMubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjthhhjhMubj )}(hdma_fence_laterh]j )}(hjh]hdma_fence_later}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjthhhjhMubj)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hstruct dma_fence *f1h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_fence_laterasbuh1hhjubj )}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj<hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hf1h]hf1}(hjIhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence *f2h](j )}(hj h]hstruct}(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubj )}(h h]h }(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_fence_laterasbuh1hhj^ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj^ubj )}(hf2h]hf2}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjthhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjphhhjhMubah}(h]jkah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjmhhubj@ )}(hhh]h)}(h&return the chronologically later fenceh]h&return the chronologically later fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjmhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hXY**Parameters** ``struct dma_fence *f1`` the first fence from the same context ``struct dma_fence *f2`` the second fence from the same context **Description** Returns NULL if both fences are signaled, otherwise the fence that would be signaled last. Both fences must be from the same context, since a seqno is not re-used across contexts.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM hjubj )}(hhh](j )}(h?``struct dma_fence *f1`` the first fence from the same context h](j )}(h``struct dma_fence *f1``h]j)}(hj$h]hstruct dma_fence *f1}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h%the first fence from the same contexth]h%the first fence from the same context}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj:ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj9hMhjubj )}(h@``struct dma_fence *f2`` the second fence from the same context h](j )}(h``struct dma_fence *f2``h]j)}(hj]h]hstruct dma_fence *f2}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjWubj )}(hhh]h)}(h&the second fence from the same contexth]h&the second fence from the same context}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhMhjsubah}(h]h ]h"]h$]h&]uh1j hjWubeh}(h]h ]h"]h$]h&]uh1j hjrhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM hjubh)}(hReturns NULL if both fences are signaled, otherwise the fence that would be signaled last. Both fences must be from the same context, since a seqno is not re-used across contexts.h]hReturns NULL if both fences are signaled, otherwise the fence that would be signaled last. Both fences must be from the same context, since a seqno is not re-used across contexts.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j (dma_fence_get_status_locked (C function)c.dma_fence_get_status_lockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(h9int dma_fence_get_status_locked (struct dma_fence *fence)h]j )}(h8int dma_fence_get_status_locked(struct dma_fence *fence)h](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM-ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhM-ubj )}(hdma_fence_get_status_lockedh]j )}(hdma_fence_get_status_lockedh]hdma_fence_get_status_locked}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhM-ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj:modnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_get_status_lockedasbuh1hhjubj )}(h h]h }(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjfhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM-ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhM-ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhM-hjhhubj@ )}(hhh]h)}(h"returns the status upon completionh]h"returns the status upon completion}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhM-ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX\**Parameters** ``struct dma_fence *fence`` the dma_fence to query **Description** Drivers can supply an optional error status condition before they signal the fence (to indicate whether the fence was completed due to an error rather than success). The value of the status condition is only valid if the fence has been signaled, dma_fence_get_status_locked() first checks the signal state before reporting the error status. Returns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM$hjubj )}(hhh]j )}(h3``struct dma_fence *fence`` the dma_fence to query h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM!hjubj )}(hhh]h)}(hthe dma_fence to queryh]hthe dma_fence to query}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM!hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM!hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM#hjubh)}(hXTDrivers can supply an optional error status condition before they signal the fence (to indicate whether the fence was completed due to an error rather than success). The value of the status condition is only valid if the fence has been signaled, dma_fence_get_status_locked() first checks the signal state before reporting the error status.h]hXTDrivers can supply an optional error status condition before they signal the fence (to indicate whether the fence was completed due to an error rather than success). The value of the status condition is only valid if the fence has been signaled, dma_fence_get_status_locked() first checks the signal state before reporting the error status.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM#hjubh)}(hReturns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.h]hReturns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM)hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_set_error (C function)c.dma_fence_set_errorhNtauh1j hjhhhNhNubj )}(hhh](j )}(h=void dma_fence_set_error (struct dma_fence *fence, int error)h]j )}(h huh1j hj{hMHhjbhhubj@ )}(hhh]h)}(h$flag an error condition on the fenceh]h$flag an error condition on the fence}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM8hj_hhubah}(h]h ]h"]h$]h&]uh1j? hjbhhhj{hMHubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jzjb jzjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the dma_fence ``int error`` the error to store **Description** Drivers can supply an optional error status condition before they signal the fence, to indicate that the fence was completed due to an error rather than success. This must be set before signaling (so that the value is visible before any waiters on the signal callback are woken). This helper exists to help catching erroneous setting of #dma_fence.error. Examples of error codes which drivers should use: * ``-ENODATA`` This operation produced no data, no other operation affected. * ``-ECANCELED`` All operations from the same context have been canceled. * ``-ETIME`` Operation caused a timeout and potentially device reset.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM<hj~ubj )}(hhh](j )}(h*``struct dma_fence *fence`` the dma_fence h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM9hjubj )}(hhh]h)}(h the dma_fenceh]h the dma_fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM9hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM9hjubj )}(h!``int error`` the error to store h](j )}(h ``int error``h]j)}(hjh]h int error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM:hjubj )}(hhh]h)}(hthe error to storeh]hthe error to store}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM:hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM:hjubeh}(h]h ]h"]h$]h&]uh1j hj~ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM<hj~ubh)}(hXbDrivers can supply an optional error status condition before they signal the fence, to indicate that the fence was completed due to an error rather than success. This must be set before signaling (so that the value is visible before any waiters on the signal callback are woken). This helper exists to help catching erroneous setting of #dma_fence.error.h]hXbDrivers can supply an optional error status condition before they signal the fence, to indicate that the fence was completed due to an error rather than success. This must be set before signaling (so that the value is visible before any waiters on the signal callback are woken). This helper exists to help catching erroneous setting of #dma_fence.error.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM<hj~ubh)}(h1Examples of error codes which drivers should use:h]h1Examples of error codes which drivers should use:}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMBhj~ubh)}(hhh](h)}(hL``-ENODATA`` This operation produced no data, no other operation affected.h]h)}(hjPh](j)}(h ``-ENODATA``h]h-ENODATA}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubh@ This operation produced no data, no other operation affected.}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMDhjNubah}(h]h ]h"]h$]h&]uh1hhjKubh)}(hG``-ECANCELED`` All operations from the same context have been canceled.h]h)}(hjvh](j)}(h``-ECANCELED``h]h -ECANCELED}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubh9 All operations from the same context have been canceled.}(hjxhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMEhjtubah}(h]h ]h"]h$]h&]uh1hhjKubh)}(hG``-ETIME`` Operation caused a timeout and potentially device reset.h]h)}(hjh](j)}(h ``-ETIME``h]h-ETIME}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh= Operation caused a timeout and potentially device reset.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMFhjubah}(h]h ]h"]h$]h&]uh1hhjKubeh}(h]h ]h"]h$]h&]j>j uh1hhjmhMDhj~ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_timestamp (C function)c.dma_fence_timestamphNtauh1j hjhhhNhNubj )}(hhh](j )}(h5ktime_t dma_fence_timestamp (struct dma_fence *fence)h]j )}(h4ktime_t dma_fence_timestamp(struct dma_fence *fence)h](h)}(hhh]j )}(hktime_th]hktime_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_fence_timestampsbc.dma_fence_timestampasbuh1hhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMYubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj hMYubj )}(hdma_fence_timestamph]j )}(hjh]hdma_fence_timestamp}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhj hMYubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubj )}(h h]h }(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjXmodnameN classnameNjj)}j]jc.dma_fence_timestampasbuh1hhj4ubj )}(h h]h }(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj4ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhj hMYubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhj hMYubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj hMYhjhhubj@ )}(hhh]h)}(h1helper to get the completion timestamp of a fenceh]h1helper to get the completion timestamp of a fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMRhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj hMYubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX1**Parameters** ``struct dma_fence *fence`` fence to get the timestamp from. **Description** After a fence is signaled the timestamp is updated with the signaling time, but setting the timestamp can race with tasks waiting for the signaling. This helper busy waits for the correct timestamp to appear.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMVhjubj )}(hhh]j )}(h=``struct dma_fence *fence`` fence to get the timestamp from. h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMShjubj )}(hhh]h)}(h fence to get the timestamp from.h]h fence to get the timestamp from.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMShjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMShjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj5h]h Description}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj3ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMUhjubh)}(hAfter a fence is signaled the timestamp is updated with the signaling time, but setting the timestamp can race with tasks waiting for the signaling. This helper busy waits for the correct timestamp to appear.h]hAfter a fence is signaled the timestamp is updated with the signaling time, but setting the timestamp can race with tasks waiting for the signaling. This helper busy waits for the correct timestamp to appear.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMUhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_wait (C function)c.dma_fence_waithNtauh1j hjhhhNhNubj )}(hhh](j )}(h?signed long dma_fence_wait (struct dma_fence *fence, bool intr)h]j )}(h>signed long dma_fence_wait(struct dma_fence *fence, bool intr)h](jK)}(hsignedh]hsigned}(hjzhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjvhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMzubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjvhhhjhMzubjK)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjvhhhjhMzubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjvhhhjhMzubj )}(hdma_fence_waith]j )}(hdma_fence_waith]hdma_fence_wait}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjvhhhjhMzubj)}(h$(struct dma_fence *fence, bool intr)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_waitasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h bool intrh](jK)}(hjE_h]hbool}(hjEhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjAubj )}(h h]h }(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubj )}(hintrh]hintr}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjvhhhjhMzubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjrhhhjhMzubah}(h]jmah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMzhjohhubj@ )}(hhh]h)}(h#sleep until the fence gets signaledh]h#sleep until the fence gets signaled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMlhjhhubah}(h]h ]h"]h$]h&]uh1j? hjohhhjhMzubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX<**Parameters** ``struct dma_fence *fence`` the fence to wait on ``bool intr`` if true, do an interruptible wait **Description** This function will return -ERESTARTSYS if interrupted by a signal, or 0 if the fence was signaled. Other error values may be returned on custom implementations. Performs a synchronous wait on this fence. It is assumed the caller directly or indirectly holds a reference to the fence, otherwise the fence might be freed before return, resulting in undefined behavior. See also dma_fence_wait_timeout() and dma_fence_wait_any_timeout().h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMphjubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMmhjubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMmhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMmhjubj )}(h0``bool intr`` if true, do an interruptible wait h](j )}(h ``bool intr``h]j)}(hjh]h bool intr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMnhjubj )}(hhh]h)}(h!if true, do an interruptible waith]h!if true, do an interruptible wait}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMnhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMnhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj?h]h Description}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj=ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMphjubh)}(hThis function will return -ERESTARTSYS if interrupted by a signal, or 0 if the fence was signaled. Other error values may be returned on custom implementations.h]hThis function will return -ERESTARTSYS if interrupted by a signal, or 0 if the fence was signaled. Other error values may be returned on custom implementations.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMphjubh)}(hPerforms a synchronous wait on this fence. It is assumed the caller directly or indirectly holds a reference to the fence, otherwise the fence might be freed before return, resulting in undefined behavior.h]hPerforms a synchronous wait on this fence. It is assumed the caller directly or indirectly holds a reference to the fence, otherwise the fence might be freed before return, resulting in undefined behavior.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMthjubh)}(hCSee also dma_fence_wait_timeout() and dma_fence_wait_any_timeout().h]hCSee also dma_fence_wait_timeout() and dma_fence_wait_any_timeout().}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMxhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_is_array (C function)c.dma_fence_is_arrayhNtauh1j hjhhhNhNubj )}(hhh](j )}(h1bool dma_fence_is_array (struct dma_fence *fence)h]j )}(h0bool dma_fence_is_array(struct dma_fence *fence)h](jK)}(hjE_h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_is_arrayh]j )}(hdma_fence_is_arrayh]hdma_fence_is_array}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_is_arrayasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj*hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h+check if a fence is from the array subclassh]h+check if a fence is from the array subclass}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj^hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jyjb jyjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` the fence to test **Description** Return true if it is a dma_fence_array and false otherwise.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj}ubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hj}ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj}ubh)}(h;Return true if it is a dma_fence_array and false otherwise.h]h;Return true if it is a dma_fence_array and false otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj}ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_is_chain (C function)c.dma_fence_is_chainhNtauh1j hjhhhNhNubj )}(hhh](j )}(h1bool dma_fence_is_chain (struct dma_fence *fence)h]j )}(h0bool dma_fence_is_chain(struct dma_fence *fence)h](jK)}(hjE_h]hbool}(hj"hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj/hMubj )}(hdma_fence_is_chainh]j )}(hdma_fence_is_chainh]hdma_fence_is_chain}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj>ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhj/hMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZubj )}(h h]h }(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj~modnameN classnameNjj)}j]jN)}jFjDsbc.dma_fence_is_chainasbuh1hhjZubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjZubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjVubah}(h]h ]h"]h$]h&]jjuh1jhjhhhj/hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhj/hMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj/hMhjhhubj@ )}(hhh]h)}(h+check if a fence is from the chain subclassh]h+check if a fence is from the chain subclass}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj/hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` the fence to test **Description** Return true if it is a dma_fence_chain and false otherwise.h](h)}(h**Parameters**h]jq )}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hj" h]hstruct dma_fence *fence}(hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj ubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7 hMhj8 ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj7 hMhj ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj] h]h Description}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj[ ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(h;Return true if it is a dma_fence_chain and false otherwise.h]h;Return true if it is a dma_fence_chain and false otherwise.}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_is_container (C function)c.dma_fence_is_containerhNtauh1j hjhhhNhNubj )}(hhh](j )}(h5bool dma_fence_is_container (struct dma_fence *fence)h]j )}(h4bool dma_fence_is_container(struct dma_fence *fence)h](jK)}(hjE_h]hbool}(hj hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhj hMubj )}(hdma_fence_is_containerh]j )}(hdma_fence_is_containerh]hdma_fence_is_container}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj hhhj hMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj modnameN classnameNjj)}j]jN)}jFj sbc.dma_fence_is_containerasbuh1hhj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjc)}(hj h]h*}(hj* hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj ubj )}(hfenceh]hfence}(hj7 hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubah}(h]h ]h"]h$]h&]jjuh1jhj hhhj hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj hhhj hMubah}(h]j ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj hMhj hhubj@ )}(hhh]h)}(h0check if a fence is a container for other fencesh]h0check if a fence is a container for other fences}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj^ hhubah}(h]h ]h"]h$]h&]uh1j? hj hhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jy jb jy jc jd je uh1j hhhjhNhNubjg )}(hX"**Parameters** ``struct dma_fence *fence`` the fence to test **Description** Return true if this fence is a container for other fences, false otherwise. This is important since we can't build up large fence structure or otherwise we run into recursion during operation on those fences.h](h)}(h**Parameters**h]jq )}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj} ubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hj h]hstruct dma_fence *fence}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj ubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hMhj ubah}(h]h ]h"]h$]h&]uh1j hj} ubh)}(h**Description**h]jq )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj} ubh)}(hReturn true if this fence is a container for other fences, false otherwise. This is important since we can't build up large fence structure or otherwise we run into recursion during operation on those fences.h]hReturn true if this fence is a container for other fences, false otherwise. This is important since we can’t build up large fence structure or otherwise we run into recursion during operation on those fences.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj} ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubeh}(h]dma-fences-functions-referenceah ]h"]dma fences functions referenceah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fence Arrayh]hDMA Fence Array}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_fence_array_alloc (C function)c.dma_fence_array_allochNtauh1j hj hhhNhNubj )}(hhh](j )}(h?struct dma_fence_array * dma_fence_array_alloc (int num_fences)h]j )}(h=struct dma_fence_array *dma_fence_array_alloc(int num_fences)h](j )}(hj h]hstruct}(hj; hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7 hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKubj )}(h h]h }(hjI hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7 hhhjH hKubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hjZ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjW ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj\ modnameN classnameNjj)}j]jN)}jFdma_fence_array_allocsbc.dma_fence_array_allocasbuh1hhj7 hhhjH hKubj )}(h h]h }(hj{ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7 hhhjH hKubjc)}(hj h]h*}(hj hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj7 hhhjH hKubj )}(hdma_fence_array_alloch]j )}(hjx h]hdma_fence_array_alloc}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj7 hhhjH hKubj)}(h(int num_fences)h]j)}(hint num_fencesh](jK)}(hinth]hint}(hj hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h num_fencesh]h num_fences}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubah}(h]h ]h"]h$]h&]jjuh1jhj7 hhhjH hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj3 hhhjH hKubah}(h]j. ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjH hKhj0 hhubj@ )}(hhh]h)}(hAllocate a custom fence arrayh]hAllocate a custom fence array}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj hhubah}(h]h ]h"]h$]h&]uh1j? hj0 hhhjH hKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j jb j jc jd je uh1j hhhj hNhNubjg )}(h**Parameters** ``int num_fences`` [in] number of fences to add in the array **Description** Return dma fence array on success, NULL on failureh](h)}(h**Parameters**h]jq )}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj ubj )}(hhh]j )}(h@``int num_fences`` [in] number of fences to add in the array h](j )}(h``int num_fences``h]j)}(hj< h]hint num_fences}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj: ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj6 ubj )}(hhh]h)}(h,[in] number of fences to add in the arrayh]h,[in] number of fences to add in the array}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQ hKhjR ubah}(h]h ]h"]h$]h&]uh1j hj6 ubeh}(h]h ]h"]h$]h&]uh1j hjQ hKhj3 ubah}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]jq )}(hjw h]h Description}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hju ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj ubh)}(h2Return dma fence array on success, NULL on failureh]h2Return dma fence array on success, NULL on failure}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_fence_array_init (C function)c.dma_fence_array_inithNtauh1j hj hhhNhNubj )}(hhh](j )}(hvoid dma_fence_array_init (struct dma_fence_array *array, int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h]j )}(hvoid dma_fence_array_init(struct dma_fence_array *array, int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](jK)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhj hKubj )}(hdma_fence_array_inith]j )}(hdma_fence_array_inith]hdma_fence_array_init}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj hhhj hKubj)}(h{(struct dma_fence_array *array, int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](j)}(hstruct dma_fence_array *arrayh](j )}(hj h]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj modnameN classnameNjj)}j]jN)}jFj sbc.dma_fence_array_initasbuh1hhj ubj )}(h h]h }(hj7 hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjc)}(hj h]h*}(hjE hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj ubj )}(harrayh]harray}(hjR hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hint num_fencesh](jK)}(hinth]hint}(hjk hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjg ubj )}(h h]h }(hjy hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjg ubj )}(h num_fencesh]h num_fences}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjg ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hstruct dma_fence **fencesh](j )}(hj h]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj modnameN classnameNjj)}j]j3 c.dma_fence_array_initasbuh1hhj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjc)}(hj h]h*}(hj hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj ubjc)}(hj h]h*}(hj hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj ubj )}(hfencesh]hfences}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj"modnameN classnameNjj)}j]j3 c.dma_fence_array_initasbuh1hhjubj )}(h h]h }(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hcontexth]hcontext}(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hunsigned seqnoh](jK)}(hunsignedh]hunsigned}(hjehhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjaubj )}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubj )}(hseqnoh]hseqno}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hbool signal_on_anyh](jK)}(hjE_h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h signal_on_anyh]h signal_on_any}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj hhhj hKubah}(h]j ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj hKhj hhubj@ )}(hhh]h)}(hInit a custom fence arrayh]hInit a custom fence array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjhhubah}(h]h ]h"]h$]h&]uh1j? hj hhhj hKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj hNhNubjg )}(hX2**Parameters** ``struct dma_fence_array *array`` [in] dma fence array to arm ``int num_fences`` [in] number of fences to add in the array ``struct dma_fence **fences`` [in] array containing the fences ``u64 context`` [in] fence context to use ``unsigned seqno`` [in] sequence number to use ``bool signal_on_any`` [in] signal on any fence in the array **Description** Implementation of **dma_fence_array_create** without allocation. Useful to init a preallocated dma fence array in the path of reclaim or dma fence signaling.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh](j )}(hA``struct dma_fence_array *array`` [in] dma fence array to arm h](j )}(h!``struct dma_fence_array *array``h]j)}(hj h]hstruct dma_fence_array *array}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h[in] dma fence array to armh]h[in] dma fence array to arm}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hKhj6ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj5hKhjubj )}(h@``int num_fences`` [in] number of fences to add in the array h](j )}(h``int num_fences``h]j)}(hjYh]hint num_fences}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjSubj )}(hhh]h)}(h,[in] number of fences to add in the arrayh]h,[in] number of fences to add in the array}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhKhjoubah}(h]h ]h"]h$]h&]uh1j hjSubeh}(h]h ]h"]h$]h&]uh1j hjnhKhjubj )}(hB``struct dma_fence **fences`` [in] array containing the fences h](j )}(h``struct dma_fence **fences``h]j)}(hjh]hstruct dma_fence **fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h#[in] array containing the fencesh]h#[in] array containing the fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h-``u64 context`` [in] fence context to use h](j )}(h``u64 context``h]j)}(hjh]h u64 context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h[in] fence context to useh]h[in] fence context to use}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h2``unsigned seqno`` [in] sequence number to use h](j )}(h``unsigned seqno``h]j)}(hjh]hunsigned seqno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h[in] sequence number to useh]h[in] sequence number to use}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h@``bool signal_on_any`` [in] signal on any fence in the array h](j )}(h``bool signal_on_any``h]j)}(hj=h]hbool signal_on_any}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj7ubj )}(hhh]h)}(h([in] signal on any fence in the arrayh]h([in] signal on any fence in the array}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhKhjSubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hjRhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjxh]h Description}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjvubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubh)}(hImplementation of **dma_fence_array_create** without allocation. Useful to init a preallocated dma fence array in the path of reclaim or dma fence signaling.h](hImplementation of }(hjhhhNhNubjq )}(h**dma_fence_array_create**h]hdma_fence_array_create}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubhq without allocation. Useful to init a preallocated dma fence array in the path of reclaim or dma fence signaling.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_array_create (C function)c.dma_fence_array_createhNtauh1j hj hhhNhNubj )}(hhh](j )}(hstruct dma_fence_array * dma_fence_array_create (int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h]j )}(hstruct dma_fence_array *dma_fence_array_create(int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_fence_array_createsbc.dma_fence_array_createasbuh1hhjhhhjhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjhhhjhKubj )}(hdma_fence_array_createh]j )}(hj h]hdma_fence_array_create}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKubj)}(h\(int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](j)}(hint num_fencesh](jK)}(hinth]hint}(hjIhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjEubj )}(h h]h }(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubj )}(h num_fencesh]h num_fences}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjAubj)}(hstruct dma_fence **fencesh](j )}(hj h]hstruct}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]j c.dma_fence_array_createasbuh1hhjzubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjzubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjzubj )}(hfencesh]hfences}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjAubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]j c.dma_fence_array_createasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hcontexth]hcontext}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjAubj)}(hunsigned seqnoh](jK)}(hunsignedh]hunsigned}(hjChhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj?ubj )}(h h]h }(hjQhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubj )}(hseqnoh]hseqno}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjAubj)}(hbool signal_on_anyh](jK)}(hjE_h]hbool}(hjxhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjtubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubj )}(h signal_on_anyh]h signal_on_any}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjAubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjhhubj@ )}(hhh]h)}(hCreate a custom fence arrayh]hCreate a custom fence array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj hNhNubjg )}(hX0**Parameters** ``int num_fences`` [in] number of fences to add in the array ``struct dma_fence **fences`` [in] array containing the fences ``u64 context`` [in] fence context to use ``unsigned seqno`` [in] sequence number to use ``bool signal_on_any`` [in] signal on any fence in the array **Description** Allocate a dma_fence_array object and initialize the base fence with dma_fence_init(). In case of error it returns NULL. The caller should allocate the fences array with num_fences size and fill it with the fences it wants to add to the object. Ownership of this array is taken and dma_fence_put() is used on each fence on release. If **signal_on_any** is true the fence array signals if any fence in the array signals, otherwise it signals when all fences in the array signal.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh](j )}(h@``int num_fences`` [in] number of fences to add in the array h](j )}(h``int num_fences``h]j)}(hjh]hint num_fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h,[in] number of fences to add in the arrayh]h,[in] number of fences to add in the array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(hB``struct dma_fence **fences`` [in] array containing the fences h](j )}(h``struct dma_fence **fences``h]j)}(hj7h]hstruct dma_fence **fences}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj1ubj )}(hhh]h)}(h#[in] array containing the fencesh]h#[in] array containing the fences}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhKhjMubah}(h]h ]h"]h$]h&]uh1j hj1ubeh}(h]h ]h"]h$]h&]uh1j hjLhKhjubj )}(h-``u64 context`` [in] fence context to use h](j )}(h``u64 context``h]j)}(hjph]h u64 context}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjjubj )}(hhh]h)}(h[in] fence context to useh]h[in] fence context to use}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h2``unsigned seqno`` [in] sequence number to use h](j )}(h``unsigned seqno``h]j)}(hjh]hunsigned seqno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h[in] sequence number to useh]h[in] sequence number to use}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h@``bool signal_on_any`` [in] signal on any fence in the array h](j )}(h``bool signal_on_any``h]j)}(hjh]hbool signal_on_any}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h([in] signal on any fence in the arrayh]h([in] signal on any fence in the array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubh)}(hxAllocate a dma_fence_array object and initialize the base fence with dma_fence_init(). In case of error it returns NULL.h]hxAllocate a dma_fence_array object and initialize the base fence with dma_fence_init(). In case of error it returns NULL.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubh)}(hThe caller should allocate the fences array with num_fences size and fill it with the fences it wants to add to the object. Ownership of this array is taken and dma_fence_put() is used on each fence on release.h]hThe caller should allocate the fences array with num_fences size and fill it with the fences it wants to add to the object. Ownership of this array is taken and dma_fence_put() is used on each fence on release.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubh)}(hIf **signal_on_any** is true the fence array signals if any fence in the array signals, otherwise it signals when all fences in the array signal.h](hIf }(hjQhhhNhNubjq )}(h**signal_on_any**h]h signal_on_any}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjQubh} is true the fence array signals if any fence in the array signals, otherwise it signals when all fences in the array signal.}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_fence_match_context (C function)c.dma_fence_match_contexthNtauh1j hj hhhNhNubj )}(hhh](j )}(hCbool dma_fence_match_context (struct dma_fence *fence, u64 context)h]j )}(hBbool dma_fence_match_context(struct dma_fence *fence, u64 context)h](jK)}(hjE_h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_match_contexth]j )}(hdma_fence_match_contexth]hdma_fence_match_context}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h&(struct dma_fence *fence, u64 context)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_match_contextasbuh1hhjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjEmodnameN classnameNjj)}j]jc.dma_fence_match_contextasbuh1hhj<ubj )}(h h]h }(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<ubj )}(hcontexth]hcontext}(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h.Check if all fences are from the given contexth]h.Check if all fences are from the given context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj hNhNubjg )}(hX=**Parameters** ``struct dma_fence *fence`` [in] fence or fence array ``u64 context`` [in] fence context to check all fences against **Description** Checks the provided fence or, for a fence array, all fences in the array against the given context. Returns false if any fence is from a different context.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMhjubj )}(hhh](j )}(h9``struct dma_fence *fence`` [in] fence or fence array h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMhjubj )}(hhh]h)}(h[in] fence or fence arrayh]h[in] fence or fence array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(hB``u64 context`` [in] fence context to check all fences against h](j )}(h``u64 context``h]j)}(hjh]h u64 context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMhj ubj )}(hhh]h)}(h1[in] fence context to check all fences againsth]h1[in] fence context to check all fences against}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hMhj)ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj(hMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjNh]h Description}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjLubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMhjubh)}(hChecks the provided fence or, for a fence array, all fences in the array against the given context. Returns false if any fence is from a different context.h]hChecks the provided fence or, for a fence array, all fences in the array against the given context. Returns false if any fence is from a different context.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_array_cb (C struct)c.dma_fence_array_cbhNtauh1j hj hhhNhNubj )}(hhh](j )}(hdma_fence_array_cbh]j )}(hstruct dma_fence_array_cbh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubj )}(hdma_fence_array_cbh]j )}(hjh]hdma_fence_array_cb}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjhhubj@ )}(hhh]h)}(hcallback helper for fence arrayh]hcallback helper for fence array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj hNhNubjg )}(h**Definition**:: struct dma_fence_array_cb { struct dma_fence_cb cb; struct dma_fence_array *array; }; **Members** ``cb`` fence callback structure for signaling ``array`` reference to the parent fence array objecth](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjubj)}(h]struct dma_fence_array_cb { struct dma_fence_cb cb; struct dma_fence_array *array; };h]h]struct dma_fence_array_cb { struct dma_fence_cb cb; struct dma_fence_array *array; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjubh)}(h **Members**h]jq )}(hj#h]hMembers}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj!ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjubj )}(hhh](j )}(h.``cb`` fence callback structure for signaling h](j )}(h``cb``h]j)}(hjBh]hcb}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhj<ubj )}(hhh]h)}(h&fence callback structure for signalingh]h&fence callback structure for signaling}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhKhjXubah}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hjWhKhj9ubj )}(h4``array`` reference to the parent fence array objecth](j )}(h ``array``h]j)}(hj{h]harray}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjuubj )}(hhh]h)}(h*reference to the parent fence array objecth]h*reference to the parent fence array object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjuubeh}(h]h ]h"]h$]h&]uh1j hjhKhj9ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_array (C struct)c.dma_fence_arrayhNtauh1j hj hhhNhNubj )}(hhh](j )}(hdma_fence_arrayh]j )}(hstruct dma_fence_arrayh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubj )}(hdma_fence_arrayh]j )}(hjh]hdma_fence_array}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjhhubj@ )}(hhh]h)}(h%fence to represent an array of fencesh]h%fence to represent an array of fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j` jja j/jb j/jc jd je uh1j hhhj hNhNubjg )}(hX2**Definition**:: struct dma_fence_array { struct dma_fence base; spinlock_t lock; unsigned num_fences; atomic_t num_pending; struct dma_fence **fences; struct irq_work work; struct dma_fence_array_cb callbacks[] ; }; **Members** ``base`` fence base class ``lock`` spinlock for fence handling ``num_fences`` number of fences in the array ``num_pending`` fences in the array still pending ``fences`` array of the fences ``work`` internal irq_work function ``callbacks`` array of callback helpersh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj7ubh:}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK!hj3ubj)}(hstruct dma_fence_array { struct dma_fence base; spinlock_t lock; unsigned num_fences; atomic_t num_pending; struct dma_fence **fences; struct irq_work work; struct dma_fence_array_cb callbacks[] ; };h]hstruct dma_fence_array { struct dma_fence base; spinlock_t lock; unsigned num_fences; atomic_t num_pending; struct dma_fence **fences; struct irq_work work; struct dma_fence_array_cb callbacks[] ; };}hjTsbah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK#hj3ubh)}(h **Members**h]jq )}(hjeh]hMembers}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjcubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK-hj3ubj )}(hhh](j )}(h``base`` fence base class h](j )}(h``base``h]j)}(hjh]hbase}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhj~ubj )}(hhh]h)}(hfence base classh]hfence base class}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hj~ubeh}(h]h ]h"]h$]h&]uh1j hjhKhj{ubj )}(h%``lock`` spinlock for fence handling h](j )}(h``lock``h]j)}(hjh]hlock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK hjubj )}(hhh]h)}(hspinlock for fence handlingh]hspinlock for fence handling}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK hj{ubj )}(h-``num_fences`` number of fences in the array h](j )}(h``num_fences``h]j)}(hjh]h num_fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK!hjubj )}(hhh]h)}(hnumber of fences in the arrayh]hnumber of fences in the array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK!hj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj hK!hj{ubj )}(h2``num_pending`` fences in the array still pending h](j )}(h``num_pending``h]j)}(hj/h]h num_pending}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK"hj)ubj )}(hhh]h)}(h!fences in the array still pendingh]h!fences in the array still pending}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhK"hjEubah}(h]h ]h"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]uh1j hjDhK"hj{ubj )}(h``fences`` array of the fences h](j )}(h ``fences``h]j)}(hjhh]hfences}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK#hjbubj )}(hhh]h)}(harray of the fencesh]harray of the fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hK#hj~ubah}(h]h ]h"]h$]h&]uh1j hjbubeh}(h]h ]h"]h$]h&]uh1j hj}hK#hj{ubj )}(h$``work`` internal irq_work function h](j )}(h``work``h]j)}(hjh]hwork}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK$hjubj )}(hhh]h)}(hinternal irq_work functionh]hinternal irq_work function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK$hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK$hj{ubj )}(h'``callbacks`` array of callback helpersh](j )}(h ``callbacks``h]j)}(hjh]h callbacks}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK$hjubj )}(hhh]h)}(harray of callback helpersh]harray of callback helpers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK%hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK$hj{ubeh}(h]h ]h"]h$]h&]uh1j hj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j to_dma_fence_array (C function)c.to_dma_fence_arrayhNtauh1j hj hhhNhNubj )}(hhh](j )}(hEstruct dma_fence_array * to_dma_fence_array (struct dma_fence *fence)h]j )}(hCstruct dma_fence_array *to_dma_fence_array(struct dma_fence *fence)h](j )}(hj h]hstruct}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK:ubj )}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0hhhjAhK:ubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjPubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjUmodnameN classnameNjj)}j]jN)}jFto_dma_fence_arraysbc.to_dma_fence_arrayasbuh1hhj0hhhjAhK:ubj )}(h h]h }(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0hhhjAhK:ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj0hhhjAhK:ubj )}(hto_dma_fence_arrayh]j )}(hjqh]hto_dma_fence_array}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj0hhhjAhK:ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]joc.to_dma_fence_arrayasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj0hhhjAhK:ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj,hhhjAhK:ubah}(h]j'ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjAhK:hj)hhubj@ )}(hhh]h)}(h!cast a fence to a dma_fence_arrayh]h!cast a fence to a dma_fence_array}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK4hj,hhubah}(h]h ]h"]h$]h&]uh1j? hj)hhhjAhK:ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jGjb jGjc jd je uh1j hhhj hNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` fence to cast to a dma_fence_array **Description** Returns NULL if the fence is not a dma_fence_array, or the dma_fence_array otherwise.h](h)}(h**Parameters**h]jq )}(hjQh]h Parameters}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjOubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK8hjKubj )}(hhh]j )}(h?``struct dma_fence *fence`` fence to cast to a dma_fence_array h](j )}(h``struct dma_fence *fence``h]j)}(hjph]hstruct dma_fence *fence}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK5hjjubj )}(hhh]h)}(h"fence to cast to a dma_fence_arrayh]h"fence to cast to a dma_fence_array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK5hjubah}(h]h ]h"]h$]h&]uh1j hjjubeh}(h]h ]h"]h$]h&]uh1j hjhK5hjgubah}(h]h ]h"]h$]h&]uh1j hjKubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK7hjKubh)}(hUReturns NULL if the fence is not a dma_fence_array, or the dma_fence_array otherwise.h]hUReturns NULL if the fence is not a dma_fence_array, or the dma_fence_array otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK7hjKubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_fence_array_for_each (C macro)c.dma_fence_array_for_eachhNtauh1j hj hhhNhNubj )}(hhh](j )}(hdma_fence_array_for_eachh]j )}(hdma_fence_array_for_eachh]j )}(hdma_fence_array_for_eachh]j )}(hjh]hdma_fence_array_for_each}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKNubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKNubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKNhjhhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hjhhhjhKNubeh}(h]h ](jmacroeh"]h$]h&]j` jja j jb j jc jd je uh1j hhhj hNhNubh)}(h1``dma_fence_array_for_each (fence, index, head)``h]j)}(hj&h]h-dma_fence_array_for_each (fence, index, head)}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKPhj hhubh)}(h!iterate over all fences in array h]h)}(h iterate over all fences in arrayh]h iterate over all fences in array}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKDhj<ubah}(h]h ]h"]h$]h&]uh1hhjNhKDhj hhubjg )}(hX\**Parameters** ``fence`` current fence ``index`` index into the array ``head`` potential dma_fence_array object **Description** Test if **array** is a dma_fence_array object and if yes iterate over all fences in the array. If not just iterate over the fence in **array** itself. For a deep dive iterator see dma_fence_unwrap_for_each().h](h)}(h**Parameters**h]jq )}(hj[h]h Parameters}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjYubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKHhjUubj )}(hhh](j )}(h``fence`` current fence h](j )}(h ``fence``h]j)}(hjzh]hfence}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKEhjtubj )}(hhh]h)}(h current fenceh]h current fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKEhjubah}(h]h ]h"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]uh1j hjhKEhjqubj )}(h``index`` index into the array h](j )}(h ``index``h]j)}(hjh]hindex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKFhjubj )}(hhh]h)}(hindex into the arrayh]hindex into the array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKFhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKFhjqubj )}(h*``head`` potential dma_fence_array object h](j )}(h``head``h]j)}(hjh]hhead}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKGhjubj )}(hhh]h)}(h potential dma_fence_array objecth]h potential dma_fence_array object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKGhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKGhjqubeh}(h]h ]h"]h$]h&]uh1j hjUubh)}(h**Description**h]jq )}(hj'h]h Description}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj%ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKIhjUubh)}(hTest if **array** is a dma_fence_array object and if yes iterate over all fences in the array. If not just iterate over the fence in **array** itself.h](hTest if }(hj=hhhNhNubjq )}(h **array**h]harray}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj=ubht is a dma_fence_array object and if yes iterate over all fences in the array. If not just iterate over the fence in }(hj=hhhNhNubjq )}(h **array**h]harray}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj=ubh itself.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKIhjUubh)}(h9For a deep dive iterator see dma_fence_unwrap_for_each().h]h9For a deep dive iterator see dma_fence_unwrap_for_each().}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKLhjUubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj hhhNhNubeh}(h]dma-fence-arrayah ]h"]dma fence arrayah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fence Chainh]hDMA Fence Chain}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_fence_chain_walk (C function)c.dma_fence_chain_walkhNtauh1j hjhhhNhNubj )}(hhh](j )}(hAstruct dma_fence * dma_fence_chain_walk (struct dma_fence *fence)h]j )}(h?struct dma_fence *dma_fence_chain_walk(struct dma_fence *fence)h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK'ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhK'ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_fence_chain_walksbc.dma_fence_chain_walkasbuh1hhjhhhjhK'ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhK'ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjhhhjhK'ubj )}(hdma_fence_chain_walkh]j )}(hjh]hdma_fence_chain_walk}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhK'ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubj )}(h h]h }(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjPhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjMubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjRmodnameN classnameNjj)}j]jc.dma_fence_chain_walkasbuh1hhj.ubj )}(h h]h }(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubjc)}(hj h]h*}(hj|hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj.ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj*ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhK'ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhK'ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhK'hjhhubj@ )}(hhh]h)}(hchain walking functionh]hchain walking function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhK'ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` current chain node **Description** Walk the chain to the next node. Returns the next fence or NULL if we are at the end of the chain. Garbage collects chain nodes which are already signaled.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK$hjubj )}(hhh]j )}(h/``struct dma_fence *fence`` current chain node h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK!hjubj )}(hhh]h)}(hcurrent chain nodeh]hcurrent chain node}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK!hj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj hK!hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj/h]h Description}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj-ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK#hjubh)}(hWalk the chain to the next node. Returns the next fence or NULL if we are at the end of the chain. Garbage collects chain nodes which are already signaled.h]hWalk the chain to the next node. Returns the next fence or NULL if we are at the end of the chain. Garbage collects chain nodes which are already signaled.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK#hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_chain_find_seqno (C function)c.dma_fence_chain_find_seqnohNtauh1j hjhhhNhNubj )}(hhh](j )}(hJint dma_fence_chain_find_seqno (struct dma_fence **pfence, uint64_t seqno)h]j )}(hIint dma_fence_chain_find_seqno(struct dma_fence **pfence, uint64_t seqno)h](jK)}(hinth]hint}(hjthhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjphhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKZubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjphhhjhKZubj )}(hdma_fence_chain_find_seqnoh]j )}(hdma_fence_chain_find_seqnoh]hdma_fence_chain_find_seqno}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjphhhjhKZubj)}(h+(struct dma_fence **pfence, uint64_t seqno)h](j)}(hstruct dma_fence **pfenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_chain_find_seqnoasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubjc)}(hj h]h*}(hj hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hpfenceh]hpfence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(huint64_t seqnoh](h)}(hhh]j )}(huint64_th]huint64_t}(hj3 hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0 ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj5 modnameN classnameNjj)}j]jc.dma_fence_chain_find_seqnoasbuh1hhj, ubj )}(h h]h }(hjQ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj, ubj )}(hseqnoh]hseqno}(hj_ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj, ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjphhhjhKZubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjlhhhjhKZubah}(h]jgah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKZhjihhubj@ )}(hhh]h)}(hfind fence chain node by seqnoh]hfind fence chain node by seqno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKPhj hhubah}(h]h ]h"]h$]h&]uh1j? hjihhhjhKZubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j jb j jc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence **pfence`` pointer to the chain node where to start ``uint64_t seqno`` the sequence number to search for **Description** Advance the fence pointer to the chain node which will signal this sequence number. If no sequence number is provided then this is a no-op. Returns EINVAL if the fence is not a chain node or the sequence number has not yet advanced far enough.h](h)}(h**Parameters**h]jq )}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKThj ubj )}(hhh](j )}(hG``struct dma_fence **pfence`` pointer to the chain node where to start h](j )}(h``struct dma_fence **pfence``h]j)}(hj h]hstruct dma_fence **pfence}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKQhj ubj )}(hhh]h)}(h(pointer to the chain node where to starth]h(pointer to the chain node where to start}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKQhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKQhj ubj )}(h5``uint64_t seqno`` the sequence number to search for h](j )}(h``uint64_t seqno``h]j)}(hj!h]huint64_t seqno}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKRhj ubj )}(hhh]h)}(h!the sequence number to search forh]h!the sequence number to search for}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hKRhj!ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj!hKRhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]jq )}(hj>!h]h Description}(hj@!hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj huh1j hj!hKhj!hhubj@ )}(hhh]h)}(hinitialize a fence chainh]hinitialize a fence chain}(hjz#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhjw#hhubah}(h]h ]h"]h$]h&]uh1j? hj!hhhj!hKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j#jb j#jc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence_chain *chain`` the chain node to initialize ``struct dma_fence *prev`` the previous fence ``struct dma_fence *fence`` the current fence ``uint64_t seqno`` the sequence number to use for the fence chain **Description** Initialize a new chain node and either start a new chain or add the node to the existing chain of the previous fence.h](h)}(h**Parameters**h]jq )}(hj#h]h Parameters}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj#ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj#ubj )}(hhh](j )}(h?``struct dma_fence_chain *chain`` the chain node to initialize h](j )}(h!``struct dma_fence_chain *chain``h]j)}(hj#h]hstruct dma_fence_chain *chain}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj#ubj )}(hhh]h)}(hthe chain node to initializeh]hthe chain node to initialize}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hKhj#ubah}(h]h ]h"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]uh1j hj#hKhj#ubj )}(h.``struct dma_fence *prev`` the previous fence h](j )}(h``struct dma_fence *prev``h]j)}(hj#h]hstruct dma_fence *prev}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj#ubj )}(hhh]h)}(hthe previous fenceh]hthe previous fence}(hj $hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj $hKhj $ubah}(h]h ]h"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]uh1j hj $hKhj#ubj )}(h.``struct dma_fence *fence`` the current fence h](j )}(h``struct dma_fence *fence``h]j)}(hj-$h]hstruct dma_fence *fence}(hj/$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+$ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj'$ubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hjF$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjB$hKhjC$ubah}(h]h ]h"]h$]h&]uh1j hj'$ubeh}(h]h ]h"]h$]h&]uh1j hjB$hKhj#ubj )}(hB``uint64_t seqno`` the sequence number to use for the fence chain h](j )}(h``uint64_t seqno``h]j)}(hjf$h]huint64_t seqno}(hjh$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjd$ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj`$ubj )}(hhh]h)}(h.the sequence number to use for the fence chainh]h.the sequence number to use for the fence chain}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{$hKhj|$ubah}(h]h ]h"]h$]h&]uh1j hj`$ubeh}(h]h ]h"]h$]h&]uh1j hj{$hKhj#ubeh}(h]h ]h"]h$]h&]uh1j hj#ubh)}(h**Description**h]jq )}(hj$h]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj$ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj#ubh)}(huInitialize a new chain node and either start a new chain or add the node to the existing chain of the previous fence.h]huInitialize a new chain node and either start a new chain or add the node to the existing chain of the previous fence.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_chain (C struct)c.dma_fence_chainhNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_fence_chainh]j )}(hstruct dma_fence_chainh](j )}(hj h]hstruct}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$hhhj$hKubj )}(hdma_fence_chainh]j )}(hj$h]hdma_fence_chain}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj$hhhj$hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj$hhhj$hKubah}(h]j$ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj$hKhj$hhubj@ )}(hhh]h)}(h+fence to represent an node of a fence chainh]h+fence to represent an node of a fence chain}(hj(%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhj%%hhubah}(h]h ]h"]h$]h&]uh1j? hj$hhhj$hKubeh}(h]h ](jstructeh"]h$]h&]j` jja j@%jb j@%jc jd je uh1j hhhjhNhNubjg )}(hXr**Definition**:: struct dma_fence_chain { struct dma_fence base; struct dma_fence __rcu *prev; u64 prev_seqno; struct dma_fence *fence; union { struct dma_fence_cb cb; struct irq_work work; }; spinlock_t lock; }; **Members** ``base`` fence base class ``prev`` previous fence of the chain ``prev_seqno`` original previous seqno before garbage collection ``fence`` encapsulated fence ``{unnamed_union}`` anonymous ``cb`` callback for signaling This is used to add the callback for signaling the complection of the fence chain. Never used at the same time as the irq work. ``work`` irq work item for signaling Irq work structure to allow us to add the callback without running into lock inversion. Never used at the same time as the callback. ``lock`` spinlock for fence handlingh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjL%hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjH%ubh:}(hjH%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhjD%ubj)}(hstruct dma_fence_chain { struct dma_fence base; struct dma_fence __rcu *prev; u64 prev_seqno; struct dma_fence *fence; union { struct dma_fence_cb cb; struct irq_work work; }; spinlock_t lock; };h]hstruct dma_fence_chain { struct dma_fence base; struct dma_fence __rcu *prev; u64 prev_seqno; struct dma_fence *fence; union { struct dma_fence_cb cb; struct irq_work work; }; spinlock_t lock; };}hje%sbah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhjD%ubh)}(h **Members**h]jq )}(hjv%h]hMembers}(hjx%hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjt%ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK$hjD%ubj )}(hhh](j )}(h``base`` fence base class h](j )}(h``base``h]j)}(hj%h]hbase}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhj%ubj )}(hhh]h)}(hfence base classh]hfence base class}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hKhj%ubah}(h]h ]h"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]uh1j hj%hKhj%ubj )}(h%``prev`` previous fence of the chain h](j )}(h``prev``h]j)}(hj%h]hprev}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhj%ubj )}(hhh]h)}(hprevious fence of the chainh]hprevious fence of the chain}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hKhj%ubah}(h]h ]h"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]uh1j hj%hKhj%ubj )}(hA``prev_seqno`` original previous seqno before garbage collection h](j )}(h``prev_seqno``h]j)}(hj&h]h prev_seqno}(hj &hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhj&ubj )}(hhh]h)}(h1original previous seqno before garbage collectionh]h1original previous seqno before garbage collection}(hj &hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hKhj&ubah}(h]h ]h"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]uh1j hj&hKhj%ubj )}(h``fence`` encapsulated fence h](j )}(h ``fence``h]j)}(hj@&h]hfence}(hjB&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>&ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhj:&ubj )}(hhh]h)}(hencapsulated fenceh]hencapsulated fence}(hjY&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjU&hKhjV&ubah}(h]h ]h"]h$]h&]uh1j hj:&ubeh}(h]h ]h"]h$]h&]uh1j hjU&hKhj%ubj )}(h``{unnamed_union}`` anonymous h](j )}(h``{unnamed_union}``h]j)}(hjy&h]h{unnamed_union}}(hj{&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw&ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhjs&ubj )}(hhh]h)}(h anonymoush]h anonymous}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hKhj&ubah}(h]h ]h"]h$]h&]uh1j hjs&ubeh}(h]h ]h"]h$]h&]uh1j hj&hKhj%ubj )}(h``cb`` callback for signaling This is used to add the callback for signaling the complection of the fence chain. Never used at the same time as the irq work. h](j )}(h``cb``h]j)}(hj&h]hcb}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK%hj&ubj )}(hhh](h)}(hcallback for signalingh]hcallback for signaling}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK!hj&ubh)}(hThis is used to add the callback for signaling the complection of the fence chain. Never used at the same time as the irq work.h]hThis is used to add the callback for signaling the complection of the fence chain. Never used at the same time as the irq work.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK#hj&ubeh}(h]h ]h"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]uh1j hj&hK%hj%ubj )}(h``work`` irq work item for signaling Irq work structure to allow us to add the callback without running into lock inversion. Never used at the same time as the callback. h](j )}(h``work``h]j)}(hj&h]hwork}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK.hj&ubj )}(hhh](h)}(hirq work item for signalingh]hirq work item for signaling}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK*hj'ubh)}(hIrq work structure to allow us to add the callback without running into lock inversion. Never used at the same time as the callback.h]hIrq work structure to allow us to add the callback without running into lock inversion. Never used at the same time as the callback.}(hj#'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK,hj'ubeh}(h]h ]h"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]uh1j hj'hK.hj%ubj )}(h$``lock`` spinlock for fence handlingh](j )}(h``lock``h]j)}(hjD'h]hlock}(hjF'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB'ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhj>'ubj )}(hhh]h)}(hspinlock for fence handlingh]hspinlock for fence handling}(hj]'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhjZ'ubah}(h]h ]h"]h$]h&]uh1j hj>'ubeh}(h]h ]h"]h$]h&]uh1j hjY'hKhj%ubeh}(h]h ]h"]h$]h&]uh1j hjD%ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j to_dma_fence_chain (C function)c.to_dma_fence_chainhNtauh1j hjhhhNhNubj )}(hhh](j )}(hEstruct dma_fence_chain * to_dma_fence_chain (struct dma_fence *fence)h]j )}(hCstruct dma_fence_chain *to_dma_fence_chain(struct dma_fence *fence)h](j )}(hj h]hstruct}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK huh1j hj'hK huh1j hjg)hKLhjO)hhubj@ )}(hhh]h)}(hreturn the contained fenceh]hreturn the contained fence}(hjU*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKFhjR*hhubah}(h]h ]h"]h$]h&]uh1j? hjO)hhhjg)hKLubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jm*jb jm*jc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` the fence to test **Description** If the fence is a dma_fence_chain the function returns the fence contained inside the chain object, otherwise it returns the fence itself.h](h)}(h**Parameters**h]jq )}(hjw*h]h Parameters}(hjy*hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hju*ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKJhjq*ubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hj*h]hstruct dma_fence *fence}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKGhj*ubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hKGhj*ubah}(h]h ]h"]h$]h&]uh1j hj*ubeh}(h]h ]h"]h$]h&]uh1j hj*hKGhj*ubah}(h]h ]h"]h$]h&]uh1j hjq*ubh)}(h**Description**h]jq )}(hj*h]h Description}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj*ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKIhjq*ubh)}(hIf the fence is a dma_fence_chain the function returns the fence contained inside the chain object, otherwise it returns the fence itself.h]hIf the fence is a dma_fence_chain the function returns the fence contained inside the chain object, otherwise it returns the fence itself.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKIhjq*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_chain_alloc (C macro)c.dma_fence_chain_allochNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_fence_chain_alloch]j )}(hdma_fence_chain_alloch]j )}(hdma_fence_chain_alloch]j )}(hj+h]hdma_fence_chain_alloc}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj+hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK]ubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj+hhhj-+hK]ubah}(h]j +ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj-+hK]hj +hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hj +hhhj-+hK]ubeh}(h]h ](jmacroeh"]h$]h&]j` jja jF+jb jF+jc jd je uh1j hhhjhNhNubh)}(h``dma_fence_chain_alloc ()``h]j)}(hjL+h]hdma_fence_chain_alloc ()}(hjN+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ+ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK_hjhhubh)}(hX**Description** Returns a new struct dma_fence_chain object or NULL on failure. This specialized allocator has to be a macro for its allocations to be accounted separately (to have a separate alloc_tag). The typecast is intentional to enforce typesafety. h](h)}(h**Description**h]jq )}(hjh+h]h Description}(hjj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjf+ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKVhjb+ubh)}(h?Returns a new struct dma_fence_chain object or NULL on failure.h]h?Returns a new struct dma_fence_chain object or NULL on failure.}(hj~+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKVhjb+ubh)}(hThis specialized allocator has to be a macro for its allocations to be accounted separately (to have a separate alloc_tag). The typecast is intentional to enforce typesafety.h]hThis specialized allocator has to be a macro for its allocations to be accounted separately (to have a separate alloc_tag). The typecast is intentional to enforce typesafety.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKXhjb+ubeh}(h]h ]h"]h$]h&]uh1hhj}+hKVhjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_fence_chain_free (C function)c.dma_fence_chain_freehNtauh1j hjhhhNhNubj )}(hhh](j )}(h9void dma_fence_chain_free (struct dma_fence_chain *chain)h]j )}(h8void dma_fence_chain_free(struct dma_fence_chain *chain)h](jK)}(hvoidh]hvoid}(hj+hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj+hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKiubj )}(h h]h }(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+hhhj+hKiubj )}(hdma_fence_chain_freeh]j )}(hdma_fence_chain_freeh]hdma_fence_chain_free}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj+hhhj+hKiubj)}(h(struct dma_fence_chain *chain)h]j)}(hstruct dma_fence_chain *chainh](j )}(hj h]hstruct}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubj )}(h h]h }(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubh)}(hhh]j )}(hdma_fence_chainh]hdma_fence_chain}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj,modnameN classnameNjj)}j]jN)}jFj+sbc.dma_fence_chain_freeasbuh1hhj+ubj )}(h h]h }(hj6,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubjc)}(hj h]h*}(hjD,hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj+ubj )}(hchainh]hchain}(hjQ,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+ubah}(h]h ]h"]h$]h&]jjuh1jhj+hhhj+hKiubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj+hhhj+hKiubah}(h]j+ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj+hKihj+hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hj+hhhj+hKiubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j,jb j,jc jd je uh1j hhhjhNhNubjg )}(hXx**Parameters** ``struct dma_fence_chain *chain`` chain node to free **Description** Frees up an allocated but not used struct dma_fence_chain object. This doesn't need an RCU grace period since the fence was never initialized nor published. After dma_fence_chain_init() has been called the fence must be released by calling dma_fence_put(), and not through this function.h](h)}(h**Parameters**h]jq )}(hj,h]h Parameters}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj,ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKdhj,ubj )}(hhh]j )}(h5``struct dma_fence_chain *chain`` chain node to free h](j )}(h!``struct dma_fence_chain *chain``h]j)}(hj,h]hstruct dma_fence_chain *chain}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKbhj,ubj )}(hhh]h)}(hchain node to freeh]hchain node to free}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hKbhj,ubah}(h]h ]h"]h$]h&]uh1j hj,ubeh}(h]h ]h"]h$]h&]uh1j hj,hKbhj,ubah}(h]h ]h"]h$]h&]uh1j hj,ubh)}(h**Description**h]jq )}(hj,h]h Description}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj,ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKdhj,ubh)}(hXFrees up an allocated but not used struct dma_fence_chain object. This doesn't need an RCU grace period since the fence was never initialized nor published. After dma_fence_chain_init() has been called the fence must be released by calling dma_fence_put(), and not through this function.h]hX!Frees up an allocated but not used struct dma_fence_chain object. This doesn’t need an RCU grace period since the fence was never initialized nor published. After dma_fence_chain_init() has been called the fence must be released by calling dma_fence_put(), and not through this function.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKdhj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_fence_chain_for_each (C macro)c.dma_fence_chain_for_eachhNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_fence_chain_for_eachh]j )}(hdma_fence_chain_for_eachh]j )}(hdma_fence_chain_for_eachh]j )}(hj'-h]hdma_fence_chain_for_each}(hj1-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj--ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj)-hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKxubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj%-hhhjD-hKxubah}(h]j -ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjD-hKxhj"-hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hj"-hhhjD-hKxubeh}(h]h ](jmacroeh"]h$]h&]j` jja j]-jb j]-jc jd je uh1j hhhjhNhNubh)}(h)``dma_fence_chain_for_each (iter, head)``h]j)}(hjc-h]h%dma_fence_chain_for_each (iter, head)}(hje-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja-ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKzhjhhubh)}(h!iterate over all fences in chain h]h)}(h iterate over all fences in chainh]h iterate over all fences in chain}(hj}-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKohjy-ubah}(h]h ]h"]h$]h&]uh1hhj-hKohjhhubjg )}(hX**Parameters** ``iter`` current fence ``head`` starting point **Description** Iterate over all fences in the chain. We keep a reference to the current fence while inside the loop which must be dropped when breaking out. For a deep dive iterator see dma_fence_unwrap_for_each().h](h)}(h**Parameters**h]jq )}(hj-h]h Parameters}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj-ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKshj-ubj )}(hhh](j )}(h``iter`` current fence h](j )}(h``iter``h]j)}(hj-h]hiter}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKphj-ubj )}(hhh]h)}(h current fenceh]h current fence}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hKphj-ubah}(h]h ]h"]h$]h&]uh1j hj-ubeh}(h]h ]h"]h$]h&]uh1j hj-hKphj-ubj )}(h``head`` starting point h](j )}(h``head``h]j)}(hj-h]hhead}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKqhj-ubj )}(hhh]h)}(hstarting pointh]hstarting point}(hj .hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hKqhj.ubah}(h]h ]h"]h$]h&]uh1j hj-ubeh}(h]h ]h"]h$]h&]uh1j hj.hKqhj-ubeh}(h]h ]h"]h$]h&]uh1j hj-ubh)}(h**Description**h]jq )}(hj+.h]h Description}(hj-.hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj).ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKshj-ubh)}(hIterate over all fences in the chain. We keep a reference to the current fence while inside the loop which must be dropped when breaking out.h]hIterate over all fences in the chain. We keep a reference to the current fence while inside the loop which must be dropped when breaking out.}(hjA.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKshj-ubh)}(h9For a deep dive iterator see dma_fence_unwrap_for_each().h]h9For a deep dive iterator see dma_fence_unwrap_for_each().}(hjP.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKvhj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubeh}(h]dma-fence-chainah ]h"]dma fence chainah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fence unwraph]hDMA Fence unwrap}(hjq.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjn.hhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_unwrap (C struct)c.dma_fence_unwraphNtauh1j hjn.hhhNhNubj )}(hhh](j )}(hdma_fence_unwraph]j )}(hstruct dma_fence_unwraph](j )}(hj h]hstruct}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.hhhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKubj )}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.hhhj.hKubj )}(hdma_fence_unwraph]j )}(hj.h]hdma_fence_unwrap}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj.hhhj.hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj.hhhj.hKubah}(h]j.ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj.hKhj.hhubj@ )}(hhh]h)}(h#cursor into the container structureh]h#cursor into the container structure}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhj.hhubah}(h]h ]h"]h$]h&]uh1j? hj.hhhj.hKubeh}(h]h ](jstructeh"]h$]h&]j` jja j.jb j.jc jd je uh1j hhhjn.hNhNubjg )}(hXo**Definition**:: struct dma_fence_unwrap { struct dma_fence *chain; struct dma_fence *array; unsigned int index; }; **Members** ``chain`` potential dma_fence_chain, but can be other fence as well ``array`` potential dma_fence_array, but can be other fence as well ``index`` last returned index if **array** is really a dma_fence_arrayh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj.ubh:}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhj.ubj)}(hnstruct dma_fence_unwrap { struct dma_fence *chain; struct dma_fence *array; unsigned int index; };h]hnstruct dma_fence_unwrap { struct dma_fence *chain; struct dma_fence *array; unsigned int index; };}hj/sbah}(h]h ]h"]h$]h&]jjuh1jhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhj.ubh)}(h **Members**h]jq )}(hj(/h]hMembers}(hj*/hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj&/ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhj.ubj )}(hhh](j )}(hD``chain`` potential dma_fence_chain, but can be other fence as well h](j )}(h ``chain``h]j)}(hjG/h]hchain}(hjI/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE/ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhjA/ubj )}(hhh]h)}(h9potential dma_fence_chain, but can be other fence as wellh]h9potential dma_fence_chain, but can be other fence as well}(hj`/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\/hKhj]/ubah}(h]h ]h"]h$]h&]uh1j hjA/ubeh}(h]h ]h"]h$]h&]uh1j hj\/hKhj>/ubj )}(hD``array`` potential dma_fence_array, but can be other fence as well h](j )}(h ``array``h]j)}(hj/h]harray}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~/ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhjz/ubj )}(hhh]h)}(h9potential dma_fence_array, but can be other fence as wellh]h9potential dma_fence_array, but can be other fence as well}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hKhj/ubah}(h]h ]h"]h$]h&]uh1j hjz/ubeh}(h]h ]h"]h$]h&]uh1j hj/hKhj>/ubj )}(hF``index`` last returned index if **array** is really a dma_fence_arrayh](j )}(h ``index``h]j)}(hj/h]hindex}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhj/ubj )}(hhh]h)}(h/ubeh}(h]h ]h"]h$]h&]uh1j hj.ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjn.hhhNhNubh)}(h**Description**h]jq )}(hj0h]h Description}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj 0ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK hjn.hhubh)}(h?Should be used with dma_fence_unwrap_for_each() iterator macro.h]h?Should be used with dma_fence_unwrap_for_each() iterator macro.}(hj$0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhjn.hhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_unwrap_for_each (C macro)c.dma_fence_unwrap_for_eachhNtauh1j hjn.hhhNhNubj )}(hhh](j )}(hdma_fence_unwrap_for_eachh]j )}(hdma_fence_unwrap_for_eachh]j )}(hdma_fence_unwrap_for_eachh]j )}(hjF0h]hdma_fence_unwrap_for_each}(hjP0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjL0ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjH0hhhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK/ubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjD0hhhjc0hK/ubah}(h]j?0ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjc0hK/hjA0hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hjA0hhhjc0hK/ubeh}(h]h ](jmacroeh"]h$]h&]j` jja j|0jb j|0jc jd je uh1j hhhjn.hNhNubh)}(h3``dma_fence_unwrap_for_each (fence, cursor, head)``h]j)}(hj0h]h/dma_fence_unwrap_for_each (fence, cursor, head)}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK1hjn.hhubh)}(h&iterate over all fences in containers h]h)}(h%iterate over all fences in containersh]h%iterate over all fences in containers}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK&hj0ubah}(h]h ]h"]h$]h&]uh1hhj0hK&hjn.hhubjg )}(hXA**Parameters** ``fence`` current fence ``cursor`` current position inside the containers ``head`` starting point for the iterator **Description** Unwrap dma_fence_chain and dma_fence_array containers and deep dive into all potential fences in them. If **head** is just a normal fence only that one is returned.h](h)}(h**Parameters**h]jq )}(hj0h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj0ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK*hj0ubj )}(hhh](j )}(h``fence`` current fence h](j )}(h ``fence``h]j)}(hj0h]hfence}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK'hj0ubj )}(hhh]h)}(h current fenceh]h current fence}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hK'hj0ubah}(h]h ]h"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]uh1j hj0hK'hj0ubj )}(h2``cursor`` current position inside the containers h](j )}(h ``cursor``h]j)}(hj1h]hcursor}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj 1ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK(hj 1ubj )}(hhh]h)}(h¤t position inside the containersh]h¤t position inside the containers}(hj(1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$1hK(hj%1ubah}(h]h ]h"]h$]h&]uh1j hj 1ubeh}(h]h ]h"]h$]h&]uh1j hj$1hK(hj0ubj )}(h)``head`` starting point for the iterator h](j )}(h``head``h]j)}(hjH1h]hhead}(hjJ1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF1ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK)hjB1ubj )}(hhh]h)}(hstarting point for the iteratorh]hstarting point for the iterator}(hja1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]1hK)hj^1ubah}(h]h ]h"]h$]h&]uh1j hjB1ubeh}(h]h ]h"]h$]h&]uh1j hj]1hK)hj0ubeh}(h]h ]h"]h$]h&]uh1j hj0ubh)}(h**Description**h]jq )}(hj1h]h Description}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj1ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK+hj0ubh)}(hUnwrap dma_fence_chain and dma_fence_array containers and deep dive into all potential fences in them. If **head** is just a normal fence only that one is returned.h](hjUnwrap dma_fence_chain and dma_fence_array containers and deep dive into all potential fences in them. If }(hj1hhhNhNubjq )}(h**head**h]hhead}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj1ubh2 is just a normal fence only that one is returned.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK+hj0ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjn.hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_unwrap_merge (C macro)c.dma_fence_unwrap_mergehNtauh1j hjn.hhhNhNubj )}(hhh](j )}(hdma_fence_unwrap_mergeh]j )}(hdma_fence_unwrap_mergeh]j )}(hdma_fence_unwrap_mergeh]j )}(hj1h]hdma_fence_unwrap_merge}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj1hhhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKCubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj1hhhj1hKCubah}(h]j1ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj1hKChj1hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hj1hhhj1hKCubeh}(h]h ](jmacroeh"]h$]h&]j` jja j 2jb j 2jc jd je uh1j hhhjn.hNhNubh)}(h ``dma_fence_unwrap_merge (...)``h]j)}(hj2h]hdma_fence_unwrap_merge (...)}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKEhjn.hhubh)}(hunwrap and merge fences h]h)}(hunwrap and merge fencesh]hunwrap and merge fences}(hj*2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK8hj&2ubah}(h]h ]h"]h$]h&]uh1hhj82hK8hjn.hhubjg )}(hX**Parameters** ``...`` variable arguments **Description** All fences given as parameters are unwrapped and merged back together as flat dma_fence_array. Useful if multiple containers need to be merged together. Implemented as a macro to allocate the necessary arrays on the stack and account the stack frame size to the caller. Returns NULL on memory allocation failure, a dma_fence object representing all the given fences otherwise.h](h)}(h**Parameters**h]jq )}(hjE2h]h Parameters}(hjG2hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjC2ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK huh1j hj(3hKAhj3hhubj@ )}(hhh]h)}(hcreates a sync fileh]hcreates a sync file}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chK9hj4hhubah}(h]h ]h"]h$]h&]uh1j? hj3hhhj(3hKAubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j.4jb j.4jc jd je uh1j hhhj2hNhNubjg )}(hXh**Parameters** ``struct dma_fence *fence`` fence to add to the sync_fence **Description** Creates a sync_file containg **fence**. This function acquires and additional reference of **fence** for the newly-created :c:type:`sync_file`, if it succeeds. The sync_file can be released with fput(sync_file->file). Returns the sync_file or NULL in case of error.h](h)}(h**Parameters**h]jq )}(hj84h]h Parameters}(hj:4hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj64ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chK=hj24ubj )}(hhh]j )}(h;``struct dma_fence *fence`` fence to add to the sync_fence h](j )}(h``struct dma_fence *fence``h]j)}(hjW4h]hstruct dma_fence *fence}(hjY4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjU4ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chK:hjQ4ubj )}(hhh]h)}(hfence to add to the sync_fenceh]hfence to add to the sync_fence}(hjp4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl4hK:hjm4ubah}(h]h ]h"]h$]h&]uh1j hjQ4ubeh}(h]h ]h"]h$]h&]uh1j hjl4hK:hjN4ubah}(h]h ]h"]h$]h&]uh1j hj24ubh)}(h**Description**h]jq )}(hj4h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj4ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKfile). Returns the sync_file or NULL in case of error.h](hCreates a sync_file containg }(hj4hhhNhNubjq )}(h **fence**h]hfence}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj4ubh5. This function acquires and additional reference of }(hj4hhhNhNubjq )}(h **fence**h]hfence}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj4ubh for the newly-created }(hj4hhhNhNubh)}(h:c:type:`sync_file`h]j)}(hj4h]h sync_file}(hj4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj sync_fileuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKfile). Returns the sync_file or NULL in case of error.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj4hK huh1j hj+5hKghj5hhubj@ )}(hhh]h)}(h)get the fence related to the sync_file fdh]h)get the fence related to the sync_file fd}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKahj5hhubah}(h]h ]h"]h$]h&]uh1j? hj5hhhj+5hKgubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j5jb j5jc jd je uh1j hhhj2hNhNubjg )}(h**Parameters** ``int fd`` sync_file fd to get the fence from **Description** Ensures **fd** references a valid sync_file and returns a fence that represents all fence in the sync_file. On error NULL is returned.h](h)}(h**Parameters**h]jq )}(hj6h]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj5ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKehj5ubj )}(hhh]j )}(h.``int fd`` sync_file fd to get the fence from h](j )}(h ``int fd``h]j)}(hj6h]hint fd}(hj!6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKbhj6ubj )}(hhh]h)}(h"sync_file fd to get the fence fromh]h"sync_file fd to get the fence from}(hj86hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj46hKbhj56ubah}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]uh1j hj46hKbhj6ubah}(h]h ]h"]h$]h&]uh1j hj5ubh)}(h**Description**h]jq )}(hjZ6h]h Description}(hj\6hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjX6ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKdhj5ubh)}(hEnsures **fd** references a valid sync_file and returns a fence that represents all fence in the sync_file. On error NULL is returned.h](hEnsures }(hjp6hhhNhNubjq )}(h**fd**h]hfd}(hjx6hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjp6ubhx references a valid sync_file and returns a fence that represents all fence in the sync_file. On error NULL is returned.}(hjp6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKdhj5ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj2hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_file (C struct) c.sync_filehNtauh1j hj2hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhNubj )}(hhh](j )}(h sync_fileh]j )}(hstruct sync_fileh](j )}(hj h]hstruct}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKubj )}(h h]h }(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6hhhj6hKubj )}(h sync_fileh]j )}(hj6h]h sync_file}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj6hhhj6hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj6hhhj6hKubah}(h]j6ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj6hKhj6hhubj@ )}(hhh]h)}(h$sync file to export to the userspaceh]h$sync file to export to the userspace}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj6hhubah}(h]h ]h"]h$]h&]uh1j? hj6hhhj6hKubeh}(h]h ](jstructeh"]h$]h&]j` jja j 7jb j 7jc jd je uh1j hhhj2hj6hNubjg )}(hX**Definition**:: struct sync_file { struct file *file; char user_name[32]; #ifdef CONFIG_DEBUG_FS; struct list_head sync_file_list; #endif; wait_queue_head_t wq; unsigned long flags; struct dma_fence *fence; struct dma_fence_cb cb; }; **Members** ``file`` file representing this fence ``user_name`` Name of the sync file provided by userspace, for merged fences. Otherwise generated through driver callbacks (in which case the entire array is 0). ``sync_file_list`` membership in global file list ``wq`` wait queue for fence signaling ``flags`` flags for the sync_file ``fence`` fence with the fences in the sync_file ``cb`` fence callback informationh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj7ubh:}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj7ubj)}(hXstruct sync_file { struct file *file; char user_name[32]; #ifdef CONFIG_DEBUG_FS; struct list_head sync_file_list; #endif; wait_queue_head_t wq; unsigned long flags; struct dma_fence *fence; struct dma_fence_cb cb; };h]hXstruct sync_file { struct file *file; char user_name[32]; #ifdef CONFIG_DEBUG_FS; struct list_head sync_file_list; #endif; wait_queue_head_t wq; unsigned long flags; struct dma_fence *fence; struct dma_fence_cb cb; };}hj17sbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj7ubh)}(h **Members**h]jq )}(hjB7h]hMembers}(hjD7hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj@7ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhK*hj7ubj )}(hhh](j )}(h&``file`` file representing this fence h](j )}(h``file``h]j)}(hja7h]hfile}(hjc7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_7ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj[7ubj )}(hhh]h)}(hfile representing this fenceh]hfile representing this fence}(hjz7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjv7hKhjw7ubah}(h]h ]h"]h$]h&]uh1j hj[7ubeh}(h]h ]h"]h$]h&]uh1j hjv7hKhjX7ubj )}(h``user_name`` Name of the sync file provided by userspace, for merged fences. Otherwise generated through driver callbacks (in which case the entire array is 0). h](j )}(h ``user_name``h]j)}(hj7h]h user_name}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhK)hj7ubj )}(hhh]h)}(hName of the sync file provided by userspace, for merged fences. Otherwise generated through driver callbacks (in which case the entire array is 0).h]hName of the sync file provided by userspace, for merged fences. Otherwise generated through driver callbacks (in which case the entire array is 0).}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhK'hj7ubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hj7hK)hjX7ubj )}(h2``sync_file_list`` membership in global file list h](j )}(h``sync_file_list``h]j)}(hj7h]hsync_file_list}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj7ubj )}(hhh]h)}(hmembership in global file listh]hmembership in global file list}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hKhj7ubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hj7hKhjX7ubj )}(h&``wq`` wait queue for fence signaling h](j )}(h``wq``h]j)}(hj 8h]hwq}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj 8ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj8ubj )}(hhh]h)}(hwait queue for fence signalingh]hwait queue for fence signaling}(hj&8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"8hKhj#8ubah}(h]h ]h"]h$]h&]uh1j hj8ubeh}(h]h ]h"]h$]h&]uh1j hj"8hKhjX7ubj )}(h"``flags`` flags for the sync_file h](j )}(h ``flags``h]j)}(hjF8h]hflags}(hjH8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD8ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj@8ubj )}(hhh]h)}(hflags for the sync_fileh]hflags for the sync_file}(hj_8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[8hKhj\8ubah}(h]h ]h"]h$]h&]uh1j hj@8ubeh}(h]h ]h"]h$]h&]uh1j hj[8hKhjX7ubj )}(h1``fence`` fence with the fences in the sync_file h](j )}(h ``fence``h]j)}(hj8h]hfence}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}8ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhjy8ubj )}(hhh]h)}(h&fence with the fences in the sync_fileh]h&fence with the fences in the sync_file}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hKhj8ubah}(h]h ]h"]h$]h&]uh1j hjy8ubeh}(h]h ]h"]h$]h&]uh1j hj8hKhjX7ubj )}(h!``cb`` fence callback informationh](j )}(h``cb``h]j)}(hj8h]hcb}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj8ubj )}(hhh]h)}(hfence callback informationh]hfence callback information}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj8ubah}(h]h ]h"]h$]h&]uh1j hj8ubeh}(h]h ]h"]h$]h&]uh1j hj8hKhjX7ubeh}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj2hhhj6hNubh)}(h**Description**h]jq )}(hj8h]h Description}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj8ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhK"hj2hhubh)}(hEflags: POLL_ENABLED: whether userspace is currently poll()'ing or noth]hGflags: POLL_ENABLED: whether userspace is currently poll()’ing or not}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhK hj2hhubeh}(h]dma-fence-sync-fileah ]h"]dma fence sync fileah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fence Sync File uABIh]hDMA Fence Sync File uABI}(hj+9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(9hhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_merge_data (C struct)c.sync_merge_datahNtauh1j hj(9hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhNubj )}(hhh](j )}(hsync_merge_datah]j )}(hstruct sync_merge_datah](j )}(hj h]hstruct}(hjS9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjO9hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKubj )}(h h]h }(hja9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjO9hhhj`9hKubj )}(hsync_merge_datah]j )}(hjM9h]hsync_merge_data}(hjs9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjo9ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjO9hhhj`9hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjK9hhhj`9hKubah}(h]jE9ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj`9hKhjH9hhubj@ )}(hhh]h)}(h SYNC_IOC_MERGE: merge two fencesh]h SYNC_IOC_MERGE: merge two fences}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj9hhubah}(h]h ]h"]h$]h&]uh1j? hjH9hhhj`9hKubeh}(h]h ](jstructeh"]h$]h&]j` jja j9jb j9jc jd je uh1j hhhj(9hjG9hNubjg )}(hX{**Definition**:: struct sync_merge_data { char name[32]; __s32 fd2; __s32 fence; __u32 flags; __u32 pad; }; **Members** ``name`` name of new fence ``fd2`` file descriptor of second fence ``fence`` returns the fd of the new fence to userspace ``flags`` merge_data flags ``pad`` padding for 64-bit alignment, should always be zeroh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj9ubh:}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj9ubj)}(hnstruct sync_merge_data { char name[32]; __s32 fd2; __s32 fence; __u32 flags; __u32 pad; };h]hnstruct sync_merge_data { char name[32]; __s32 fd2; __s32 fence; __u32 flags; __u32 pad; };}hj9sbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj9ubh)}(h **Members**h]jq )}(hj9h]hMembers}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj9ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK!hj9ubj )}(hhh](j )}(h``name`` name of new fence h](j )}(h``name``h]j)}(hj:h]hname}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj9ubj )}(hhh]h)}(hname of new fenceh]hname of new fence}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hKhj:ubah}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]uh1j hj:hKhj9ubj )}(h(``fd2`` file descriptor of second fence h](j )}(h``fd2``h]j)}(hj;:h]hfd2}(hj=:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9:ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj5:ubj )}(hhh]h)}(hfile descriptor of second fenceh]hfile descriptor of second fence}(hjT:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjP:hKhjQ:ubah}(h]h ]h"]h$]h&]uh1j hj5:ubeh}(h]h ]h"]h$]h&]uh1j hjP:hKhj9ubj )}(h7``fence`` returns the fd of the new fence to userspace h](j )}(h ``fence``h]j)}(hjt:h]hfence}(hjv:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr:ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhjn:ubj )}(hhh]h)}(h,returns the fd of the new fence to userspaceh]h,returns the fd of the new fence to userspace}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hKhj:ubah}(h]h ]h"]h$]h&]uh1j hjn:ubeh}(h]h ]h"]h$]h&]uh1j hj:hKhj9ubj )}(h``flags`` merge_data flags h](j )}(h ``flags``h]j)}(hj:h]hflags}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj:ubj )}(hhh]h)}(hmerge_data flagsh]hmerge_data flags}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hKhj:ubah}(h]h ]h"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]uh1j hj:hKhj9ubj )}(h;``pad`` padding for 64-bit alignment, should always be zeroh](j )}(h``pad``h]j)}(hj:h]hpad}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj:ubj )}(hhh]h)}(h3padding for 64-bit alignment, should always be zeroh]h3padding for 64-bit alignment, should always be zero}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj:ubah}(h]h ]h"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]uh1j hj:hKhj9ubeh}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj(9hhhjG9hNubh)}(h**Description**h]jq )}(hj);h]h Description}(hj+;hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj';ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj(9hhubh)}(hCreates a new fence containing copies of the sync_pts in both the calling fd and sync_merge_data.fd2. Returns the new fence's fd in sync_merge_data.fenceh]hCreates a new fence containing copies of the sync_pts in both the calling fd and sync_merge_data.fd2. Returns the new fence’s fd in sync_merge_data.fence}(hj?;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj(9hhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_fence_info (C struct)c.sync_fence_infohNtauh1j hj(9hhhjG9hNubj )}(hhh](j )}(hsync_fence_infoh]j )}(hstruct sync_fence_infoh](j )}(hj h]hstruct}(hjg;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjc;hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK!ubj )}(h h]h }(hju;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjc;hhhjt;hK!ubj )}(hsync_fence_infoh]j )}(hja;h]hsync_fence_info}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjc;hhhjt;hK!ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj_;hhhjt;hK!ubah}(h]jZ;ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjt;hK!hj\;hhubj@ )}(hhh]h)}(hdetailed fence informationh]hdetailed fence information}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK'hj;hhubah}(h]h ]h"]h$]h&]uh1j? hj\;hhhjt;hK!ubeh}(h]h ](jstructeh"]h$]h&]j` jja j;jb j;jc jd je uh1j hhhj(9hjG9hNubjg )}(hX**Definition**:: struct sync_fence_info { char obj_name[32]; char driver_name[32]; __s32 status; __u32 flags; __u64 timestamp_ns; }; **Members** ``obj_name`` name of parent sync_timeline ``driver_name`` name of driver implementing the parent ``status`` status of the fence 0:active 1:signaled <0:error ``flags`` fence_info flags ``timestamp_ns`` timestamp of status change in nanosecondsh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj;ubh:}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK+hj;ubj)}(hstruct sync_fence_info { char obj_name[32]; char driver_name[32]; __s32 status; __u32 flags; __u64 timestamp_ns; };h]hstruct sync_fence_info { char obj_name[32]; char driver_name[32]; __s32 status; __u32 flags; __u64 timestamp_ns; };}hj;sbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK-hj;ubh)}(h **Members**h]jq )}(hj;h]hMembers}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj;ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK5hj;ubj )}(hhh](j )}(h*``obj_name`` name of parent sync_timeline h](j )}(h ``obj_name``h]j)}(hj<h]hobj_name}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK)hj<ubj )}(hhh]h)}(hname of parent sync_timelineh]hname of parent sync_timeline}(hj/<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+<hK)hj,<ubah}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hj+<hK)hj <ubj )}(h7``driver_name`` name of driver implementing the parent h](j )}(h``driver_name``h]j)}(hjO<h]h driver_name}(hjQ<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjM<ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK*hjI<ubj )}(hhh]h)}(h&name of driver implementing the parenth]h&name of driver implementing the parent}(hjh<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjd<hK*hje<ubah}(h]h ]h"]h$]h&]uh1j hjI<ubeh}(h]h ]h"]h$]h&]uh1j hjd<hK*hj <ubj )}(h<``status`` status of the fence 0:active 1:signaled <0:error h](j )}(h ``status``h]j)}(hj<h]hstatus}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK+hj<ubj )}(hhh]h)}(h0status of the fence 0:active 1:signaled <0:errorh]h0status of the fence 0:active 1:signaled <0:error}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hK+hj<ubah}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hj<hK+hj <ubj )}(h``flags`` fence_info flags h](j )}(h ``flags``h]j)}(hj<h]hflags}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK,hj<ubj )}(hhh]h)}(hfence_info flagsh]hfence_info flags}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hK,hj<ubah}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hj<hK,hj <ubj )}(h:``timestamp_ns`` timestamp of status change in nanosecondsh](j )}(h``timestamp_ns``h]j)}(hj<h]h timestamp_ns}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK,hj<ubj )}(hhh]h)}(h)timestamp of status change in nanosecondsh]h)timestamp of status change in nanoseconds}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK-hj=ubah}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hj=hK,hj <ubeh}(h]h ]h"]h$]h&]uh1j hj;ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj(9hhhjG9hNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_file_info (C struct)c.sync_file_infohNtauh1j hj(9hhhjG9hNubj )}(hhh](j )}(hsync_file_infoh]j )}(hstruct sync_file_infoh](j )}(hj h]hstruct}(hjT=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjP=hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK3ubj )}(h h]h }(hjb=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjP=hhhja=hK3ubj )}(hsync_file_infoh]j )}(hjN=h]hsync_file_info}(hjt=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjp=ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjP=hhhja=hK3ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjL=hhhja=hK3ubah}(h]jG=ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hja=hK3hjI=hhubj@ )}(hhh]h)}(h;SYNC_IOC_FILE_INFO: get detailed information on a sync_fileh]h;SYNC_IOC_FILE_INFO: get detailed information on a sync_file}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK7hj=hhubah}(h]h ]h"]h$]h&]uh1j? hjI=hhhja=hK3ubeh}(h]h ](jstructeh"]h$]h&]j` jja j=jb j=jc jd je uh1j hhhj(9hjG9hNubjg )}(hX**Definition**:: struct sync_file_info { char name[32]; __s32 status; __u32 flags; __u32 num_fences; __u32 pad; __u64 sync_fence_info; }; **Members** ``name`` name of fence ``status`` status of fence. 1: signaled 0:active <0:error ``flags`` sync_file_info flags ``num_fences`` number of fences in the sync_file ``pad`` padding for 64-bit alignment, should always be zero ``sync_fence_info`` pointer to array of struct :c:type:`sync_fence_info` with all fences in the sync_fileh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj=ubh:}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK;hj=ubj)}(hstruct sync_file_info { char name[32]; __s32 status; __u32 flags; __u32 num_fences; __u32 pad; __u64 sync_fence_info; };h]hstruct sync_file_info { char name[32]; __s32 status; __u32 flags; __u32 num_fences; __u32 pad; __u64 sync_fence_info; };}hj=sbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK=hj=ubh)}(h **Members**h]jq )}(hj=h]hMembers}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj=ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKFhj=ubj )}(hhh](j )}(h``name`` name of fence h](j )}(h``name``h]j)}(hj>h]hname}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK9hj=ubj )}(hhh]h)}(h name of fenceh]h name of fence}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hK9hj>ubah}(h]h ]h"]h$]h&]uh1j hj=ubeh}(h]h ]h"]h$]h&]uh1j hj>hK9hj=ubj )}(h:``status`` status of fence. 1: signaled 0:active <0:error h](j )}(h ``status``h]j)}(hj<>h]hstatus}(hj>>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:>ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK:hj6>ubj )}(hhh]h)}(h.status of fence. 1: signaled 0:active <0:errorh]h.status of fence. 1: signaled 0:active <0:error}(hjU>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQ>hK:hjR>ubah}(h]h ]h"]h$]h&]uh1j hj6>ubeh}(h]h ]h"]h$]h&]uh1j hjQ>hK:hj=ubj )}(h``flags`` sync_file_info flags h](j )}(h ``flags``h]j)}(hju>h]hflags}(hjw>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjs>ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK;hjo>ubj )}(hhh]h)}(hsync_file_info flagsh]hsync_file_info flags}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hK;hj>ubah}(h]h ]h"]h$]h&]uh1j hjo>ubeh}(h]h ]h"]h$]h&]uh1j hj>hK;hj=ubj )}(h1``num_fences`` number of fences in the sync_file h](j )}(h``num_fences``h]j)}(hj>h]h num_fences}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKubj )}(hhh]h)}(h!number of fences in the sync_fileh]h!number of fences in the sync_file}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hKubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hj>hKh]hpad}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK=hj>ubj )}(hhh]h)}(h3padding for 64-bit alignment, should always be zeroh]h3padding for 64-bit alignment, should always be zero}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hK=hj>ubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hj>hK=hj=ubj )}(hi``sync_fence_info`` pointer to array of struct :c:type:`sync_fence_info` with all fences in the sync_fileh](j )}(h``sync_fence_info``h]j)}(hj ?h]hsync_fence_info}(hj"?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK>hj?ubj )}(hhh]h)}(hUpointer to array of struct :c:type:`sync_fence_info` with all fences in the sync_fileh](hpointer to array of struct }(hj9?hhhNhNubh)}(h:c:type:`sync_fence_info`h]j)}(hjC?h]hsync_fence_info}(hjE?hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjA?ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsync_fence_infouh1hhj5?hK>hj9?ubh! with all fences in the sync_file}(hj9?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj5?hK>hj6?ubah}(h]h ]h"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]uh1j hj5?hK>hj=ubeh}(h]h ]h"]h$]h&]uh1j hj=ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj(9hhhjG9hNubh)}(h**Description**h]jq )}(hj?h]h Description}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj?ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKBhj(9hhubh)}(hXTakes a struct sync_file_info. If num_fences is 0, the field is updated with the actual number of fences. If num_fences is > 0, the system will use the pointer provided on sync_fence_info to return up to num_fences of struct sync_fence_info, with detailed fence information.h]hXTakes a struct sync_file_info. If num_fences is 0, the field is updated with the actual number of fences. If num_fences is > 0, the system will use the pointer provided on sync_fence_info to return up to num_fences of struct sync_fence_info, with detailed fence information.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK@hj(9hhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_set_deadline (C struct)c.sync_set_deadlinehNtauh1j hj(9hhhjG9hNubj )}(hhh](j )}(hsync_set_deadlineh]j )}(hstruct sync_set_deadlineh](j )}(hj h]hstruct}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKHubj )}(h h]h }(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?hhhj?hKHubj )}(hsync_set_deadlineh]j )}(hj?h]hsync_set_deadline}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj?hhhj?hKHubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj?hhhj?hKHubah}(h]j?ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj?hKHhj?hhubj@ )}(hhh]h)}(h6SYNC_IOC_SET_DEADLINE - set a deadline hint on a fenceh]h6SYNC_IOC_SET_DEADLINE - set a deadline hint on a fence}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKPhj@hhubah}(h]h ]h"]h$]h&]uh1j? hj?hhhj?hKHubeh}(h]h ](jstructeh"]h$]h&]j` jja j@jb j@jc jd je uh1j hhhj(9hjG9hNubjg )}(h**Definition**:: struct sync_set_deadline { __u64 deadline_ns; __u64 pad; }; **Members** ``deadline_ns`` absolute time of the deadline ``pad`` must be zeroh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj)@hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj%@ubh:}(hj%@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKThj!@ubj)}(hCstruct sync_set_deadline { __u64 deadline_ns; __u64 pad; };h]hCstruct sync_set_deadline { __u64 deadline_ns; __u64 pad; };}hjB@sbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKVhj!@ubh)}(h **Members**h]jq )}(hjS@h]hMembers}(hjU@hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjQ@ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK[hj!@ubj )}(hhh](j )}(h.``deadline_ns`` absolute time of the deadline h](j )}(h``deadline_ns``h]j)}(hjr@h]h deadline_ns}(hjt@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp@ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKRhjl@ubj )}(hhh]h)}(habsolute time of the deadlineh]habsolute time of the deadline}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hKRhj@ubah}(h]h ]h"]h$]h&]uh1j hjl@ubeh}(h]h ]h"]h$]h&]uh1j hj@hKRhji@ubj )}(h``pad`` must be zeroh](j )}(h``pad``h]j)}(hj@h]hpad}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKRhj@ubj )}(hhh]h)}(h must be zeroh]h must be zero}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKShj@ubah}(h]h ]h"]h$]h&]uh1j hj@ubeh}(h]h ]h"]h$]h&]uh1j hj@hKRhji@ubeh}(h]h ]h"]h$]h&]uh1j hj!@ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj(9hhhjG9hNubh)}(h**Description**h]jq )}(hj@h]h Description}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj@ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKVhj(9hhubh)}(hSAllows userspace to set a deadline on a fence, see :c:type:`dma_fence_set_deadline`h](h3Allows userspace to set a deadline on a fence, see }(hjAhhhNhNubh)}(h :c:type:`dma_fence_set_deadline`h]j)}(hjAh]hdma_fence_set_deadline}(hjAhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj Aubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_fence_set_deadlineuh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKThjAubeh}(h]h ]h"]h$]h&]uh1hhj+AhKThj(9hhubh)}(hOThe timebase for the deadline is CLOCK_MONOTONIC (same as vblank). For exampleh]hOThe timebase for the deadline is CLOCK_MONOTONIC (same as vblank). For example}(hj2AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKVhj(9hhubh)}(huclock_gettime(CLOCK_MONOTONIC, :c:type:`t`); deadline_ns = (t.tv_sec * 1000000000L) + t.tv_nsec + ns_until_deadline h]h)}(hsclock_gettime(CLOCK_MONOTONIC, :c:type:`t`); deadline_ns = (t.tv_sec * 1000000000L) + t.tv_nsec + ns_until_deadlineh](hclock_gettime(CLOCK_MONOTONIC, }(hjEAhhhNhNubh)}(h :c:type:`t`h]j)}(hjOAh]ht}(hjQAhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjMAubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjtuh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKYhjEAubhI); deadline_ns = (t.tv_sec * 1000000000L) + t.tv_nsec + ns_until_deadline}(hjEAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjlAhKYhjAAubah}(h]h ]h"]h$]h&]uh1hhjlAhKYhj(9hhubeh}(h]dma-fence-sync-file-uabiah ]h"]dma fence sync file uabiah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hIndefinite DMA Fencesh]hIndefinite DMA Fences}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhhhhhKubh)}(hAt various times struct dma_fence with an indefinite time until dma_fence_wait() finishes have been proposed. Examples include:h]hAt various times struct dma_fence with an indefinite time until dma_fence_wait() finishes have been proposed. Examples include:}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAhhubh)}(hhh](h)}(hFuture fences, used in HWC1 to signal when a buffer isn't used by the display any longer, and created with the screen update that makes the buffer visible. The time this fence completes is entirely under userspace's control. h]h)}(hFuture fences, used in HWC1 to signal when a buffer isn't used by the display any longer, and created with the screen update that makes the buffer visible. The time this fence completes is entirely under userspace's control.h]hFuture fences, used in HWC1 to signal when a buffer isn’t used by the display any longer, and created with the screen update that makes the buffer visible. The time this fence completes is entirely under userspace’s control.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAubah}(h]h ]h"]h$]h&]uh1hhjAhhhhhNubh)}(hProxy fences, proposed to handle &drm_syncobj for which the fence has not yet been set. Used to asynchronously delay command submission. h]h)}(hProxy fences, proposed to handle &drm_syncobj for which the fence has not yet been set. Used to asynchronously delay command submission.h]hProxy fences, proposed to handle &drm_syncobj for which the fence has not yet been set. Used to asynchronously delay command submission.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAubah}(h]h ]h"]h$]h&]uh1hhjAhhhhhNubh)}(hUserspace fences or gpu futexes, fine-grained locking within a command buffer that userspace uses for synchronization across engines or with the CPU, which are then imported as a DMA fence for integration into existing winsys protocols. h]h)}(hUserspace fences or gpu futexes, fine-grained locking within a command buffer that userspace uses for synchronization across engines or with the CPU, which are then imported as a DMA fence for integration into existing winsys protocols.h]hUserspace fences or gpu futexes, fine-grained locking within a command buffer that userspace uses for synchronization across engines or with the CPU, which are then imported as a DMA fence for integration into existing winsys protocols.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAubah}(h]h ]h"]h$]h&]uh1hhjAhhhhhNubh)}(hLong-running compute command buffers, while still using traditional end of batch DMA fences for memory management instead of context preemption DMA fences which get reattached when the compute job is rescheduled. h]h)}(hLong-running compute command buffers, while still using traditional end of batch DMA fences for memory management instead of context preemption DMA fences which get reattached when the compute job is rescheduled.h]hLong-running compute command buffers, while still using traditional end of batch DMA fences for memory management instead of context preemption DMA fences which get reattached when the compute job is rescheduled.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAubah}(h]h ]h"]h$]h&]uh1hhjAhhhhhNubeh}(h]h ]h"]h$]h&]j>j uh1hhhhKhjAhhubh)}(hXCommon to all these schemes is that userspace controls the dependencies of these fences and controls when they fire. Mixing indefinite fences with normal in-kernel DMA fences does not work, even when a fallback timeout is included to protect against malicious userspace:h]hXCommon to all these schemes is that userspace controls the dependencies of these fences and controls when they fire. Mixing indefinite fences with normal in-kernel DMA fences does not work, even when a fallback timeout is included to protect against malicious userspace:}(hj BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAhhubh)}(hhh](h)}(hOnly the kernel knows about all DMA fence dependencies, userspace is not aware of dependencies injected due to memory management or scheduler decisions. h]h)}(hOnly the kernel knows about all DMA fence dependencies, userspace is not aware of dependencies injected due to memory management or scheduler decisions.h]hOnly the kernel knows about all DMA fence dependencies, userspace is not aware of dependencies injected due to memory management or scheduler decisions.}(hj"BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubh)}(hOnly userspace knows about all dependencies in indefinite fences and when exactly they will complete, the kernel has no visibility. h]h)}(hOnly userspace knows about all dependencies in indefinite fences and when exactly they will complete, the kernel has no visibility.h]hOnly userspace knows about all dependencies in indefinite fences and when exactly they will complete, the kernel has no visibility.}(hj:BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj6Bubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubeh}(h]h ]h"]h$]h&]j>j uh1hhhhMhjAhhubh)}(hXRFurthermore the kernel has to be able to hold up userspace command submission for memory management needs, which means we must support indefinite fences being dependent upon DMA fences. If the kernel also support indefinite fences in the kernel like a DMA fence, like any of the above proposal would, there is the potential for deadlocks.h]hXRFurthermore the kernel has to be able to hold up userspace command submission for memory management needs, which means we must support indefinite fences being dependent upon DMA fences. If the kernel also support indefinite fences in the kernel like a DMA fence, like any of the above proposal would, there is the potential for deadlocks.}(hjTBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAhhubhfigure)}(hhh](kfigure kernel_render)}(hhh]j)}(hX9digraph "Fencing Cycle" { node [shape=box bgcolor=grey style=filled] kernel [label="Kernel DMA Fences"] userspace [label="userspace controlled fences"] kernel -> userspace [label="memory management"] userspace -> kernel [label="Future fence, fence proxy, ..."] { rank=same; kernel userspace } }:Oh]hX9digraph "Fencing Cycle" { node [shape=box bgcolor=grey style=filled] kernel [label="Kernel DMA Fences"] userspace [label="userspace controlled fences"] kernel -> userspace [label="memory management"] userspace -> kernel [label="Future fence, fence proxy, ..."] { rank=same; kernel userspace } }}hjmBsbah}(h]h ]h"]h$]h&]jjuh1jhjjBhhubah}(h]h ]h"]h$]h&]alt#Indefinite Fencing Dependency CyclesrclangDOTuh1jhBhjdBubhcaption)}(h#Indefinite Fencing Dependency Cycleh]h#Indefinite Fencing Dependency Cycle}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhhhKhjdBubeh}(h]id1ah ]h"]h$]h&]altjBcaptionjBuh1jbBhjAhhhhhNubh)}(hXThis means that the kernel might accidentally create deadlocks through memory management dependencies which userspace is unaware of, which randomly hangs workloads until the timeout kicks in. Workloads, which from userspace's perspective, do not contain a deadlock. In such a mixed fencing architecture there is no single entity with knowledge of all dependencies. Therefore preventing such deadlocks from within the kernel is not possible.h]hXThis means that the kernel might accidentally create deadlocks through memory management dependencies which userspace is unaware of, which randomly hangs workloads until the timeout kicks in. Workloads, which from userspace’s perspective, do not contain a deadlock. In such a mixed fencing architecture there is no single entity with knowledge of all dependencies. Therefore preventing such deadlocks from within the kernel is not possible.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjAhhubh)}(hmThe only solution to avoid dependencies loops is by not allowing indefinite fences in the kernel. This means:h]hmThe only solution to avoid dependencies loops is by not allowing indefinite fences in the kernel. This means:}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjAhhubh)}(hhh](h)}(hfNo future fences, proxy fences or userspace fences imported as DMA fences, with or without a timeout. h]h)}(heNo future fences, proxy fences or userspace fences imported as DMA fences, with or without a timeout.h]heNo future fences, proxy fences or userspace fences imported as DMA fences, with or without a timeout.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hjBubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubh)}(hNo DMA fences that signal end of batchbuffer for command submission where userspace is allowed to use userspace fencing or long running compute workloads. This also means no implicit fencing for shared buffers in these cases. h]h)}(hNo DMA fences that signal end of batchbuffer for command submission where userspace is allowed to use userspace fencing or long running compute workloads. This also means no implicit fencing for shared buffers in these cases.h]hNo DMA fences that signal end of batchbuffer for command submission where userspace is allowed to use userspace fencing or long running compute workloads. This also means no implicit fencing for shared buffers in these cases.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hjBubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubeh}(h]h ]h"]h$]h&]j>j uh1hhhhM,hjAhhubeh}(h]indefinite-dma-fencesah ]h"]indefinite dma fencesah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h-Recoverable Hardware Page Faults Implicationsh]h-Recoverable Hardware Page Faults Implications}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhM5ubh)}(haModern hardware supports recoverable page faults, which has a lot of implications for DMA fences.h]haModern hardware supports recoverable page faults, which has a lot of implications for DMA fences.}(hj ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hjBhhubh)}(hXFirst, a pending page fault obviously holds up the work that's running on the accelerator and a memory allocation is usually required to resolve the fault. But memory allocations are not allowed to gate completion of DMA fences, which means any workload using recoverable page faults cannot use DMA fences for synchronization. Synchronization fences controlled by userspace must be used instead.h]hXFirst, a pending page fault obviously holds up the work that’s running on the accelerator and a memory allocation is usually required to resolve the fault. But memory allocations are not allowed to gate completion of DMA fences, which means any workload using recoverable page faults cannot use DMA fences for synchronization. Synchronization fences controlled by userspace must be used instead.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hjBhhubh)}(hXOn GPUs this poses a problem, because current desktop compositor protocols on Linux rely on DMA fences, which means without an entirely new userspace stack built on top of userspace fences, they cannot benefit from recoverable page faults. Specifically this means implicit synchronization will not be possible. The exception is when page faults are only used as migration hints and never to on-demand fill a memory request. For now this means recoverable page faults on GPUs are limited to pure compute workloads.h]hXOn GPUs this poses a problem, because current desktop compositor protocols on Linux rely on DMA fences, which means without an entirely new userspace stack built on top of userspace fences, they cannot benefit from recoverable page faults. Specifically this means implicit synchronization will not be possible. The exception is when page faults are only used as migration hints and never to on-demand fill a memory request. For now this means recoverable page faults on GPUs are limited to pure compute workloads.}(hj(ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhjBhhubh)}(hXFurthermore GPUs usually have shared resources between the 3D rendering and compute side, like compute units or command submission engines. If both a 3D job with a DMA fence and a compute workload using recoverable page faults are pending they could deadlock:h]hXFurthermore GPUs usually have shared resources between the 3D rendering and compute side, like compute units or command submission engines. If both a 3D job with a DMA fence and a compute workload using recoverable page faults are pending they could deadlock:}(hj6ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjBhhubh)}(hhh](h)}(hgThe 3D workload might need to wait for the compute job to finish and release hardware resources first. h]h)}(hfThe 3D workload might need to wait for the compute job to finish and release hardware resources first.h]hfThe 3D workload might need to wait for the compute job to finish and release hardware resources first.}(hjKChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjGCubah}(h]h ]h"]h$]h&]uh1hhjDChhhhhNubh)}(hThe compute workload might be stuck in a page fault, because the memory allocation is waiting for the DMA fence of the 3D workload to complete. h]h)}(hThe compute workload might be stuck in a page fault, because the memory allocation is waiting for the DMA fence of the 3D workload to complete.h]hThe compute workload might be stuck in a page fault, because the memory allocation is waiting for the DMA fence of the 3D workload to complete.}(hjcChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj_Cubah}(h]h ]h"]h$]h&]uh1hhjDChhhhhNubeh}(h]h ]h"]h$]h&]j>j?uh1hhhhMNhjBhhubh)}(hUThere are a few options to prevent this problem, one of which drivers need to ensure:h]hUThere are a few options to prevent this problem, one of which drivers need to ensure:}(hj}ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjBhhubh)}(hhh](h)}(hCompute workloads can always be preempted, even when a page fault is pending and not yet repaired. Not all hardware supports this. h]h)}(hCompute workloads can always be preempted, even when a page fault is pending and not yet repaired. Not all hardware supports this.h]hCompute workloads can always be preempted, even when a page fault is pending and not yet repaired. Not all hardware supports this.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjCubah}(h]h ]h"]h$]h&]uh1hhjChhhhhNubh)}(hXDMA fence workloads and workloads which need page fault handling have independent hardware resources to guarantee forward progress. This could be achieved through e.g. through dedicated engines and minimal compute unit reservations for DMA fence workloads. h]h)}(hXDMA fence workloads and workloads which need page fault handling have independent hardware resources to guarantee forward progress. This could be achieved through e.g. through dedicated engines and minimal compute unit reservations for DMA fence workloads.h]hXDMA fence workloads and workloads which need page fault handling have independent hardware resources to guarantee forward progress. This could be achieved through e.g. through dedicated engines and minimal compute unit reservations for DMA fence workloads.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjCubah}(h]h ]h"]h$]h&]uh1hhjChhhhhNubh)}(hXThe reservation approach could be further refined by only reserving the hardware resources for DMA fence workloads when they are in-flight. This must cover the time from when the DMA fence is visible to other threads up to moment when fence is completed through dma_fence_signal(). h]h)}(hXThe reservation approach could be further refined by only reserving the hardware resources for DMA fence workloads when they are in-flight. This must cover the time from when the DMA fence is visible to other threads up to moment when fence is completed through dma_fence_signal().h]hXThe reservation approach could be further refined by only reserving the hardware resources for DMA fence workloads when they are in-flight. This must cover the time from when the DMA fence is visible to other threads up to moment when fence is completed through dma_fence_signal().}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hjCubah}(h]h ]h"]h$]h&]uh1hhjChhhhhNubh)}(hXAs a last resort, if the hardware provides no useful reservation mechanics, all workloads must be flushed from the GPU when switching between jobs requiring DMA fences or jobs requiring page fault handling: This means all DMA fences must complete before a compute job with page fault handling can be inserted into the scheduler queue. And vice versa, before a DMA fence can be made visible anywhere in the system, all compute workloads must be preempted to guarantee all pending GPU page faults are flushed. h]h)}(hXAs a last resort, if the hardware provides no useful reservation mechanics, all workloads must be flushed from the GPU when switching between jobs requiring DMA fences or jobs requiring page fault handling: This means all DMA fences must complete before a compute job with page fault handling can be inserted into the scheduler queue. And vice versa, before a DMA fence can be made visible anywhere in the system, all compute workloads must be preempted to guarantee all pending GPU page faults are flushed.h]hXAs a last resort, if the hardware provides no useful reservation mechanics, all workloads must be flushed from the GPU when switching between jobs requiring DMA fences or jobs requiring page fault handling: This means all DMA fences must complete before a compute job with page fault handling can be inserted into the scheduler queue. And vice versa, before a DMA fence can be made visible anywhere in the system, all compute workloads must be preempted to guarantee all pending GPU page faults are flushed.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhjCubah}(h]h ]h"]h$]h&]uh1hhjChhhhhNubh)}(hXOnly a fairly theoretical option would be to untangle these dependencies when allocating memory to repair hardware page faults, either through separate memory blocks or runtime tracking of the full dependency graph of all DMA fences. This results very wide impact on the kernel, since resolving the page on the CPU side can itself involve a page fault. It is much more feasible and robust to limit the impact of handling hardware page faults to the specific driver. h]h)}(hXOnly a fairly theoretical option would be to untangle these dependencies when allocating memory to repair hardware page faults, either through separate memory blocks or runtime tracking of the full dependency graph of all DMA fences. This results very wide impact on the kernel, since resolving the page on the CPU side can itself involve a page fault. It is much more feasible and robust to limit the impact of handling hardware page faults to the specific driver.h]hXOnly a fairly theoretical option would be to untangle these dependencies when allocating memory to repair hardware page faults, either through separate memory blocks or runtime tracking of the full dependency graph of all DMA fences. This results very wide impact on the kernel, since resolving the page on the CPU side can itself involve a page fault. It is much more feasible and robust to limit the impact of handling hardware page faults to the specific driver.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjCubah}(h]h ]h"]h$]h&]uh1hhjChhhhhNubeh}(h]h ]h"]h$]h&]j>j?uh1hhhhMWhjBhhubh)}(hX+Note that workloads that run on independent hardware like copy engines or other GPUs do not have any impact. This allows us to keep using DMA fences internally in the kernel even for resolving hardware page faults, e.g. by using copy engines to clear or copy memory needed to resolve the page fault.h]hX+Note that workloads that run on independent hardware like copy engines or other GPUs do not have any impact. This allows us to keep using DMA fences internally in the kernel even for resolving hardware page faults, e.g. by using copy engines to clear or copy memory needed to resolve the page fault.}(hj DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthjBhhubh)}(hXIn some ways this page fault problem is a special case of the `Infinite DMA Fences` discussions: Infinite fences from compute workloads are allowed to depend on DMA fences, but not the other way around. And not even the page fault problem is new, because some other CPU thread in userspace might hit a page fault which holds up a userspace fence - supporting page faults on GPUs doesn't anything fundamentally new.h](h>In some ways this page fault problem is a special case of the }(hjDhhhNhNubhtitle_reference)}(h`Infinite DMA Fences`h]hInfinite DMA Fences}(hj$DhhhNhNubah}(h]h ]h"]h$]h&]uh1j"DhjDubhXM discussions: Infinite fences from compute workloads are allowed to depend on DMA fences, but not the other way around. And not even the page fault problem is new, because some other CPU thread in userspace might hit a page fault which holds up a userspace fence - supporting page faults on GPUs doesn’t anything fundamentally new.}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMyhjBhhubeh}(h]-recoverable-hardware-page-faults-implicationsah ]h"]-recoverable hardware page faults implicationsah$]h&]uh1hhjhhhhhM5ubeh}(h] dma-fencesah ]h"] dma fencesah$]h&]uh1hhhhhhhhKubeh}(h]*buffer-sharing-and-synchronization-dma-bufah ]h"],buffer sharing and synchronization (dma-buf)ah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_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_handlerjwDerror_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}( cpu access to dma buffer objects]jaimplicit fence poll support](jjRedma buffer ioctls]j adma-buf statistics]jTaurefids}nameids}(jQDjNDjjjgj8bj5bj5j2j|jyjajjjj j jjjjj0bj-bjjjIDjFDjjjܳjٳjjj j jjjk.jh.j2j2j%9j"9jAjAjBjBjADj>Du nametypes}(jQDjjj8bj5j|jajj jjj0bjjIDjjܳjj jjk.j2j%9jAjBjADuh}(jNDhjgjFj5bjmj2j#jyj8jjjjej jjj j j j_ jd jrjwjjj-bjjj j=jBj/j4jjjcjhj!j!j$j $jw&j|&j@(jE(j)j)j|,j,j.j.j1j1jr4jw4j5j5jQ8jV8j}:j:jA=jF=j?j?jAjAjCjCjEjEjbNjgNjUUjZUjVjVjZjZj\j\j]j]j6_j;_j`j`jj;bjvbj{bjcjcj,ej1ejygj~gjij"ij'lj,lj}ojojWqj\qj"sj'sjujujvjvjyjyj|j|jjjjjXj]jjjjjjjjjwj|jfjkjj jjj6j;jjj=jBj'j,jßjȟjPjUjjjjjQjVjѩj֩jjjFDjjjîjٳjjj߳j jj9j>jjj2j7jjj.j3jqjvjƾj˾jjjjj_jdjjjjjjjQjVjXj]jjjajfjjjjjjjjjjjjjjjQjVjjjhjmj$j)jj"jjj|jjjjBjGjkjpjjj`jejjjmjrjjjjj j jj j. j3 j j jjjjjjjjj'j,jjjh.jjjjgjlj!j!j$j$j'j'jM)jR)j +j+j+j+j -j%-j2jn.j.j.j?0jD0j1j1j"9j2j3j3j5j5j6j6jAj(9jE9jK9jZ;j_;jG=jL=j?j?jBjAj>DjBjBjdBu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jDKsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.