8sphinx.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.chMhj8hhubhenumerated_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.chMhjaubh. 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_bufuh1hhjhMhjaubh; to userspace as a file descriptor by calling dma_buf_fd().}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhj]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.chMhjubhW using dma_buf_get(). Then the buffer is attached to the device using dma_buf_attach().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubh)}(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.chMhjubeh}(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.chMhjubah}(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.chMhj 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.chMhjEubh.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjlhMhj8hhubeh}(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.chMBhjhhubh)}(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.chMDhjubh)}(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.chMJhjubh)}(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.chMNhjubh 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.chMPhjubh)}(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.chMUhjubh mutex.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMUhjubeh}(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.chMbhj"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.chMhhj"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.chMohj^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.chMphjvubah}(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.chMthjubah}(h]h ]h"]h$]h&]uh1hhj[ubeh}(h]h ]h"]h$]h&]j>j?uh1hhjohMohjWubah}(h]h ]h"]h$]h&]uh1hhjohMohjSubh)}(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.chMvhjSubeh}(h]h ]h"]h$]h&]uh1hhjohMohj"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.chM}hjubh)}(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.chMhjubh)}(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.chMhjubj)}(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.chMhjubh)}(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.chMhjubh0 will equally achieve that for a dma-buf object.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j?uh1hhjhMDhjhhubeh}(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.chMhjvubh) 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_bufuh1hhjhMhjvubhA. 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_resvuh1hhjhMhjvubh structure.}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjehhubh)}(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.chMhjehhubh)}(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.chMhjubah}(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.chM"hjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j?uh1hhjhMhjehhubh)}(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.chM%hjehhubh)}(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.chM)hjGubh 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_exportuh1hhjnhM)hjGubh.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjnhM)hjehhubeh}(h]jah ]h"]implicit fence poll supportah$]h&]uh1hhjmhhhhhK{jdKubh)}(hhh](h)}(hDMA Buffer ioctlsh]hDMA Buffer ioctls}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singledma_buf_sync (C struct)c.dma_buf_synchNtauh1jhjhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./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}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhKubh desc_name)}(h dma_buf_synch]h desc_sig_name)}(hjh]h dma_buf_sync}(hj hhhNhNubah}(h]h ]nah"]h$]h&]uh1j hjubah}(h]h ](sig-namedescnameeh"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jj add_permalinkuh1jsphinx_line_type declaratorhjhhhjhKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhKhjhhubh desc_content)}(hhh]h)}(hSynchronize with CPU access.h]hSynchronize with CPU access.}(hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj. hhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]domainjobjtypejI desctypejI noindex noindexentrynocontentsentryuh1jhhhjhjhNubh 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}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjY ubh:}(hjY hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjU ubj)}(h)struct dma_buf_sync { __u64 flags; };h]h)struct dma_buf_sync { __u64 flags; };}hjx sbah}(h]h ]h"]h$]h&]jjuh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK!hjU ubh)}(h **Members**h]j^ )}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK%hjU 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:131: ./include/uapi/linux/dma-buf.hhKJhj 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:131: ./include/uapi/linux/dma-buf.hhK:hj 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:131: ./include/uapi/linux/dma-buf.hhK=hj ubj )}(hhh]h)}(h,Indicates the start of a map access session.h]h,Indicates the start of a map access session.}(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=DMA_BUF_SYNC_END: Indicates the end of a map access session. h](j )}(hDMA_BUF_SYNC_END:h]hDMA_BUF_SYNC_END:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK@hj ubj )}(hhh]h)}(h*Indicates the end of a map access session.h]h*Indicates the end of a map access session.}(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 )}(hdDMA_BUF_SYNC_READ: Indicates that the mapped DMA buffer will be read by the client via the CPU map. h](j )}(hDMA_BUF_SYNC_READ:h]hDMA_BUF_SYNC_READ:}(hj? hhhNhNubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKDhj; ubj )}(hhh]h)}(hPIndicates that the mapped DMA buffer will be read by the client via the CPU map.h]hPIndicates that the mapped DMA buffer will be read by the client via the CPU map.}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKChjN ubah}(h]h ]h"]h$]h&]uh1j hj; ubeh}(h]h ]h"]h$]h&]uh1j hjM hKDhj ubj )}(hhDMA_BUF_SYNC_WRITE: Indicates that the mapped DMA buffer will be written by the client via the CPU map. h](j )}(hDMA_BUF_SYNC_WRITE:h]hDMA_BUF_SYNC_WRITE:}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKHhjl ubj )}(hhh]h)}(hSIndicates that the mapped DMA buffer will be written by the client via the CPU map.h]hSIndicates that the mapped DMA buffer will be written by the client via the CPU map.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKGhj ubah}(h]h ]h"]h$]h&]uh1j hjl ubeh}(h]h ]h"]h$]h&]uh1j hj~ hKHhj ubj )}(hEDMA_BUF_SYNC_RW: An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.h](j )}(hDMA_BUF_SYNC_RW:h]hDMA_BUF_SYNC_RW:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKJhj ubj )}(hhh]h)}(h4An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.h]h4An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKJhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKJhj ubah}(h]h ]h"]h$]h&]uh1j hjU ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhjhNubh)}(h**Description**h]j^ )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKNhjhhubh)}(hX*When a DMA buffer is accessed from the CPU via mmap, it is not always possible to guarantee coherency between the CPU-visible map and underlying memory. To manage coherency, DMA_BUF_IOCTL_SYNC must be used to bracket any CPU access to give the kernel the chance to shuffle memory around if needed.h]hX*When a DMA buffer is accessed from the CPU via mmap, it is not always possible to guarantee coherency between the CPU-visible map and underlying memory. To manage coherency, DMA_BUF_IOCTL_SYNC must be used to bracket any CPU access to give the kernel the chance to shuffle memory around if needed.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjhhubh)}(hPrior to accessing the map, the client must call DMA_BUF_IOCTL_SYNC with DMA_BUF_SYNC_START and the appropriate read/write flags. Once the access is complete, the client should call DMA_BUF_IOCTL_SYNC with DMA_BUF_SYNC_END and the same read/write flags.h]hPrior to accessing the map, the client must call DMA_BUF_IOCTL_SYNC with DMA_BUF_SYNC_START and the appropriate read/write flags. Once the access is complete, the client should call DMA_BUF_IOCTL_SYNC with DMA_BUF_SYNC_END and the same read/write flags.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK"hjhhubh)}(hXThe synchronization provided via DMA_BUF_IOCTL_SYNC only provides cache coherency. It does not prevent other processes or devices from accessing the memory at the same time. If synchronization with a GPU or other device driver is required, it is the client's responsibility to wait for buffer to be ready for reading or writing before calling this ioctl with DMA_BUF_SYNC_START. Likewise, the client must ensure that follow-up work is not submitted to GPU or other device driver until after this ioctl has been called with DMA_BUF_SYNC_END?h]hX!The synchronization provided via DMA_BUF_IOCTL_SYNC only provides cache coherency. It does not prevent other processes or devices from accessing the memory at the same time. If synchronization with a GPU or other device driver is required, it is the client’s responsibility to wait for buffer to be ready for reading or writing before calling this ioctl with DMA_BUF_SYNC_START. Likewise, the client must ensure that follow-up work is not submitted to GPU or other device driver until after this ioctl has been called with DMA_BUF_SYNC_END?}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK'hjhhubh)}(hXeIf the driver or API with which the client is interacting uses implicit synchronization, waiting for prior work to complete can be done via poll() on the DMA buffer file descriptor. If the driver or API requires explicit synchronization, the client may have to wait on a sync_file or other synchronization primitive outside the scope of the DMA buffer API.h]hXeIf the driver or API with which the client is interacting uses implicit synchronization, waiting for prior work to complete can be done via poll() on the DMA buffer file descriptor. If the driver or API requires explicit synchronization, the client may have to wait on a sync_file or other synchronization primitive outside the scope of the DMA buffer API.}(hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK0hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_buf_export_sync_file (C struct)c.dma_buf_export_sync_filehNtauh1jhjhhhjhNubj)}(hhh](j)}(hdma_buf_export_sync_fileh]j)}(hstruct dma_buf_export_sync_fileh](j)}(hjh]hstruct}(hjY hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK9ubj)}(h h]h }(hjg hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU hhhjf hK9ubj)}(hdma_buf_export_sync_fileh]j )}(hjS h]hdma_buf_export_sync_file}(hjy hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hju ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjU hhhjf hK9ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjQ hhhjf hK9ubah}(h]jL ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjf hK9hjN 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:131: ./include/uapi/linux/dma-buf.hhKZhj hhubah}(h]h ]h"]h$]h&]uh1j, hjN hhhjf hK9ubeh}(h]h ](jstructeh"]h$]h&]jM jjN j jO j jP jQ jR uh1jhhhjhjhNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./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:131: ./include/uapi/linux/dma-buf.hhK`hj ubh)}(h **Members**h]j^ )}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKehj 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:131: ./include/uapi/linux/dma-buf.hhKhj ubj )}(hhh](h)}(hRead/write flagsh]hRead/write flags}(hj! hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKzhj 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.}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK|hj 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.}(hj? hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK~hj 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.}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKhj ubj )}(h$``fd`` Returned sync file descriptorh](j )}(h``fd``h]j)}(hjo h]hfd}(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:131: ./include/uapi/linux/dma-buf.hhKhji 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:131: ./include/uapi/linux/dma-buf.hhKhj ubah}(h]h ]h"]h$]h&]uh1j hji ubeh}(h]h ]h"]h$]h&]uh1j hj hKhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhjhNubh)}(h**Description**h]j^ )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjhhubh)}(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:131: ./include/uapi/linux/dma-buf.hhK[hjhhubh)}(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:131: ./include/uapi/linux/dma-buf.hhKdhjhhubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKfhj ubah}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKihj ubah}(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.}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKmhj ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]j?j@jAhjBjCuh1jXhj ubah}(h]h ]h"]h$]h&]uh1hhj hKfhjhhubh)}(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.}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKphjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_buf_import_sync_file (C struct)c.dma_buf_import_sync_filehNtauh1jhjhhhjhNubj)}(hhh](j)}(hdma_buf_import_sync_fileh]j)}(hstruct dma_buf_import_sync_fileh](j)}(hjh]hstruct}(hjl hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjh hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKyubj)}(h h]h }(hjz hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjh hhhjy hKyubj)}(hdma_buf_import_sync_fileh]j )}(hjf h]hdma_buf_import_sync_file}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjh hhhjy hKyubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjd hhhjy hKyubah}(h]j_ ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjy hKyhja hhubj- )}(hhh]h)}(h!Insert a sync_file into a dma-bufh]h!Insert a sync_file into a dma-buf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj hhubah}(h]h ]h"]h$]h&]uh1j, hja hhhjy hKyubeh}(h]h ](jstructeh"]h$]h&]jM jjN j jO j jP jQ jR uh1jhhhjhjhNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj ubj)}(hCstruct dma_buf_import_sync_file { __u32 flags; __s32 fd; };h]hCstruct dma_buf_import_sync_file { __u32 flags; __s32 fd; };}hj sbah}(h]h ]h"]h$]h&]jjuh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj ubh)}(h **Members**h]j^ )}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj ubj )}(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)}(hjh]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjubj )}(hhh](h)}(hRead/write flagsh]hRead/write flags}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj1ubh)}(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.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj1ubh)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj1ubh)}(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.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj1ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj0hKhjubj )}(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:131: ./include/uapi/linux/dma-buf.hhKhj|ubj )}(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:131: ./include/uapi/linux/dma-buf.hhKhjubah}(h]h ]h"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhjhNubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjhhubh)}(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:131: ./include/uapi/linux/dma-buf.hhKhjhhubeh}(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:136: ./drivers/dma-buf/dma-buf.chMhjhhubh)}(hConvention for importersh]hConvention for importers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjhhubjY)}(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:136: ./drivers/dma-buf/dma-buf.chMhj#ubh)}(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)}(hj?h]h dma_buf_pin()}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhj=ubah}(h]h ]h"]h$]h&]uh1hhj:ubh)}(hdma_buf_unpin()h]h)}(hjWh]hdma_buf_unpin()}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjUubah}(h]h ]h"]h$]h&]uh1hhj:ubh)}(hdma_buf_map_attachment()h]h)}(hjoh]hdma_buf_map_attachment()}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjmubah}(h]h ]h"]h$]h&]uh1hhj:ubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhj:ubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhj:ubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhj:ubeh}(h]h ]h"]h$]h&]j>j?uh1hhjNhMhj6ubah}(h]h ]h"]h$]h&]uh1hhjNhMhj#ubeh}(h]h ]h"]h$]h&]uh1hhj ubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hdma_buf_dynamic_attach()h]h)}(hjh]hdma_buf_dynamic_attach()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hdma_buf_detach()h]h)}(hj,h]hdma_buf_detach()}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhj*ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hdma_buf_export()h]h)}(hjDh]hdma_buf_export()}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjBubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h dma_buf_fd()h]h)}(hj\h]h dma_buf_fd()}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjZubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h dma_buf_get()h]h)}(hjth]h dma_buf_get()}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjrubah}(h]h ]h"]h$]h&]uh1hhjubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hdma_buf_vmap_unlocked()h]h)}(hjh]hdma_buf_vmap_unlocked()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hdma_buf_vunmap_unlocked() h]h)}(hdma_buf_vunmap_unlocked()h]hdma_buf_vunmap_unlocked()}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhj2ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j?uh1hhj hMhjubah}(h]h ]h"]h$]h&]uh1hhj hMhjubeh}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]j?j@jAhjBjCuh1jXhjhhhNhNubh)}(hConvention for exportersh]hConvention for exporters}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjhhubjY)}(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 }(hjyhhhNhNubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjyubhX callbacks are invoked with unlocked dma-buf reservation and exporter can take the lock:}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjuubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(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)}(hjh]hdma_buf_ops.detach()}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h/:c:type:`dma_buf_ops.release\(\) `h]h)}(hj"h]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:136: ./drivers/dma-buf/dma-buf.chMhj$ubah}(h]h ]h"]h$]h&]uh1hhjFhMhj ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h8:c:type:`dma_buf_ops.begin_cpu_access\(\) `h]h)}(hjUh]h)}(h8:c:type:`dma_buf_ops.begin_cpu_access\(\) `h]j)}(hj\h]hdma_buf_ops.begin_cpu_access()}(hj^hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjWubah}(h]h ]h"]h$]h&]uh1hhjyhMhjSubah}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j?uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjuubeh}(h]h ]h"]h$]h&]uh1hhjrubh)}(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}(hjhhhNhNubah}(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:136: ./drivers/dma-buf/dma-buf.chMhjubhZ callbacks are invoked with locked dma-buf reservation and exporter can’t take the lock:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj*hMhjubh)}(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)}(hj>h]h)}(h+:c:type:`dma_buf_ops.pin\(\) `h]j)}(hjEh]hdma_buf_ops.pin()}(hjGhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhj@ubah}(h]h ]h"]h$]h&]uh1hhjbhMhj<ubah}(h]h ]h"]h$]h&]uh1hhj9ubh)}(h-:c:type:`dma_buf_ops.unpin\(\) `h]h)}(hjqh]h)}(h-:c:type:`dma_buf_ops.unpin\(\) `h]j)}(hjxh]hdma_buf_ops.unpin()}(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:136: ./drivers/dma-buf/dma-buf.chMhjsubah}(h]h ]h"]h$]h&]uh1hhjhMhjoubah}(h]h ]h"]h$]h&]uh1hhj9ubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhj9ubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhj9ubh)}(h,:c:type:`dma_buf_ops.vmap\(\) `h]h)}(hj h]h)}(h,:c:type:`dma_buf_ops.vmap\(\) `h]j)}(hjh]hdma_buf_ops.vmap()}(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:136: ./drivers/dma-buf/dma-buf.chMhj ubah}(h]h ]h"]h$]h&]uh1hhj.hMhjubah}(h]h ]h"]h$]h&]uh1hhj9ubh)}(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)}(hjEh]hdma_buf_ops.vunmap()}(hjGhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhj?ubah}(h]h ]h"]h$]h&]uh1hhjbhMhj;ubah}(h]h ]h"]h$]h&]uh1hhj9ubeh}(h]h ]h"]h$]h&]j>j?uh1hhjbhMhj5ubah}(h]h ]h"]h$]h&]uh1hhjbhMhjubeh}(h]h ]h"]h$]h&]uh1hhjrubh)}(hjExporters 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:136: ./drivers/dma-buf/dma-buf.chMhjubh)}(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:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]j>j?uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ]h"]h$]h&]uh1hhjrubeh}(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](jdma_buf_export (C function)c.dma_buf_exporthNtauh1jhjhhhNhNubj)}(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)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj hMubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetjmodnameN classnameNjj)}j]j ASTIdentifier)}j3dma_buf_exportsbc.dma_buf_exportasbuh1hhjhhhj hMubj)}(h h]h }(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj hMubhdesc_sig_punctuation)}(h*h]h*}(hjQhhhNhNubah}(h]h ]pah"]h$]h&]uh1jOhjhhhj hMubj)}(hdma_buf_exporth]j )}(hj>h]hdma_buf_export}(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhj hMubhdesc_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 ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_buf_export_infoh]hdma_buf_export_info}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j<c.dma_buf_exportasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hexp_infoh]hexp_info}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjyubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhj hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhj hMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj hMhjhhubj- )}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j8jO j8jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hjBh]h Parameters}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj@ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj<ubj )}(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)}(hjah]h*const struct dma_buf_export_info *exp_info}(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:142: ./drivers/dma-buf/dma-buf.chMhj[ubj )}(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 }(hjzhhhNhNubh)}(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:142: ./drivers/dma-buf/dma-buf.chMhjzubh for further details.}(hjzhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjwubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hjvhMhjXubah}(h]h ]h"]h$]h&]uh1j hj<ubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj<ubh)}(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:142: ./drivers/dma-buf/dma-buf.chMhj<ubh)}(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 }(hjhhhNhNubj^ )}(h **exp_info**h]hexp_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] 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:142: ./drivers/dma-buf/dma-buf.chMhj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_fd (C function) c.dma_buf_fdhNtauh1jhjhhhNhNubj)}(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}(hj:hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j8hj4hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4hhhjIhMubj)}(h dma_buf_fdh]j )}(h dma_buf_fdh]h dma_buf_fd}(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjXubah}(h]h ](j j eh"]h$]h&]jjuh1jhj4hhhjIhMubjx)}(h#(struct dma_buf *dmabuf, int flags)h](j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3j^sb c.dma_buf_fdasbuh1hhjtubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjtubj )}(hdmabufh]hdmabuf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjpubj~)}(h int flagsh](j9)}(hinth]hint}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hflagsh]hflags}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjpubeh}(h]h ]h"]h$]h&]jjuh1jwhj4hhhjIhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj0hhhjIhMubah}(h]j+ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjIhMhj-hhubj- )}(hhh]h)}(h6returns a file descriptor for the given struct dma_bufh]h6returns a file descriptor for the given struct dma_buf}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj-hhubah}(h]h ]h"]h$]h&]uh1j, hj-hhhjIhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jHjO jHjP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hjRh]h Parameters}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjPubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjLubj )}(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)}(hjqh]hstruct dma_buf *dmabuf}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjkubj )}(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 hjkubeh}(h]h ]h"]h$]h&]uh1j hjhMhjhubj )}(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:142: ./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 hjhMhjhubeh}(h]h ]h"]h$]h&]uh1j hjLubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjLubh)}(h` vfunc in turn, and frees the memory allocated for dmabuf when exported.h](h)}(h**Parameters**h]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMFhjubj )}(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:142: ./drivers/dma-buf/dma-buf.chMChjubj )}(hhh]h)}(h$[in] buffer to reduce refcount ofh]h$[in] buffer to reduce refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMChjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMChjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMEhjubh)}(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:142: ./drivers/dma-buf/dma-buf.chMDhjubh)}(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 }(hj hhhNhNubh)}(h+:c:type:`dma_buf_ops.release `h]j)}(hjh]hdma_buf_ops.release}(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:142: ./drivers/dma-buf/dma-buf.chMFhj ubhH vfunc in turn, and frees the memory allocated for dmabuf when exported.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj3hMFhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_buf_dynamic_attach (C function)c.dma_buf_dynamic_attachhNtauh1jhjhhhNhNubj)}(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)}(hjh]hstruct}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZhhhjkhMubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3dma_buf_dynamic_attachsbc.dma_buf_dynamic_attachasbuh1hhjZhhhjkhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZhhhjkhMubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjZhhhjkhMubj)}(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&]jjuh1jhjZhhhjkhMubjx)}(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)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_buf_dynamic_attachasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hj"hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hdmabufh]hdmabuf}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hstruct device *devh](j)}(hjh]hstruct}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubj)}(h h]h }(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubh)}(hhh]j )}(hdeviceh]hdevice}(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjhmodnameN classnameNjj)}j]jc.dma_buf_dynamic_attachasbuh1hhjDubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjDubj )}(hdevh]hdev}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(h-const struct dma_buf_attach_ops *importer_opsh](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_buf_attach_opsh]hdma_buf_attach_ops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_buf_dynamic_attachasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(h importer_opsh]h importer_ops}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hvoid *importer_privh](j9)}(hvoidh]hvoid}(hjChhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj?ubj)}(h h]h }(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubjP)}(hjSh]h*}(hj_hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj?ubj )}(h importer_privh]h importer_priv}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubeh}(h]h ]h"]h$]h&]jjuh1jwhjZhhhjkhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjVhhhjkhMubah}(h]jQah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjkhMhjShhubj- )}(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:142: ./drivers/dma-buf/dma-buf.chMhjhhubah}(h]h ]h"]h$]h&]uh1j, hjShhhjkhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjhNhNubjT )}(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.h](h)}(h**Parameters**h]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubj )}(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:142: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]h)}(h#[in] buffer to attach device to.h]h#[in] buffer to attach device to.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h6``struct device *dev`` [in] device to be attached. h](j )}(h``struct device *dev``h]j)}(hjh]hstruct device *dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./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%hMhjubj )}(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)}(hjIh]h-const struct dma_buf_attach_ops *importer_ops}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjCubj )}(hhh]h)}(h.[in] importer operations for the attachmenth]h.[in] importer operations for the attachment}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hMhj_ubah}(h]h ]h"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]uh1j hj^hMhjubj )}(hL``void *importer_priv`` [in] importer private pointer for the attachment h](j )}(h``void *importer_priv``h]j)}(hjh]hvoid *importer_priv}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj|ubj )}(hhh]h)}(h3[in] importer private pointer for the attachmenth]h3[in] importer private pointer for the attachment}(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]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubh)}(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().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubh)}(hoOptionally this calls :c:type:`dma_buf_ops.attach ` to allow device-specific attach functionality.h](hOptionally this calls }(hjhhhNhNubh)}(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:142: ./drivers/dma-buf/dma-buf.chMhjubh/ to allow device-specific attach functionality.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hMhjubh)}(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)}(hj h]hdma_buf_attachment}(hj 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:142: ./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&]uh1hhj; 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 }(hjF hhhNhNubj^ )}(h **dmabuf**h]hdmabuf}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjF ubh! is in a place not accessible to }(hjF hhhNhNubj^ )}(h**dev**h]hdev}(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjF ubh], and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY.}(hjF hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_attach (C function)c.dma_buf_attachhNtauh1jhjhhhNhNubj)}(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)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 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&] refdomainjreftypej3 reftargetj modnameN classnameNjj)}j]j;)}j3dma_buf_attachsbc.dma_buf_attachasbuh1hhj hhhj hMubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hMubjP)}(hjSh]h*}(hj hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj 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&]jjuh1jhj hhhj hMubjx)}(h,(struct dma_buf *dmabuf, struct device *dev)h](j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(h h]h }(hj !hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj1!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.!ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj3!modnameN classnameNjj)}j]j c.dma_buf_attachasbuh1hhj!ubj)}(h h]h }(hjO!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubjP)}(hjSh]h*}(hj]!hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj!ubj )}(hdmabufh]hdmabuf}(hjj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj !ubj~)}(hstruct device *devh](j)}(hjh]hstruct}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubh)}(hhh]j )}(hdeviceh]hdevice}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj!modnameN classnameNjj)}j]j c.dma_buf_attachasbuh1hhj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubjP)}(hjSh]h*}(hj!hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj!ubj )}(hdevh]hdev}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj !ubeh}(h]h ]h"]h$]h&]jjuh1jwhj hhhj hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj hhhj hMubah}(h]j ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj 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:142: ./drivers/dma-buf/dma-buf.chMhj"hhubah}(h]h ]h"]h$]h&]uh1j, hj hhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j"jO j"jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hj&"h]h Parameters}(hj("hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj$"ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM#hj "ubj )}(hhh](j )}(h?``struct dma_buf *dmabuf`` [in] buffer to attach device to. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjE"h]hstruct dma_buf *dmabuf}(hjG"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC"ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM hj?"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&]uh1hhjZ"hM hj["ubah}(h]h ]h"]h$]h&]uh1j hj?"ubeh}(h]h ]h"]h$]h&]uh1j hjZ"hM hj<"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:142: ./drivers/dma-buf/dma-buf.chM!hjx"ubj )}(hhh]h)}(h[in] device to be attached.h]h[in] device to be attached.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hM!hj"ubah}(h]h ]h"]h$]h&]uh1j hjx"ubeh}(h]h ]h"]h$]h&]uh1j hj"hM!hj<"ubeh}(h]h ]h"]h$]h&]uh1j hj "ubh)}(h**Description**h]j^ )}(hj"h]h Description}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj"ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM#hj "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:142: ./drivers/dma-buf/dma-buf.chM"hj "ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_detach (C function)c.dma_buf_detachhNtauh1jhjhhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hj"hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj"hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM.ubj)}(h h]h }(hj #hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"hhhj #hM.ubj)}(hdma_buf_detachh]j )}(hdma_buf_detachh]hdma_buf_detach}(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj"hhhj #hM.ubjx)}(h;(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)h](j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj;#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7#ubj)}(h h]h }(hjH#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7#ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjY#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjV#ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj[#modnameN classnameNjj)}j]j;)}j3j!#sbc.dma_buf_detachasbuh1hhj7#ubj)}(h h]h }(hjy#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7#ubjP)}(hjSh]h*}(hj#hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj7#ubj )}(hdmabufh]hdmabuf}(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7#ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj3#ubj~)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#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&] refdomainjreftypej3 reftargetj#modnameN classnameNjj)}j]ju#c.dma_buf_detachasbuh1hhj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubjP)}(hjSh]h*}(hj#hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj#ubj )}(hattachh]hattach}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj3#ubeh}(h]h ]h"]h$]h&]jjuh1jwhj"hhhj #hM.ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj"hhhj #hM.ubah}(h]j"ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj #hM.hj"hhubj- )}(hhh]h)}(h:Remove the given attachment from dmabuf's attachments listh]h` for device-specific detach.h](h)}(h**Parameters**h]j^ )}(hjP$h]h Parameters}(hjR$hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjN$ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM2hjJ$ubj )}(hhh](j )}(h:``struct dma_buf *dmabuf`` [in] buffer to detach from. 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:142: ./drivers/dma-buf/dma-buf.chM/hji$ubj )}(hhh]h)}(h[in] buffer to detach from.h]h[in] buffer to detach from.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hM/hj$ubah}(h]h ]h"]h$]h&]uh1j hji$ubeh}(h]h ]h"]h$]h&]uh1j hj$hM/hjf$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:142: ./drivers/dma-buf/dma-buf.chM0hj$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$hM0hj$ubah}(h]h ]h"]h$]h&]uh1j hj$ubeh}(h]h ]h"]h$]h&]uh1j hj$hM0hjf$ubeh}(h]h ]h"]h$]h&]uh1j hjJ$ubh)}(h**Description**h]j^ )}(hj$h]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj$ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM2hjJ$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:142: ./drivers/dma-buf/dma-buf.chM1hjJ$ubh)}(h\Optionally this calls :c:type:`dma_buf_ops.detach ` for device-specific detach.h](hOptionally this calls }(hj%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:142: ./drivers/dma-buf/dma-buf.chM3hj%ubh for device-specific detach.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj/%hM3hjJ$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_pin (C function) c.dma_buf_pinhNtauh1jhjhhhNhNubj)}(hhh](j)}(h3int dma_buf_pin (struct dma_buf_attachment *attach)h]j)}(h2int dma_buf_pin(struct dma_buf_attachment *attach)h](j9)}(hinth]hint}(hjZ%hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjV%hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMJubj)}(h h]h }(hji%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV%hhhjh%hMJubj)}(h dma_buf_pinh]j )}(h dma_buf_pinh]h dma_buf_pin}(hj{%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjw%ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjV%hhhjh%hMJubjx)}(h#(struct dma_buf_attachment *attach)h]j~)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%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&] refdomainjreftypej3 reftargetj%modnameN classnameNjj)}j]j;)}j3j}%sb c.dma_buf_pinasbuh1hhj%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubjP)}(hjSh]h*}(hj%hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj%ubj )}(hattachh]hattach}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj%ubah}(h]h ]h"]h$]h&]jjuh1jwhjV%hhhjh%hMJubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjR%hhhjh%hMJubah}(h]jM%ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjh%hMJhjO%hhubj- )}(hhh]h)}(hLock down the DMA-bufh]hLock down the DMA-buf}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMJhj&hhubah}(h]h ]h"]h$]h&]uh1j, hjO%hhhjh%hMJubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j2&jO j2&jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hj<&h]h Parameters}(hj>&hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj:&ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMNhj6&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&]uh1jhjY&ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMKhjU&ubj )}(hhh]h)}(h)[in] attachment which should be pinnedh]h)[in] attachment which should be pinned}(hjt&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjp&hMKhjq&ubah}(h]h ]h"]h$]h&]uh1j hjU&ubeh}(h]h ]h"]h$]h&]uh1j hjp&hMKhjR&ubah}(h]h ]h"]h$]h&]uh1j hj6&ubh)}(h**Description**h]j^ )}(hj&h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj&ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMMhj6&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&hhhNhNubj^ )}(h **attach**h]hattach}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j] 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:142: ./drivers/dma-buf/dma-buf.chMLhj6&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:142: ./drivers/dma-buf/dma-buf.chMQhj6&ubh)}(h **Return**h]j^ )}(hj&h]hReturn}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj&ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMShj6&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:142: ./drivers/dma-buf/dma-buf.chMThj6&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_unpin (C function)c.dma_buf_unpinhNtauh1jhjhhhNhNubj)}(hhh](j)}(h6void dma_buf_unpin (struct dma_buf_attachment *attach)h]j)}(h5void dma_buf_unpin(struct dma_buf_attachment *attach)h](j9)}(hvoidh]hvoid}(hj#'hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj'hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhubj)}(h h]h }(hj2'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'hhhj1'hMhubj)}(h dma_buf_unpinh]j )}(h dma_buf_unpinh]h dma_buf_unpin}(hjD'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@'ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj'hhhj1'hMhubjx)}(h#(struct dma_buf_attachment *attach)h]j~)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hj`'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\'ubj)}(h h]h }(hjm'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\'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&] refdomainjreftypej3 reftargetj'modnameN classnameNjj)}j]j;)}j3jF'sbc.dma_buf_unpinasbuh1hhj\'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\'ubjP)}(hjSh]h*}(hj'hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj\'ubj )}(hattachh]hattach}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj\'ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjX'ubah}(h]h ]h"]h$]h&]jjuh1jwhj'hhhj1'hMhubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj'hhhj1'hMhubah}(h]j'ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj1'hMhhj'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:142: ./drivers/dma-buf/dma-buf.chMhhj'hhubah}(h]h ]h"]h$]h&]uh1j, hj'hhhj1'hMhubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j'jO j'jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hj(h]h Parameters}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj(ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMlhj'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)}(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:142: ./drivers/dma-buf/dma-buf.chMihj(ubj )}(hhh]h)}(h+[in] attachment which should be unpinnedh]h+[in] attachment which should be unpinned}(hj=(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9(hMihj:(ubah}(h]h ]h"]h$]h&]uh1j hj(ubeh}(h]h ]h"]h$]h&]uh1j hj9(hMihj(ubah}(h]h ]h"]h$]h&]uh1j hj'ubh)}(h**Description**h]j^ )}(hj_(h]h Description}(hja(hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj](ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMkhj'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 }(hju(hhhNhNubj^ )}(h **attach**h]hattach}(hj}(hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hju(ubh' again and inform the importer through }(hju(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:142: ./drivers/dma-buf/dma-buf.chMjhju(ubh.}(hju(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj(hMjhj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_buf_map_attachment (C function)c.dma_buf_map_attachmenthNtauh1jhjhhhNhNubj)}(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)}(hjh]hstruct}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM}ubj)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(hhhj(hM}ubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj(modnameN classnameNjj)}j]j;)}j3dma_buf_map_attachmentsbc.dma_buf_map_attachmentasbuh1hhj(hhhj(hM}ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(hhhj(hM}ubjP)}(hjSh]h*}(hj')hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj(hhhj(hM}ubj)}(hdma_buf_map_attachmenth]j )}(hj)h]hdma_buf_map_attachment}(hj8)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4)ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj(hhhj(hM}ubjx)}(hF(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j~)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hjS)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjO)ubj)}(h h]h }(hj`)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjO)ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hjq)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjn)ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjs)modnameN classnameNjj)}j]j)c.dma_buf_map_attachmentasbuh1hhjO)ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjO)ubjP)}(hjSh]h*}(hj)hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjO)ubj )}(hattachh]hattach}(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjO)ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjK)ubj~)}(h!enum dma_data_direction directionh](j)}(henumh]henum}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)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&] refdomainjreftypej3 reftargetj)modnameN classnameNjj)}j]j)c.dma_buf_map_attachmentasbuh1hhj)ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj )}(h directionh]h direction}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjK)ubeh}(h]h ]h"]h$]h&]jjuh1jwhj(hhhj(hM}ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj(hhhj(hM}ubah}(h]j(ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj(hM}hj(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.}(hj8*hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM}hj5*hhubah}(h]h ]h"]h$]h&]uh1j, hj(hhhj(hM}ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jP*jO jP*jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hjZ*h]h Parameters}(hj\*hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjX*ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjT*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)}(hjy*h]h!struct dma_buf_attachment *attach}(hj{*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw*ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjs*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*hMhj*ubah}(h]h ]h"]h$]h&]uh1j hjs*ubeh}(h]h ]h"]h$]h&]uh1j hj*hMhjp*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:142: ./drivers/dma-buf/dma-buf.chMhj*ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(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*hMhjp*ubeh}(h]h ]h"]h$]h&]uh1j hjT*ubh)}(h**Description**h]j^ )}(hj*h]h Description}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj*ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjT*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:142: ./drivers/dma-buf/dma-buf.chMhjT*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:142: ./drivers/dma-buf/dma-buf.chMhjT*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.}(hj!+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjT*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.}(hj0+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjT*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j,dma_buf_map_attachment_unlocked (C function)!c.dma_buf_map_attachment_unlockedhNtauh1jhjhhhNhNubj)}(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)}(hjh]hstruct}(hj_+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[+hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hjm+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[+hhhjl+hMubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj~+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{+ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj+modnameN classnameNjj)}j]j;)}j3dma_buf_map_attachment_unlockedsb!c.dma_buf_map_attachment_unlockedasbuh1hhj[+hhhjl+hMubj)}(h h]h }(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[+hhhjl+hMubjP)}(hjSh]h*}(hj+hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj[+hhhjl+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&]jjuh1jhj[+hhhjl+hMubjx)}(hF(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j~)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubj)}(h h]h }(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+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&] refdomainjreftypej3 reftargetj+modnameN classnameNjj)}j]j+!c.dma_buf_map_attachment_unlockedasbuh1hhj+ubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubjP)}(hjSh]h*}(hj#,hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj+ubj )}(hattachh]hattach}(hj0,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj+ubj~)}(h!enum dma_data_direction directionh](j)}(hj)h]henum}(hjI,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjE,ubj)}(h h]h }(hjV,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjE,ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hjg,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjd,ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetji,modnameN classnameNjj)}j]j+!c.dma_buf_map_attachment_unlockedasbuh1hhjE,ubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjE,ubj )}(h directionh]h direction}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjE,ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj+ubeh}(h]h ]h"]h$]h&]jjuh1jwhj[+hhhjl+hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjW+hhhjl+hMubah}(h]jR+ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjl+hMhjT+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:142: ./drivers/dma-buf/dma-buf.chMhj,hhubah}(h]h ]h"]h$]h&]uh1j, hjT+hhhjl+hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j,jO j,jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hj,h]h Parameters}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj,ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./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:142: ./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}(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 )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hj7-h]h!enum dma_data_direction direction}(hj9-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5-ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj1-ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hjP-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjL-hMhjM-ubah}(h]h ]h"]h$]h&]uh1j hj1-ubeh}(h]h ]h"]h$]h&]uh1j hjL-hMhj,ubeh}(h]h ]h"]h$]h&]uh1j hj,ubh)}(h**Description**h]j^ )}(hjr-h]h Description}(hjt-hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjp-ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./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:142: ./drivers/dma-buf/dma-buf.chMhj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%dma_buf_unmap_attachment (C function)c.dma_buf_unmap_attachmenthNtauh1jhjhhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hj-hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj-hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-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&]jjuh1jhj-hhhj-hMubjx)}(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)}(hjh]hstruct}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-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&] refdomainjreftypej3 reftargetj.modnameN classnameNjj)}j]j;)}j3j-sbc.dma_buf_unmap_attachmentasbuh1hhj-ubj)}(h h]h }(hj2.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubjP)}(hjSh]h*}(hj@.hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj-ubj )}(hattachh]hattach}(hjM.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj-ubj~)}(hstruct sg_table *sg_tableh](j)}(hjh]hstruct}(hjf.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjb.ubj)}(h h]h }(hjs.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjb.ubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj.modnameN classnameNjj)}j]j..c.dma_buf_unmap_attachmentasbuh1hhjb.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjb.ubjP)}(hjSh]h*}(hj.hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjb.ubj )}(hsg_tableh]hsg_table}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjb.ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj-ubj~)}(h!enum dma_data_direction directionh](j)}(hj)h]henum}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.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&] refdomainjreftypej3 reftargetj.modnameN classnameNjj)}j]j..c.dma_buf_unmap_attachmentasbuh1hhj.ubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj )}(h directionh]h direction}(hj /hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj-ubeh}(h]h ]h"]h$]h&]jjuh1jwhj-hhhj-hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj-hhhj-hMubah}(h]j-ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj-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.}(hjJ/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjG/hhubah}(h]h ]h"]h$]h&]uh1j, hj-hhhj-hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jb/jO jb/jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hjl/h]h Parameters}(hjn/hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjj/ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjf/ubj )}(hhh](j )}(hN``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from 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:142: ./drivers/dma-buf/dma-buf.chMhj/ubj )}(hhh]h)}(h'[in] attachment to unmap buffer fromh]h'[in] attachment to unmap buffer 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 )}(hN``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap h](j )}(h``struct sg_table *sg_table``h]j)}(hj/h]hstruct sg_table *sg_table}(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:142: ./drivers/dma-buf/dma-buf.chMhj/ubj )}(hhh]h)}(h/[in] scatterlist info of the buffer to unmaph]h/[in] scatterlist info of the buffer to unmap}(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 )}(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:142: ./drivers/dma-buf/dma-buf.chMhj/ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMhj0ubah}(h]h ]h"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]uh1j hj0hMhj/ubeh}(h]h ]h"]h$]h&]uh1j hjf/ubh)}(h**Description**h]j^ )}(hj80h]h Description}(hj:0hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj60ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjf/ubh)}(hPThis unmaps a DMA mapping for **attached** obtained by dma_buf_map_attachment().h](hThis unmaps a DMA mapping for }(hjN0hhhNhNubj^ )}(h **attached**h]hattached}(hjV0hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjN0ubh& obtained by dma_buf_map_attachment().}(hjN0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjf/ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j.dma_buf_unmap_attachment_unlocked (C function)#c.dma_buf_unmap_attachment_unlockedhNtauh1jhjhhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hj0hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj0hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0hhhj0hMubj)}(h!dma_buf_unmap_attachment_unlockedh]j )}(h!dma_buf_unmap_attachment_unlockedh]h!dma_buf_unmap_attachment_unlocked}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj0hhhj0hMubjx)}(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)}(hjh]hstruct}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj0modnameN classnameNjj)}j]j;)}j3j0sb#c.dma_buf_unmap_attachment_unlockedasbuh1hhj0ubj)}(h h]h }(hj 1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubjP)}(hjSh]h*}(hj1hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj0ubj )}(hattachh]hattach}(hj%1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj0ubj~)}(hstruct sg_table *sg_tableh](j)}(hjh]hstruct}(hj>1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:1ubj)}(h h]h }(hjK1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:1ubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj\1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjY1ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj^1modnameN classnameNjj)}j]j1#c.dma_buf_unmap_attachment_unlockedasbuh1hhj:1ubj)}(h h]h }(hjz1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:1ubjP)}(hjSh]h*}(hj1hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj:1ubj )}(hsg_tableh]hsg_table}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:1ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj0ubj~)}(h!enum dma_data_direction directionh](j)}(hj)h]henum}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj1modnameN classnameNjj)}j]j1#c.dma_buf_unmap_attachment_unlockedasbuh1hhj1ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubj )}(h directionh]h direction}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj0ubeh}(h]h ]h"]h$]h&]jjuh1jwhj0hhhj0hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj0hhhj0hMubah}(h]j0ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj0hMhj0hhubj- )}(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.}(hj"2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj2hhubah}(h]h ]h"]h$]h&]uh1j, hj0hhhj0hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j:2jO j:2jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hjD2h]h Parameters}(hjF2hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjB2ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj>2ubj )}(hhh](j )}(hN``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hjc2h]h!struct dma_buf_attachment *attach}(hje2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja2ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj]2ubj )}(hhh]h)}(h'[in] attachment to unmap buffer fromh]h'[in] attachment to unmap buffer from}(hj|2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjx2hMhjy2ubah}(h]h ]h"]h$]h&]uh1j hj]2ubeh}(h]h ]h"]h$]h&]uh1j hjx2hMhjZ2ubj )}(hN``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap h](j )}(h``struct sg_table *sg_table``h]j)}(hj2h]hstruct sg_table *sg_table}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj2ubj )}(hhh]h)}(h/[in] scatterlist info of the buffer to unmaph]h/[in] scatterlist info of the buffer to unmap}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1j hj2ubeh}(h]h ]h"]h$]h&]uh1j hj2hMhjZ2ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hj2h]h!enum dma_data_direction direction}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj2ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1j hj2ubeh}(h]h ]h"]h$]h&]uh1j hj2hMhjZ2ubeh}(h]h ]h"]h$]h&]uh1j hj>2ubh)}(h**Description**h]j^ )}(hj3h]h Description}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj3ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj>2ubh)}(h/Unlocked variant of dma_buf_unmap_attachment().h]h/Unlocked variant of dma_buf_unmap_attachment().}(hj&3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj>2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_move_notify (C function)c.dma_buf_move_notifyhNtauh1jhjhhhNhNubj)}(hhh](j)}(h1void dma_buf_move_notify (struct dma_buf *dmabuf)h]j)}(h0void dma_buf_move_notify(struct dma_buf *dmabuf)h](j9)}(hvoidh]hvoid}(hjU3hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjQ3hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM.ubj)}(h h]h }(hjd3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQ3hhhjc3hM.ubj)}(hdma_buf_move_notifyh]j )}(hdma_buf_move_notifyh]hdma_buf_move_notify}(hjv3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjr3ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjQ3hhhjc3hM.ubjx)}(h(struct dma_buf *dmabuf)h]j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj3modnameN classnameNjj)}j]j;)}j3jx3sbc.dma_buf_move_notifyasbuh1hhj3ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubjP)}(hjSh]h*}(hj3hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj3ubj )}(hdmabufh]hdmabuf}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj3ubah}(h]h ]h"]h$]h&]jjuh1jwhjQ3hhhjc3hM.ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjM3hhhjc3hM.ubah}(h]jH3ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjc3hM.hjJ3hhubj- )}(hhh]h)}(h)notify attachments that DMA-buf is movingh]h)notify attachments that DMA-buf is moving}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM.hj4hhubah}(h]h ]h"]h$]h&]uh1j, hjJ3hhhjc3hM.ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j-4jO j-4jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hj74h]h Parameters}(hj94hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj54ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM2hj14ubj )}(hhh]j )}(h:``struct dma_buf *dmabuf`` [in] buffer which is moving h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjV4h]hstruct dma_buf *dmabuf}(hjX4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT4ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM0hjP4ubj )}(hhh]h)}(h[in] buffer which is movingh]h[in] buffer which is moving}(hjo4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjk4hM0hjl4ubah}(h]h ]h"]h$]h&]uh1j hjP4ubeh}(h]h ]h"]h$]h&]uh1j hjk4hM0hjM4ubah}(h]h ]h"]h$]h&]uh1j hj14ubh)}(h**Description**h]j^ )}(hj4h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj4ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM2hj14ubh)}(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.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM1hj14ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%dma_buf_begin_cpu_access (C function)c.dma_buf_begin_cpu_accesshNtauh1jhjhhhNhNubj)}(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](j9)}(hinth]hint}(hj4hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj4hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4hhhj4hMubj)}(hdma_buf_begin_cpu_accessh]j )}(hdma_buf_begin_cpu_accessh]hdma_buf_begin_cpu_access}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj4hhhj4hMubjx)}(h;(struct dma_buf *dmabuf, enum dma_data_direction direction)h](j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj)}(h h]h }(hj 5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj15hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.5ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj35modnameN classnameNjj)}j]j;)}j3j4sbc.dma_buf_begin_cpu_accessasbuh1hhj5ubj)}(h h]h }(hjQ5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubjP)}(hjSh]h*}(hj_5hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj5ubj )}(hdmabufh]hdmabuf}(hjl5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj 5ubj~)}(h!enum dma_data_direction directionh](j)}(hj)h]henum}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj)}(h h]h }(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj5modnameN classnameNjj)}j]jM5c.dma_buf_begin_cpu_accessasbuh1hhj5ubj)}(h h]h }(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj )}(h directionh]h direction}(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj 5ubeh}(h]h ]h"]h$]h&]jjuh1jwhj4hhhj4hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj4hhhj4hMubah}(h]j4ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj4hMhj4hhubj- )}(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.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj5hhubah}(h]h ]h"]h$]h&]uh1j, hj4hhhj4hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j6jO j6jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hj6h]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj6ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj6ubj )}(hhh](j )}(hE``struct dma_buf *dmabuf`` [in] buffer to prepare cpu access for. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj:6h]hstruct dma_buf *dmabuf}(hj<6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj86ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj46ubj )}(hhh]h)}(h)[in] buffer to prepare cpu access for.h]h)[in] buffer to prepare cpu access for.}(hjS6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjO6hMhjP6ubah}(h]h ]h"]h$]h&]uh1j hj46ubeh}(h]h ]h"]h$]h&]uh1j hjO6hMhj16ubj )}(hC``enum dma_data_direction direction`` [in] direction of access. h](j )}(h%``enum dma_data_direction direction``h]j)}(hjs6h]h!enum dma_data_direction direction}(hju6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjq6ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjm6ubj )}(hhh]h)}(h[in] direction of access.h]h[in] direction of access.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hMhj6ubah}(h]h ]h"]h$]h&]uh1j hjm6ubeh}(h]h ]h"]h$]h&]uh1j hj6hMhj16ubeh}(h]h ]h"]h$]h&]uh1j hj6ubh)}(h**Description**h]j^ )}(hj6h]h Description}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj6ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj6ubh)}(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.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj6ubh)}(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 }(hj6hhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hj6h]h dma_buf.resv}(hj6hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj6ubh. For DMA transactions with explicit synchronization this function will only ensure cache coherency, callers must ensure synchronization with such DMA transactions on their own.}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj6hMhj6ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_buf_end_cpu_access (C function)c.dma_buf_end_cpu_accesshNtauh1jhjhhhNhNubj)}(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](j9)}(hinth]hint}(hj47hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj07hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hjC7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj07hhhjB7hMubj)}(hdma_buf_end_cpu_accessh]j )}(hdma_buf_end_cpu_accessh]hdma_buf_end_cpu_access}(hjU7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQ7ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj07hhhjB7hMubjx)}(h;(struct dma_buf *dmabuf, enum dma_data_direction direction)h](j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hjq7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjm7ubj)}(h h]h }(hj~7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjm7ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj7modnameN classnameNjj)}j]j;)}j3jW7sbc.dma_buf_end_cpu_accessasbuh1hhjm7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjm7ubjP)}(hjSh]h*}(hj7hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjm7ubj )}(hdmabufh]hdmabuf}(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjm7ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hji7ubj~)}(h!enum dma_data_direction directionh](j)}(hj)h]henum}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj8modnameN classnameNjj)}j]j7c.dma_buf_end_cpu_accessasbuh1hhj7ubj)}(h h]h }(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj )}(h directionh]h direction}(hj-8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hji7ubeh}(h]h ]h"]h$]h&]jjuh1jwhj07hhhjB7hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj,7hhhjB7hMubah}(h]j'7ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjB7hMhj)7hhubj- )}(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.}(hjW8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjT8hhubah}(h]h ]h"]h$]h&]uh1j, hj)7hhhjB7hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jo8jO jo8jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hjy8h]h Parameters}(hj{8hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjw8ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjs8ubj )}(hhh](j )}(hF``struct dma_buf *dmabuf`` [in] buffer to complete cpu access for. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj8h]hstruct dma_buf *dmabuf}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj8ubj )}(hhh]h)}(h*[in] buffer to complete cpu access for.h]h*[in] buffer to complete cpu access for.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMhj8ubah}(h]h ]h"]h$]h&]uh1j hj8ubeh}(h]h ]h"]h$]h&]uh1j hj8hMhj8ubj )}(hC``enum dma_data_direction direction`` [in] direction of access. h](j )}(h%``enum dma_data_direction direction``h]j)}(hj8h]h!enum dma_data_direction direction}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj8ubj )}(hhh]h)}(h[in] direction of access.h]h[in] direction of access.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMhj8ubah}(h]h ]h"]h$]h&]uh1j hj8ubeh}(h]h ]h"]h$]h&]uh1j hj8hMhj8ubeh}(h]h ]h"]h$]h&]uh1j hjs8ubh)}(h**Description**h]j^ )}(hj 9h]h Description}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj 9ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjs8ubh)}(hCThis terminates CPU access started with dma_buf_begin_cpu_access().h]hCThis terminates CPU access started with dma_buf_begin_cpu_access().}(hj"9hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjs8ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hj19hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjs8ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_mmap (C function)c.dma_buf_mmaphNtauh1jhjhhhNhNubj)}(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](j9)}(hinth]hint}(hj`9hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj\9hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hjo9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\9hhhjn9hMubj)}(h dma_buf_mmaph]j )}(h dma_buf_mmaph]h dma_buf_mmap}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}9ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj\9hhhjn9hMubjx)}(hI(struct dma_buf *dmabuf, struct vm_area_struct *vma, unsigned long pgoff)h](j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubj)}(h h]h }(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj9modnameN classnameNjj)}j]j;)}j3j9sbc.dma_buf_mmapasbuh1hhj9ubj)}(h h]h }(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubjP)}(hjSh]h*}(hj9hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj9ubj )}(hdmabufh]hdmabuf}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj9ubj~)}(hstruct vm_area_struct *vmah](j)}(hjh]hstruct}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj :ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj :ubh)}(hhh]j )}(hvm_area_structh]hvm_area_struct}(hj-:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*:ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj/:modnameN classnameNjj)}j]j9c.dma_buf_mmapasbuh1hhj :ubj)}(h h]h }(hjK:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj :ubjP)}(hjSh]h*}(hjY:hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj :ubj )}(hvmah]hvma}(hjf:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj :ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj9ubj~)}(hunsigned long pgoffh](j9)}(hunsignedh]hunsigned}(hj:hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj{:ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{:ubj9)}(hlongh]hlong}(hj:hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj{:ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{:ubj )}(hpgoffh]hpgoff}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{:ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj9ubeh}(h]h ]h"]h$]h&]jjuh1jwhj\9hhhjn9hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjX9hhhjn9hMubah}(h]jS9ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjn9hMhjU9hhubj- )}(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:142: ./drivers/dma-buf/dma-buf.chMhj:hhubah}(h]h ]h"]h$]h&]uh1j, hjU9hhhjn9hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j:jO j:jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hj;h]h Parameters}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj;ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./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)}(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:142: ./drivers/dma-buf/dma-buf.chMhj;ubj )}(hhh]h)}(h'[in] buffer that should back the vmah]h'[in] buffer that should back the vma}(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;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&]uh1jhjY;ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjU;ubj )}(hhh]h)}(h[in] vma for the mmaph]h[in] vma for the mmap}(hjt;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjp;hMhjq;ubah}(h]h ]h"]h$]h&]uh1j hjU;ubeh}(h]h ]h"]h$]h&]uh1j hjp;hMhj;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:142: ./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:142: ./drivers/dma-buf/dma-buf.chMhj;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]j^ )}(hj;h]h Description}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj;ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./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:142: ./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:142: ./drivers/dma-buf/dma-buf.chMhj:ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_vmap (C function)c.dma_buf_vmaphNtauh1jhjhhhNhNubj)}(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](j9)}(hinth]hint}(hj$<hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj <hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj3<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj <hhhj2<hMubj)}(h dma_buf_vmaph]j )}(h dma_buf_vmaph]h dma_buf_vmap}(hjE<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjA<ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj <hhhj2<hMubjx)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hja<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]<ubj)}(h h]h }(hjn<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]<ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|<ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj<modnameN classnameNjj)}j]j;)}j3jG<sbc.dma_buf_vmapasbuh1hhj]<ubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]<ubjP)}(hjSh]h*}(hj<hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj]<ubj )}(hdmabufh]hdmabuf}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]<ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjY<ubj~)}(hstruct iosys_map *maph](j)}(hjh]hstruct}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<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&] refdomainjreftypej3 reftargetj<modnameN classnameNjj)}j]j<c.dma_buf_vmapasbuh1hhj<ubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubjP)}(hjSh]h*}(hj=hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj<ubj )}(hmaph]hmap}(hj*=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjY<ubeh}(h]h ]h"]h$]h&]jjuh1jwhj <hhhj2<hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj<hhhj2<hMubah}(h]j<ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj2<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.}(hjT=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjQ=hhubah}(h]h ]h"]h$]h&]uh1j, hj<hhhj2<hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jl=jO jl=jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hjv=h]h Parameters}(hjx=hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjt=ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM"hjp=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:142: ./drivers/dma-buf/dma-buf.chM hj=ubj )}(hhh]h)}(h[in] buffer to vmaph]h[in] buffer to vmap}(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;``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:142: ./drivers/dma-buf/dma-buf.chM!hj=ubj )}(hhh]h)}(h [out] returns the vmap pointerh]h [out] returns the vmap pointer}(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=ubeh}(h]h ]h"]h$]h&]uh1j hjp=ubh)}(h**Description**h]j^ )}(hj >h]h Description}(hj >hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj>ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM#hjp=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.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM"hjp=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.}(hj.>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM&hjp=ubh)}(h9Returns 0 on success, or a negative errno code otherwise.h]h9Returns 0 on success, or a negative errno code otherwise.}(hj=>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM*hjp=ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_buf_vmap_unlocked (C function)c.dma_buf_vmap_unlockedhNtauh1jhjhhhNhNubj)}(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](j9)}(hinth]hint}(hjl>hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjh>hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMSubj)}(h h]h }(hj{>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjh>hhhjz>hMSubj)}(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&]jjuh1jhjh>hhhjz>hMSubjx)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubj)}(h h]h }(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj>ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj>modnameN classnameNjj)}j]j;)}j3j>sbc.dma_buf_vmap_unlockedasbuh1hhj>ubj)}(h h]h }(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubjP)}(hjSh]h*}(hj>hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj>ubj )}(hdmabufh]hdmabuf}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj>ubj~)}(hstruct iosys_map *maph](j)}(hjh]hstruct}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(h h]h }(hj(?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hj9?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6?ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj;?modnameN classnameNjj)}j]j>c.dma_buf_vmap_unlockedasbuh1hhj?ubj)}(h h]h }(hjW?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubjP)}(hjSh]h*}(hje?hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj?ubj )}(hmaph]hmap}(hjr?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj>ubeh}(h]h ]h"]h$]h&]jjuh1jwhjh>hhhjz>hMSubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjd>hhhjz>hMSubah}(h]j_>ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjz>hMShja>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:142: ./drivers/dma-buf/dma-buf.chMShj?hhubah}(h]h ]h"]h$]h&]uh1j, hja>hhhjz>hMSubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j?jO j?jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hj?h]h Parameters}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj?ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMWhj?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:142: ./drivers/dma-buf/dma-buf.chMUhj?ubj )}(hhh]h)}(h[in] buffer to vmaph]h[in] buffer to vmap}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hMUhj?ubah}(h]h ]h"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]uh1j hj?hMUhj?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:142: ./drivers/dma-buf/dma-buf.chMVhj@ubj )}(hhh]h)}(h [out] returns the vmap pointerh]h [out] returns the vmap pointer}(hj/@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+@hMVhj,@ubah}(h]h ]h"]h$]h&]uh1j hj@ubeh}(h]h ]h"]h$]h&]uh1j hj+@hMVhj?ubeh}(h]h ]h"]h$]h&]uh1j hj?ubh)}(h**Description**h]j^ )}(hjQ@h]h Description}(hjS@hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjO@ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMXhj?ubh)}(h"Unlocked version of dma_buf_vmap()h]h"Unlocked version of dma_buf_vmap()}(hjg@hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMWhj?ubh)}(h9Returns 0 on success, or a negative errno code otherwise.h]h9Returns 0 on success, or a negative errno code otherwise.}(hjv@hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMYhj?ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_vunmap (C function)c.dma_buf_vunmaphNtauh1jhjhhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hj@hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj@hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMnubj)}(h h]h }(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@hhhj@hMnubj)}(hdma_buf_vunmaph]j )}(hdma_buf_vunmaph]hdma_buf_vunmap}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj@hhhj@hMnubjx)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubj)}(h h]h }(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjAmodnameN classnameNjj)}j]j;)}j3j@sbc.dma_buf_vunmapasbuh1hhj@ubj)}(h h]h }(hj AhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubjP)}(hjSh]h*}(hj.AhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj@ubj )}(hdmabufh]hdmabuf}(hj;AhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj@ubj~)}(hstruct iosys_map *maph](j)}(hjh]hstruct}(hjTAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPAubj)}(h h]h }(hjaAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPAubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hjrAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjoAubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjtAmodnameN classnameNjj)}j]jAc.dma_buf_vunmapasbuh1hhjPAubj)}(h h]h }(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPAubjP)}(hjSh]h*}(hjAhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjPAubj )}(hmaph]hmap}(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjPAubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj@ubeh}(h]h ]h"]h$]h&]jjuh1jwhj@hhhj@hMnubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj@hhhj@hMnubah}(h]j@ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj@hMnhj@hhubj- )}(hhh]h)}(h&Unmap a vmap obtained by dma_buf_vmap.h]h&Unmap a vmap obtained by dma_buf_vmap.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMnhjAhhubah}(h]h ]h"]h$]h&]uh1j, hj@hhhj@hMnubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jAjO jAjP jQ jR uh1jhhhjhNhNubjT )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vunmap ``struct iosys_map *map`` [in] vmap pointer to vunmaph](h)}(h**Parameters**h]j^ )}(hjAh]h Parameters}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjAubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMrhjAubj )}(hhh](j )}(h4``struct dma_buf *dmabuf`` [in] buffer to vunmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjBh]hstruct dma_buf *dmabuf}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMohjBubj )}(hhh]h)}(h[in] buffer to vunmaph]h[in] buffer to vunmap}(hj/BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+BhMohj,Bubah}(h]h ]h"]h$]h&]uh1j hjBubeh}(h]h ]h"]h$]h&]uh1j hj+BhMohj Bubj )}(h8``struct iosys_map *map`` [in] vmap pointer to vunmaph](j )}(h``struct iosys_map *map``h]j)}(hjOBh]hstruct iosys_map *map}(hjQBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMBubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMqhjIBubj )}(hhh]h)}(h[in] vmap pointer to vunmaph]h[in] vmap pointer to vunmap}(hjhBhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMphjeBubah}(h]h ]h"]h$]h&]uh1j hjIBubeh}(h]h ]h"]h$]h&]uh1j hjdBhMqhj Bubeh}(h]h ]h"]h$]h&]uh1j hjAubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_buf_vunmap_unlocked (C function)c.dma_buf_vunmap_unlockedhNtauh1jhjhhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hjBhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjBhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBhhhjBhMubj)}(hdma_buf_vunmap_unlockedh]j )}(hdma_buf_vunmap_unlockedh]hdma_buf_vunmap_unlocked}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubah}(h]h ](j j eh"]h$]h&]jjuh1jhjBhhhjBhMubjx)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjCmodnameN classnameNjj)}j]j;)}j3jBsbc.dma_buf_vunmap_unlockedasbuh1hhjBubj)}(h h]h }(hj$ChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubjP)}(hjSh]h*}(hj2ChhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjBubj )}(hdmabufh]hdmabuf}(hj?ChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjBubj~)}(hstruct iosys_map *maph](j)}(hjh]hstruct}(hjXChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTCubj)}(h h]h }(hjeChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTCubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hjvChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsCubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjxCmodnameN classnameNjj)}j]j Cc.dma_buf_vunmap_unlockedasbuh1hhjTCubj)}(h h]h }(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTCubjP)}(hjSh]h*}(hjChhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjTCubj )}(hmaph]hmap}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjTCubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjBubeh}(h]h ]h"]h$]h&]jjuh1jwhjBhhhjBhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjBhhhjBhMubah}(h]jBah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjBhMhjBhhubj- )}(hhh]h)}(h&Unmap a vmap obtained by dma_buf_vmap.h]h&Unmap a vmap obtained by dma_buf_vmap.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjChhubah}(h]h ]h"]h$]h&]uh1j, hjBhhhjBhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jCjO jCjP jQ jR uh1jhhhjhNhNubjT )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vunmap ``struct iosys_map *map`` [in] vmap pointer to vunmaph](h)}(h**Parameters**h]j^ )}(hjCh]h Parameters}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjCubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjCubj )}(hhh](j )}(h4``struct dma_buf *dmabuf`` [in] buffer to vunmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjDh]hstruct dma_buf *dmabuf}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjDubj )}(hhh]h)}(h[in] buffer to vunmaph]h[in] buffer to vunmap}(hj3DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/DhMhj0Dubah}(h]h ]h"]h$]h&]uh1j hjDubeh}(h]h ]h"]h$]h&]uh1j hj/DhMhjDubj )}(h8``struct iosys_map *map`` [in] vmap pointer to vunmaph](j )}(h``struct iosys_map *map``h]j)}(hjSDh]hstruct iosys_map *map}(hjUDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQDubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjMDubj )}(hhh]h)}(h[in] vmap pointer to vunmaph]h[in] vmap pointer to vunmap}(hjlDhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjiDubah}(h]h ]h"]h$]h&]uh1j hjMDubeh}(h]h ]h"]h$]h&]uh1j hjhDhMhjDubeh}(h]h ]h"]h$]h&]uh1j hjCubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_ops (C struct) c.dma_buf_opshNtauh1jhjhhhNhNubj)}(hhh](j)}(h dma_buf_opsh]j)}(hstruct dma_buf_opsh](j)}(hjh]hstruct}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDhhhjDhKubj)}(h dma_buf_opsh]j )}(hjDh]h dma_buf_ops}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDubah}(h]h ](j j eh"]h$]h&]jjuh1jhjDhhhjDhKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjDhhhjDhKubah}(h]jDah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjDhKhjDhhubj- )}(hhh]h)}(h%operations possible on struct dma_bufh]h%operations possible on struct dma_buf}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK hjDhhubah}(h]h ]h"]h$]h&]uh1j, hjDhhhjDhKubeh}(h]h ](jstructeh"]h$]h&]jM jjN jEjO jEjP jQ jR uh1jhhhjhNhNubjT )}(hXg#**Definition**:: struct dma_buf_ops { 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** ``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](j^ )}(h**Definition**h]h Definition}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjEubh:}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK$hj Eubj)}(hX<struct dma_buf_ops { 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]hX<struct dma_buf_ops { 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); };}hj,Esbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK&hj Eubh)}(h **Members**h]j^ )}(hj=Eh]hMembers}(hj?EhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj;Eubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK5hj Eubj )}(hhh](j )}(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)}(hj\Eh]hattach}(hj^EhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZEubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK=hjVEubj )}(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 }(hjuEhhhNhNubh)}(h5:c:type:`dma_buf_attachment.dev `h]j)}(hjEh]hdma_buf_attachment.dev}(hjEhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj}Eubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK(hjuEubh can access the provided }(hjuEhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjEh]hdma_buf}(hjEhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hhjEhK(hjuEubhX. 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.}(hjuEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjEhK(hjrEubh)}(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.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK/hjrEubh)}(h{Any exporter-private housekeeping data can be stored in the :c:type:`dma_buf_attachment.priv ` pointer.h](h`h]j)}(hjEh]hdma_buf_attachment.priv}(hjEhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK4hjEubh pointer.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhK4hjrEubh)}(hThis callback is optional.h]hThis callback is optional.}(hj FhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK7hjrEubh)}(hReturns:h]hReturns:}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK9hjrEubh)}(h0 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]h0 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.}(hj)FhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK;hjrEubeh}(h]h ]h"]h$]h&]uh1j hjVEubeh}(h]h ]h"]h$]h&]uh1j hjqEhK=hjSEubj )}(h``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. h](j )}(h ``detach``h]j)}(hjJFh]hdetach}(hjLFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHFubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKHhjDFubj )}(hhh](h)}(hThis 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`.h](h0This is called by dma_buf_detach() to release a }(hjcFhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjmFh]hdma_buf_attachment}(hjoFhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjkFubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKDhjcFubhB. Provided so that exporters can clean up any housekeeping for an }(hjcFhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjFh]hdma_buf_attachment}(hjFhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hhjFhKDhjcFubh.}(hjcFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhKDhj`Fubh)}(hThis callback is optional.h]hThis callback is optional.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_FhKHhj`Fubeh}(h]h ]h"]h$]h&]uh1j hjDFubeh}(h]h ]h"]h$]h&]uh1j hj_FhKHhjSEubj )}(hX``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. h](j )}(h``pin``h]j)}(hjFh]hpin}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKbhjFubj )}(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.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKOhjFubh)}(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 }(hjGhhhNhNubh)}(h:c:type:`dmabuf.resv `h]j)}(hj Gh]h dmabuf.resv}(hj GhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdmabufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKThjGubh, object locked and is mutual exclusive with }(hjGhhhNhNubj^ )}(h**cache_sgt_mapping**h]hcache_sgt_mapping}(hj,GhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjGubh.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj'GhKThjFubh)}(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().}(hjDGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKWhjFubh)}(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 }(hjSGhhhNhNubj^ )}(h**map_dma_buf**h]h map_dma_buf}(hj[GhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjSGubh 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.}(hjSGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKZhjFubh)}(hReturns:h]hReturns:}(hjtGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK`hjFubh)}(h-0 on success, negative error code on failure.h]h-0 on success, negative error code on failure.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhKbhjFubeh}(h]h ]h"]h$]h&]uh1j hjFubeh}(h]h ]h"]h$]h&]uh1j hjFhKbhjSEubj )}(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)}(hjGh]hunpin}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKohjGubj )}(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.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKihjGubh)}(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 }(hjGhhhNhNubj^ )}(h**cache_sgt_mapping**h]hcache_sgt_mapping}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjGubh.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKlhjGubh)}(hThis callback is optional.h]hThis callback is optional.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhKohjGubeh}(h]h ]h"]h$]h&]uh1j hjGubeh}(h]h ]h"]h$]h&]uh1j hjGhKohjSEubj )}(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)}(hj Hh]h map_dma_buf}(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:145: ./include/linux/dma-buf.hhKhjHubj )}(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 }(hj%HhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hj/Hh]hdma_buf}(hj1HhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj-Hubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKvhj%HubhJ into device address space, and it is mandatory. It can only be called if }(hj%HhhhNhNubj^ )}(h **attach**h]hattach}(hjQHhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj%Hubh has been called successfully.}(hj%HhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjLHhKvhj"Hubh)}(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.}(hjiHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKzhj"Hubh)}(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 }(hjxHhhhNhNubh)}(h$:c:type:`device.dma_params `h]j)}(hjHh]hdevice.dma_params}(hjHhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdeviceuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK~hjxHubh from the }(hjxHhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjHh]hdma_buf_attachment}(hjHhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hhjHhK~hjxHubh. The }(hjxHhhhNhNubj^ )}(h **attach**h]hattach}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjxHubh. callback should also check these constraints.}(hjxHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjHhK~hj"Hubh)}(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.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj"Hubh)}(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.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj"Hubh)}(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.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj"Hubh)}(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 }(hj IhhhNhNubj^ )}(h**pin**h]hpin}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj Iubhc, which has the same requirements. Dynamic importers otoh are required to obey the dma_resv fences.}(hj IhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj"Hubh)}(hReturns:h]hReturns:}(hj-IhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj"Hubh)}(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 }(hjvm_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)}(hjKh]hmmap}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjKubj )}(hhh](h)}(h4This callback is used by the dma_buf_mmap() functionh]h4This callback is used by the dma_buf_mmap() function}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjKubh)}(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.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjKubh)}(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.}(hj LhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjKubh)}(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.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjKubh)}(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.}(hj*LhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjKubh)}(hThis callback is optional.h]hThis callback is optional.}(hj9LhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM hjKubh)}(hReturns:h]hReturns:}(hjHLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjKubh)}(h10 on success or a negative error code on failure.h]h10 on success or a negative error code on failure.}(hjWLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhMhjKubeh}(h]h ]h"]h$]h&]uh1j hjKubeh}(h]h ]h"]h$]h&]uh1j hjKhMhjSEubj )}(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)}(hjwLh]hvmap}(hjyLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuLubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK#hjqLubj )}(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.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK"hjLubah}(h]h ]h"]h$]h&]uh1j hjqLubeh}(h]h ]h"]h$]h&]uh1j hjLhK#hjSEubj )}(h3``vunmap`` [optional] unmaps a vmap from the bufferh](j )}(h ``vunmap``h]j)}(hjLh]hvunmap}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK#hjLubj )}(hhh]h)}(h([optional] unmaps a vmap from the bufferh]h([optional] unmaps a vmap from the buffer}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK$hjLubah}(h]h ]h"]h$]h&]uh1j hjLubeh}(h]h ]h"]h$]h&]uh1j hjLhK#hjSEubeh}(h]h ]h"]h$]h&]uh1j hj Eubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf (C struct) c.dma_bufhNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_bufh]j)}(hstruct dma_bufh](j)}(hjh]hstruct}(hj MhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK*ubj)}(h h]h }(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMhhhjMhK*ubj)}(hdma_bufh]j )}(hjMh]hdma_buf}(hj+MhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'Mubah}(h]h ](j j eh"]h$]h&]jjuh1jhjMhhhjMhK*ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjMhhhjMhK*ubah}(h]jLah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjMhK*hjMhhubj- )}(hhh]h)}(hshared buffer objecth]hshared buffer object}(hjMMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjJMhhubah}(h]h ]h"]h$]h&]uh1j, hjMhhhjMhK*ubeh}(h]h ](jstructeh"]h$]h&]jM jjN jeMjO jeMjP jQ jR uh1jhhhjhNhNubjT )}(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; struct list_head list_node; 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; }; **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 supporth](h)}(h**Definition**::h](j^ )}(h**Definition**h]h Definition}(hjqMhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjmMubh:}(hjmMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjiMubj)}(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; struct list_head list_node; 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; };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; struct list_head list_node; 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; };}hjMsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM!hjiMubh)}(h **Members**h]j^ )}(hjMh]hMembers}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjMubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM7hjiMubj )}(hhh](j )}(hH``size`` Size of the buffer; invariant over the lifetime of the buffer. h](j )}(h``size``h]j)}(hjMh]hsize}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM)hjMubj )}(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.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhM)hjMubah}(h]h ]h"]h$]h&]uh1j hjMubeh}(h]h ]h"]h$]h&]uh1j hjMhM)hjMubj )}(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)}(hjMh]hfile}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM1hjMubj )}(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().}(hj NhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM0hj Nubah}(h]h ]h"]h$]h&]uh1j hjMubeh}(h]h ]h"]h$]h&]uh1j hjNhM1hjMubj )}(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)}(hj-Nh]h attachments}(hj/NhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+Nubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM9hj'Nubj )}(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 }(hjFNhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjPNh]hdma_resv}(hjRNhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjNNubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM8hjFNubh lock }(hjFNhhhNhNubj^ )}(h**resv**h]hresv}(hjrNhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjFNubh.}(hjFNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjmNhM8hjCNubah}(h]h ]h"]h$]h&]uh1j hj'Nubeh}(h]h ]h"]h$]h&]uh1j hjBNhM9hjMubj )}(h8``ops`` dma_buf_ops associated with this buffer object. h](j )}(h``ops``h]j)}(hjNh]hops}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM?hjNubj )}(hhh]h)}(h/dma_buf_ops associated with this buffer object.h]h/dma_buf_ops associated with this buffer object.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhM?hjNubah}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]uh1j hjNhM?hjMubj )}(hl``vmapping_counter`` Used internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by **lock**. h](j )}(h``vmapping_counter``h]j)}(hjNh]hvmapping_counter}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMDhjNubj )}(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 }(hjNhhhNhNubj^ )}(h**lock**h]hlock}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjNubh.}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMChjNubah}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]uh1j hjNhMDhjMubj )}(hV``vmap_ptr`` The current vmap ptr if **vmapping_counter** > 0. Protected by **lock**. h](j )}(h ``vmap_ptr``h]j)}(hj!Oh]hvmap_ptr}(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:145: ./include/linux/dma-buf.hhMKhjOubj )}(hhh]h)}(hHThe current vmap ptr if **vmapping_counter** > 0. Protected by **lock**.h](hThe current vmap ptr if }(hj:OhhhNhNubj^ )}(h**vmapping_counter**h]hvmapping_counter}(hjBOhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj:Oubh > 0. Protected by }(hj:OhhhNhNubj^ )}(h**lock**h]hlock}(hjTOhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj:Oubh.}(hj:OhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj6OhMKhj7Oubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1j hj6OhMKhjMubj )}(hJ``exp_name`` Name of the exporter; useful for debugging. Must not be NULL h](j )}(h ``exp_name``h]j)}(hj~Oh]hexp_name}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|Oubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMQhjxOubj )}(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)}(hjPh]hresv}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjPubj )}(hhh](h)}(h*Reservation object linked to this dma-buf.h]h*Reservation object linked to this dma-buf.}(hj QhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMuhjQubh)}(hIMPLICIT SYNCHRONIZATION RULES:h]hIMPLICIT SYNCHRONIZATION RULES:}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMwhjQubh)}(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 }(hj)QhhhNhNubj)}(h`Implicit Fence Poll Support`_h]hImplicit Fence Poll Support}(hj1QhhhNhNubah}(h]h ]h"]h$]h&]nameImplicit Fence Poll Supportjjuh1jhj)QjKubh must follow the below rules.}(hj)QhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMyhjQubh)}(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.}(hjSQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM}hjOQubah}(h]h ]h"]h$]h&]uh1hhjLQubh)}(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.}(hjlQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhQubah}(h]h ]h"]h$]h&]uh1hhjLQubh)}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjQubah}(h]h ]h"]h$]h&]uh1hhjLQubh)}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjQubah}(h]h ]h"]h$]h&]uh1hhjLQubh)}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjQubah}(h]h ]h"]h$]h&]uh1hhjLQubeh}(h]h ]h"]h$]h&]j>j?uh1hhjaQhM}hjQubh)}(hDYNAMIC IMPORTER RULES:h]hDYNAMIC IMPORTER RULES:}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjQubh)}(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:}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjQubh)}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjQubah}(h]h ]h"]h$]h&]uh1hhjQubh)}(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 }(hjRhhhNhNubh)}(h=:c:type:`dma_buf_attach_ops.move_notify `h]j)}(hjRh]hdma_buf_attach_ops.move_notify}(hjRhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attach_opsuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjRubh callback.}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj7RhMhj Rubah}(h]h ]h"]h$]h&]uh1hhjQubeh}(h]h ]h"]h$]h&]j>j?uh1hhjRhMhjQubh)}(h IMPORTANT:h]h IMPORTANT:}(hjNRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjQubh)}(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.}(hj]RhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjQubeh}(h]h ]h"]h$]h&]uh1j hjPubeh}(h]h ]h"]h$]h&]uh1j hjQhMhjMubj )}(h$``poll`` for userspace poll support h](j )}(h``poll``h]j)}(hj~Rh]hpoll}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|Rubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjxRubj )}(hhh]h)}(hfor userspace poll supporth]hfor userspace poll support}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjRubah}(h]h ]h"]h$]h&]uh1j hjxRubeh}(h]h ]h"]h$]h&]uh1j hjRhMhjMubj )}(h%``cb_in`` for userspace poll support h](j )}(h ``cb_in``h]j)}(hjRh]hcb_in}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjRubj )}(hhh]h)}(hfor userspace poll supporth]hfor userspace poll support}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjRubah}(h]h ]h"]h$]h&]uh1j hjRubeh}(h]h ]h"]h$]h&]uh1j hjRhMhjMubj )}(h%``cb_out`` for userspace poll supporth](j )}(h ``cb_out``h]j)}(hjRh]hcb_out}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjRubj )}(hhh]h)}(hfor userspace poll supporth]hfor userspace poll support}(hj ShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjSubah}(h]h ]h"]h$]h&]uh1j hjRubeh}(h]h ]h"]h$]h&]uh1j hjShMhjMubeh}(h]h ]h"]h$]h&]uh1j hjiMubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubh)}(h**Description**h]j^ )}(hj3Sh]h Description}(hj5ShhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj1Subah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./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().}(hjIShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubh)}(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().}(hjXShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./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 }(hjgShhhNhNubh)}(h8:c:type:`struct dma_buf_attachment `h]j)}(hjqSh]hstruct dma_buf_attachment}(hjsShhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjoSubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM#hjgSubh.}(hjgShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjShM#hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_attach_ops (C struct)c.dma_buf_attach_opshNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_buf_attach_opsh]j)}(hstruct dma_buf_attach_opsh](j)}(hjh]hstruct}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjShhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM(ubj)}(h h]h }(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjShhhjShM(ubj)}(hdma_buf_attach_opsh]j )}(hjSh]hdma_buf_attach_ops}(hjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubah}(h]h ](j j eh"]h$]h&]jjuh1jhjShhhjShM(ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjShhhjShM(ubah}(h]jSah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjShM(hjShhubj- )}(hhh]h)}(h%importer operations for an attachmenth]h%importer operations for an attachment}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjShhubah}(h]h ]h"]h$]h&]uh1j, hjShhhjShM(ubeh}(h]h ](jstructeh"]h$]h&]jM jjN j TjO j TjP jQ jR uh1jhhhjhNhNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjTubh:}(hjThhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjTubj)}(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); };}hj1Tsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjTubh)}(h **Members**h]j^ )}(hjBTh]hMembers}(hjDThhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj@Tubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjTubj )}(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)}(hjaTh]hallow_peer2peer}(hjcThhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_Tubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj[Tubj )}(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.}(hjzThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjwTubah}(h]h ]h"]h$]h&]uh1j hj[Tubeh}(h]h ]h"]h$]h&]uh1j hjvThMhjXTubj )}(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)}(hjTh]h move_notify}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjTubj )}(hhh](h)}(h2[optional] notification that the DMA-buf is movingh]h2[optional] notification that the DMA-buf is moving}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjTubh)}(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.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjTubh)}(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.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjTubh)}(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.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjTubh)}(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.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThMhjTubeh}(h]h ]h"]h$]h&]uh1j hjTubeh}(h]h ]h"]h$]h&]uh1j hjThMhjXTubeh}(h]h ]h"]h$]h&]uh1j hjTubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubh)}(h**Description**h]j^ )}(hjUh]h Description}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjUubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubh)}(h2Attachment operations implemented by the importer.h]h2Attachment operations implemented by the importer.}(hj/UhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_attachment (C struct)c.dma_buf_attachmenthNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_buf_attachmenth]j)}(hstruct dma_buf_attachmenth](j)}(hjh]hstruct}(hjWUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSUhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMubj)}(h h]h }(hjeUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSUhhhjdUhMubj)}(hdma_buf_attachmenth]j )}(hjQUh]hdma_buf_attachment}(hjwUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsUubah}(h]h ](j j eh"]h$]h&]jjuh1jhjSUhhhjdUhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjOUhhhjdUhMubah}(h]jJUah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjdUhMhjLUhhubj- )}(hhh]h)}(h#holds device-buffer attachment datah]h#holds device-buffer attachment data}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjUhhubah}(h]h ]h"]h$]h&]uh1j, hjLUhhhjdUhMubeh}(h]h ](jstructeh"]h$]h&]jM jjN jUjO jUjP jQ jR uh1jhhhjhNhNubjT )}(hX**Definition**:: struct dma_buf_attachment { struct dma_buf *dmabuf; struct device *dev; struct list_head node; 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. ``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](j^ )}(h**Definition**h]h Definition}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjUubh:}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjUubj)}(hstruct dma_buf_attachment { struct dma_buf *dmabuf; struct device *dev; struct list_head node; bool peer2peer; const struct dma_buf_attach_ops *importer_ops; void *importer_priv; void *priv; };h]hstruct dma_buf_attachment { struct dma_buf *dmabuf; struct device *dev; struct list_head node; bool peer2peer; const struct dma_buf_attach_ops *importer_ops; void *importer_priv; void *priv; };}hjUsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjUubh)}(h **Members**h]j^ )}(hjUh]hMembers}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjUubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjUubj )}(hhh](j )}(h'``dmabuf`` buffer for this attachment. h](j )}(h ``dmabuf``h]j)}(hjVh]hdmabuf}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjVubj )}(hhh]h)}(hbuffer for this attachment.h]hbuffer for this attachment.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjVubah}(h]h ]h"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]uh1j hjVhMhjUubj )}(h'``dev`` device attached to the buffer. h](j )}(h``dev``h]j)}(hj?Vh]hdev}(hjAVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=Vubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj9Vubj )}(hhh]h)}(hdevice attached to the buffer.h]hdevice attached to the buffer.}(hjXVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjTVhMhjUVubah}(h]h ]h"]h$]h&]uh1j hj9Vubeh}(h]h ]h"]h$]h&]uh1j hjTVhMhjUubj )}(hO``node`` list of dma_buf_attachment, protected by dma_resv lock of the dmabuf. h](j )}(h``node``h]j)}(hjxVh]hnode}(hjzVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvVubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjrVubj )}(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.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjVubah}(h]h ]h"]h$]h&]uh1j hjrVubeh}(h]h ]h"]h$]h&]uh1j hjVhMhjUubj )}(hL``peer2peer`` true if the importer can handle peer resources without pages. h](j )}(h ``peer2peer``h]j)}(hjVh]h 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:145: ./include/linux/dma-buf.hhMhjVubj )}(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.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjVubah}(h]h ]h"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]uh1j hjVhMhjUubj )}(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)}(hjVh]h importer_ops}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjVubj )}(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.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjWubah}(h]h ]h"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]uh1j hjVhMhjUubj )}(h5``importer_priv`` importer specific attachment data. h](j )}(h``importer_priv``h]j)}(hj$Wh]h importer_priv}(hj&WhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"Wubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjWubj )}(hhh]h)}(h"importer specific attachment data.h]h"importer specific attachment data.}(hj=WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9WhMhj:Wubah}(h]h ]h"]h$]h&]uh1j hjWubeh}(h]h ]h"]h$]h&]uh1j hj9WhMhjUubj )}(h+``priv`` exporter specific attachment data.h](j )}(h``priv``h]j)}(hj]Wh]hpriv}(hj_WhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[Wubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjWWubj )}(hhh]h)}(h"exporter specific attachment data.h]h"exporter specific attachment data.}(hjvWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjsWubah}(h]h ]h"]h$]h&]uh1j hjWWubeh}(h]h ]h"]h$]h&]uh1j hjrWhMhjUubeh}(h]h ]h"]h$]h&]uh1j hjUubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubh)}(h**Description**h]j^ )}(hjWh]h Description}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjWubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./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.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./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().}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_export_info (C struct)c.dma_buf_export_infohNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_buf_export_infoh]j)}(hstruct dma_buf_export_infoh](j)}(hjh]hstruct}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMubj)}(h h]h }(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWhhhjWhMubj)}(hdma_buf_export_infoh]j )}(hjWh]hdma_buf_export_info}(hj XhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj Xubah}(h]h ](j j eh"]h$]h&]jjuh1jhjWhhhjWhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjWhhhjWhMubah}(h]jWah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjWhMhjWhhubj- )}(hhh]h)}(h,holds information needed to export a dma_bufh]h,holds information needed to export a dma_buf}(hj/XhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj,Xhhubah}(h]h ]h"]h$]h&]uh1j, hjWhhhjWhMubeh}(h]h ](jstructeh"]h$]h&]jM jjN jGXjO jGXjP jQ jR uh1jhhhjhNhNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hjSXhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjOXubh:}(hjOXhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjKXubj)}(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; };}hjlXsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjKXubh)}(h **Members**h]j^ )}(hj}Xh]hMembers}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj{Xubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjKXubj )}(hhh](j )}(h:``exp_name`` name of the exporter - useful for debugging. h](j )}(h ``exp_name``h]j)}(hjXh]hexp_name}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjXubj )}(hhh]h)}(h,name of the exporter - useful for debugging.h]h,name of the exporter - useful for debugging.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhMhjXubah}(h]h ]h"]h$]h&]uh1j hjXubeh}(h]h ]h"]h$]h&]uh1j hjXhMhjXubj )}(hJ``owner`` pointer to exporter module - used for refcounting kernel module h](j )}(h ``owner``h]j)}(hjXh]howner}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjXubj )}(hhh]h)}(h?pointer to exporter module - used for refcounting kernel moduleh]h?pointer to exporter module - used for refcounting kernel module}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhMhjXubah}(h]h ]h"]h$]h&]uh1j hjXubeh}(h]h ]h"]h$]h&]uh1j hjXhMhjXubj )}(h?``ops`` Attach allocator-defined dma buf ops to the new buffer h](j )}(h``ops``h]j)}(hjYh]hops}(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:145: ./include/linux/dma-buf.hhMhjYubj )}(hhh]h)}(h6Attach allocator-defined dma buf ops to the new bufferh]h6Attach allocator-defined dma buf ops to the new buffer}(hj'YhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#YhMhj$Yubah}(h]h ]h"]h$]h&]uh1j hjYubeh}(h]h ]h"]h$]h&]uh1j hj#YhMhjXubj )}(hH``size`` Size of the buffer - invariant over the lifetime of the buffer h](j )}(h``size``h]j)}(hjGYh]hsize}(hjIYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEYubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjAYubj )}(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`YhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\YhMhj]Yubah}(h]h ]h"]h$]h&]uh1j hjAYubeh}(h]h ]h"]h$]h&]uh1j hj\YhMhjXubj )}(h"``flags`` mode flags for the file h](j )}(h ``flags``h]j)}(hjYh]hflags}(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:145: ./include/linux/dma-buf.hhMhjzYubj )}(hhh]h)}(hmode flags for the fileh]hmode flags for the file}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhMhjYubah}(h]h ]h"]h$]h&]uh1j hjzYubeh}(h]h ]h"]h$]h&]uh1j hjYhMhjXubj )}(h:``resv`` reservation-object, NULL to allocate default one h](j )}(h``resv``h]j)}(hjYh]hresv}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjYubj )}(hhh]h)}(h0reservation-object, NULL to allocate default oneh]h0reservation-object, NULL to allocate default one}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhMhjYubah}(h]h ]h"]h$]h&]uh1j hjYubeh}(h]h ]h"]h$]h&]uh1j hjYhMhjXubj )}(h8``priv`` Attach private data of allocator to this bufferh](j )}(h``priv``h]j)}(hjYh]hpriv}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjYubj )}(hhh]h)}(h/Attach private data of allocator to this bufferh]h/Attach private data of allocator to this buffer}(hj ZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjZubah}(h]h ]h"]h$]h&]uh1j hjYubeh}(h]h ]h"]h$]h&]uh1j hjZhMhjXubeh}(h]h ]h"]h$]h&]uh1j hjKXubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubh)}(h**Description**h]j^ )}(hj5Zh]h Description}(hj7ZhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj3Zubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./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.}(hjKZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./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_INFOhNtauh1jhjhhhNhNubj)}(hhh](j)}(hDEFINE_DMA_BUF_EXPORT_INFOh]j)}(hDEFINE_DMA_BUF_EXPORT_INFOh]j)}(hDEFINE_DMA_BUF_EXPORT_INFOh]j )}(hjmZh]hDEFINE_DMA_BUF_EXPORT_INFO}(hjwZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsZubah}(h]h ](j j eh"]h$]h&]jjuh1jhjoZhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM ubah}(h]h ]h"]h$]h&]jjj uh1jj j hjkZhhhjZhM ubah}(h]jfZah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjZhM hjhZhhubj- )}(hhh]h}(h]h ]h"]h$]h&]uh1j, hjhZhhhjZhM ubeh}(h]h ](jmacroeh"]h$]h&]jM jjN jZjO jZjP jQ jR uh1jhhhjhNhNubh)}(h%``DEFINE_DMA_BUF_EXPORT_INFO (name)``h]j)}(hjZh]h!DEFINE_DMA_BUF_EXPORT_INFO (name)}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM hjhhubh)}(hhelper macro for exporters h]h)}(hhelper macro for exportersh]hhelper macro for exporters}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM hjZubah}(h]h ]h"]h$]h&]uh1hhjZhM hjhhubjT )}(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]j^ )}(hjZh]h Parameters}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjZubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjZubj )}(hhh]j )}(h``name`` export-info name h](j )}(h``name``h]j)}(hjZh]hname}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM hjZubj )}(hhh]h)}(hexport-info nameh]hexport-info name}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hM hj[ubah}(h]h ]h"]h$]h&]uh1j hjZubeh}(h]h ]h"]h$]h&]uh1j hj[hM hjZubah}(h]h ]h"]h$]h&]uh1j hjZubh)}(h**Description**h]j^ )}(hj8[h]h Description}(hj:[hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj6[ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjZubh)}(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 }(hjN[hhhNhNubh)}(h::c:type:`struct dma_buf_export_info `h]j)}(hjX[h]hstruct dma_buf_export_info}(hjZ[hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjV[ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_export_infouh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM hjN[ubh1, zeroes it out and pre-populates exp_name in it.}(hjN[hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhju[hM hjZubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jget_dma_buf (C function) c.get_dma_bufhNtauh1jhjhhhNhNubj)}(hhh](j)}(h)void get_dma_buf (struct dma_buf *dmabuf)h]j)}(h(void get_dma_buf(struct dma_buf *dmabuf)h](j9)}(hvoidh]hvoid}(hj[hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj[hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMubj)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[hhhj[hMubj)}(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&]jjuh1jhj[hhhj[hMubjx)}(h(struct dma_buf *dmabuf)h]j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj[ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj[modnameN classnameNjj)}j]j;)}j3j[sb c.get_dma_bufasbuh1hhj[ubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubjP)}(hjSh]h*}(hj)\hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj[ubj )}(hdmabufh]hdmabuf}(hj6\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj[ubah}(h]h ]h"]h$]h&]jjuh1jwhj[hhhj[hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj[hhhj[hMubah}(h]j[ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj[hMhj[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:145: ./include/linux/dma-buf.hhMhj]\hhubah}(h]h ]h"]h$]h&]uh1j, hj[hhhj[hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jx\jO jx\jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hj\h]h Parameters}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj\ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj|\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:145: ./include/linux/dma-buf.hhMhj\ubj )}(hhh]h)}(h[in] pointer to dma_bufh]h[in] pointer to dma_buf}(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]j^ )}(hj\h]h Description}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj\ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj|\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:145: ./include/linux/dma-buf.hhMhj|\ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_is_dynamic (C function)c.dma_buf_is_dynamichNtauh1jhjhhhNhNubj)}(hhh](j)}(h0bool dma_buf_is_dynamic (struct dma_buf *dmabuf)h]j)}(h/bool dma_buf_is_dynamic(struct dma_buf *dmabuf)h](j9)}(hboolh]hbool}(hj!]hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj]hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM$ubj)}(h h]h }(hj0]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]hhhj/]hM$ubj)}(hdma_buf_is_dynamich]j )}(hdma_buf_is_dynamich]hdma_buf_is_dynamic}(hjB]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj>]ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj]hhhj/]hM$ubjx)}(h(struct dma_buf *dmabuf)h]j~)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj^]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZ]ubj)}(h h]h }(hjk]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZ]ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj|]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjy]ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj~]modnameN classnameNjj)}j]j;)}j3jD]sbc.dma_buf_is_dynamicasbuh1hhjZ]ubj)}(h h]h }(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZ]ubjP)}(hjSh]h*}(hj]hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjZ]ubj )}(hdmabufh]hdmabuf}(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZ]ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjV]ubah}(h]h ]h"]h$]h&]jjuh1jwhj]hhhj/]hM$ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj]hhhj/]hM$ubah}(h]j]ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj/]hM$hj]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:145: ./include/linux/dma-buf.hhM$hj]hhubah}(h]h ]h"]h$]h&]uh1j, hj]hhhj/]hM$ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j]jO j]jP jQ jR uh1jhhhjhNhNubjT )}(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]j^ )}(hj^h]h Parameters}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj^ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM(hj]ubj )}(hhh]j )}(h0``struct dma_buf *dmabuf`` the DMA-buf to check 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:145: ./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&]uh1hhj7^hM%hj8^ubah}(h]h ]h"]h$]h&]uh1j hj^ubeh}(h]h ]h"]h$]h&]uh1j hj7^hM%hj^ubah}(h]h ]h"]h$]h&]uh1j hj]ubh)}(h**Description**h]j^ )}(hj]^h]h Description}(hj_^hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj[^ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM'hj]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.}(hjs^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM&hj]ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS 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^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hhhhhKubh)}(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.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:151: ./drivers/dma-buf/dma-resv.chK-hj^hhubh)}(h%See struct dma_resv for more details.h]h%See struct dma_resv for more details.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:151: ./drivers/dma-buf/dma-resv.chK4hj^hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_init (C function)c.dma_resv_inithNtauh1jhj^hhhNhNubj)}(hhh](j)}(h)void dma_resv_init (struct dma_resv *obj)h]j)}(h(void dma_resv_init(struct dma_resv *obj)h](j9)}(hvoidh]hvoid}(hj^hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj^hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKubj)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^hhhj^hKubj)}(h dma_resv_inith]j )}(h dma_resv_inith]h dma_resv_init}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj^hhhj^hKubjx)}(h(struct dma_resv *obj)h]j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(h h]h }(hj+_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj<_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9_ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj>_modnameN classnameNjj)}j]j;)}j3j_sbc.dma_resv_initasbuh1hhj_ubj)}(h h]h }(hj\_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubjP)}(hjSh]h*}(hjj_hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj_ubj )}(hobjh]hobj}(hjw_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj_ubah}(h]h ]h"]h$]h&]jjuh1jwhj^hhhj^hKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj^hhhj^hKubah}(h]j^ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj^hKhj^hhubj- )}(hhh]h)}(hinitialize a reservation objecth]hinitialize a reservation object}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhj_hhubah}(h]h ]h"]h$]h&]uh1j, hj^hhhj^hKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j_jO j_jP jQ jR uh1jhhhj^hNhNubjT )}(hA**Parameters** ``struct dma_resv *obj`` the reservation objecth](h)}(h**Parameters**h]j^ )}(hj_h]h Parameters}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj_ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhj_ubj )}(hhh]j )}(h/``struct dma_resv *obj`` the reservation objecth](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:154: ./drivers/dma-buf/dma-resv.chKhj_ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhj_ubah}(h]h ]h"]h$]h&]uh1j hj_ubeh}(h]h ]h"]h$]h&]uh1j hj_hKhj_ubah}(h]h ]h"]h$]h&]uh1j hj_ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_fini (C function)c.dma_resv_finihNtauh1jhj^hhhNhNubj)}(hhh](j)}(h)void dma_resv_fini (struct dma_resv *obj)h]j)}(h(void dma_resv_fini(struct dma_resv *obj)h](j9)}(hvoidh]hvoid}(hj<`hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj8`hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKubj)}(h h]h }(hjK`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8`hhhjJ`hKubj)}(h dma_resv_finih]j )}(h dma_resv_finih]h dma_resv_fini}(hj]`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjY`ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj8`hhhjJ`hKubjx)}(h(struct dma_resv *obj)h]j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjy`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju`ubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju`ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj`modnameN classnameNjj)}j]j;)}j3j_`sbc.dma_resv_finiasbuh1hhju`ubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju`ubjP)}(hjSh]h*}(hj`hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhju`ubj )}(hobjh]hobj}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hju`ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjq`ubah}(h]h ]h"]h$]h&]jjuh1jwhj8`hhhjJ`hKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj4`hhhjJ`hKubah}(h]j/`ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjJ`hKhj1`hhubj- )}(hhh]h)}(hdestroys a reservation objecth]hdestroys a reservation object}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhj`hhubah}(h]h ]h"]h$]h&]uh1j, hj1`hhhjJ`hKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jajO jajP jQ jR uh1jhhhj^hNhNubjT )}(hA**Parameters** ``struct dma_resv *obj`` the reservation objecth](h)}(h**Parameters**h]j^ )}(hjah]h Parameters}(hj ahhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjaubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjaubj )}(hhh]j )}(h/``struct dma_resv *obj`` the reservation objecth](j )}(h``struct dma_resv *obj``h]j)}(hj=ah]hstruct dma_resv *obj}(hj?ahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;aubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhj7aubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjVahhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjSaubah}(h]h ]h"]h$]h&]uh1j hj7aubeh}(h]h ]h"]h$]h&]uh1j hjRahKhj4aubah}(h]h ]h"]h$]h&]uh1j hjaubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_resv_reserve_fences (C function)c.dma_resv_reserve_fenceshNtauh1jhj^hhhNhNubj)}(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](j9)}(hinth]hint}(hjahhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjahhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKubj)}(h h]h }(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjahhhjahKubj)}(hdma_resv_reserve_fencesh]j )}(hdma_resv_reserve_fencesh]hdma_resv_reserve_fences}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubah}(h]h ](j j eh"]h$]h&]jjuh1jhjahhhjahKubjx)}(h/(struct dma_resv *obj, unsigned int num_fences)h](j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubj)}(h h]h }(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjamodnameN classnameNjj)}j]j;)}j3jasbc.dma_resv_reserve_fencesasbuh1hhjaubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubjP)}(hjSh]h*}(hj bhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjaubj )}(hobjh]hobj}(hj-bhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjaubj~)}(hunsigned int num_fencesh](j9)}(hunsignedh]hunsigned}(hjFbhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjBbubj)}(h h]h }(hjTbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBbubj9)}(hinth]hint}(hjbbhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjBbubj)}(h h]h }(hjpbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBbubj )}(h num_fencesh]h num_fences}(hj~bhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBbubeh}(h].h ]h"]h$]h&]noemphjjuh1j}hjaubeh}(h]h ]h"]h$]h&]jjuh1jwhjahhhjahKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjahhhjahKubah}(h]jaah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjahKhjahhubj- )}(hhh]h)}(h1Reserve space to add fences to a dma_resv object.h]h1Reserve space to add fences to a dma_resv object.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjbhhubah}(h]h ]h"]h$]h&]uh1j, hjahhhjahKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jbjO jbjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjbh]h Parameters}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjbubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjbubj )}(hhh](j )}(h,``struct dma_resv *obj`` reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjbh]hstruct dma_resv *obj}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjbubj )}(hhh]h)}(hreservation objecth]hreservation object}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhKhjbubah}(h]h ]h"]h$]h&]uh1j hjbubeh}(h]h ]h"]h$]h&]uh1j hjbhKhjbubj )}(h<``unsigned int num_fences`` number of fences we want to add h](j )}(h``unsigned int num_fences``h]j)}(hj"ch]hunsigned int num_fences}(hj$chhhNhNubah}(h]h ]h"]h$]h&]uh1jhj cubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjcubj )}(hhh]h)}(hnumber of fences we want to addh]hnumber of fences we want to add}(hj;chhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7chKhj8cubah}(h]h ]h"]h$]h&]uh1j hjcubeh}(h]h ]h"]h$]h&]uh1j hj7chKhjbubeh}(h]h ]h"]h$]h&]uh1j hjbubh)}(h**Description**h]j^ )}(hj]ch]h Description}(hj_chhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj[cubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjbubh)}(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 }(hjschhhNhNubj^ )}(h**obj**h]hobj}(hj{chhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjscubh locked through dma_resv_lock().}(hjschhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjbubh)}(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 }(hjchhhNhNubj^ )}(h**obj**h]hobj}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjcubhu is unlocked at any time before calling dma_resv_add_fence(). This is validated when CONFIG_DEBUG_MUTEXES is enabled.}(hjchhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjbubh)}(h#RETURNS Zero for success, or -errnoh]h#RETURNS Zero for success, or -errno}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjbubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&dma_resv_reset_max_fences (C function)c.dma_resv_reset_max_fenceshNtauh1jhj^hhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hjchhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjchhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjchhhjchMubj)}(hdma_resv_reset_max_fencesh]j )}(hdma_resv_reset_max_fencesh]hdma_resv_reset_max_fences}(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubah}(h]h ](j j eh"]h$]h&]jjuh1jhjchhhjchMubjx)}(h(struct dma_resv *obj)h]j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hj!dhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj)}(h h]h }(hj.dhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj?dhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`.h](h)}(h**Parameters**h]j^ )}(hjdh]h Parameters}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjdubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjdubj )}(hhh]j )}(h6``struct dma_resv *obj`` the dma_resv object to reset h](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:154: ./drivers/dma-buf/dma-resv.chMhjdubj )}(hhh]h)}(hthe dma_resv object to reseth]hthe dma_resv object to reset}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhMhjdubah}(h]h ]h"]h$]h&]uh1j hjdubeh}(h]h ]h"]h$]h&]uh1j hjdhMhjdubah}(h]h ]h"]h$]h&]uh1j hjdubh)}(h**Description**h]j^ )}(hj eh]h Description}(hj"ehhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjeubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjdubh)}(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 }(hj6ehhhNhNubh)}(h2:c:type:`dma_resv_list.max_fences `h]j)}(hj@eh]hdma_resv_list.max_fences}(hjBehhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj>eubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_resv_listuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj6eubh.}(hj6ehhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj]ehMhjdubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_add_fence (C function)c.dma_resv_add_fencehNtauh1jhj^hhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hjehhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjehhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjehhhjehMubj)}(hdma_resv_add_fenceh]j )}(hdma_resv_add_fenceh]hdma_resv_add_fence}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubah}(h]h ](j j eh"]h$]h&]jjuh1jhjehhhjehMubjx)}(hJ(struct dma_resv *obj, struct dma_fence *fence, enum dma_resv_usage usage)h](j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjemodnameN classnameNjj)}j]j;)}j3jesbc.dma_resv_add_fenceasbuh1hhjeubj)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeubjP)}(hjSh]h*}(hjfhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjeubj )}(hobjh]hobj}(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjeubj~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj7fhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3fubj)}(h h]h }(hjDfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3fubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjUfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRfubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjWfmodnameN classnameNjj)}j]jec.dma_resv_add_fenceasbuh1hhj3fubj)}(h h]h }(hjsfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3fubjP)}(hjSh]h*}(hjfhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj3fubj )}(hfenceh]hfence}(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3fubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjeubj~)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjfubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjfmodnameN classnameNjj)}j]jec.dma_resv_add_fenceasbuh1hhjfubj)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj )}(husageh]husage}(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjfubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjeubeh}(h]h ]h"]h$]h&]jjuh1jwhjehhhjehMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjehhhjehMubah}(h]j{eah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjehMhj}ehhubj- )}(hhh]h)}(hAdd a fence to the dma_resv objh]hAdd a fence to the dma_resv obj}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjghhubah}(h]h ]h"]h$]h&]uh1j, hj}ehhhjehMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j3gjO j3gjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hj=gh]h Parameters}(hj?ghhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj;gubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj7gubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj\gh]hstruct dma_resv *obj}(hj^ghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZgubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjVgubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjughhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqghMhjrgubah}(h]h ]h"]h$]h&]uh1j hjVgubeh}(h]h ]h"]h$]h&]uh1j hjqghMhjSgubj )}(h-``struct dma_fence *fence`` the fence to add h](j )}(h``struct dma_fence *fence``h]j)}(hjgh]hstruct dma_fence *fence}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjgubj )}(hhh]h)}(hthe fence to addh]hthe fence to add}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjgubah}(h]h ]h"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]uh1j hjghMhjSgubj )}(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)}(hjgh]henum dma_resv_usage usage}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjgubj )}(hhh]h)}(h.how the fence is used, see enum dma_resv_usageh]h.how the fence is used, see enum dma_resv_usage}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjgubah}(h]h ]h"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]uh1j hjghMhjSgubeh}(h]h ]h"]h$]h&]uh1j hj7gubh)}(h**Description**h]j^ )}(hj hh]h Description}(hj hhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjhubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj7gubh)}(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, }(hjhhhhNhNubj^ )}(h**obj**h]hobj}(hj'hhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjhubhT must be locked with dma_resv_lock(), and dma_resv_reserve_fences() has been called.}(hjhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj7gubh)}(hOSee also :c:type:`dma_resv.fence ` for a discussion of the semantics.h](h See also }(hj@hhhhNhNubh)}(h#:c:type:`dma_resv.fence `h]j)}(hjJhh]hdma_resv.fence}(hjLhhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjHhubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj@hubh# for a discussion of the semantics.}(hj@hhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjghhMhj7gubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_resv_replace_fences (C function)c.dma_resv_replace_fenceshNtauh1jhj^hhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hjhhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMJubj)}(h h]h }(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhjhhMJubj)}(hdma_resv_replace_fencesh]j )}(hdma_resv_replace_fencesh]hdma_resv_replace_fences}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhhjhhMJubjx)}(hb(struct dma_resv *obj, uint64_t context, struct dma_fence *replacement, enum dma_resv_usage usage)h](j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubj)}(h h]h }(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjhmodnameN classnameNjj)}j]j;)}j3jhsbc.dma_resv_replace_fencesasbuh1hhjhubj)}(h h]h }(hj ihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubjP)}(hjSh]h*}(hjihhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjhubj )}(hobjh]hobj}(hj(ihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjhubj~)}(huint64_t contexth](h)}(hhh]j )}(huint64_th]huint64_t}(hjDihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAiubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjFimodnameN classnameNjj)}j]j ic.dma_resv_replace_fencesasbuh1hhj=iubj)}(h h]h }(hjbihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=iubj )}(hcontexth]hcontext}(hjpihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=iubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjhubj~)}(hstruct dma_fence *replacementh](j)}(hjh]hstruct}(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubj)}(h h]h }(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjimodnameN classnameNjj)}j]j ic.dma_resv_replace_fencesasbuh1hhjiubj)}(h h]h }(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubjP)}(hjSh]h*}(hjihhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjiubj )}(h replacementh]h replacement}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjhubj~)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubj)}(h h]h }(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjjmodnameN classnameNjj)}j]j ic.dma_resv_replace_fencesasbuh1hhjiubj)}(h h]h }(hj5jhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubj )}(husageh]husage}(hjCjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjhubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhhjhhMJubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhhjhhMJubah}(h]jhah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhhMJhjhhhubj- )}(hhh]h)}(h"replace fences in the dma_resv objh]h"replace fences in the dma_resv obj}(hjmjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMJhjjjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhhjhhMJubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjjO jjjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjjh]h Parameters}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMNhjjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjjh]hstruct dma_resv *obj}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMKhjjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhMKhjjubah}(h]h ]h"]h$]h&]uh1j hjjubeh}(h]h ]h"]h$]h&]uh1j hjjhMKhjjubj )}(h:``uint64_t context`` the context of the fences to replace h](j )}(h``uint64_t context``h]j)}(hjjh]huint64_t context}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMLhjjubj )}(hhh]h)}(h$the context of the fences to replaceh]h$the context of the fences to replace}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhMLhjjubah}(h]h ]h"]h$]h&]uh1j hjjubeh}(h]h ]h"]h$]h&]uh1j hjjhMLhjjubj )}(h?``struct dma_fence *replacement`` the new fence to use instead h](j )}(h!``struct dma_fence *replacement``h]j)}(hj kh]hstruct dma_fence *replacement}(hj"khhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMMhjkubj )}(hhh]h)}(hthe new fence to use insteadh]hthe new fence to use instead}(hj9khhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5khMMhj6kubah}(h]h ]h"]h$]h&]uh1j hjkubeh}(h]h ]h"]h$]h&]uh1j hj5khMMhjjubj )}(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)}(hjYkh]henum dma_resv_usage usage}(hj[khhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWkubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMNhjSkubj )}(hhh]h)}(h2how the new fence is used, see enum dma_resv_usageh]h2how the new fence is used, see enum dma_resv_usage}(hjrkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnkhMNhjokubah}(h]h ]h"]h$]h&]uh1j hjSkubeh}(h]h ]h"]h$]h&]uh1j hjnkhMNhjjubeh}(h]h ]h"]h$]h&]uh1j hjjubh)}(h**Description**h]j^ )}(hjkh]h Description}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjkubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMPhjjubh)}(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.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMOhjjubh)}(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.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMShjjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)dma_resv_iter_first_unlocked (C function)c.dma_resv_iter_first_unlockedhNtauh1jhj^hhhNhNubj)}(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)}(hjh]hstruct}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkhhhjkhMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj lmodnameN classnameNjj)}j]j;)}j3dma_resv_iter_first_unlockedsbc.dma_resv_iter_first_unlockedasbuh1hhjkhhhjkhMubj)}(h h]h }(hj(lhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkhhhjkhMubjP)}(hjSh]h*}(hj6lhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjkhhhjkhMubj)}(hdma_resv_iter_first_unlockedh]j )}(hj%lh]hdma_resv_iter_first_unlocked}(hjGlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjClubah}(h]h ](j j eh"]h$]h&]jjuh1jhjkhhhjkhMubjx)}(h(struct dma_resv_iter *cursor)h]j~)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hjblhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^lubj)}(h h]h }(hjolhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^lubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}lubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjlmodnameN classnameNjj)}j]j#lc.dma_resv_iter_first_unlockedasbuh1hhj^lubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^lubjP)}(hjSh]h*}(hjlhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj^lubj )}(hcursorh]hcursor}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^lubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjZlubah}(h]h ]h"]h$]h&]jjuh1jwhjkhhhjkhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjkhhhjkhMubah}(h]jkah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjkhMhjkhhubj- )}(hhh]h)}(h(first fence in an unlocked dma_resv obj.h]h(first fence in an unlocked dma_resv obj.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjlhhubah}(h]h ]h"]h$]h&]uh1j, hjkhhhjkhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jljO jljP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjmh]h Parameters}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjmubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjlubj )}(hhh]j )}(hF``struct dma_resv_iter *cursor`` the cursor with the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hj$mh]hstruct dma_resv_iter *cursor}(hj&mhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"mubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjmubj )}(hhh]h)}(h$the cursor with the current positionh]h$the cursor with the current position}(hj=mhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9mhMhj:mubah}(h]h ]h"]h$]h&]uh1j hjmubeh}(h]h ]h"]h$]h&]uh1j hj9mhMhjmubah}(h]h ]h"]h$]h&]uh1j hjlubh)}(h**Description**h]j^ )}(hj_mh]h Description}(hjamhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj]mubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjlubh)}(hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().h]hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().}(hjumhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjlubh)}(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.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjlubh)}(h6Returns the first fence from an unlocked dma_resv obj.h]h6Returns the first fence from an unlocked dma_resv obj.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjlubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(dma_resv_iter_next_unlocked (C function)c.dma_resv_iter_next_unlockedhNtauh1jhj^hhhNhNubj)}(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)}(hjh]hstruct}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmhhhjmhMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmmodnameN classnameNjj)}j]j;)}j3dma_resv_iter_next_unlockedsbc.dma_resv_iter_next_unlockedasbuh1hhjmhhhjmhMubj)}(h h]h }(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmhhhjmhMubjP)}(hjSh]h*}(hjnhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjmhhhjmhMubj)}(hdma_resv_iter_next_unlockedh]j )}(hjmh]hdma_resv_iter_next_unlocked}(hj!nhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjnubah}(h]h ](j j eh"]h$]h&]jjuh1jhjmhhhjmhMubjx)}(h(struct dma_resv_iter *cursor)h]j~)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hj`.h](h)}(h**Parameters**h]j^ )}(hjph]h Parameters}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjpubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjpubj )}(hhh]j )}(hG``struct dma_resv_iter *cursor`` cursor to record 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:154: ./drivers/dma-buf/dma-resv.chMhjpubj )}(hhh]h)}(h%cursor to record the current positionh]h%cursor to record 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]j^ )}(hjqh]h Description}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjqubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./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:154: ./drivers/dma-buf/dma-resv.chMhjpubh)}(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 }(hj)qhhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hj3qh]h dma_resv.lock}(hj5qhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj1qubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj)qubh.}(hj)qhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjPqhMhjpubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_iter_next (C function)c.dma_resv_iter_nexthNtauh1jhj^hhhNhNubj)}(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)}(hjh]hstruct}(hj{qhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwqhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwqhhhjqhMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjqmodnameN classnameNjj)}j]j;)}j3dma_resv_iter_nextsbc.dma_resv_iter_nextasbuh1hhjwqhhhjqhMubj)}(h h]h }(hjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwqhhhjqhMubjP)}(hjSh]h*}(hjqhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjwqhhhjqhMubj)}(hdma_resv_iter_nexth]j )}(hjqh]hdma_resv_iter_next}(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubah}(h]h ](j j eh"]h$]h&]jjuh1jhjwqhhhjqhMubjx)}(h(struct dma_resv_iter *cursor)h]j~)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubj)}(h h]h }(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjrmodnameN classnameNjj)}j]jqc.dma_resv_iter_nextasbuh1hhjqubj)}(h h]h }(hj1rhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubjP)}(hjSh]h*}(hj?rhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjqubj )}(hcursorh]hcursor}(hjLrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjqubah}(h]h ]h"]h$]h&]jjuh1jwhjwqhhhjqhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjsqhhhjqhMubah}(h]jnqah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjqhMhjpqhhubj- )}(hhh]h)}(h(next fence from a locked dma_resv objecth]h(next fence from a locked dma_resv object}(hjvrhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjsrhhubah}(h]h ]h"]h$]h&]uh1j, hjpqhhhjqhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jrjO jrjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjrh]h Parameters}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjrubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjrubj )}(hhh]j )}(hG``struct dma_resv_iter *cursor`` cursor to record 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:154: ./drivers/dma-buf/dma-resv.chMhjrubj )}(hhh]h)}(h%cursor to record the current positionh]h%cursor to record 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 hjrubh)}(h**Description**h]j^ )}(hjrh]h Description}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjrubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjrubh)}(heReturn the next fences from the dma_resv object while holding the :c:type:`dma_resv.lock `.h](hBReturn the next fences from the dma_resv object while holding the }(hjshhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjsh]h dma_resv.lock}(hjshhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjsubh.}(hjshhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj/shMhjrubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_resv_copy_fences (C function)c.dma_resv_copy_fenceshNtauh1jhj^hhhNhNubj)}(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](j9)}(hinth]hint}(hjZshhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjVshhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjishhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVshhhjhshMubj)}(hdma_resv_copy_fencesh]j )}(hdma_resv_copy_fencesh]hdma_resv_copy_fences}(hj{shhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwsubah}(h]h ](j j eh"]h$]h&]jjuh1jhjVshhhjhshMubjx)}(h,(struct dma_resv *dst, struct dma_resv *src)h](j~)}(hstruct dma_resv *dsth](j)}(hjh]hstruct}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj)}(h h]h }(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjsmodnameN classnameNjj)}j]j;)}j3j}ssbc.dma_resv_copy_fencesasbuh1hhjsubj)}(h h]h }(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubjP)}(hjSh]h*}(hjshhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjsubj )}(hdsth]hdst}(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjsubj~)}(hstruct dma_resv *srch](j)}(hjh]hstruct}(hj thhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(h h]h }(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj'thhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$tubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj)tmodnameN classnameNjj)}j]jsc.dma_resv_copy_fencesasbuh1hhjtubj)}(h h]h }(hjEthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubjP)}(hjSh]h*}(hjSthhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjtubj )}(hsrch]hsrc}(hj`thhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjsubeh}(h]h ]h"]h$]h&]jjuh1jwhjVshhhjhshMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjRshhhjhshMubah}(h]jMsah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhshMhjOshhubj- )}(hhh]h)}(h Copy all fences from src to dst.h]h Copy all fences from src to dst.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjthhubah}(h]h ]h"]h$]h&]uh1j, hjOshhhjhshMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jtjO jtjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjth]h Parameters}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjtubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjtubj )}(hhh](j )}(h<``struct dma_resv *dst`` the destination reservation object h](j )}(h``struct dma_resv *dst``h]j)}(hjth]hstruct dma_resv *dst}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjtubj )}(hhh]h)}(h"the destination reservation objecth]h"the destination reservation object}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthMhjtubah}(h]h ]h"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]uh1j hjthMhjtubj )}(h7``struct dma_resv *src`` the source reservation object h](j )}(h``struct dma_resv *src``h]j)}(hjuh]hstruct dma_resv *src}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjtubj )}(hhh]h)}(hthe source reservation objecth]hthe source reservation object}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhMhjuubah}(h]h ]h"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]uh1j hjuhMhjtubeh}(h]h ]h"]h$]h&]uh1j hjtubh)}(h**Description**h]j^ )}(hj?uh]h Description}(hjAuhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj=uubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjtubh)}(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.}(hjUuhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjtubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_get_fences (C function)c.dma_resv_get_fenceshNtauh1jhj^hhhNhNubj)}(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](j9)}(hinth]hint}(hjuhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjuhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM.ubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuhhhjuhM.ubj)}(hdma_resv_get_fencesh]j )}(hdma_resv_get_fencesh]hdma_resv_get_fences}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubah}(h]h ](j j eh"]h$]h&]jjuh1jhjuhhhjuhM.ubjx)}(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)}(hjh]hstruct}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjumodnameN classnameNjj)}j]j;)}j3jusbc.dma_resv_get_fencesasbuh1hhjuubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubjP)}(hjSh]h*}(hj vhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjuubj )}(hobjh]hobj}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjuubj~)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hj3vhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/vubj)}(h h]h }(hj@vhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/vubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjQvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNvubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjSvmodnameN classnameNjj)}j]juc.dma_resv_get_fencesasbuh1hhj/vubj)}(h h]h }(hjovhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/vubj )}(husageh]husage}(hj}vhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/vubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjuubj~)}(hunsigned int *num_fencesh](j9)}(hunsignedh]hunsigned}(hjvhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjvubj)}(h h]h }(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj9)}(hinth]hint}(hjvhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjvubj)}(h h]h }(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubjP)}(hjSh]h*}(hjvhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjvubj )}(h num_fencesh]h num_fences}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjvubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjuubj~)}(hstruct dma_fence ***fencesh](j)}(hjh]hstruct}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjwmodnameN classnameNjj)}j]juc.dma_resv_get_fencesasbuh1hhjvubj)}(h h]h }(hj0whhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubjP)}(hjSh]h*}(hj>whhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjvubjP)}(hjSh]h*}(hjKwhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjvubjP)}(hjSh]h*}(hjXwhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjvubj )}(hfencesh]hfences}(hjewhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjvubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjuubeh}(h]h ]h"]h$]h&]jjuh1jwhjuhhhjuhM.ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj|uhhhjuhM.ubah}(h]jwuah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjuhM.hjyuhhubj- )}(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}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM.hjwhhubah}(h]h ]h"]h$]h&]uh1j, hjyuhhhjuhM.ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jwjO jwjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjwh]h Parameters}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjwubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM2hjwubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjwh]hstruct dma_resv *obj}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM0hjwubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhM0hjwubah}(h]h ]h"]h$]h&]uh1j hjwubeh}(h]h ]h"]h$]h&]uh1j hjwhM0hjwubj )}(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 xh]henum dma_resv_usage usage}(hj xhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM1hjxubj )}(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"xhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhM1hjxubah}(h]h ]h"]h$]h&]uh1j hjxubeh}(h]h ]h"]h$]h&]uh1j hjxhM1hjwubj )}(h;``unsigned int *num_fences`` the number of fences returned h](j )}(h``unsigned int *num_fences``h]j)}(hjBxh]hunsigned int *num_fences}(hjDxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@xubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM2hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubj)}(h h]h }(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjYubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj^modnameN classnameNjj)}j]j;)}j3j$sbc.dma_resv_set_deadlineasbuh1hhj:ubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj:ubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj6ubj~)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jxc.dma_resv_set_deadlineasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(husageh]husage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj6ubj~)}(hktime_t deadlineh](h)}(hhh]j )}(hktime_th]hktime_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jxc.dma_resv_set_deadlineasbuh1hhjubj)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hdeadlineh]hdeadline}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj6ubeh}(h]h ]h"]h$]h&]jjuh1jwhj~hhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj~hhhjhMubah}(h]j~ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhj~hhubj- )}(hhh]h)}(h.Set a deadline on reservation's objects fencesh]h0Set a deadline on reservation’s objects fences}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjihhubah}(h]h ]h"]h$]h&]uh1j, hj~hhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./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:154: ./drivers/dma-buf/dma-resv.chMhjubj )}(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€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:154: ./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 hjhMhjubj )}(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:154: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(h"the requested deadline (MONOTONIC)h]h"the requested deadline (MONOTONIC)}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hMhj5ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj4hMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjZh]h Description}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjXubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubh)}(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 }(hjphhhNhNubj^ )}(h **deadline**h]hdeadline}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjpubh on all fences filtered by }(hjphhhNhNubj^ )}(h **usage**h]husage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjpubh.}(hjphhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_resv_test_signaled (C function)c.dma_resv_test_signaledhNtauh1jhj^hhhNhNubj)}(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](j9)}(hj#]h]hbool}(hjÁhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjсhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjЁhMubj)}(hdma_resv_test_signaledh]j )}(hdma_resv_test_signaledh]hdma_resv_test_signaled}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj߁ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjЁhMubjx)}(h1(struct dma_resv *obj, enum dma_resv_usage usage)h](j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jsbc.dma_resv_test_signaledasbuh1hhjubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjKhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hobjh]hobj}(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubj)}(h h]h }(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j9c.dma_resv_test_signaledasbuh1hhjmubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubj )}(husageh]husage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhjЁhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjЁhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjЁhMhjhhubj- )}(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:154: ./drivers/dma-buf/dma-resv.chMhjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjЁhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./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:154: ./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 )}(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}(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:154: ./drivers/dma-buf/dma-resv.chMhjYubj )}(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.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthMhjuubah}(h]h ]h"]h$]h&]uh1j hjYubeh}(h]h ]h"]h$]h&]uh1j hjthMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubh)}(hRETURNSh]hRETURNS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubh)}(h(True if all fences signaled, else false.h]h(True if all fences signaled, else false.}(hj΃hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_describe (C function)c.dma_resv_describehNtauh1jhj^hhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj hMubj)}(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&]jjuh1jhjhhhj hMubjx)}(h,(struct dma_resv *obj, struct seq_file *seq)h](j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj)}(h h]h }(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjUubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjZmodnameN classnameNjj)}j]j;)}j3j sbc.dma_resv_describeasbuh1hhj6ubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj6ubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj2ubj~)}(hstruct seq_file *seqh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(hseq_fileh]hseq_file}(hjʄhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDŽubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj̄modnameN classnameNjj)}j]jtc.dma_resv_describeasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hseqh]hseq}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj2ubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhj hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhj hMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj hMhjhhubj- )}(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:154: ./drivers/dma-buf/dma-resv.chMhj*hhubah}(h]h ]h"]h$]h&]uh1j, hjhhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jEjO jEjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjOh]h Parameters}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjMubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjIubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjnh]hstruct dma_resv *obj}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjhubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjhubeh}(h]h ]h"]h$]h&]uh1j hjhMhjeubj )}(hC``struct seq_file *seq`` the seq_file to dump the description into h](j )}(h``struct seq_file *seq``h]j)}(hjh]hstruct seq_file *seq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(h)the seq_file to dump the description intoh]h)the seq_file to dump the description into}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjeubeh}(h]h ]h"]h$]h&]uh1j hjIubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjIubh)}(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:154: ./drivers/dma-buf/dma-resv.chMhjIubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_usage (C enum)c.dma_resv_usagehNtauh1jhj^hhhNhNubj)}(hhh](j)}(hdma_resv_usageh]j)}(henum dma_resv_usageh](j)}(hj)h]henum}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKubj)}(h h]h }(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#hhhj4hKubj)}(hdma_resv_usageh]j )}(hj!h]hdma_resv_usage}(hjGhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubah}(h]h ](j j eh"]h$]h&]jjuh1jhj#hhhj4hKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhj4hKubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj4hKhjhhubj- )}(hhh]h)}(h+how the fences from a dma_resv obj are usedh]h+how the fences from a dma_resv obj are used}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhK5hjfhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhj4hKubeh}(h]h ](jenumeh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjh]h Constants}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhK9hjubj )}(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)}(hjh]hDMA_RESV_USAGE_KERNEL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKEhjubj )}(hhh](h)}(h%For in kernel memory management only.h]h%For in kernel memory management only.}(hjÆhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubh)}(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:157: ./include/linux/dma-resv.hhKBhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKEhjubj )}(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:157: ./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:157: ./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.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKJhj,ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj+hKKhjubj )}(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)}(hj_h]hDMA_RESV_USAGE_READ}(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:157: ./include/linux/dma-resv.hhKQhjYubj )}(hhh](h)}(hImplicit read synchronization.h]hImplicit read synchronization.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKNhjuubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKPhjuubeh}(h]h ]h"]h$]h&]uh1j hjYubeh}(h]h ]h"]h$]h&]uh1j hjthKQhjubj )}(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)}(hjh]hDMA_RESV_USAGE_BOOKKEEP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhK^hjubj )}(hhh](h)}(hNo implicit sync.h]hNo implicit sync.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKThjubh)}(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.}(hjЇhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKVhjubh)}(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.}(hj߇hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKYhjubh)}(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:157: ./include/linux/dma-resv.hhK\hjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK^hjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKahj^hhubh)}(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:157: ./include/linux/dma-resv.hhK6hj^hhubh)}(hAn important fact is that there is the order KERNEL`.h](h)}(h**Parameters**h]j^ )}(hjWh]h Parameters}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjUubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhK|hjQubj )}(hhh]j )}(h;``bool write`` true if we create a new implicit sync write h](j )}(h``bool write``h]j)}(hjvh]h bool write}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKyhjpubj )}(hhh]h)}(h+true if we create a new implicit sync writeh]h+true if we create a new implicit sync write}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKyhjubah}(h]h ]h"]h$]h&]uh1j hjpubeh}(h]h ]h"]h$]h&]uh1j hjhKyhjmubah}(h]h ]h"]h$]h&]uh1j hjQubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhK{hjQubh)}(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 }(hjljhhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hjщh]h dma_buf.resv}(hjӉhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjωubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKzhjljubh.}(hjljhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKzhjQubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv (C struct) c.dma_resvhNtauh1jhj^hhhNhNubj)}(hhh](j)}(hdma_resvh]j)}(hstruct dma_resvh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj&hKubj)}(hdma_resvh]j )}(hjh]hdma_resv}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhj&hKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhj&hKubah}(h]j ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj&hKhjhhubj- )}(hhh]h)}(h0a reservation object manages fences for a bufferh]h0a reservation object manages fences for a buffer}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjXhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhj&hKubeh}(h]h ](jstructeh"]h$]h&]jM jjN jsjO jsjP jQ jR uh1jhhhj^hNhNubjT )}(hX**Definition**:: struct dma_resv { struct ww_mutex lock; struct dma_resv_list *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](j^ )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj{ubh:}(hj{hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjwubj)}(hQstruct dma_resv { struct ww_mutex lock; struct dma_resv_list *fences; };h]hQstruct dma_resv { struct ww_mutex lock; struct dma_resv_list *fences; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjwubh)}(h **Members**h]j^ )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjwubj )}(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)}(hjȊh]hlock}(hjʊhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjƊubah}(h]h ]h"]h$]h&]u h1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjŠubj )}(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:157: ./include/linux/dma-resv.hhKhjފubh)}(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:157: ./include/linux/dma-resv.hhKhjފubeh}(h]h ]h"]h$]h&]uh1j hjŠubeh}(h]h ]h"]h$]h&]uh1j hj݊hKhjubj )}(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:157: ./include/linux/dma-resv.hhKhj ubj )}(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:157: ./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().}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj'ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj&hKhjubeh}(h]h ]h"]h$]h&]uh1j hjwubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubh)}(h**Description**h]j^ )}(hjch]h Description}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjaubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj^hhubh)}(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.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj^hhubh)}(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 }(hjhhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hjh]h dma_buf.resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubh for a more in-depth discussion.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhj^hhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj^hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_iter (C struct)c.dma_resv_iterhNtauh1jhj^hhhNhNubj)}(hhh](j)}(h dma_resv_iterh]j)}(hstruct dma_resv_iterh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjދhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjދhhhjhKubj)}(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&]jjuh1jhjދhhhjhKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjڋhhhjhKubah}(h]jՋah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhKhj׋hhubj- )}(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:157: ./include/linux/dma-resv.hhKhj!hhubah}(h]h ]h"]h$]h&]uh1j, hj׋hhhjhKubeh}(h]h ](jstructeh"]h$]h&]jM jjN j<jO j<jP jQ jR uh1jhhhj^hNhNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjDubh:}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj@ubj)}(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; };}hjasbah}(h]h ]h"]h$]h&]jjuh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj@ubh)}(h **Members**h]j^ )}(hjrh]hMembers}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjpubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj@ubj )}(hhh](j )}(h,``obj`` The dma_resv object we iterate over h](j )}(h``obj``h]j)}(hjh]hobj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(h#The dma_resv object we iterate overh]h#The dma_resv object we iterate over}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h2``usage`` Return fences with this usage or lower. h](j )}(h ``usage``h]j)}(hjʌh]husage}(hǰ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:157: ./include/linux/dma-resv.hhKhjČubj )}(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&]uh1hhjߌhKhjubah}(h]h ]h"]h$]h&]uh1j hjČubeh}(h]h ]h"]h$]h&]uh1j hjߌhKhjubj )}(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:157: ./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 hjhKhjubj )}(h/``fence_usage`` the usage of the current fence h](j )}(h``fence_usage``h]j)}(hj<h]h fence_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:157: ./include/linux/dma-resv.hhKhj6ubj )}(hhh]h)}(hthe usage of the current fenceh]hthe usage of the current fence}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhKhjRubah}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]uh1j hjQhKhjubj )}(h'``index`` index into the shared fences h](j )}(h ``index``h]j)}(hjuh]hindex}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjoubj )}(hhh]h)}(hindex into the shared fencesh]hindex into the shared fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjoubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h>``fences`` the shared fences; private, *MUST* not dereference 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:157: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(h2the shared fences; private, *MUST* not dereferenceh](hthe shared fences; private, }(hjǍhhhNhNubj)}(h*MUST*h]hMUST}(hjύhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjǍubh not dereference}(hjǍhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjÍhKhjčubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjÍhKhjubj )}(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:157: ./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 hjhKhjubj )}(h9``is_restarted`` true if this is the first returned fenceh](j )}(h``is_restarted``h]j)}(hj2h]h is_restarted}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjHubah}(h]h ]h"]h$]h&]uh1j hj,ubeh}(h]h ]h"]h$]h&]uh1j hjGhKhjubeh}(h]h ]h"]h$]h&]uh1j hj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubh)}(h**Description**h]j^ )}(hjuh]h Description}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjsubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj^hhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj^hhubh)}(h IMPORTANTh]h IMPORTANT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj^hhubh)}(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().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj^hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_begin (C function)c.dma_resv_iter_beginhNtauh1jhj^hhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hjюhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj͎hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj͎hhhjߎhKubj)}(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&]jjuh1jhj͎hhhjߎhKubjx)}(hO(struct dma_resv_iter *cursor, struct dma_resv *obj, enum dma_resv_usage usage)h](j~)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(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&] refdomainjreftypej3 reftargetj.modnameN classnameNjj)}j]j;)}j3jsbc.dma_resv_iter_beginasbuh1hhj ubj)}(h h]h }(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjP)}(hjSh]h*}(hjZhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj ubj )}(hcursorh]hcursor}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jHc.dma_resv_iter_beginasbuh1hhj|ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubjP)}(hjSh]h*}(hjʏhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj|ubj )}(hobjh]hobj}(hj׏hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jHc.dma_resv_iter_beginasbuh1hhjubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(husageh]husage}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubeh}(h]h ]h"]h$]h&]jjuh1jwhj͎hhhjߎhKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjɎhhhjߎhKubah}(h]jĎah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjߎhKhjƎhhubj- )}(hhh]h)}(h!initialize a dma_resv_iter objecth]h!initialize a dma_resv_iter object}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjahhubah}(h]h ]h"]h$]h&]uh1j, hjƎhhhjߎhKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j|jO j|jP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubj )}(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)}(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:157: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(h&The dma_resv_iter object to initializeh]h&The dma_resv_iter object to initialize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(hK``struct dma_resv *obj`` The dma_resv object which we want to iterate over h](j )}(h``struct dma_resv *obj``h]j)}(hjސh]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:157: ./include/linux/dma-resv.hhKhjؐubj )}(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 hjؐubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(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:157: ./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.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj-ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj,hKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_iter_end (C function)c.dma_resv_iter_endhNtauh1jhj^hhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hjqhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjmhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmhhhjhKubj)}(hdma_resv_iter_endh]j )}(hdma_resv_iter_endh]hdma_resv_iter_end}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjmhhhjhKubjx)}(h(struct dma_resv_iter *cursor)h]j~)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(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&] refdomainjreftypej3 reftargetjΑmodnameN classnameNjj)}j]j;)}j3jsbc.dma_resv_iter_endasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hcursorh]hcursor}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjmhhhjhKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjihhhjhKubah}(h]jdah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhKhjfhhubj- )}(hhh]h)}(hcleanup a dma_resv_iter objecth]hcleanup a dma_resv_iter object}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj.hhubah}(h]h ]h"]h$]h&]uh1j, hjfhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jIjO jIjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjSh]h Parameters}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjQubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjMubj )}(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)}(hjrh]hstruct dma_resv_iter *cursor}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjlubj )}(hhh]h)}(h3the dma_resv_iter object which should be cleaned uph]h3the dma_resv_iter object which should be cleaned up}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjlubeh}(h]h ]h"]h$]h&]uh1j hjhKhjiubah}(h]h ]h"]h$]h&]uh1j hjMubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjMubh)}(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.}(hjÒhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjMubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_usage (C function)c.dma_resv_iter_usagehNtauh1jhj^hhhNhNubj)}(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 ]jah"]h$]h&]uh1jhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3dma_resv_iter_usagesbc.dma_resv_iter_usageasbuh1hhjhhhjhKubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(hdma_resv_iter_usageh]j )}(hj/h]hdma_resv_iter_usage}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhKubjx)}(h(struct dma_resv_iter *cursor)h]j~)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j-c.dma_resv_iter_usageasbuh1hhj[ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj[ubj )}(hcursorh]hcursor}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjWubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhKubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhKhjhhubj- )}(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:157: ./include/linux/dma-resv.hhKhjݓhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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:157: ./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&]uh1hhj6hKhj7ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj6hKhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hj\h]h Description}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjZubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubh)}(h3Returns the usage of the currently processed fence.h]h3Returns the usage of the currently processed fence.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_resv_iter_is_restarted (C function)c.dma_resv_iter_is_restartedhNtauh1jhj^hhhNhNubj)}(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](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(hdma_resv_iter_is_restartedh]j )}(hdma_resv_iter_is_restartedh]hdma_resv_iter_is_restarted}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhMubjx)}(h(struct dma_resv_iter *cursor)h]j~)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hjݔhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjٔubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjٔ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&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jÔsbc.dma_resv_iter_is_restartedasbuh1hhjٔubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjٔubjP)}(hjSh]h*}(hj)hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjٔubj )}(hcursorh]hcursor}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjٔubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjՔubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(hhh]h)}(h/test if this is the first fence after a restarth]h/test if this is the first fence after a restart}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhj]hhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jxjO jxjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM hj|ubj )}(hhh]j )}(hF``struct dma_resv_iter *cursor`` the cursor with the current position 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:157: ./include/linux/dma-resv.hhM hjubj )}(hhh]h)}(h$the cursor with the current positionh]h$the cursor with the current position}(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 hj|ubh)}(h**Description**h]j^ )}(hjܕh]h Description}(hjޕhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjڕubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM hj|ubh)}(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:157: ./include/linux/dma-resv.hhM hj|ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j*dma_resv_for_each_fence_unlocked (C macro)"c.dma_resv_for_each_fence_unlockedhNtauh1jhj^hhhNhNubj)}(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&]jjuh1jhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubah}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhj8hMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj8hMhjhhubj- )}(hhh]h}(h]h ]h"]h$]h&]uh1j, hjhhhj8hMubeh}(h]h ](jmacroeh"]h$]h&]jM jjN jQjO jQjP jQ jR uh1jhhhj^hNhNubh)}(h4``dma_resv_for_each_fence_unlocked (cursor, fence)``h]j)}(hjWh]h0dma_resv_for_each_fence_unlocked (cursor, fence)}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhj^hhubh)}(hunlocked fence iterator h]h)}(hunlocked fence iteratorh]hunlocked fence iterator}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjmubah}(h]h ]h"]h$]h&]uh1hhjhMhj^hhubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubj )}(hhh](j )}(h*``cursor`` a struct dma_resv_iter pointer h](j )}(h ``cursor``h]j)}(hjh]hcursor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(ha struct dma_resv_iter pointerh]ha struct dma_resv_iter pointer}(hjĖhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(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:157: ./include/linux/dma-resv.hhMhjޖubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(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]j^ )}(hjh]h Description}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubh)}(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 }(hj5hhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hj?h]h dma_resv.lock}(hjAhhhNhNubah}(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:157: ./include/linux/dma-resv.hhMhj5ubh 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.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj\hMhjubh)}(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 }(hjghhhNhNubj^ )}(h **cursor**h]hcursor}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjgubh 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.}(hjghhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_resv_for_each_fence (C macro)c.dma_resv_for_each_fencehNtauh1jhj^hhhNhNubj)}(hhh](j)}(hdma_resv_for_each_fenceh]j)}(hdma_resv_for_each_fenceh]j)}(hdma_resv_for_each_fenceh]j )}(hjh]hdma_resv_for_each_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM&ubah}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhM&ubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhM&hjhhubj- )}(hhh]h}(h]h ]h"]h$]h&]uh1j, hjhhhjhM&ubeh}(h]h ](jmacroeh"]h$]h&]jM jjN jؗjO jؗjP jQ jR uh1jhhhj^hNhNubh)}(h7``dma_resv_for_each_fence (cursor, obj, usage, fence)``h]j)}(hjޗh]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:157: ./include/linux/dma-resv.hhM(hj^hhubh)}(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:157: ./include/linux/dma-resv.hhM&hjubah}(h]h ]h"]h$]h&]uh1hhjhM&hj^hhubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM*hj ubj )}(hhh](j )}(h*``cursor`` a struct dma_resv_iter pointer h](j )}(h ``cursor``h]j)}(hj2h]hcursor}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM'hj,ubj )}(hhh]h)}(ha struct dma_resv_iter pointerh]ha struct dma_resv_iter pointer}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhM'hjHubah}(h]h ]h"]h$]h&]uh1j hj,ubeh}(h]h ]h"]h$]h&]uh1j hjGhM'hj)ubj )}(h"``obj`` a dma_resv object pointer h](j )}(h``obj``h]j)}(hjkh]hobj}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM(hjeubj )}(hhh]h)}(ha dma_resv object pointerh]ha dma_resv object pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM(hjubah}(h]h ]h"]h$]h&]uh1j hjeubeh}(h]h ]h"]h$]h&]uh1j hjhM(hj)ubj )}(h*``usage`` controls which fences to return h](j )}(h ``usage``h]j)}(hjh]husage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM)hjubj )}(hhh]h)}(hcontrols which fences to returnh]hcontrols which fences to return}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM)hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM)hj)ubj )}(h``fence`` the current fence h](j )}(h ``fence``h]j)}(hjݘh]hfence}(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:157: ./include/linux/dma-resv.hhM*hjטubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM*hjubah}(h]h ]h"]h$]h&]uh1j hjטubeh}(h]h ]h"]h$]h&]uh1j hjhM*hj)ubeh}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM,hj ubh)}(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)}(hj8h]h dma_resv.lock}(hj:hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM+hj.ubh. }(hj.hhhNhNubj^ )}(h**all_fences**h]h all_fences}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j] 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&]uh1hhjUhM+hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_lock (C function)c.dma_resv_lockhNtauh1jhj^hhhNhNubj)}(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](j9)}(hinth]hint}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMAubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMAubj)}(h dma_resv_lockh]j )}(h dma_resv_lockh]h dma_resv_lock}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhMAubjx)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjϙhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj˙ubj)}(h h]h }(hjܙhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj˙ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jsbc.dma_resv_lockasbuh1hhj˙ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj˙ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj˙ubj )}(hobjh]hobj}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj˙ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjǙubj~)}(hstruct ww_acquire_ctx *ctxh](j)}(hjh]hstruct}(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubj)}(h h]h }(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj\ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjamodnameN classnameNjj)}j]j c.dma_resv_lockasbuh1hhj=ubj)}(h h]h }(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj=ubj )}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjǙubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMAubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMAubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMAhjhhubj- )}(hhh]h)}(hlock the reservation objecth]hlock the reservation object}(hjšhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMAhjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMAubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jښjO jښjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMEhjޚubj )}(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:157: ./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}(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:157: ./include/linux/dma-resv.hhMChj6ubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhMChjRubah}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]uh1j hjQhMChjubeh}(h]h ]h"]h$]h&]uh1j hjޚubh)}(h**Description**h]j^ )}(hjwh]h Description}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjuubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMEhjޚubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMDhjޚubh)}(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 }(hjhhhNhNubj^ )}(h**ctx**h]hctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMIhjޚubh)}(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 }(hjhhhNhNubj^ )}(h**ctx**h]hctx}(hjśhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubh: must be unlocked and then dma_resv_lock_slow() called on }(hjhhhNhNubj^ )}(h**obj**h]hobj}(hjכhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMNhjޚubh)}(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:157: ./include/linux/dma-resv.hhMQhjޚubh)}(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:157: ./include/linux/dma-resv.hhMShjޚubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(dma_resv_lock_interruptible (C function)c.dma_resv_lock_interruptiblehNtauh1jhj^hhhNhNubj)}(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](j9)}(hinth]hint}(hj.hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj*hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM]ubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*hhhj<hM]ubj)}(hdma_resv_lock_interruptibleh]j )}(hdma_resv_lock_interruptibleh]hdma_resv_lock_interruptible}(hjOhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjKubah}(h]h ](j j eh"]h$]h&]jjuh1jhj*hhhj<hM]ubjx)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jQsbc.dma_resv_lock_interruptibleasbuh1hhjgubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjgubj )}(hobjh]hobj}(hjĜhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjcubj~)}(hstruct ww_acquire_ctx *ctxh](j)}(hjh]hstruct}(hjݜhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjٜubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjٜubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_resv_lock_interruptibleasbuh1hhjٜubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjٜubjP)}(hjSh]h*}(hj'hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjٜubj )}(hctxh]hctx}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjٜubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjcubeh}(h]h ]h"]h$]h&]jjuh1jwhj*hhhj<hM]ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj&hhhj<hM]ubah}(h]j!ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj<hM]hj#hhubj- )}(hhh]h)}(hlock the reservation objecth]hlock the reservation object}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM]hj[hhubah}(h]h ]h"]h$]h&]uh1j, hj#hhhj<hM]ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jvjO jvjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj~ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMahjzubj )}(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:157: ./include/linux/dma-resv.hhM^hjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM^hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM^hjubj )}(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}(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:157: ./include/linux/dma-resv.hhM_hjҝubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM_hjubah}(h]h ]h"]h$]h&]uh1j hjҝubeh}(h]h ]h"]h$]h&]uh1j hjhM_hjubeh}(h]h ]h"]h$]h&]uh1j hjzubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMahjzubh)}(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:157: ./include/linux/dma-resv.hhM`hjzubh)}(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 }(hj8hhhNhNubj^ )}(h**ctx**h]hctx}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj8ubh.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMehjzubh)}(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 }(hjYhhhNhNubj^ )}(h**ctx**h]hctx}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjYubhH must be unlocked and then dma_resv_lock_slow_interruptible() called on }(hjYhhhNhNubj^ )}(h**obj**h]hobj}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjYubh.}(hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMjhjzubh)}(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:157: ./include/linux/dma-resv.hhMnhjzubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_lock_slow (C function)c.dma_resv_lock_slowhNtauh1jhj^hhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMxubj)}(h h]h }(hjʞhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjɞhMxubj)}(hdma_resv_lock_slowh]j )}(hdma_resv_lock_slowh]hdma_resv_lock_slow}(hjܞhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj؞ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjɞhMxubjx)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jޞsbc.dma_resv_lock_slowasbuh1hhjubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjDhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hobjh]hobj}(hjQhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hstruct ww_acquire_ctx *ctxh](j)}(hjh]hstruct}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j2c.dma_resv_lock_slowasbuh1hhjfubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjfubj )}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjfubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhjɞhMxubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjɞhMxubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjɞhMxhjhhubj- )}(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:157: ./include/linux/dma-resv.hhMxhjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjɞhMxubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hj h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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:157: ./include/linux/dma-resv.hhMyhj&ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMyhjBubah}(h]h ]h"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]uh1j hjAhMyhj#ubj )}(h3``struct ww_acquire_ctx *ctx`` the locking context h](j )}(h``struct ww_acquire_ctx *ctx``h]j)}(hjeh]hstruct ww_acquire_ctx *ctx}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMzhj_ubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhMzhj{ubah}(h]h ]h"]h$]h&]uh1j hj_ubeh}(h]h ]h"]h$]h&]uh1j hjzhMzhj#ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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.}(hjŠhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j-dma_resv_lock_slow_interruptible (C function)"c.dma_resv_lock_slow_interruptiblehNtauh1jhj^hhhNhNubj)}(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](j9)}(hinth]hint}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(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&]jjuh1jhjhhhjhMubjx)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubj)}(h h]h }(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjOhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjLubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjQmodnameN classnameNjj)}j]j;)}j3jsb"c.dma_resv_lock_slow_interruptibleasbuh1hhj-ubj)}(h h]h }(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubjP)}(hjSh]h*}(hj}hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj-ubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj)ubj~)}(hstruct ww_acquire_ctx *ctxh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjámodnameN classnameNjj)}j]jk"c.dma_resv_lock_slow_interruptibleasbuh1hhjubj)}(h h]h }(hjߡhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj)ubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(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:157: ./include/linux/dma-resv.hhMhj!hhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j<jO j<jP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjFh]h Parameters}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjDubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhj@ubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjeh]hstruct dma_resv *obj}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhj_ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(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 ww_acquire_ctx *ctx`` the locking context h](j )}(h``struct ww_acquire_ctx *ctx``h]j)}(hjh]hstruct ww_acquire_ctx *ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(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]j^ )}(hj٢h]h Description}(hjۢhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjעubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhj@ubh)}(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:157: ./include/linux/dma-resv.hhMhj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_trylock (C function)c.dma_resv_trylockhNtauh1jhj^hhhNhNubj)}(hhh](j)}(h,bool dma_resv_trylock (struct dma_resv *obj)h]j)}(h+bool dma_resv_trylock(struct dma_resv *obj)h](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj+hMubj)}(hdma_resv_trylockh]j )}(hdma_resv_trylockh]hdma_resv_trylock}(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhj+hMubjx)}(h(struct dma_resv *obj)h]j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVubj)}(h h]h }(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjzmodnameN classnameNjj)}j]j;)}j3j@sbc.dma_resv_trylockasbuh1hhjVubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjVubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjRubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhj+hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhj+hMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj+hMhjhhubj- )}(hhh]h)}(htrylock the reservation objecth]htrylock the reservation object}(hjݣhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjڣhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhj+hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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:157: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMhj4ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj3hMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjYh]h Description}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjWubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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:157: ./include/linux/dma-resv.hhMhjubh)}(h7Returns true if the lock was acquired, false otherwise.h]h7Returns true if the lock was acquired, false otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_is_locked (C function)c.dma_resv_is_lockedhNtauh1jhj^hhhNhNubj)}(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](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubj)}(h h]h }(hjʤhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjɤhMubj)}(hdma_resv_is_lockedh]j )}(hdma_resv_is_lockedh]hdma_resv_is_locked}(hjܤhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjؤubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjɤhMubjx)}(h(struct dma_resv *obj)h]j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jޤsbc.dma_resv_is_lockedasbuh1hhjubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjDhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hobjh]hobj}(hjQhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjɤhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjɤhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjɤhMhjhhubj- )}(hhh]h)}(h is the reservation object lockedh]h is the reservation object locked}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjxhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjɤhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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:157: ./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]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubh)}(h7Returns true if the mutex is locked, false if unlocked.h]h7Returns true if the mutex is locked, false if unlocked.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_resv_locking_ctx (C function)c.dma_resv_locking_ctxhNtauh1jhj^hhhNhNubj)}(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)}(hjh]hstruct}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubj)}(h h]h }(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8hhhjIhMubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjXubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj]modnameN classnameNjj)}j]j;)}j3dma_resv_locking_ctxsbc.dma_resv_locking_ctxasbuh1hhj8hhhjIhMubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8hhhjIhMubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj8hhhjIhMubj)}(hdma_resv_locking_ctxh]j )}(hjyh]hdma_resv_locking_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhj8hhhjIhMubjx)}(h(struct dma_resv *obj)h]j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjæhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjԦhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjѦubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj֦modnameN classnameNjj)}j]jwc.dma_resv_locking_ctxasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hobjh]hobj}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhj8hhhjIhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj4hhhjIhMubah}(h]j/ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjIhMhj1hhubj- )}(hhh]h)}(h+returns the context used to lock the objecth]h+returns the context used to lock the object}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhj4hhubah}(h]h ]h"]h$]h&]uh1j, hj1hhhjIhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jOjO jOjP jQ jR uh1jhhhj^hNhNubjT )}(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]j^ )}(hjYh]h Parameters}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjWubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjSubj )}(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:157: ./include/linux/dma-resv.hhMhjrubj )}(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 hjhMhjoubah}(h]h ]h"]h$]h&]uh1j hjSubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjSubh)}(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.}(hjɧhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjSubh)}(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.}(hjاhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjSubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_unlock (C function)c.dma_resv_unlockhNtauh1jhj^hhhNhNubj)}(hhh](j)}(h+void dma_resv_unlock (struct dma_resv *obj)h]j)}(h*void dma_resv_unlock(struct dma_resv *obj)h](j9)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(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&]jjuh1jhjhhhjhMubjx)}(h(struct dma_resv *obj)h]j~)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubj)}(h h]h }(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjdmodnameN classnameNjj)}j]j;)}j3j*sbc.dma_resv_unlockasbuh1hhj@ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj@ubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj<ubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(hhh]h)}(hunlock the reservation objecth]hunlock the reservation object}(hjǨhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjĨhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jߨjO jߨjP jQ jR uh1jhhhj^hNhNubjT )}(h**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Unlocks the reservation object following exclusive access.h](h)}(h**Parameters**h]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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:157: ./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]j^ )}(hjCh]h Description}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjAubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubh)}(h:Unlocks the reservation object following exclusive access.h]h:Unlocks the reservation object following exclusive access.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj^hhhNhNubeh}(h]reservation-objectsah ]h"]reservation objectsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h DMA Fencesh]h DMA Fences}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhhhhhKubh)}(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 }(hjhhhNhNubh)}(h&:c:type:`struct dma_fence `h]j)}(hjh]hstruct 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:163: ./drivers/dma-buf/dma-fence.chK'hjubh, are the kernel internal synchronization primitive for DMA operations like GPU rendering, video encoding/decoding, or displaying buffers on a screen.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK'hjwhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:163: ./drivers/dma-buf/dma-fence.chK+hjwhhubh)}(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:}(hjɩhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:163: ./drivers/dma-buf/dma-fence.chK0hjwhhubh)}(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 }(hjߩhhhNhNubh)}(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:163: ./drivers/dma-buf/dma-fence.chK3hjߩubh, 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.}(hjߩhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK3hj۩ubah}(h]h ]h"]h$]h&]uh1hhjةubh)}(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:163: ./drivers/dma-buf/dma-fence.chK8hjubh. Compared to }(hjhhhNhNubh)}(h:c:type:`sync_file`h]j)}(hjIh]h sync_file}(hjKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj sync_fileuh1hhjBhK8hjubh, a }(hjhhhNhNubh)}(h:c:type:`drm_syncobj`h]j)}(hjlh]h drm_syncobj}(hjnhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj drm_syncobjuh1hhjBhK8hjubh+ allows the underlying fence to be updated.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjBhK8hjubah}(h]h ]h"]h$]h&]uh1hhjةubh)}(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 }(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 refexplicitrefwarnjjjdma_bufuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:163: ./drivers/dma-buf/dma-fence.chK`h]j)}(hj˪h]hstruct dma_resv}(hjͪhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjɪubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hhjĪhK`h]j)}(hjh]h dma_buf.resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hhjĪhKj?uh1hhjhK3hjwhhubh)}(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 }(hj2hhhNhNubh)}(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:169: ./drivers/dma-buf/dma-fence.chKEhj2ubhI provide a cross driver contract, all drivers must follow the same rules:}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjYhKEhj!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.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chKHhjgubah}(h]h ]h"]h$]h&]uh1hhjdubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chKQhjubah}(h]h ]h"]h$]h&]uh1hhjdubh)}(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().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chKWhjubah}(h]h ]h"]h$]h&]uh1hhjdubh)}(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 }(hjhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjh]hdma_resv}(hj«hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chK\hjubhz lock. Note that this also pulls in the entire established locking hierarchy around dma_resv_lock() and dma_resv_unlock().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjݫhK\hjubah}(h]h ]h"]h$]h&]uh1hhjdubh)}(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:169: ./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&]uh1hhjdubh)}(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)}(hj8h]h mmu_notifier}(hj:hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chKehj.ubh respectively }(hj.hhhNhNubh)}(h:c:type:`mmu_interval_notifier`h]j)}(hj\h]hmmu_interval_notifier}(hj^hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmmu_interval_notifieruh1hhjUhKehj.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&]uh1hhjUhKehj*ubah}(h]h ]h"]h$]h&]uh1hhjdubeh}(h]h ]h"]h$]h&]j>jSuh1hhjyhKHhj!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 }(hjhhhNhNubh)}(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_notifieruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chKjhjubh and }(hjhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hjh]hshrinker}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hhjhKjhjubhO callbacks at the same time as having to track asynchronous compute work using }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjެubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhjhKjhjubhV. No driver outside of drivers/gpu should ever call dma_fence_wait() in such contexts.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKjhj!hhubeh}(h]dma-fence-cross-driver-contractah ]h"]dma fence cross-driver contractah$]h&]uh1hhjwhhhhhKubh)}(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:175: ./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&]uh1hhjGhKhjhhubh)}(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.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhjUubah}(h]h ]h"]h$]h&]uh1hhjRubh)}(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 }(hjrhhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hj|h]h mmu_notifier}(hj~hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhjrubh, respectively }(hjrhhhNhNubh)}(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_notifieruh1hhjhKhjrubh, and }(hjrhhhNhNubh)}(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 refexplicitrefwarnjjjshrinkeruh1hhjhKhjrubhX. 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.}(hjrhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjnubah}(h]h ]h"]h$]h&]uh1hhjRubh)}(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:175: ./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)}(hjEh]h mmu_notifier}(hjGhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hhjhKhjubh and }(hjhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hjhh]hshrinker}(hjjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hhjhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1hhjRubeh}(h]h ]h"]h$]h&]j>jSuh1hhjghKhjhhubh)}(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 }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hj hhhNhNubah}(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:175: ./drivers/dma-buf/dma-fence.chKhjubh while holding a lock:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj®hKhjhhubj)}(h&lock(A); dma_fence_wait(B); unlock(A);h]h&lock(A); dma_fence_wait(B); unlock(A);}hjͮsbah}(h]h ]h"]h$]h&]jjuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./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:175: ./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:175: ./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:175: ./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:175: ./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:175: ./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 }(hjQhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hj[h]h dma_fence}(hj]hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhjQubhX2 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.}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjxhKhjMubah}(h]h ]h"]h$]h&]uh1hhjJubh)}(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)}(hjh]hstruct dma_resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chMhjubh 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.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjJubh)}(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 }(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:175: ./drivers/dma-buf/dma-fence.chMhjůubh. 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.}(hjůhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjJubh)}(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:175: ./drivers/dma-buf/dma-fence.chM hjubah}(h]h ]h"]h$]h&]uh1hhjJubh)}(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:175: ./drivers/dma-buf/dma-fence.chMhjubah}(h]h ]h"]h$]h&]uh1hhjJubeh}(h]h ]h"]h$]h&]j>jSuh1hhjxhKhjhhubeh}(h] dma-fence-signalling-annotationsah ]h"] dma fence signalling annotationsah$]h&]uh1hhjwhhhhhKubh)}(hhh](h)}(hDMA Fence Deadline Hintsh]hDMA Fence Deadline Hints}(hj@hhhNhNubah}(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:}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:181: ./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.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:181: ./drivers/dma-buf/dma-fence.chMhj`ubah}(h]h ]h"]h$]h&]uh1hhj]ubh)}(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 }(hj}hhhNhNubj)}(h *increase*h]hincrease}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubh 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.}(hj}hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:181: ./drivers/dma-buf/dma-fence.chMhjyubah}(h]h ]h"]h$]h&]uh1hhj]ubeh}(h]h ]h"]h$]h&]j>jSuh1hhjrhMhj=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 }(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:181: ./drivers/dma-buf/dma-fence.chMhjubh via }(hjhhhNhNubh)}(h :c:type:`dma_fence_set_deadline`h]j)}(hjذh]hdma_fence_set_deadline}(hjڰhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjְubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_fence_set_deadlineuh1hhjѰhMhjubh1 (or indirectly via userspace facing ioctls like }(hjhhhNhNubh)}(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_deadlineuh1hhjѰhMhjubh). The deadline hint provides a way for the waiting driver, or userspace, to convey an appropriate sense of urgency to the signaling driver.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjѰhMhj=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:181: ./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 }(hj1hhhNhNubh)}(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&]uh1jhj9ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:181: ./drivers/dma-buf/dma-fence.chMhj1ubh.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjXhMhj=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.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:181: ./drivers/dma-buf/dma-fence.chMhj=hhubeh}(h]dma-fence-deadline-hintsah ]h"]dma fence deadline hintsah$]h&]uh1hhjwhhhhhKubh)}(hhh](h)}(hDMA Fences Functions Referenceh]hDMA Fences Functions Reference}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_get_stub (C function)c.dma_fence_get_stubhNtauh1jhjzhhhNhNubj)}(hhh](j)}(h,struct dma_fence * dma_fence_get_stub (void)h]j)}(h*struct dma_fence *dma_fence_get_stub(void)h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjñhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjűmodnameN classnameNjj)}j]j;)}j3dma_fence_get_stubsbc.dma_fence_get_stubasbuh1hhjhhhjhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjhhhjhKubj)}(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&]jjuh1jhjhhhjhKubjx)}(h(void)h]j~)}(hvoidh]j9)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubah}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhKubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhKhjhhubj- )}(hhh]h)}(hreturn a signaled fenceh]hreturn a signaled fence}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjEhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j`jO j`jP jQ jR uh1jhhhjzhNhNubjT )}(h**Parameters** ``void`` no arguments **Description** Return a stub fence which is already signaled. The fence's timestamp corresponds to the initialisation time of the linux kernel.h](h)}(h**Parameters**h]j^ )}(hjjh]h Parameters}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjhubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjdubj )}(hhh]j )}(h``void`` no arguments h](j )}(h``void``h]j)}(hjh]hvoid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]h)}(h no argumentsh]h no arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubah}(h]h ]h"]h$]h&]uh1j hjdubh)}(h**Description**h]j^ )}(hjIJh]h Description}(hjƲhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj²ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjdubh)}(hReturn a stub fence which is already signaled. The fence's timestamp corresponds to the initialisation time of the linux kernel.h]hReturn a stub fence which is already signaled. The fence’s timestamp corresponds to the initialisation time of the linux kernel.}(hjڲhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjdubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j,dma_fence_allocate_private_stub (C function)!c.dma_fence_allocate_private_stubhNtauh1jhjzhhhNhNubj)}(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)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj*modnameN classnameNjj)}j]j;)}j3dma_fence_allocate_private_stubsb!c.dma_fence_allocate_private_stubasbuh1hhjhhhjhKubj)}(h h]h }(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubjP)}(hjSh]h*}(hjWhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjhhhjhKubj)}(hdma_fence_allocate_private_stubh]j )}(hjFh]hdma_fence_allocate_private_stub}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhKubjx)}(h(ktime_t timestamp)h]j~)}(hktime_t timestamph](h)}(hhh]j )}(hktime_th]hktime_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jD!c.dma_fence_allocate_private_stubasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(h timestamph]h timestamp}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj{ubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhKubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhKhjhhubj- )}(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:187: ./drivers/dma-buf/dma-fence.chKhjٳhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./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:187: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]h)}(h%timestamp when the fence was signaledh]h%timestamp when the fence was signaled}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hKhj3ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj2hKhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjXh]h Description}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjVubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubh)}(h1Return a newly allocated and signaled stub fence.h]h1Return a newly allocated and signaled stub fence.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_fence_context_alloc (C function)c.dma_fence_context_allochNtauh1jhjzhhhNhNubj)}(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}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3dma_fence_context_allocsbc.dma_fence_context_allocasbuh1hhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKubj)}(h h]h }(hj´hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(hdma_fence_context_alloch]j )}(hjh]hdma_fence_context_alloc}(hjԴhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjдubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhKubjx)}(h(unsigned num)h]j~)}(h unsigned numh](j9)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hnumh]hnum}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhKubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhKhjhhubj- )}(hhh]h)}(h#allocate an array of fence contextsh]h#allocate an array of fence contexts}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhj2hhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jMjO jMjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjWh]h Parameters}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjUubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjQubj )}(hhh]j )}(h0``unsigned num`` amount of contexts to allocate h](j )}(h``unsigned num``h]j)}(hjvh]h unsigned num}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjpubj )}(hhh]h)}(hamount of contexts to allocateh]hamount of contexts to allocate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjpubeh}(h]h ]h"]h$]h&]uh1j hjhKhjmubah}(h]h ]h"]h$]h&]uh1j hjQubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjQubh)}(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 }(hjǵhhhNhNubh)}(h':c:type:`dma_fence.context `h]j)}(hjѵh]hdma_fence.context}(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:187: ./drivers/dma-buf/dma-fence.chKhjǵubh? to a unique number by passing the context to dma_fence_init().}(hjǵhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjQubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_fence_begin_signalling (C function)c.dma_fence_begin_signallinghNtauh1jhjzhhhNhNubj)}(hhh](j)}(h&bool dma_fence_begin_signalling (void)h]j)}(h%bool dma_fence_begin_signalling(void)h](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj&hMubj)}(hdma_fence_begin_signallingh]j )}(hdma_fence_begin_signallingh]hdma_fence_begin_signalling}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhj&hMubjx)}(h(void)h]j~)}(hvoidh]j9)}(hvoidh]hvoid}(hjUhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjQubah}(h]h ]h"]h$]h&]noemphjjuh1j}hjMubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhj&hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhj&hMubah}(h]j ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj&hMhjhhubj- )}(hhh]h)}(h-begin a critical DMA fence signalling sectionh]h-begin a critical DMA fence signalling section}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj|hhubah}(h]h ]h"]h$]h&]uh1j, hjhhhj&hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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().h](h)}(h**Parameters**h]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM#hjubj )}(hhh]j )}(h``void`` no arguments h](j )}(h``void``h]j)}(hjh]hvoid}(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:187: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]h)}(h no argumentsh]h no arguments}(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]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubh)}(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:187: ./drivers/dma-buf/dma-fence.chM hjubh by calling dma_fence_signal().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj8hM hjubh)}(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().}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM#hjubh)}(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().}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM'hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%dma_fence_end_signalling (C function)c.dma_fence_end_signallinghNtauh1jhjzhhhNhNubj)}(hhh](j)}(h+void dma_fence_end_signalling (bool cookie)h]j)}(h*void dma_fence_end_signalling(bool cookie)h](j9)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj}hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM>ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}hhhjhM>ubj)}(hdma_fence_end_signallingh]j )}(hdma_fence_end_signallingh]hdma_fence_end_signalling}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhj}hhhjhM>ubjx)}(h (bool cookie)h]j~)}(h bool cookieh](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hj˷hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hcookieh]hcookie}(hjٷhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhj}hhhjhM>ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjyhhhjhM>ubah}(h]jtah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhM>hjvhhubj- )}(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:187: ./drivers/dma-buf/dma-fence.chM>hjhhubah}(h]h ]h"]h$]h&]uh1j, hjvhhhjhM>ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hj%h]h Parameters}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj#ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMBhjubj )}(hhh]j )}(h@``bool cookie`` opaque cookie from dma_fence_begin_signalling() h](j )}(h``bool cookie``h]j)}(hjDh]h bool cookie}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM?hj>ubj )}(hhh]h)}(h/opaque cookie from dma_fence_begin_signalling()h]h/opaque cookie from dma_fence_begin_signalling()}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhM?hjZubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hjYhM?hj;ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj}ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMAhjubh)}(hLCloses a critical section annotation opened by dma_fence_begin_signalling().h]hLCloses a critical section annotation opened by dma_fence_begin_signalling().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM@hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j.dma_fence_signal_timestamp_locked (C function)#c.dma_fence_signal_timestamp_lockedhNtauh1jhjzhhhNhNubj)}(hhh](j)}(hSvoid dma_fence_signal_timestamp_locked (struct dma_fence *fence, ktime_t timestamp)h]j)}(hRvoid dma_fence_signal_timestamp_locked(struct dma_fence *fence, ktime_t timestamp)h](j9)}(hvoidh]hvoid}(hjĸhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM\ubj)}(h h]h }(hjӸhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjҸhM\ubj)}(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&]jjuh1jhjhhhjҸhM\ubjx)}(h,(struct dma_fence *fence, ktime_t timestamp)h](j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj!modnameN classnameNjj)}j]j;)}j3jsb#c.dma_fence_signal_timestamp_lockedasbuh1hhjubj)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjMhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hktime_t timestamph](h)}(hhh]j )}(hktime_th]hktime_t}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjxmodnameN classnameNjj)}j]j;#c.dma_fence_signal_timestamp_lockedasbuh1hhjoubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj )}(h timestamph]h timestamp}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjoubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhjҸhM\ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjҸhM\ubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjҸhM\hjhhubj- )}(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:187: ./drivers/dma-buf/dma-fence.chM\hjɹhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjҸhM\ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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.h](h)}(h**Parameters**h]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM`hjubj )}(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}(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:187: ./drivers/dma-buf/dma-fence.chM]hjubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(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]hjubj )}(hU``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain h](j )}(h``ktime_t timestamp``h]j)}(hjFh]hktime_t timestamp}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM^hj@ubj )}(hhh]h)}(h>fence signal timestamp in kernel's CLOCK_MONOTONIC time domainh]h@fence signal timestamp in kernel’s CLOCK_MONOTONIC time domain}(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^hjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM`hjubh)}(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:187: ./drivers/dma-buf/dma-fence.chM_hjubh)}(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 }(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:187: ./drivers/dma-buf/dma-fence.chMfhjubh held.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjͺhMfhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_fence_signal_timestamp (C function)c.dma_fence_signal_timestamphNtauh1jhjzhhhNhNubj)}(hhh](j)}(hLvoid dma_fence_signal_timestamp (struct dma_fence *fence, ktime_t timestamp)h]j)}(hKvoid dma_fence_signal_timestamp(struct dma_fence *fence, ktime_t timestamp)h](j9)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(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&]jjuh1jhjhhhjhMubjx)}(h,(struct dma_fence *fence, ktime_t timestamp)h](j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjPubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjUmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_signal_timestampasbuh1hhj1ubj)}(h h]h }(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj1ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj-ubj~)}(hktime_t timestamph](h)}(hhh]j )}(hktime_th]hktime_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]joc.dma_fence_signal_timestampasbuh1hhjubj)}(h h]h }(hjȻhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(h timestamph]h timestamp}(hjֻhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj-ubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(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:187: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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.h](h)}(h**Parameters**h]j^ )}(hj"h]h Parameters}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./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)}(hjAh]hstruct dma_fence *fence}(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:187: ./drivers/dma-buf/dma-fence.chMhj;ubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjWubah}(h]h ]h"]h$]h&]uh1j hj;ubeh}(h]h ]h"]h$]h&]uh1j hjVhMhj8ubj )}(hU``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain h](j )}(h``ktime_t timestamp``h]j)}(hjzh]hktime_t timestamp}(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:187: ./drivers/dma-buf/dma-fence.chMhjtubj )}(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&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]uh1j hjhMhj8ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./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.}(hj˼hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_fence_signal_locked (C function)c.dma_fence_signal_lockedhNtauh1jhjzhhhNhNubj)}(hhh](j)}(h6void dma_fence_signal_locked (struct dma_fence *fence)h]j)}(h5void dma_fence_signal_locked(struct dma_fence *fence)h](j9)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(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&]jjuh1jhjhhhjhMubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjWmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_signal_lockedasbuh1hhj3ubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj3ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj/ubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(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:187: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jҽjO jҽjP jQ jR uh1jhhhjzhNhNubjT )}(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. Unlike dma_fence_signal(), this function must be called with :c:type:`dma_fence.lock ` held.h](h)}(h**Parameters**h]j^ )}(hjܽh]h Parameters}(hj޽hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjڽubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjֽubj )}(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:187: ./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 hjֽubh)}(h**Description**h]j^ )}(hj6h]h Description}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj4ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjֽubh)}(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.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjֽubh)}(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 }(hj[hhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjeh]hdma_fence.lock}(hjghhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj[ubh held.}(hj[hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjֽubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j.dma_fence_check_and_signal_locked (C function)#c.dma_fence_check_and_signal_lockedhNtauh1jhjzhhhNhNubj)}(hhh](j)}(h@bool dma_fence_check_and_signal_locked (struct dma_fence *fence)h]j)}(h?bool dma_fence_check_and_signal_locked(struct dma_fence *fence)h](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(h!dma_fence_check_and_signal_lockedh]j )}(h!dma_fence_check_and_signal_lockedh]h!dma_fence_check_and_signal_locked}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjɾubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhMubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj modnameN classnameNjj)}j]j;)}j3jϾsb#c.dma_fence_check_and_signal_lockedasbuh1hhjubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hj5hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(hhh]h)}(h)signal the fence if it's not yet signaledh]h+signal the fence if it’s not yet signaled}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjihhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(hXs**Parameters** ``struct dma_fence *fence`` the fence to check and signal **Description** Checks whether a fence was signaled and signals it if it was not yet signaled. Unlike dma_fence_check_and_signal(), this function must be called with :c:type:`struct dma_fence `.lock being held. **Return** true if fence has been signaled already, false otherwise.h](h)}(h**Parameters**h]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h:``struct dma_fence *fence`` the fence to check and 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:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to check and signalh]hthe fence to check and signal}(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]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hNChecks whether a fence was signaled and signals it if it was not yet signaled.h]hNChecks whether a fence was signaled and signals it if it was not yet signaled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(h~Unlike dma_fence_check_and_signal(), this function must be called with :c:type:`struct dma_fence `.lock being held.h](hGUnlike dma_fence_check_and_signal(), this function must be called with }(hj hhhNhNubh)}(h&:c:type:`struct dma_fence `h]j)}(hjh]hstruct 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:187: ./drivers/dma-buf/dma-fence.chMhj ubh.lock being held.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj4hMhjubh)}(h **Return**h]j^ )}(hjAh]hReturn}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj?ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(h9true if fence has been signaled already, false otherwise.h]h9true if fence has been signaled already, false otherwise.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_fence_check_and_signal (C function)c.dma_fence_check_and_signalhNtauh1jhjzhhhNhNubj)}(hhh](j)}(h9bool dma_fence_check_and_signal (struct dma_fence *fence)h]j)}(h8bool dma_fence_check_and_signal(struct dma_fence *fence)h](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(hdma_fence_check_and_signalh]j )}(hdma_fence_check_and_signalh]hdma_fence_check_and_signal}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhMubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_check_and_signalasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj~hhhjhMubah}(h]jyah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhj{hhubj- )}(hhh]h)}(h)signal the fence if it's not yet signaledh]h+signal the fence if it’s not yet signaled}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjBhhubah}(h]h ]h"]h$]h&]uh1j, hj{hhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j]jO j]jP jQ jR uh1jhhhjzhNhNubjT )}(hX**Parameters** ``struct dma_fence *fence`` the fence to check and signal **Description** Checks whether a fence was signaled and signals it if it was not yet signaled. All this is done in a race-free manner. **Return** true if fence has been signaled already, false otherwise.h](h)}(h**Parameters**h]j^ )}(hjgh]h Parameters}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjeubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjaubj )}(hhh]j )}(h:``struct dma_fence *fence`` the fence to check and 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:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to check and signalh]hthe fence to check and signal}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhj}ubah}(h]h ]h"]h$]h&]uh1j hjaubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjaubh)}(hvChecks whether a fence was signaled and signals it if it was not yet signaled. All this is done in a race-free manner.h]hvChecks whether a fence was signaled and signals it if it was not yet signaled. All this is done in a race-free manner.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjaubh)}(h **Return**h]j^ )}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjaubh)}(h9true if fence has been signaled already, false otherwise.h]h9true if fence has been signaled already, false otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjaubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_signal (C function)c.dma_fence_signalhNtauh1jhjzhhhNhNubj)}(hhh](j)}(h/void dma_fence_signal (struct dma_fence *fence)h]j)}(h.void dma_fence_signal(struct dma_fence *fence)h](j9)}(hvoidh]hvoid}(hj-hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj)hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)hhhj;hMubj)}(hdma_fence_signalh]j )}(hdma_fence_signalh]hdma_fence_signal}(hjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubah}(h]h ](j j eh"]h$]h&]jjuh1jhj)hhhj;hMubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jPsbc.dma_fence_signalasbuh1hhjfubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjfubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjfubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjbubah}(h]h ]h"]h$]h&]jjuh1jwhj)hhhj;hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj%hhhj;hMubah}(h]j ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj;hMhj"hhubj- )}(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:187: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j, hj"hhhj;hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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.h](h)}(h**Parameters**h]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj ubj )}(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}(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:187: ./drivers/dma-buf/dma-fence.chMhj(ubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMhjDubah}(h]h ]h"]h$]h&]uh1j hj(ubeh}(h]h ]h"]h$]h&]uh1j hjChMhj%ubah}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]j^ )}(hjih]h Description}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjgubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj ubh)}(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:187: ./drivers/dma-buf/dma-fence.chMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_fence_wait_timeout (C function)c.dma_fence_wait_timeouthNtauh1jhjzhhhNhNubj)}(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](j9)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj9)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhhjhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(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&]jjuh1jhjhhhjhMubjx)}(h9(struct dma_fence *fence, bool intr, signed long timeout)h](j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj'modnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_wait_timeoutasbuh1hhjubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjShhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(h bool intrh](j9)}(hj#]h]hbool}(hjyhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjuubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubj )}(hintrh]hintr}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hsigned long timeouth](j9)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj9)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(htimeouth]htimeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(hhh]h)}(h` **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]j^ )}(hjBh]h Parameters}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj@ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM/hj<ubj )}(hhh]j )}(h?``struct kref *kref`` :c:type:`dma_fence.recfount ` h](j )}(h``struct kref *kref``h]j)}(hjah]hstruct kref *kref}(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:187: ./drivers/dma-buf/dma-fence.chM,hj[ubj )}(hhh]h)}(h(:c:type:`dma_fence.recfount `h]h)}(hj|h]j)}(hj|h]hdma_fence.recfount}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhjvhM,hjzubah}(h]h ]h"]h$]h&]uh1hhjvhM,hjwubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hjvhM,hjXubah}(h]h ]h"]h$]h&]uh1j hj<ubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM.hj<ubh)}(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:187: ./drivers/dma-buf/dma-fence.chM-hjubhK. Drivers shouldn’t call this directly, but instead call dma_fence_put().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM-hj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_free (C function)c.dma_fence_freehNtauh1jhjzhhhNhNubj)}(hhh](j)}(h-void dma_fence_free (struct dma_fence *fence)h]j)}(h,void dma_fence_free(struct dma_fence *fence)h](j9)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM^ubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj,hM^ubj)}(hdma_fence_freeh]j )}(hdma_fence_freeh]hdma_fence_free}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhj,hM^ubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubj)}(h h]h }(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjvubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj{modnameN classnameNjj)}j]j;)}j3jAsbc.dma_fence_freeasbuh1hhjWubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjWubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjWubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjSubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhj,hM^ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhj,hM^ubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj,hM^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]jc.dma_fence_freeasbj dma_fenceuh1hhjhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM^hjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhj,hM^ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hj(h]h Parameters}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj&ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMbhj"ubj )}(hhh]j )}(h-``struct dma_fence *fence`` fence to release h](j )}(h``struct dma_fence *fence``h]j)}(hjGh]hstruct dma_fence *fence}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM_hjAubj )}(hhh]h)}(hfence to releaseh]hfence to release}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hM_hj]ubah}(h]h ]h"]h$]h&]uh1j hjAubeh}(h]h ]h"]h$]h&]uh1j hj\hM_hj>ubah}(h]h ]h"]h$]h&]uh1j hj"ubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMahj"ubh)}(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 }(hjhhhNhNubh)}(h/:c:type:`dma_fence_ops.release `h]j)}(hjh]hdma_fence_ops.release}(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:187: ./drivers/dma-buf/dma-fence.chM`hjubh. It calls kfree_rcu() on }(hjhhhNhNubj^ )}(h **fence**h]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM`hj"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j*dma_fence_enable_sw_signaling (C function)c.dma_fence_enable_sw_signalinghNtauh1jhjzhhhNhNubj)}(hhh](j)}(h` internally.h](h)}(h**Parameters**h]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(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:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to enableh]hthe fence to enable}(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]j^ )}(hj8h]h Description}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj6ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(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 }(hjNhhhNhNubh)}(h8:c:type:`dma_fence_ops.enable_signaling `h]j)}(hjXh]hdma_fence_ops.enable_signaling}(hjZhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjNubh internally.}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjuhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_fence_add_callback (C function)c.dma_fence_add_callbackhNtauh1jhjzhhhNhNubj)}(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](j9)}(hinth]hint}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(hdma_fence_add_callbackh]j )}(hdma_fence_add_callbackh]hdma_fence_add_callback}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhMubjx)}(hI(struct dma_fence *fence, struct dma_fence_cb *cb, dma_fence_func_t func)h](j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_add_callbackasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hj)hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hstruct dma_fence_cb *cbh](j)}(hjh]hstruct}(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubh)}(hhh]j )}(h dma_fence_cbh]h dma_fence_cb}(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjomodnameN classnameNjj)}j]jc.dma_fence_add_callbackasbuh1hhjKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjKubj )}(hcbh]hcb}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjKubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hdma_fence_func_t funch](h)}(hhh]j )}(hdma_fence_func_th]hdma_fence_func_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_fence_add_callbackasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hfunch]hfunc}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(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:187: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j0jO j0jP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hj:h]h Parameters}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj8ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj4ubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hjYh]hstruct dma_fence *fence}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjSubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhMhjoubah}(h]h ]h"]h$]h&]uh1j hjSubeh}(h]h ]h"]h$]h&]uh1j hjnhMhjPubj )}(h5``struct dma_fence_cb *cb`` the callback to register 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:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe callback to registerh]hthe callback to register}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjPubj )}(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:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe function to callh]hthe function to call}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjPubeh}(h]h ]h"]h$]h&]uh1j hj4ubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj4ubh)}(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:187: ./drivers/dma-buf/dma-fence.chMhj4ubh)}(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](j^ )}(h**cb**h]hcb}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj+ubh 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.}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj4ubh)}(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 }(hjHhhhNhNubj)}(h*not*h]hnot}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubh call the callback).}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj4ubh)}(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.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj4ubh)}(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.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj4ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_fence_get_status (C function)c.dma_fence_get_statushNtauh1jhjzhhhNhNubj)}(hhh](j)}(h2int dma_fence_get_status (struct dma_fence *fence)h]j)}(h1int dma_fence_get_status(struct dma_fence *fence)h](j9)}(hinth]hint}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(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&]jjuh1jhjhhhjhMubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_get_statusasbuh1hhjubj)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hj0hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(hhh]h)}(h"returns the status upon completionh]h"returns the status upon completion}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjdhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(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:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe dma_fence to queryh]hthe dma_fence to query}(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]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(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:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(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:187: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&dma_fence_remove_callback (C function)c.dma_fence_remove_callbackhNtauh1jhjzhhhNhNubj)}(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](j9)}(hj#]h]hbool}(hj7hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj3hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3hhhjDhMubj)}(hdma_fence_remove_callbackh]j )}(hdma_fence_remove_callbackh]hdma_fence_remove_callback}(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubah}(h]h ](j j eh"]h$]h&]jjuh1jhj3hhhjDhMubjx)}(h2(struct dma_fence *fence, struct dma_fence_cb *cb)h](j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jYsbc.dma_fence_remove_callbackasbuh1hhjoubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjoubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjoubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjkubj~)}(hstruct dma_fence_cb *cbh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fence_cbh]h dma_fence_cb}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_fence_remove_callbackasbuh1hhjubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hj/hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hcbh]hcb}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjkubeh}(h]h ]h"]h$]h&]jjuh1jwhj3hhhjDhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj/hhhjDhMubah}(h]j*ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjDhMhj,hhubj- )}(hhh]h)}(h)remove a callback from the signaling listh]h)remove a callback from the signaling list}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjchhubah}(h]h ]h"]h$]h&]uh1j, hj,hhhjDhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j~jO j~jP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./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:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(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:187: ./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 hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(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.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(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}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubhX: 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.}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hkBehaviour is undefined if **cb** has not been added to **fence** using dma_fence_add_callback() beforehand.h](hBehaviour is undefined if }(hj]hhhNhNubj^ )}(h**cb**h]hcb}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj]ubh has not been added to }(hj]hhhNhNubj^ )}(h **fence**h]hfence}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj]ubh+ using dma_fence_add_callback() beforehand.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_fence_default_wait (C function)c.dma_fence_default_waithNtauh1jhjzhhhNhNubj)}(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](j9)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj9)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhhjhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(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&]jjuh1jhjhhhjhMubjx)}(h9(struct dma_fence *fence, bool intr, signed long timeout)h](j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj)modnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_default_waitasbuh1hhjubj)}(h h]h }(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjUhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(h bool intrh](j9)}(hj#]h]hbool}(hj{hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjwubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj )}(hintrh]hintr}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hsigned long timeouth](j9)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj9)}(hlongh]hlong}(hjhhhNhNubah}(h] h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(htimeouth]htimeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(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:187: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j)jO j)jP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hj3h]h Parameters}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj1ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./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)}(hjRh]hstruct dma_fence *fence}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjLubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjhubah}(h]h ]h"]h$]h&]uh1j hjLubeh}(h]h ]h"]h$]h&]uh1j hjghMhjIubj )}(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:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h!if true, do an interruptible waith]h!if true, do an interruptible wait}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjIubj )}(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:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(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 hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjIubeh}(h]h ]h"]h$]h&]uh1j hj-ubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj-ubh)}(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:187: ./drivers/dma-buf/dma-fence.chMhj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_fence_wait_any_timeout (C function)c.dma_fence_wait_any_timeouthNtauh1jhjzhhhNhNubj)}(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](j9)}(hsignedh]hsigned}(hjDhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj@hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMcubj)}(h h]h }(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@hhhjRhMcubj9)}(hlongh]hlong}(hjahhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj@hhhjRhMcubj)}(h h]h }(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@hhhjRhMcubj)}(hdma_fence_wait_any_timeouth]j )}(hdma_fence_wait_any_timeouth]hdma_fence_wait_any_timeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj@hhhjRhMcubjx)}(hZ(struct dma_fence **fences, uint32_t count, bool intr, signed long timeout, uint32_t *idx)h](j~)}(hstruct dma_fence **fencesh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_wait_any_timeoutasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfencesh]hfences}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(huint32_t counth](h)}(hhh]j )}(huint32_th]huint32_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj!modnameN classnameNjj)}j]jc.dma_fence_wait_any_timeoutasbuh1hhjubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hcounth]hcount}(hjKhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(h bool intrh](j9)}(hj#]h]hbool}(hjdhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj`ubj)}(h h]h }(hjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj )}(hintrh]hintr}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hsigned long timeouth](j9)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj9)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(htimeouth]htimeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(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&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_fence_wait_any_timeoutasbuh1hhjubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hidxh]hidx}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubeh}(h]h ]h"]h$]h&]jjuh1jwhj@hhhjRhMcubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj<hhhjRhMcubah}(h]j7ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjRhMchj9hhubj- )}(hhh]h)}(h``struct dma_fence *fence`` the fence that is to be waited on h](j )}(h``struct dma_fence *fence``h]j)}(hj\h]hstruct dma_fence *fence}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjVubj )}(hhh]h)}(h!the fence that is to be waited onh]h!the fence that is to be waited on}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhMhjrubah}(h]h ]h"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]uh1j hjqhMhjSubj )}(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)}(hjh]hktime_t 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:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjSubeh}(h]h ]h"]h$]h&]uh1j hj7ubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj7ubh)}(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:187: ./drivers/dma-buf/dma-fence.chMhj7ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_describe (C function)c.dma_fence_describehNtauh1jhjzhhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj$hMubj)}(hdma_fence_describeh]j )}(hdma_fence_describeh]hdma_fence_describe}(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhj$hMubjx)}(h/(struct dma_fence *fence, struct seq_file *seq)h](j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjnubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjsmodnameN classnameNjj)}j]j;)}j3j9sbc.dma_fence_describeasbuh1hhjOubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjOubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjKubj~)}(hstruct seq_file *seqh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(hseq_fileh]hseq_file}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_fence_describeasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hseqh]hseq}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjKubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhj$hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhj$hMubah}(h]j ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj$hMhj hhubj- )}(hhh]h)}(h$Dump fence description into seq_fileh]h$Dump fence description into seq_file}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjChhubah}(h]h ]h"]h$]h&]uh1j, hj hhhj$hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j^jO j^jP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjhh]h Parameters}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjfubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjbubj )}(hhh](j )}(h2``struct dma_fence *fence`` the fence to describe 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:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to describeh]hthe fence to describe}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhj~ubj )}(hJ``struct seq_file *seq`` the seq_file to put the textual description into h](j )}(h``struct seq_file *seq``h]j)}(hjh]hstruct seq_file *seq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(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 hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhj~ubeh}(h]h ]h"]h$]h&]uh1j hjbubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjbubh)}(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:187: ./drivers/dma-buf/dma-fence.chMhjbubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_init (C function)c.dma_fence_inithNtauh1jhjzhhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hj@hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj<hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM(ubj)}(h h]h }(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<hhhjNhM(ubj)}(hdma_fence_inith]j )}(hdma_fence_inith]hdma_fence_init}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj<hhhjNhM(ubjx)}(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)}(hjh]hstruct}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jcsbc.dma_fence_initasbuh1hhjyubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjyubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjuubj~)}(hconst struct dma_fence_ops *opsh](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fence_opsh]h dma_fence_ops}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj*modnameN classnameNjj)}j]jc.dma_fence_initasbuh1hhjubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjThhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hopsh]hops}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjuubj~)}(hspinlock_t *lockh](h)}(hhh]j )}(h spinlock_th]h spinlock_t}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_fence_initasbuh1hhjvubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjvubj )}(hlockh]hlock}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjvubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjuubj~)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_fence_initasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hcontexth]hcontext}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjuubj~)}(h u64 seqnoh](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_fence_initasbuh1hhjubj)}(h h]h }(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hseqnoh]hseqno}(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjuubeh}(h]h ]h"]h$]h&]jjuh1jwhj<hhhjNhM(ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj8hhhjNhM(ubah}(h]j3ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjNhM(hj5hhubj- )}(hhh]h)}(hInitialize a custom fence.h]hInitialize a custom fence.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM(hjmhhubah}(h]h ]h"]h$]h&]uh1j, hj5hhhjNhM(ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM,hjubj )}(hhh](j )}(h4``struct dma_fence *fence`` the fence to initialize 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:187: ./drivers/dma-buf/dma-fence.chM)hjubj )}(hhh]h)}(hthe fence to initializeh]hthe fence to initialize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM)hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM)hjubj )}(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:187: ./drivers/dma-buf/dma-fence.chM*hjubj )}(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&]uh1hhjhM*hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM*hjubj )}(hH``spinlock_t *lock`` the irqsafe spinlock to use for locking this fence h](j )}(h``spinlock_t *lock``h]j)}(hj#h]hspinlock_t *lock}(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:187: ./drivers/dma-buf/dma-fence.chM+hjubj )}(hhh]h)}(h2the irqsafe spinlock to use for locking this fenceh]h2the irqsafe spinlock to use for locking this fence}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hM+hj9ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj8hM+hjubj )}(h;``u64 context`` the execution context this fence is run on h](j )}(h``u64 context``h]j)}(hj\h]h u64 context}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM,hjVubj )}(hhh]h)}(h*the execution context this fence is run onh]h*the execution context this fence is run on}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhM,hjrubah}(h]h ]h"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]uh1j hjqhM,hjubj )}(hC``u64 seqno`` a linear increasing sequence number for this context h](j )}(h ``u64 seqno``h]j)}(hjh]h u64 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:187: ./drivers/dma-buf/dma-fence.chM-hjubj )}(hhh]h)}(h4a linear increasing sequence number for this contexth]h4a linear increasing sequence number for this context}(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]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM/hjubh)}(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:187: ./drivers/dma-buf/dma-fence.chM.hjubh gets called.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hM.hjubh)}(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:187: ./drivers/dma-buf/dma-fence.chM2hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_init64 (C function)c.dma_fence_init64hNtauh1jhjzhhhNhNubj)}(hhh](j)}(hzvoid dma_fence_init64 (struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h]j)}(hyvoid dma_fence_init64(struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h](j9)}(hvoidh]hvoid}(hjGhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjChhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM?ubj)}(h h]h }(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjChhhjUhM?ubj)}(hdma_fence_init64h]j )}(hdma_fence_init64h]hdma_fence_init64}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubah}(h]h ](j j eh"]h$]h&]jjuh1jhjChhhjUhM?ubjx)}(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)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jjsbc.dma_fence_init64asbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj|ubj~)}(hconst struct dma_fence_ops *opsh](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fence_opsh]h dma_fence_ops}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj1modnameN classnameNjj)}j]jc.dma_fence_init64asbuh1hhjubj)}(h h]h }(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hj[hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hopsh]hops}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj|ubj~)}(hspinlock_t *lockh](h)}(hhh]j )}(h spinlock_th]h spinlock_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_fence_init64asbuh1hhj}ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj}ubj )}(hlockh]hlock}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj|ubj~)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_fence_init64asbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hcontexth]hcontext}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj|ubj~)}(h u64 seqnoh](h)}(hhh]j )}(hu64h]hu64}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj#modnameN classnameNjj)}j]jc.dma_fence_init64asbuh1hhjubj)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hseqnoh]hseqno}(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj|ubeh}(h]h ]h"]h$]h&]jjuh1jwhjChhhjUhM?ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj?hhhjUhM?ubah}(h]j:ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjUhM?hj<hhubj- )}(hhh]h)}(h4Initialize a custom fence with 64-bit seqno support.h]h4Initialize a custom fence with 64-bit seqno support.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM?hjthhubah}(h]h ]h"]h$]h&]uh1j, hj<hhhjUhM?ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMChjubj )}(hhh](j )}(h4``struct dma_fence *fence`` the fence to initialize 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:187: ./drivers/dma-buf/dma-fence.chM@hjubj )}(hhh]h)}(hthe fence to initializeh]hthe fence to initialize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM@hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM@hjubj )}(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:187: ./drivers/dma-buf/dma-fence.chMAhjubj )}(hhh]h)}(h.the dma_fence_ops for operations on this fenceh]h.the dma_fence_ops for operations on this fence}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMAhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMAhjubj )}(hH``spinlock_t *lock`` the irqsafe spinlock to use for locking this fence h](j )}(h``spinlock_t *lock``h]j)}(hj*h]hspinlock_t *lock}(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:187: ./drivers/dma-buf/dma-fence.chMBhj$ubj )}(hhh]h)}(h2the irqsafe spinlock to use for locking this fenceh]h2the irqsafe spinlock to use for locking this fence}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hMBhj@ubah}(h]h ]h"]h$]h&]uh1j hj$ubeh}(h]h ]h"]h$]h&]uh1j hj?hMBhjubj )}(h;``u64 context`` the execution context this fence is run on h](j )}(h``u64 context``h]j)}(hjch]h u64 context}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMChj]ubj )}(hhh]h)}(h*the execution context this fence is run onh]h*the execution context this fence is run on}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhMChjyubah}(h]h ]h"]h$]h&]uh1j hj]ubeh}(h]h ]h"]h$]h&]uh1j hjxhMChjubj )}(hC``u64 seqno`` a linear increasing sequence number for this context h](j )}(h ``u64 seqno``h]j)}(hjh]h u64 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:187: ./drivers/dma-buf/dma-fence.chMDhjubj )}(hhh]h)}(h4a linear increasing sequence number for this contexth]h4a linear increasing sequence number for this context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMDhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMDhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMFhjubh)}(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:187: ./drivers/dma-buf/dma-fence.chMEhjubh gets called.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMEhjubh)}(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:187: ./drivers/dma-buf/dma-fence.chMIhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_fence_driver_name (C function)c.dma_fence_driver_namehNtauh1jhjzhhhNhNubj)}(hhh](j)}(hBconst char __rcu * dma_fence_driver_name (struct dma_fence *fence)h]j)}(h@const char __rcu *dma_fence_driver_name(struct dma_fence *fence)h](j)}(hjh]hconst}(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMWubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJhhhj[hMWubj9)}(hcharh]hchar}(hjjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjJhhhj[hMWubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJhhhj[hMWubh__rcu}(hjJhhhNhNubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJhhhj[hMWubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjJhhhj[hMWubj)}(hdma_fence_driver_nameh]j )}(hdma_fence_driver_nameh]hdma_fence_driver_name}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjJhhhj[hMWubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_driver_nameasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjJhhhj[hMWubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjFhhhj[hMWubah}(h]jAah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj[hMWhjChhubj- )}(hhh]h)}(hAccess the driver nameh]hAccess the driver name}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMWhjEhhubah}(h]h ]h"]h$]h&]uh1j, hjChhhj[hMWubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j`jO j`jP jQ jR uh1jhhhjzhNhNubjT )}(hXh**Parameters** ``struct dma_fence *fence`` the fence to query **Description** Returns a driver name backing the dma-fence implementation. IMPORTANT CONSIDERATION: Dma-fence contract stipulates that access to driver provided data (data not directly embedded into the object itself), such as the :c:type:`dma_fence.lock ` and memory potentially accessed by the :c:type:`dma_fence.ops ` functions, is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do. To allow safe access drivers are mandated to guarantee a RCU grace period between signalling the fence and freeing said data. As such access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the :c:type:`rcu_read_lock` and :c:type:`rcu_read_unlock` pair.h](h)}(h**Parameters**h]j^ )}(hjjh]h Parameters}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjhubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM[hjdubj )}(hhh]j )}(h/``struct dma_fence *fence`` the 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:187: ./drivers/dma-buf/dma-fence.chMXhjubj )}(hhh]h)}(hthe fence to queryh]hthe fence to query}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMXhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMXhjubah}(h]h ]h"]h$]h&]uh1j hjdubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMZhjdubh)}(h;Returns a driver name backing the dma-fence implementation.h]h;Returns a driver name backing the dma-fence implementation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMYhjdubh)}(hX{IMPORTANT CONSIDERATION: Dma-fence contract stipulates that access to driver provided data (data not directly embedded into the object itself), such as the :c:type:`dma_fence.lock ` and memory potentially accessed by the :c:type:`dma_fence.ops ` functions, is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do.h](hIMPORTANT CONSIDERATION: Dma-fence contract stipulates that access to driver provided data (data not directly embedded into the object itself), such as the }(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:187: ./drivers/dma-buf/dma-fence.chM[hjubh( and memory potentially accessed by the }(hjhhhNhNubh)}(h#:c:type:`dma_fence.ops `h]j)}(hjh]h dma_fence.ops}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhjhM[hjubhp functions, is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM[hjdubh)}(h}To allow safe access drivers are mandated to guarantee a RCU grace period between signalling the fence and freeing said data.h]h}To allow safe access drivers are mandated to guarantee a RCU grace period between signalling the fence and freeing said data.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMbhjdubh)}(hAs such access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the :c:type:`rcu_read_lock` and :c:type:`rcu_read_unlock` pair.h](hAs such access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the }(hjMhhhNhNubh)}(h:c:type:`rcu_read_lock`h]j)}(hjWh]h rcu_read_lock}(hjYhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj rcu_read_lockuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMehjMubh and }(hjMhhhNhNubh)}(h:c:type:`rcu_read_unlock`h]j)}(hj{h]hrcu_read_unlock}(hj}hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjrcu_read_unlockuh1hhjthMehjMubh pair.}(hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjthMehjdubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_fence_timeline_name (C function)c.dma_fence_timeline_namehNtauh1jhjzhhhNhNubj)}(hhh](j)}(hDconst char __rcu * dma_fence_timeline_name (struct dma_fence *fence)h]j)}(hBconst char __rcu *dma_fence_timeline_name(struct dma_fence *fence)h](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMwubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMwubj9)}(hcharh]hchar}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhhjhMwubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMwubh__rcu}(hjhhhNhNubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMwubjP)}(hjSh]h*}(hj hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjhhhjhMwubj)}(hdma_fence_timeline_nameh]j )}(hdma_fence_timeline_nameh]hdma_fence_timeline_name}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhMwubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjTubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjYmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_timeline_nameasbuh1hhj5ubj)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj5ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj1ubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMwubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMwubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMwhjhhubj- )}(hhh]h)}(hAccess the timeline nameh]hAccess the timeline name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMwhjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMwubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(hXn**Parameters** ``struct dma_fence *fence`` the fence to query **Description** Returns a timeline name provided by the dma-fence implementation. IMPORTANT CONSIDERATION: Dma-fence contract stipulates that access to driver provided data (data not directly embedded into the object itself), such as the :c:type:`dma_fence.lock ` and memory potentially accessed by the :c:type:`dma_fence.ops ` functions, is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do. To allow safe access drivers are mandated to guarantee a RCU grace period between signalling the fence and freeing said data. As such access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the :c:type:`rcu_read_lock` and :c:type:`rcu_read_unlock` pair.h](h)}(h**Parameters**h]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM{hjubj )}(hhh]j )}(h/``struct dma_fence *fence`` the 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:187: ./drivers/dma-buf/dma-fence.chMxhjubj )}(hhh]h)}(hthe fence to queryh]hthe fence to query}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMxhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMxhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hj8h]h Description}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj6ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMzhjubh)}(hAReturns a timeline name provided by the dma-fence implementation.h]hAReturns a timeline name provided by the dma-fence implementation.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMyhjubh)}(hX{IMPORTANT CONSIDERATION: Dma-fence contract stipulates that access to driver provided data (data not directly embedded into the object itself), such as the :c:type:`dma_fence.lock ` and memory potentially accessed by the :c:type:`dma_fence.ops ` functions, is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do.h](hIMPORTANT CONSIDERATION: Dma-fence contract stipulates that access to driver provided data (data not directly embedded into the object itself), such as the }(hj]hhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjgh]hdma_fence.lock}(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:187: ./drivers/dma-buf/dma-fence.chM{hj]ubh( and memory potentially accessed by the }(hj]hhhNhNubh)}(h#:c:type:`dma_fence.ops `h]j)}(hjh]h dma_fence.ops}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhjhM{hj]ubhp functions, is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM{hjubh)}(h}To allow safe access drivers are mandated to guarantee a RCU grace period between signalling the fence and freeing said data.h]h}To allow safe access drivers are mandated to guarantee a RCU grace period between signalling the fence and freeing said data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hAs such access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the :c:type:`rcu_read_lock` and :c:type:`rcu_read_unlock` pair.h](hAs such access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the }(hjhhhNhNubh)}(h:c:type:`rcu_read_lock`h]j)}(hjh]h rcu_read_lock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj rcu_read_lockuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh and }(hjhhhNhNubh)}(h:c:type:`rcu_read_unlock`h]j)}(hjh]hrcu_read_unlock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjrcu_read_unlockuh1hhjhMhjubh pair.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence (C struct) c.dma_fencehNtauh1jhjzhhhNhNubj)}(hhh](j)}(h dma_fenceh]j)}(hstruct dma_fenceh](j)}(hjh]hstruct}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2hhhjChKubj)}(h dma_fenceh]j )}(hj0h]h dma_fence}(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubah}(h]h ](j j eh"]h$]h&]jjuh1jhj2hhhjChKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj.hhhjChKubah}(h]j)ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjChKhj+hhubj- )}(hhh]h)}(h"software synchronization primitiveh]h"software synchronization primitive}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK hjuhhubah}(h]h ]h"]h$]h&]uh1j, hj+hhhjChKubeh}(h]h ](jstructeh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK$hjubj)}(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:190: ./include/linux/dma-fence.hhK&hjubh)}(h **Members**h]j^ )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK5hjubj )}(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:190: ./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}(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:190: ./include/linux/dma-fence.hhK#hjubj )}(hhh]h)}(h(dma_fence_ops associated with this fenceh]h(dma_fence_ops associated with this fence}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hK#hj4ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj3hK#hjubj )}(h``{unnamed_union}`` anonymous h](j )}(h``{unnamed_union}``h]j)}(hjWh]h{unnamed_union}}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjQubj )}(hhh]h)}(h anonymoush]h anonymous}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhKhjmubah}(h]h ]h"]h$]h&]uh1j hjQubeh}(h]h ]h"]h$]h&]uh1j hjlhKhjubj )}(h*``cb_list`` list of all callbacks to call h](j )}(h ``cb_list``h]j)}(hjh]hcb_list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK%hjubj )}(hhh]h)}(hlist of all callbacks to callh]hlist of all callbacks to call}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK%hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK%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:190: ./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:190: ./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&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK(hj5ubj )}(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()}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK'hjQubah}(h]h ]h"]h$]h&]uh1j hj5ubeh}(h]h ]h"]h$]h&]uh1j hjPhK(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)}(hjuh]hseqno}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK*hjoubj )}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK)hjubah}(h]h ]h"]h$]h&]uh1j hjoubeh}(h]h ]h"]h$]h&]uh1j hjhK*hjubj )}(h3``flags`` A mask of DMA_FENCE_FLAG_* defined below h](j )}(h ``flags``h]j)}(hjh]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK+hjubj )}(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 hjubeh}(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:190: ./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)}(hj!h]herror}(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:190: ./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&]uh1hhj6hK-hj7ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj6hK-hjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubh)}(h**Description**h]j^ )}(hjch]h Description}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjaubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK1hjzhhubh)}(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.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK.hjzhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK2hjzhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK9hjzhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_cb (C struct)c.dma_fence_cbhNtauh1jhjzhhhNhNubj)}(hhh](j)}(h dma_fence_cbh]j)}(hstruct dma_fence_cbh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKEubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKEubj)}(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&]jjuh1jhjhhhjhKEubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhKEubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhKEhjhhubj- )}(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:190: ./include/linux/dma-fence.hhKphjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhKEubeh}(h]h ](jstructeh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj!ubh:}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKthjubj)}(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:190: ./include/linux/dma-fence.hhKvhjubh)}(h **Members**h]j^ )}(hjOh]hMembers}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjMubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK{hjubj )}(hhh](j )}(hR``node`` used by dma_fence_add_callback() to append this struct to fence::cb_list h](j )}(h``node``h]j)}(hjnh]hnode}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKrhjhubj )}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKrhjubah}(h]h ]h"]h$]h&]uh1j hjhubeh}(h]h ]h"]h$]h&]uh1j hjhKrhjeubj )}(h!``func`` dma_fence_func_t to callh](j )}(h``func``h]j)}(hjh]hfunc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKrhjubj )}(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:190: ./include/linux/dma-fence.hhKshjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKrhjeubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKvhjzhhubh)}(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:190: ./include/linux/dma-fence.hhKshjzhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_ops (C struct)c.dma_fence_opshNtauh1jhjzhhhNhNubj)}(hhh](j)}(h dma_fence_opsh]j)}(hstruct dma_fence_opsh](j)}(hjh]hstruct}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKyubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$hhhj5hKyubj)}(h dma_fence_opsh]j )}(hj"h]h dma_fence_ops}(hjHhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDubah}(h]h ](j j eh"]h$]h&]jjuh1jhj$hhhj5hKyubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj hhhj5hKyubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj5hKyhjhhubj- )}(hhh]h)}(h operations implemented for fenceh]h operations implemented for fence}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK}hjghhubah}(h]h ]h"]h$]h&]uh1j, hjhhhj5hKyubeh}(h]h ](jstructeh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(hX**Definition**:: struct dma_fence_ops { 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 (*set_deadline)(struct dma_fence *fence, ktime_t deadline); }; **Members** ``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 is called with irq's disabled, so only spinlocks which disable IRQ's can be used in the code outside of this callback. 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. ``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](j^ )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubj)}(hXstruct dma_fence_ops { 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 (*set_deadline)(struct dma_fence *fence, ktime_t deadline); };h]hXstruct dma_fence_ops { 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 (*set_deadline)(struct dma_fence *fence, ktime_t deadline); };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubh)}(h **Members**h]j^ )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubj )}(hhh](j )}(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:190: ./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:190: ./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)}(hjh]hget_timeline_name}(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:190: ./include/linux/dma-fence.hhKhjubj )}(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.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj5ubh)}(hThis callback is mandatory.h]hThis callback is mandatory.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hKhj5ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj4hKhjubj )}(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 is called with irq's disabled, so only spinlocks which disable IRQ's can be used in the code outside of this callback. 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)}(hjgh]henable_signaling}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjaubj )}(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:190: ./include/linux/dma-fence.hhKhj}ubh)}(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:190: ./include/linux/dma-fence.hhKhj}ubh)}(h{This is called with irq's disabled, so only spinlocks which disable IRQ's can be used in the code outside of this callback.h]hThis is called with irq’s disabled, so only spinlocks which disable IRQ’s can be used in the code outside of this callback.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj}ubh)}(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:190: ./include/linux/dma-fence.hhKhj}ubh)}(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:190: ./include/linux/dma-fence.hhKhjubhA may be set in enable_signaling, but only when false is returned.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhj}ubh)}(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 }(hjhhhNhNubj^ )}(h**enable_signaling**h]henable_signaling}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] 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:190: ./include/linux/dma-fence.hhKhj}ubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj}ubeh}(h]h ]h"]h$]h&]uh1j hjaubeh}(h]h ]h"]h$]h&]uh1j hj|hKhjubj )}(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)}(hj,h]hsignaled}(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:190: ./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().}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjBubh)}(h@May set :c:type:`dma_fence.error ` if returning true.h](hMay set }(hjThhhNhNubh)}(h%:c:type:`dma_fence.error `h]j)}(hj^h]hdma_fence.error}(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:190: ./include/linux/dma-fence.hhKhjTubh if returning true.}(hjThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj{hKhjBubh)}(hThis callback is optional.h]hThis callback is optional.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhKhjBubeh}(h]h ]h"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]uh1j hjAhKhjubj )}(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:190: ./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:190: ./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:190: ./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:190: ./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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(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)}(hj8h]h set_deadline}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj2ubj )}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjNubh)}(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 }(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:190: ./include/linux/dma-fence.hhKhj`ubhX& 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.}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjNubh)}(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:190: ./include/linux/dma-fence.hhKhjNubeh}(h]h ]h"]h$]h&]uh1j hj2ubeh}(h]h ]h"]h$]h&]uh1j hjMhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_put (C function)c.dma_fence_puthNtauh1jhjzhhhNhNubj)}(hhh](j)}(h,void dma_fence_put (struct dma_fence *fence)h]j)}(h+void dma_fence_put(struct dma_fence *fence)h](j9)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhM ubj)}(h dma_fence_puth]j )}(h dma_fence_puth]h dma_fence_put}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhM ubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 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&] refdomainjreftypej3 reftargetj0modnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_putasbuh1hhj ubj)}(h h]h }(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjP)}(hjSh]h*}(hj\hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj ubj )}(hfenceh]hfence}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhM ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhM ubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhM hjhhubj- )}(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:190: ./include/linux/dma-fence.hhM hjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhM ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(hI**Parameters** ``struct dma_fence *fence`` fence to reduce refcount ofh](h)}(h**Parameters**h]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h7``struct dma_fence *fence`` fence to reduce refcount ofh](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:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hfence to reduce refcount ofh]hfence to reduce refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_get (C function)c.dma_fence_gethNtauh1jhjzhhhNhNubj)}(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)}(hjh]hstruct}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*hhhj;hMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjOmodnameN classnameNjj)}j]j;)}j3 dma_fence_getsbc.dma_fence_getasbuh1hhj*hhhj;hMubj)}(h h]h }(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*hhhj;hMubjP)}(hjSh]h*}(hj|hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj*hhhj;hMubj)}(h dma_fence_geth]j )}(hjkh]h dma_fence_get}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhj*hhhj;hMubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jic.dma_fence_getasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhj*hhhj;hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj&hhhj;hMubah}(h]j!ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj;hMhj#hhubj- )}(hhh]h)}(hincreases refcount of the fenceh]hincreases refcount of the fence}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj&hhubah}(h]h ]h"]h$]h&]uh1j, hj#hhhj;hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jAjO jAjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjKh]h Parameters}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjIubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjEubj )}(hhh]j )}(h:``struct dma_fence *fence`` fence to increase refcount of h](j )}(h``struct dma_fence *fence``h]j)}(hjjh]hstruct dma_fence *fence}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjdubj )}(hhh]h)}(hfence to increase refcount ofh]hfence to increase refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjdubeh}(h]h ]h"]h$]h&]uh1j hjhMhjaubah}(h]h ]h"]h$]h&]uh1j hjEubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjEubh)}(h5Returns the same fence, with refcount increased by 1.h]h5Returns the same fence, with refcount increased by 1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjEubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_get_rcu (C function)c.dma_fence_get_rcuhNtauh1jhjzhhhNhNubj)}(hhh](j)}(h>struct dma_fence * dma_fence_get_rcu (struct dma_fence *fence)h]j)}(hhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj@modnameN classnameNjj)}j]jc.dma_fence_get_rcu_safeasbuh1hhjubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh__rcu}(hjhhhNhNubj)}(h h]h }(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hj|hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceph]hfencep}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhM1ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhM1ubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhM1hjhhubj- )}(hhh]h)}(h+acquire a reference to an RCU tracked fenceh]h+acquire a reference to an RCU tracked fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM1hjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhM1ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM5hjubj )}(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:190: ./include/linux/dma-fence.hhM2hjubj )}(hhh]h)}(h(pointer to fence to increase refcount ofh]h(pointer to fence to increase refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM2hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM2hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hj<h]h Description}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj:ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM4hjubh)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM3hjubh)}(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).}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM8hjubh)}(h1The caller is required to hold the RCU read lock.h]h1The caller is required to hold the RCU read lock.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM=hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)dma_fence_is_signaled_locked (C function)c.dma_fence_is_signaled_lockedhNtauh1jhjzhhhNhNubj)}(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](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(hdma_fence_is_signaled_lockedh]j )}(hdma_fence_is_signaled_lockedh]hdma_fence_is_signaled_locked}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhMubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_is_signaled_lockedasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hj'hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(hhh]h)}(h2Return an indication if the fence is signaled yet.h]h2Return an indication if the fence is signaled yet.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj[hhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jvjO jvjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj~ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjzubj )}(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:190: ./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 hjzubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjzubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjzubh)}(hGThis function requires :c:type:`dma_fence.lock ` to be held.h](hThis function requires }(hjhhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hj h]hdma_fence.lock}(hj hhhNhNubah}(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:190: ./include/linux/dma-fence.hhMhjubh to be held.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj&hMhjzubh)}(h!See also dma_fence_is_signaled().h]h!See also dma_fence_is_signaled().}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjzubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_fence_is_signaled (C function)c.dma_fence_is_signaledhNtauh1jhjzhhhNhNubj)}(hhh](j)}(h4bool dma_fence_is_signaled (struct dma_fence *fence)h]j)}(h3bool dma_fence_is_signaled(struct dma_fence *fence)h](j9)}(hj#]h]hbool}(hj`hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj\hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\hhhjmhMubj)}(hdma_fence_is_signaledh]j )}(hdma_fence_is_signaledh]hdma_fence_is_signaled}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj\hhhjmhMubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_is_signaledasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhj\hhhjmhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjXhhhjmhMubah}(h]jSah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjmhMhjUhhubj- )}(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:190: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j, hjUhhhjmhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j7jO j7jP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjAh]h Parameters}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj?ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj;ubj )}(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}(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:190: ./include/linux/dma-fence.hhMhjZubj )}(hhh]h)}(hthe fence to checkh]hthe fence to check}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhMhjvubah}(h]h ]h"]h$]h&]uh1j hjZubeh}(h]h ]h"]h$]h&]uh1j hjuhMhjWubah}(h]h ]h"]h$]h&]uh1j hj;ubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj;ubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj;ubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj;ubh)}(h(See also dma_fence_is_signaled_locked().h]h(See also dma_fence_is_signaled_locked().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj;ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!__dma_fence_is_later (C function)c.__dma_fence_is_laterhNtauh1jhjzhhhNhNubj)}(hhh](j)}(hCbool __dma_fence_is_later (struct dma_fence *fence, u64 f1, u64 f2)h]j)}(hBbool __dma_fence_is_later(struct dma_fence *fence, u64 f1, u64 f2)h](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj hMubj)}(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&]jjuh1jhjhhhj hMubjx)}(h)(struct dma_fence *fence, u64 f1, u64 f2)h](j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj)}(h h]h }(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjUubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjZmodnameN classnameNjj)}j]j;)}j3j sbc.__dma_fence_is_laterasbuh1hhj6ubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj6ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj2ubj~)}(hu64 f1h](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jtc.__dma_fence_is_laterasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hf1h]hf1}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj2ubj~)}(hu64 f2h](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jtc.__dma_fence_is_laterasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hf2h]hf2}(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj2ubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhj hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhj hMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj hMhjhhubj- )}(hhh]h)}(h-return if f1 is chronologically later than f2h]h-return if f1 is chronologically later than f2}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjJhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jejO jejP jQ jR uh1jhhhjzhNhNubjT )}(hX[**Parameters** ``struct dma_fence *fence`` fence in whose context to do the comparison ``u64 f1`` the first fence's seqno ``u64 f2`` the second fence's seqno 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 common across contexts.h](h)}(h**Parameters**h]j^ )}(hjoh]h Parameters}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjmubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjiubj )}(hhh](j )}(hH``struct dma_fence *fence`` fence in whose context to do the comparison 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:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h+fence in whose context to do the comparisonh]h+fence in whose context to do the comparison}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h#``u64 f1`` the first fence's seqno h](j )}(h ``u64 f1``h]j)}(hjh]hu64 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:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe first fence's seqnoh]hthe first fence’s seqno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h:``u64 f2`` the second fence's seqno from the same context h](j )}(h ``u64 f2``h]j)}(hjh]hu64 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:190: ./include/linux/dma-fence.hhMhjubj )}(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 hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjiubh)}(h**Description**h]j^ )}(hj;h]h Description}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj9ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjiubh)}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjiubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_is_later (C function)c.dma_fence_is_laterhNtauh1jhjzhhhNhNubj)}(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](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj|hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|hhhjhMubj)}(hdma_fence_is_laterh]j )}(hdma_fence_is_laterh]hdma_fence_is_later}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhj|hhhjhMubjx)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j~)}(hstruct dma_fence *f1h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_is_laterasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hf1h]hf1}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hstruct dma_fence *f2h](j)}(hjh]hstruct}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(h h]h }(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjIubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjNmodnameN classnameNjj)}j]jc.dma_fence_is_laterasbuh1hhj*ubj)}(h h]h }(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubjP)}(hjSh]h*}(hjxhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj*ubj )}(hf2h]hf2}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubeh}(h]h ]h"]h$]h&]jjuh1jwhj|hhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjxhhhjhMubah}(h]jsah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjuhhubj- )}(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:190: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j, hjuhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./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:190: ./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&]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)}(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:190: ./include/linux/dma-fence.hhMhj#ubj )}(hhh]h)}(h&the second fence from the same contexth]h&the second fence from the same context}(hjBhhhNhNubah}(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]j^ )}(hjdh]h Description}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjbubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./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 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.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_fence_is_later_or_same (C function)c.dma_fence_is_later_or_samehNtauh1jhjzhhhNhNubj)}(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](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhM ubj)}(hdma_fence_is_later_or_sameh]j )}(hdma_fence_is_later_or_sameh]hdma_fence_is_later_or_same}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhM ubjx)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j~)}(hstruct dma_fence *f1h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_is_later_or_sameasbuh1hhjubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hj1hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hf1h]hf1}(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hstruct dma_fence *f2h](j)}(hjh]hstruct}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubj)}(h h]h }(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjwmodnameN classnameNjj)}j]jc.dma_fence_is_later_or_sameasbuh1hhjSubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjSubj )}(hf2h]hf2}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhM ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhM ubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhM hjhhubj- )}(hhh]h)}(h(return true if f1 is later or same as f2h]h(return true if f1 is later or same as f2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM hjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhM ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./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:190: ./include/linux/dma-fence.hhM hjubj )}(hhh]h)}(h%the first fence from the same contexth]h%the first fence from the same context}(hj2hhhNhNubah}(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 )}(h@``struct dma_fence *f2`` the second fence from the same context h](j )}(h``struct dma_fence *f2``h]j)}(hjRh]hstruct dma_fence *f2}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM hjLubj )}(hhh]h)}(h&the second fence from the same contexth]h&the second fence from the same context}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghM hjhubah}(h]h ]h"]h$]h&]uh1j hjLubeh}(h]h ]h"]h$]h&]uh1j hjghM hjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_later (C function)c.dma_fence_laterhNtauh1jhjzhhhNhNubj)}(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)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3dma_fence_latersbc.dma_fence_laterasbuh1hhjhhhjhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubjP)}(hjSh]h*}(hj hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjhhhjhMubj)}(hdma_fence_laterh]j )}(hjh]hdma_fence_later}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhMubjx)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j~)}(hstruct dma_fence *f1h](j)}(hjh]hstruct}(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj)}(h h]h }(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjlmodnameN classnameNjj)}j]j c.dma_fence_laterasbuh1hhjHubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjHubj )}(hf1h]hf1}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjHubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjDubj~)}(hstruct dma_fence *f2h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j c.dma_fence_laterasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hf2h]hf2}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjDubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(hhh]h)}(h&return the chronologically later fenceh]h&return the chronologically later fence}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj:hhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jUjO jUjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hj_h]h Parameters}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj]ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjYubj )}(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}(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:190: ./include/linux/dma-fence.hhMhjxubj )}(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 hjxubeh}(h]h ]h"]h$]h&]uh1j hjhMhjuubj )}(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:190: ./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 hjhMhjuubeh}(h]h ]h"]h$]h&]uh1j hjYubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjYubh)}(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:190: ./include/linux/dma-fence.hhMhjYubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(dma_fence_get_status_locked (C function)c.dma_fence_get_status_lockedhNtauh1jhjzhhhNhNubj)}(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](j9)}(hinth]hint}(hj7hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj3hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM3ubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3hhhjEhM3ubj)}(hdma_fence_get_status_lockedh]j )}(hdma_fence_get_status_lockedh]hdma_fence_get_status_locked}(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjTubah}(h]h ](j j eh"]h$]h&]jjuh1jhj3hhhjEhM3ubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jZsbc.dma_fence_get_status_lockedasbuh1hhjpubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjpubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjpubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjlubah}(h]h ]h"]h$]h&]jjuh1jwhj3hhhjEhM3ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj/hhhjEhM3ubah}(h]j*ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjEhM3hj,hhubj- )}(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:190: ./include/linux/dma-fence.hhM3hjhhubah}(h]h ]h"]h$]h&]uh1j, hj,hhhjEhM3ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM7hjubj )}(hhh]j )}(h3``struct dma_fence *fence`` the dma_fence to query h](j )}(h``struct dma_fence *fence``h]j)}(hj8h]hstruct dma_fence *fence}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM4hj2ubj )}(hhh]h)}(hthe dma_fence to queryh]hthe dma_fence to query}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhM4hjNubah}(h]h ]h"]h$]h&]uh1j hj2ubeh}(h]h ]h"]h$]h&]uh1j hjMhM4hj/ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjsh]h Description}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjqubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM6hjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM5hjubh)}(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:190: ./include/linux/dma-fence.hhM;hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_set_error (C function)c.dma_fence_set_errorhNtauh1jhjzhhhNhNubj)}(hhh](j)}(h=void dma_fence_set_error (struct dma_fence *fence, int error)h]j)}(hjSuh1hhj hMVhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_timestamp (C function)c.dma_fence_timestamphNtauh1jhjzhhhNhNubj)}(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}(hjC hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjE modnameN classnameNjj)}j]j;)}j3dma_fence_timestampsbc.dma_fence_timestampasbuh1hhj< hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMeubj)}(h h]h }(hje hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj< hhhjd hMeubj)}(hdma_fence_timestamph]j )}(hja h]hdma_fence_timestamp}(hjw hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjs ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj< hhhjd hMeubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 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&] refdomainjreftypej3 reftargetj modnameN classnameNjj)}j]j_ c.dma_fence_timestampasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjP)}(hjSh]h*}(hj hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj ubj )}(hfenceh]hfence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj ubah}(h]h ]h"]h$]h&]jjuh1jwhj< hhhjd hMeubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj8 hhhjd hMeubah}(h]j3 ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjd hMehj5 hhubj- )}(hhh]h)}(h1helper to get the completion timestamp of a fenceh]h1helper to get the completion timestamp of a fence}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMehj hhubah}(h]h ]h"]h$]h&]uh1j, hj5 hhhjd hMeubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j+ jO j+ jP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hj5 h]h Parameters}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj3 ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMihj/ ubj )}(hhh]j )}(h=``struct dma_fence *fence`` fence to get the timestamp from. h](j )}(h``struct dma_fence *fence``h]j)}(hjT h]hstruct dma_fence *fence}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjR ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMfhjN ubj )}(hhh]h)}(h fence to get the timestamp from.h]h fence to get the timestamp from.}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1hhji hMfhjj ubah}(h]h ]h"]h$]h&]uh1j hjN ubeh}(h]h ]h"]h$]h&]uh1j hji hMfhjK ubah}(h]h ]h"]h$]h&]uh1j hj/ ubh)}(h**Description**h]j^ )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhhj/ ubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMghj/ ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_wait (C function)c.dma_fence_waithNtauh1jhjzhhhNhNubj)}(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](j9)}(hsignedh]hsigned}(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hMubj9)}(hlongh]hlong}(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj hhhj hMubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hMubj)}(hdma_fence_waith]j )}(hdma_fence_waith]hdma_fence_wait}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj hhhj hMubjx)}(h$(struct dma_fence *fence, bool intr)h](j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj- hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj) ubj)}(h h]h }(hj: hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj) ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjK hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjH ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjM modnameN classnameNjj)}j]j;)}j3j sbc.dma_fence_waitasbuh1hhj) ubj)}(h h]h }(hjk hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj) ubjP)}(hjSh]h*}(hjy hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj) ubj )}(hfenceh]hfence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj) ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj% ubj~)}(h bool intrh](j9)}(hj#]h]hbool}(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj )}(hintrh]hintr}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj% ubeh}(h]h ]h"]h$]h&]jjuh1jwhj hhhj hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj hhhj hMubah}(h]j ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj hMhj hhubj- )}(hhh]h)}(h#sleep until the fence gets signaledh]h#sleep until the fence gets signaled}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj hhubah}(h]h ]h"]h$]h&]uh1j, hj hhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j jO j jP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj ubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on 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:190: ./include/linux/dma-fence.hhMhj 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: hMhj ubj )}(h0``bool intr`` if true, do an interruptible wait h](j )}(h ``bool intr``h]j)}(hj^ h]h bool intr}(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:190: ./include/linux/dma-fence.hhMhjX ubj )}(hhh]h)}(h!if true, do an interruptible waith]h!if true, do an interruptible wait}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjs hMhjt ubah}(h]h ]h"]h$]h&]uh1j hjX ubeh}(h]h ]h"]h$]h&]uh1j hjs hMhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]j^ )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj ubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj ubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj ubh)}(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().}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_is_array (C function)c.dma_fence_is_arrayhNtauh1jhjzhhhNhNubj)}(hhh](j)}(h1bool dma_fence_is_array (struct dma_fence *fence)h]j)}(h0bool dma_fence_is_array(struct dma_fence *fence)h](j9)}(hj#]h]hbool}(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hMubj)}(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&]jjuh1jhj hhhj hMubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjXmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_is_arrayasbuh1hhj4ubj)}(h h]h }(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj4ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj0ubah}(h]h ]h"]h$]h&]jjuh1jwhj hhhj hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj hhhj hMubah}(h]j ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj hMhj hhubj- )}(hhh]h)}(h+check if a fence is from the array subclassh]h+check if a fence is from the array subclass}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j, hj hhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./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)}(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:190: ./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 hjubh)}(h**Description**h]j^ )}(hj7h]h Description}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj5ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubh)}(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.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_is_chain (C function)c.dma_fence_is_chainhNtauh1jhjzhhhNhNubj)}(hhh](j)}(h1bool dma_fence_is_chain (struct dma_fence *fence)h]j)}(h0bool dma_fence_is_chain(struct dma_fence *fence)h](j9)}(hj#]h]hbool}(hj|hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjxhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxhhhjhMubj)}(hdma_fence_is_chainh]j )}(hdma_fence_is_chainh]hdma_fence_is_chain}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjxhhhjhMubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_is_chainasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjxhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjthhhjhMubah}(h]joah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjqhhubj- )}(hhh]h)}(h+check if a fence is from the chain subclassh]h+check if a fence is from the chain subclass}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj8hhubah}(h]h ]h"]h$]h&]uh1j, hjqhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jSjO jSjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hj]h]h Parameters}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj[ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjWubj )}(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&]uh1jhjzubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjvubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjvubeh}(h]h ]h"]h$]h&]uh1j hjhMhjsubah}(h]h ]h"]h$]h&]uh1j hjWubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjWubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjWubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_fence_is_container (C function)c.dma_fence_is_containerhNtauh1jhjzhhhNhNubj)}(hhh](j)}(h5bool dma_fence_is_container (struct dma_fence *fence)h]j)}(h4bool dma_fence_is_container(struct dma_fence *fence)h](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj hMubj)}(hdma_fence_is_containerh]j )}(hdma_fence_is_containerh]hdma_fence_is_container}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhj hMubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjXmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_is_containerasbuh1hhj4ubj)}(h h]h }(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj4ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj0ubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhj hMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhj hMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj hMhjhhubj- )}(hhh]h)}(h0check if a fence is a container for other fencesh]h0check if a fence is a container for other fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjzhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./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)}(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:190: ./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 hjubh)}(h**Description**h]j^ )}(hj7h]h Description}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj5ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubh)}(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.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjzhhhNhNubeh}(h]dma-fences-functions-referenceah ]h"]dma fences functions referenceah$]h&]uh1hhjwhhhhhKubh)}(hhh](h)}(hDMA Fence Arrayh]hDMA Fence Array}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_fence_array_alloc (C function)c.dma_fence_array_allochNtauh1jhjkhhhNhNubj)}(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)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]j;)}j3dma_fence_array_allocsbc.dma_fence_array_allocasbuh1hhjhhhjhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjhhhjhKubj)}(hdma_fence_array_alloch]j )}(hjh]hdma_fence_array_alloc}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhKubjx)}(h(int num_fences)h]j~)}(hint num_fencesh](j9)}(hinth]hint}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj )}(h num_fencesh]h num_fences}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubah}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhKubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhKhjhhubj- )}(hhh]h)}(hAllocate a custom fence arrayh]hAllocate a custom fence array}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjRhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jmjO jmjP jQ jR uh1jhhhjkhNhNubjT )}(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]j^ )}(hjwh]h Parameters}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjuubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjqubj )}(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:196: ./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 hjhKhjubah}(h]h ]h"]h$]h&]uh1j hjqubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjqubh)}(h2Return dma fence array on success, NULL on failureh]h2Return dma fence array on success, NULL on failure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjqubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjkhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_fence_array_init (C function)c.dma_fence_array_inithNtauh1jhjkhhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj$hKubj)}(hdma_fence_array_inith]j )}(hdma_fence_array_inith]hdma_fence_array_init}(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhj$hKubjx)}(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)}(hjh]hstruct}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjnubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjsmodnameN classnameNjj)}j]j;)}j3j9sbc.dma_fence_array_initasbuh1hhjOubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOubjP)}(hjSh]h*}(hjhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjOubj )}(harrayh]harray}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjKubj~)}(hint num_fencesh](j9)}(hinth]hint}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(h num_fencesh]h num_fences}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjKubj~)}(hstruct dma_fence **fencesh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jc.dma_fence_array_initasbuh1hhjubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hjDhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubjP)}(hjSh]h*}(hjQhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfencesh]hfences}(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjKubj~)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj|modnameN classnameNjj)}j]jc.dma_fence_array_initasbuh1hhjsubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj )}(hcontexth]hcontext}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjKubj~)}(hunsigned seqnoh](j9)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hseqnoh]hseqno}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjKubj~)}(hbool signal_on_anyh](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(h signal_on_anyh]h signal_on_any}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjKubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhj$hKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhj$hKubah}(h]j ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj$hKhj hhubj- )}(hhh]h)}(hInit a custom fence arrayh]hInit a custom fence array}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj6hhubah}(h]h ]h"]h$]h&]uh1j, hj hhhj$hKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jQjO jQjP jQ jR uh1jhhhjkhNhNubjT )}(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]j^ )}(hj[h]h Parameters}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjYubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjUubj )}(hhh](j )}(hA``struct dma_fence_array *array`` [in] dma fence array to arm h](j )}(h!``struct dma_fence_array *array``h]j)}(hjzh]hstruct dma_fence_array *array}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjtubj )}(hhh]h)}(h[in] dma fence array to armh]h[in] dma fence array to arm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]uh1j hjhKhjqubj )}(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:196: ./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 hjhKhjqubj )}(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:196: ./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 hjhKhjqubj )}(h-``u64 context`` [in] fence context to use h](j )}(h``u64 context``h]j)}(hj%h]h u64 context}(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:196: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h[in] fence context to useh]h[in] fence context to use}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hKhj;ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj:hKhjqubj )}(h2``unsigned seqno`` [in] sequence number to use h](j )}(h``unsigned seqno``h]j)}(hj^h]hunsigned 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:196: ./drivers/dma-buf/dma-fence-array.chKhjXubj )}(hhh]h)}(h[in] sequence number to useh]h[in] sequence number to use}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshKhjtubah}(h]h ]h"]h$]h&]uh1j hjXubeh}(h]h ]h"]h$]h&]uh1j hjshKhjqubj )}(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:196: ./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 hjhKhjqubeh}(h]h ]h"]h$]h&]uh1j hjUubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjUubh)}(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 }(hjhhhNhNubj^ )}(h**dma_fence_array_create**h]hdma_fence_array_create}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] 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:196: ./drivers/dma-buf/dma-fence-array.chKhjUubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjkhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_fence_array_create (C function)c.dma_fence_array_createhNtauh1jhjkhhhNhNubj)}(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)}(hjh]hstruct}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%hhhj6hKubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hjHhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjJmodnameN classnameNjj)}j]j;)}j3dma_fence_array_createsbc.dma_fence_array_createasbuh1hhj%hhhj6hKubj)}(h h]h }(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%hhhj6hKubjP)}(hjSh]h*}(hjwhhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj%hhhj6hKubj)}(hdma_fence_array_createh]j )}(hjfh]hdma_fence_array_create}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhj%hhhj6hKubjx)}(h\(int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](j~)}(hint num_fencesh](j9)}(hinth]hint}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(h num_fencesh]h num_fences}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hstruct dma_fence **fencesh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jdc.dma_fence_array_createasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjP)}(hjSh]h*}(hj"hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubjP)}(hjSh]h*}(hj/hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjubj )}(hfencesh]hfences}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjUubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjZmodnameN classnameNjj)}j]jdc.dma_fence_array_createasbuh1hhjQubj)}(h h]h }(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQubj )}(hcontexth]hcontext}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hunsigned seqnoh](j9)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hseqnoh]hseqno}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubj~)}(hbool signal_on_anyh](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(h signal_on_anyh]h signal_on_any}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjubeh}(h]h ]h"]h$]h&]jjuh1jwhj%hhhj6hKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj!hhhj6hKubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj6hKhjhhubj- )}(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:196: ./drivers/dma-buf/dma-fence-array.chKhjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhj6hKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j/jO j/jP jQ jR uh1jhhhjkhNhNubjT )}(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]j^ )}(hj9h]h Parameters}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj7ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj3ubj )}(hhh](j )}(h@``int num_fences`` [in] number of fences to add in the array h](j )}(h``int num_fences``h]j)}(hjXh]hint num_fences}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjRubj )}(hhh]h)}(h,[in] number of fences to add in the arrayh]h,[in] number of fences to add in the array}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhKhjnubah}(h]h ]h"]h$]h&]uh1j hjRubeh}(h]h ]h"]h$]h&]uh1j hjmhKhjOubj )}(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:196: ./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 hjhKhjOubj )}(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:196: ./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 hjhKhjOubj )}(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:196: ./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 hjhKhjOubj )}(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:196: ./drivers/dma-buf/dma-fence-array.chKhj6ubj )}(hhh]h)}(h([in] signal on any fence in the arrayh]h([in] signal on any fence in the array}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhKhjRubah}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]uh1j hjQhKhjOubeh}(h]h ]h"]h$]h&]uh1j hj3ubh)}(h**Description**h]j^ )}(hjwh]h Description}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjuubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj3ubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj3ubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj3ubh)}(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 }(hjhhhNhNubj^ )}(h**signal_on_any**h]h signal_on_any}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubh} is true the fence array signals if any fence in the array signals, otherwise it signals when all fences in the array signal.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjkhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_fence_match_context (C function)c.dma_fence_match_contexthNtauh1jhjkhhhNhNubj)}(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](j9)}(hj#]h]hbool}(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(hdma_fence_match_contexth]j )}(hdma_fence_match_contexth]hdma_fence_match_context}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhMubjx)}(h&(struct dma_fence *fence, u64 context)h](j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj)}(h h]h }(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjHmodnameN classnameNjj)}j]j;)}j3jsbc.dma_fence_match_contextasbuh1hhj$ubj)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubjP)}(hjSh]h*}(hjthhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj$ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj ubj~)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjmodnameN classnameNjj)}j]jbc.dma_fence_match_contextasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hcontexth]hcontext}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj ubeh}(h]h ]h"]h$]h&]jjuh1jwhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhMubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhMhjhhubj- )}(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:196: ./drivers/dma-buf/dma-fence-array.chMhjhhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j jO j jP jQ jR uh1jhhhjkhNhNubjT )}(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]j^ )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./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)}(hj4h]hstruct dma_fence *fence}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chMhj.ubj )}(hhh]h)}(h[in] fence or fence arrayh]h[in] fence or fence array}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhMhjJubah}(h]h ]h"]h$]h&]uh1j hj.ubeh}(h]h ]h"]h$]h&]uh1j hjIhMhj+ubj )}(hB``u64 context`` [in] fence context to check all fences against h](j )}(h``u64 context``h]j)}(hjmh]h u64 context}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chMhjgubj )}(hhh]h)}(h1[in] fence context to check all fences againsth]h1[in] fence context to check all fences against}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]uh1j hjhMhj+ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j^ )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjkhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_array_cb (C struct)c.dma_fence_array_cbhNtauh1jhjkhhhNhNubj)}(hhh](j)}(hdma_fence_array_cbh]j)}(hstruct dma_fence_array_cbh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(hdma_fence_array_cbh]j )}(hjh]hdma_fence_array_cb}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjhhhjhKubah}(h]jah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjhKhjhhubj- )}(hhh]h)}(hcallback helper for fence arrayh]hcallback helper for fence array}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhj,hhubah}(h]h ]h"]h$]h&]uh1j, hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]jM jjN jGjO jGjP jQ jR uh1jhhhjkhNhNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjOubh:}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhjKubj)}(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; };}hjlsbah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhjKubh)}(h **Members**h]j^ )}(hj}h]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj{ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhjKubj )}(hhh](j )}(h.``cb`` fence callback structure for signaling h](j )}(h``cb``h]j)}(hjh]hcb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhjubj )}(hhh]h)}(h&fence callback structure for signalingh]h&fence callback structure for signaling}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h4``array`` reference to the parent fence array objecth](j )}(h ``array``h]j)}(hjh]harray}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhjubj )}(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:199: ./include/linux/dma-fence-array.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjKubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjkhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_array (C struct)c.dma_fence_arrayhNtauh1jhjkhhhNhNubj)}(hhh](j)}(hdma_fence_arrayh]j)}(hstruct dma_fence_arrayh](j)}(hjh]hstruct}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhhj<hKubj)}(hdma_fence_arrayh]j )}(hj)h]hdma_fence_array}(hjOhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjKuba+h}(h]h ](j j eh"]h$]h&]jjuh1jhj+hhhj<hKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj'hhhj<hKubah}(h]j"ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj<hKhj$hhubj- )}(hhh]h)}(h%fence to represent an array of fencesh]h%fence to represent an array of fences}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhjnhhubah}(h]h ]h"]h$]h&]uh1j, hj$hhhj<hKubeh}(h]h ](jstructeh"]h$]h&]jM jjN jjO jjP jQ jR uh1jhhhjkhNhNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK!hjubj)}(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[] ; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK#hjubh)}(h **Members**h]j^ )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK-hjubj )}(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:199: ./include/linux/dma-fence-array.hhKhjubj )}(hhh]h)}(hfence base classh]hfence base class}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h%``lock`` spinlock for fence handling h](j )}(h``lock``h]j)}(hj h]hlock}(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:199: ./include/linux/dma-fence-array.hhK hj ubj )}(hhh]h)}(hspinlock for fence handlingh]hspinlock for fence handling}(hj0 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-``num_fences`` number of fences in the array h](j )}(h``num_fences``h]j)}(hjP h]h num_fences}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjN ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK!hjJ ubj )}(hhh]h)}(hnumber of fences in the arrayh]hnumber of fences in the array}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1hhje hK!hjf ubah}(h]h ]h"]h$]h&]uh1j hjJ ubeh}(h]h ]h"]h$]h&]uh1j hje hK!hjubj )}(h2``num_pending`` fences in the array still pending h](j )}(h``num_pending``h]j)}(hj h]h num_pending}(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:199: ./include/linux/dma-fence-array.hhK"hj ubj )}(hhh]h)}(h!fences in the array still pendingh]h!fences in the array still pending}(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``fences`` array of the fences h](j )}(h ``fences``h]j)}(hj h]hfences}(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:199: ./include/linux/dma-fence-array.hhK#hj ubj )}(hhh]h)}(harray of the fencesh]harray of the fences}(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$``work`` internal irq_work function 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:199: ./include/linux/dma-fence-array.hhK$hj ubj )}(hhh]h)}(hinternal irq_work functionh]hinternal irq_work function}(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'``callbacks`` array of callback helpersh](j )}(h ``callbacks``h]j)}(hj4!h]h callbacks}(hj6!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2!ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK$hj.!ubj )}(hhh]h)}(harray of callback helpersh]harray of callback helpers}(hjM!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK%hjJ!ubah}(h]h ]h"]h$]h&]uh1j hj.!ubeh}(h]h ]h"]h$]h&]uh1j hjI!hK$hjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjkhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jto_dma_fence_array (C function)c.to_dma_fence_arrayhNtauh1jhjkhhhNhNubj)}(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)}(hjh]hstruct}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK4ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!hhhj!hK4ubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj!modnameN classnameNjj)}j]j;)}j3to_dma_fence_arraysbc.to_dma_fence_arrayasbuh1hhj!hhhj!hK4ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!hhhj!hK4ubjP)}(hjSh]h*}(hj!hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj!hhhj!hK4ubj)}(hto_dma_fence_arrayh]j )}(hj!h]hto_dma_fence_array}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj!hhhj!hK4ubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"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&] refdomainjreftypej3 reftargetj("modnameN classnameNjj)}j]j!c.to_dma_fence_arrayasbuh1hhj"ubj)}(h h]h }(hjD"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubjP)}(hjSh]h*}(hjR"hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj"ubj )}(hfenceh]hfence}(hj_"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj"ubah}(h]h ]h"]h$]h&]jjuh1jwhj!hhhj!hK4ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj!hhhj!hK4ubah}(h]j!ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj!hK4hj!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:199: ./include/linux/dma-fence-array.hhK4hj"hhubah}(h]h ]h"]h$]h&]uh1j, hj!hhhj!hK4ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j"jO j"jP jQ jR uh1jhhhjkhNhNubjT )}(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]j^ )}(hj"h]h Parameters}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj"ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK8hj"ubj )}(hhh]j )}(h?``struct dma_fence *fence`` fence to cast to a dma_fence_array 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:199: ./include/linux/dma-fence-array.hhK5hj"ubj )}(hhh]h)}(h"fence to cast to a dma_fence_arrayh]h"fence to cast to a dma_fence_array}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hK5hj"ubah}(h]h ]h"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]uh1j hj"hK5hj"ubah}(h]h ]h"]h$]h&]uh1j hj"ubh)}(h**Description**h]j^ )}(hj#h]h Description}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj#ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK7hj"ubh)}(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.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK6hj"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjkhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_fence_array_for_each (C macro)c.dma_fence_array_for_eachhNtauh1jhjkhhhNhNubj)}(hhh](j)}(hdma_fence_array_for_eachh]j)}(hdma_fence_array_for_eachh]j)}(hdma_fence_array_for_eachh]j )}(hjD#h]hdma_fence_array_for_each}(hjN#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJ#ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjF#hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKDubah}(h]h ]h"]h$]h&]jjj uh1jj j hjB#hhhja#hKDubah}(h]j=#ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhja#hKDhj?#hhubj- )}(hhh]h}(h]h ]h"]h$]h&]uh1j, hj?#hhhja#hKDubeh}(h]h ](jmacroeh"]h$]h&]jM jjN jz#jO jz#jP jQ jR uh1jhhhjkhNhNubh)}(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:199: ./include/linux/dma-fence-array.hhKFhjkhhubh)}(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:199: ./include/linux/dma-fence-array.hhKDhj#ubah}(h]h ]h"]h$]h&]uh1hhj#hKDhjkhhubjT )}(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]j^ )}(hj#h]h Parameters}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj#ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKHhj#ubj )}(hhh](j )}(h``fence`` current fence h](j )}(h ``fence``h]j)}(hj#h]hfence}(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:199: ./include/linux/dma-fence-array.hhKEhj#ubj )}(hhh]h)}(h current fenceh]h current fence}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hKEhj#ubah}(h]h ]h"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]uh1j hj#hKEhj#ubj )}(h``index`` index into the array h](j )}(h ``index``h]j)}(hj $h]hindex}(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:199: ./include/linux/dma-fence-array.hhKFhj$ubj )}(hhh]h)}(hindex into the arrayh]hindex into the array}(hj&$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"$hKFhj#$ubah}(h]h ]h"]h$]h&]uh1j hj$ubeh}(h]h ]h"]h$]h&]uh1j hj"$hKFhj#ubj )}(h*``head`` potential dma_fence_array object h](j )}(h``head``h]j)}(hjF$h]hhead}(hjH$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD$ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKGhj@$ubj )}(hhh]h)}(h potential dma_fence_array objecth]h potential dma_fence_array object}(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#ubeh}(h]h ]h"]h$]h&]uh1j hj#ubh)}(h**Description**h]j^ )}(hj$h]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj$ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKIhj#ubh)}(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$hhhNhNubj^ )}(h **array**h]harray}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j] 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$hhhNhNubj^ )}(h **array**h]harray}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj$ubh itself.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKHhj#ubh)}(h9For a deep dive iterator see dma_fence_unwrap_for_each().h]h9For a deep dive iterator see dma_fence_unwrap_for_each().}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKKhj#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjkhhhNhNubeh}(h]dma-fence-arrayah ]h"]dma fence arrayah$]h&]uh1hhjwhhhhhKubh)}(hhh](h)}(hDMA Fence Chainh]hDMA Fence Chain}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_fence_chain_walk (C function)c.dma_fence_chain_walkhNtauh1jhj$hhhNhNubj)}(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)}(hjh]hstruct}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chK ubj)}(h h]h }(hj %hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%hhhj%hK ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj1%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.%ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj3%modnameN classnameNjj)}j]j;)}j3dma_fence_chain_walksbc.dma_fence_chain_walkasbuh1hhj%hhhj%hK ubj)}(h h]h }(hjR%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%hhhj%hK ubjP)}(hjSh]h*}(hj`%hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj%hhhj%hK ubj)}(hdma_fence_chain_walkh]j )}(hjO%h]hdma_fence_chain_walk}(hjq%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjm%ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj%hhhj%hK ubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%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&] refdomainjreftypej3 reftargetj%modnameN classnameNjj)}j]jM%c.dma_fence_chain_walkasbuh1hhj%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubjP)}(hjSh]h*}(hj%hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj%ubj )}(hfenceh]hfence}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj%ubah}(h]h ]h"]h$]h&]jjuh1jwhj%hhhj%hK ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj %hhhj%hK ubah}(h]j%ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj%hK hj%hhubj- )}(hhh]h)}(hchain walking functionh]hchain walking function}(hj &hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chK hj &hhubah}(h]h ]h"]h$]h&]uh1j, hj%hhhj%hK ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j%&jO j%&jP jQ jR uh1jhhhj$hNhNubjT )}(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]j^ )}(hj/&h]h Parameters}(hj1&hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj-&ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chK$hj)&ubj )}(hhh]j )}(h/``struct dma_fence *fence`` current chain node h](j )}(h``struct dma_fence *fence``h]j)}(hjN&h]hstruct dma_fence *fence}(hjP&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL&ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chK!hjH&ubj )}(hhh]h)}(hcurrent chain nodeh]hcurrent chain node}(hjg&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjc&hK!hjd&ubah}(h]h ]h"]h$]h&]uh1j hjH&ubeh}(h]h ]h"]h$]h&]uh1j hjc&hK!hjE&ubah}(h]h ]h"]h$]h&]uh1j hj)&ubh)}(h**Description**h]j^ )}(hj&h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj&ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chK#hj)&ubh)}(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.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chK"hj)&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj$hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_fence_chain_find_seqno (C function)c.dma_fence_chain_find_seqnohNtauh1jhj$hhhNhNubj)}(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](j9)}(hinth]hint}(hj&hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj&hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKPubj)}(h h]h }(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&hhhj&hKPubj)}(hdma_fence_chain_find_seqnoh]j )}(hdma_fence_chain_find_seqnoh]hdma_fence_chain_find_seqno}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj&hhhj&hKPubjx)}(h+(struct dma_fence **pfence, uint64_t seqno)h](j~)}(hstruct dma_fence **pfenceh](j)}(hjh]hstruct}(hj 'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'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&] refdomainjreftypej3 reftargetj+'modnameN classnameNjj)}j]j;)}j3j&sbc.dma_fence_chain_find_seqnoasbuh1hhj'ubj)}(h h]h }(hjI'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubjP)}(hjSh]h*}(hjW'hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj'ubjP)}(hjSh]h*}(hjd'hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj'ubj )}(hpfenceh]hpfence}(hjq'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj'ubj~)}(huint64_t seqnoh](h)}(hhh]j )}(huint64_th]huint64_t}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj'modnameN classnameNjj)}j]jE'c.dma_fence_chain_find_seqnoasbuh1hhj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj )}(hseqnoh]hseqno}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj'ubeh}(h]h ]h"]h$]h&]jjuh1jwhj&hhhj&hKPubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj&hhhj&hKPubah}(h]j&ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj&hKPhj&hhubj- )}(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:205: ./drivers/dma-buf/dma-fence-chain.chKPhj'hhubah}(h]h ]h"]h$]h&]uh1j, hj&hhhj&hKPubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j'jO j'jP jQ jR uh1jhhhj$hNhNubjT )}(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]j^ )}(hj(h]h Parameters}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj(ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./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:205: ./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&]uh1hhj9(hKQhj:(ubah}(h]h ]h"]h$]h&]uh1j hj(ubeh}(h]h ]h"]h$]h&]uh1j hj9(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:205: ./drivers/dma-buf/dma-fence-chain.chKRhjW(ubj )}(hhh]h)}(h!the sequence number to search forh]h!the sequence number to search for}(hjv(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjr(hKRhjs(ubah}(h]h ]h"]h$]h&]uh1j hjW(ubeh}(h]h ]h"]h$]h&]uh1j hjr(hKRhj(ubeh}(h]h ]h"]h$]h&]uh1j hj'ubh)}(h**Description**h]j^ )}(hj(h]h Description}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj(ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKThj'ubh)}(hAdvance 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.h]hAdvance 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.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKShj'ubh)}(hgReturns EINVAL if the fence is not a chain node or the sequence number has not yet advanced far enough.h]hgReturns EINVAL if the fence is not a chain node or the sequence number has not yet advanced far enough.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKVhj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj$hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_fence_chain_init (C function)c.dma_fence_chain_inithNtauh1jhj$hhhNhNubj)}(hhh](j)}(hzvoid dma_fence_chain_init (struct dma_fence_chain *chain, struct dma_fence *prev, struct dma_fence *fence, uint64_t seqno)h]j)}(hyvoid dma_fence_chain_init(struct dma_fence_chain *chain, struct dma_fence *prev, struct dma_fence *fence, uint64_t seqno)h](j9)}(hvoidh]hvoid}(hj(hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj(hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKubj)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(hhhj(hKubj)}(hdma_fence_chain_inith]j )}(hdma_fence_chain_inith]hdma_fence_chain_init}(hj )hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj )ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj(hhhj(hKubjx)}(h`(struct dma_fence_chain *chain, struct dma_fence *prev, struct dma_fence *fence, uint64_t seqno)h](j~)}(hstruct dma_fence_chain *chainh](j)}(hjh]hstruct}(hj))hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%)ubj)}(h h]h }(hj6)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%)ubh)}(hhh]j )}(hdma_fence_chainh]hdma_fence_chain}(hjG)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjD)ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjI)modnameN classnameNjj)}j]j;)}j3j)sbc.dma_fence_chain_initasbuh1hhj%)ubj)}(h h]h }(hjg)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%)ubjP)}(hjSh]h*}(hju)hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj%)ubj )}(hchainh]hchain}(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%)ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj!)ubj~)}(hstruct dma_fence *prevh](j)}(hjh]hstruct}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)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&] refdomainjreftypej3 reftargetj)modnameN classnameNjj)}j]jc)c.dma_fence_chain_initasbuh1hhj)ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubjP)}(hjSh]h*}(hj)hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj)ubj )}(hprevh]hprev}(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj!)ubj~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj *hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*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&] refdomainjreftypej3 reftargetj+*modnameN classnameNjj)}j]jc)c.dma_fence_chain_initasbuh1hhj*ubj)}(h h]h }(hjG*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubjP)}(hjSh]h*}(hjU*hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj*ubj )}(hfenceh]hfence}(hjb*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj!)ubj~)}(huint64_t seqnoh](h)}(hhh]j )}(huint64_th]huint64_t}(hj~*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{*ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj*modnameN classnameNjj)}j]jc)c.dma_fence_chain_initasbuh1hhjw*ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw*ubj )}(hseqnoh]hseqno}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjw*ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj!)ubeh}(h]h ]h"]h$]h&]jjuh1jwhj(hhhj(hKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj(hhhj(hKubah}(h]j(ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj(hKhj(hhubj- )}(hhh]h)}(hinitialize a fence chainh]hinitialize a fence chain}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKhj*hhubah}(h]h ]h"]h$]h&]uh1j, hj(hhhj(hKubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j*jO j*jP jQ jR uh1jhhhj$hNhNubjT )}(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]j^ )}(hj*h]h Parameters}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj*ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./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:205: ./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)}(hjN+h]hstruct dma_fence *prev}(hjP+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL+ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKhjH+ubj )}(hhh]h)}(hthe previous fenceh]hthe previous fence}(hjg+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjc+hKhjd+ubah}(h]h ]h"]h$]h&]uh1j hjH+ubeh}(h]h ]h"]h$]h&]uh1j hjc+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:205: ./drivers/dma-buf/dma-fence-chain.chKhj+ubj )}(hhh]h)}(hthe current fenceh]hthe current 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 )}(hB``uint64_t seqno`` the sequence number to use for the fence chain 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:205: ./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]j^ )}(hj+h]h Description}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj+ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./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:205: ./drivers/dma-buf/dma-fence-chain.chKhj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj$hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_chain (C struct)c.dma_fence_chainhNtauh1jhj$hhhNhNubj)}(hhh](j)}(hdma_fence_chainh]j)}(hstruct dma_fence_chainh](j)}(hjh]hstruct}(hj@,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<,hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKubj)}(h h]h }(hjN,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<,hhhjM,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&]jjuh1jhj<,hhhjM,hKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj8,hhhjM,hKubah}(h]j3,ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjM,hKhj5,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:208: ./include/linux/dma-fence-chain.hhKhj,hhubah}(h]h ]h"]h$]h&]uh1j, hj5,hhhjM,hKubeh}(h]h ](jstructeh"]h$]h&]jM jjN j,jO j,jP jQ jR uh1jhhhj$hNhNubjT )}(hXm**Definition**:: struct dma_fence_chain { struct dma_fence base; struct dma_fence *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](j^ )}(h**Definition**h]h Definition}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj,ubh:}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKhj,ubj)}(hstruct dma_fence_chain { struct dma_fence base; struct dma_fence *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 *prev; u64 prev_seqno; struct dma_fence *fence; union { struct dma_fence_cb cb; struct irq_work work; }; spinlock_t lock; };}hj,sbah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKhj,ubh)}(h **Members**h]j^ )}(hj,h]hMembers}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj,ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK$hj,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:208: ./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:208: ./include/linux/dma-fence-chain.hhKhj"-ubj )}(hhh]h)}(hprevious fence of the chainh]hprevious fence of the chain}(hjA-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)}(hja-h]h prev_seqno}(hjc-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:208: ./include/linux/dma-fence-chain.hhKhj[-ubj )}(hhh]h)}(h1original previous seqno before garbage collectionh]h1original previous seqno before garbage collection}(hjz-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjv-hKhjw-ubah}(h]h ]h"]h$]h&]uh1j hj[-ubeh}(h]h ]h"]h$]h&]uh1j hjv-hKhj,ubj )}(h``fence`` encapsulated fence h](j )}(h ``fence``h]j)}(hj-h]hfence}(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:208: ./include/linux/dma-fence-chain.hhKhj-ubj )}(hhh]h)}(hencapsulated fenceh]hencapsulated 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``{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 hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKhj-ubj )}(hhh]h)}(h anonymoush]h anonymous}(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``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:208: ./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:208: ./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.}(hj4.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./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)}(hjU.h]hwork}(hjW.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS.ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK.hjO.ubj )}(hhh](h)}(hirq work item for signalingh]hirq work item for signaling}(hjn.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK*hjk.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:208: ./include/linux/dma-fence-chain.hhK,hjk.ubeh}(h]h ]h"]h$]h&]uh1j hjO.ubeh}(h]h ]h"]h$]h&]uh1j hjj.hK.hj,ubj )}(h$``lock`` spinlock for fence handlingh](j )}(h``lock``h]j)}(hj.h]hlock}(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:208: ./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:208: ./include/linux/dma-fence-chain.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&]uh1jS hj$hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jto_dma_fence_chain (C function)c.to_dma_fence_chainhNtauh1jhj$hhhNhNubj)}(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)}(hjh]hstruct}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK6ubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.hhhj/hK6ubh)}(hhh]j )}(hdma_fence_chainh]hdma_fence_chain}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj/modnameN classnameNjj)}j]j;)}j3to_dma_fence_chainsbc.to_dma_fence_chainasbuh1hhj.hhhj/hK6ubj)}(h h]h }(hj8/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.hhhj/hK6ubjP)}(hjSh]h*}(hjF/hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj.hhhj/hK6ubj)}(hto_dma_fence_chainh]j )}(hj5/h]hto_dma_fence_chain}(hjW/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjS/ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj.hhhj/hK6ubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjr/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjn/ubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjn/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&] refdomainjreftypej3 reftargetj/modnameN classnameNjj)}j]j3/c.to_dma_fence_chainasbuh1hhjn/ubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjn/ubjP)}(hjSh]h*}(hj/hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjn/ubj )}(hfenceh]hfence}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjn/ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjj/ubah}(h]h ]h"]h$]h&]jjuh1jwhj.hhhj/hK6ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj.hhhj/hK6ubah}(h]j.ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj/hK6hj.hhubj- )}(hhh]h)}(h!cast a fence to a dma_fence_chainh]h!cast a fence to a dma_fence_chain}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK6hj/hhubah}(h]h ]h"]h$]h&]uh1j, hj.hhhj/hK6ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j 0jO j 0jP jQ jR uh1jhhhj$hNhNubjT )}(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_chain, or the dma_fence_chain otherwise.h](h)}(h**Parameters**h]j^ )}(hj0h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj0ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK:hj0ubj )}(hhh]j )}(h?``struct dma_fence *fence`` fence to cast to a dma_fence_array h](j )}(h``struct dma_fence *fence``h]j)}(hj40h]hstruct dma_fence *fence}(hj60hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj20ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK7hj.0ubj )}(hhh]h)}(h"fence to cast to a dma_fence_arrayh]h"fence to cast to a dma_fence_array}(hjM0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjI0hK7hjJ0ubah}(h]h ]h"]h$]h&]uh1j hj.0ubeh}(h]h ]h"]h$]h&]uh1j hjI0hK7hj+0ubah}(h]h ]h"]h$]h&]uh1j hj0ubh)}(h**Description**h]j^ )}(hjo0h]h Description}(hjq0hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjm0ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK9hj0ubh)}(hUReturns NULL if the fence is not a dma_fence_chain, or the dma_fence_chain otherwise.h]hUReturns NULL if the fence is not a dma_fence_chain, or the dma_fence_chain otherwise.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK8hj0ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj$hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&dma_fence_chain_contained (C function)c.dma_fence_chain_containedhNtauh1jhj$hhhNhNubj)}(hhh](j)}(hFstruct dma_fence * dma_fence_chain_contained (struct dma_fence *fence)h]j)}(hDstruct dma_fence *dma_fence_chain_contained(struct dma_fence *fence)h](j)}(hjh]hstruct}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKFubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0hhhj0hKFubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj0modnameN classnameNjj)}j]j;)}j3dma_fence_chain_containedsbc.dma_fence_chain_containedasbuh1hhj0hhhj0hKFubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0hhhj0hKFubjP)}(hjSh]h*}(hj1hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj0hhhj0hKFubj)}(hdma_fence_chain_containedh]j )}(hj0h]hdma_fence_chain_contained}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj0hhhj0hKFubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj.1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*1ubj)}(h h]h }(hj;1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*1ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjL1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjI1ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjN1modnameN classnameNjj)}j]j0c.dma_fence_chain_containedasbuh1hhj*1ubj)}(h h]h }(hjj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*1ubjP)}(hjSh]h*}(hjx1hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj*1ubj )}(hfenceh]hfence}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*1ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj&1ubah}(h]h ]h"]h$]h&]jjuh1jwhj0hhhj0hKFubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj0hhhj0hKFubah}(h]j0ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj0hKFhj0hhubj- )}(hhh]h)}(hreturn the contained fenceh]hreturn the contained fence}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKFhj1hhubah}(h]h ]h"]h$]h&]uh1j, hj0hhhj0hKFubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j1jO j1jP jQ jR uh1jhhhj$hNhNubjT )}(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]j^ )}(hj1h]h Parameters}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj1ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKJhj1ubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hj1h]hstruct dma_fence *fence}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKGhj1ubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hj 2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hKGhj2ubah}(h]h ]h"]h$]h&]uh1j hj1ubeh}(h]h ]h"]h$]h&]uh1j hj2hKGhj1ubah}(h]h ]h"]h$]h&]uh1j hj1ubh)}(h**Description**h]j^ )}(hj+2h]h Description}(hj-2hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj)2ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKIhj1ubh)}(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.}(hjA2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKHhj1ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj$hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_chain_alloc (C macro)c.dma_fence_chain_allochNtauh1jhj$hhhNhNubj)}(hhh](j)}(hdma_fence_chain_alloch]j)}(hdma_fence_chain_alloch]j)}(hdma_fence_chain_alloch]j )}(hjj2h]hdma_fence_chain_alloc}(hjt2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjp2ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjl2hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKUubah}(h]h ]h"]h$]h&]jjj uh1jj j hjh2hhhj2hKUubah}(h]jc2ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj2hKUhje2hhubj- )}(hhh]h}(h]h ]h"]h$]h&]uh1j, hje2hhhj2hKUubeh}(h]h ](jmacroeh"]h$]h&]jM jjN j2jO j2jP jQ jR uh1jhhhj$hNhNubh)}(h``dma_fence_chain_alloc ()``h]j)}(hj2h]hdma_fence_chain_alloc ()}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKWhj$hhubh)}(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]j^ )}(hj2h]h Description}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj2ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKWhj2ubh)}(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.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKVhj2ubh)}(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.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKXhj2ubeh}(h]h ]h"]h$]h&]uh1hhj2hKWhj$hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_fence_chain_free (C function)c.dma_fence_chain_freehNtauh1jhj$hhhNhNubj)}(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](j9)}(hvoidh]hvoid}(hj3hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj3hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKaubj)}(h h]h }(hj$3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3hhhj#3hKaubj)}(hdma_fence_chain_freeh]j )}(hdma_fence_chain_freeh]hdma_fence_chain_free}(hj63hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj23ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj3hhhj#3hKaubjx)}(h(struct dma_fence_chain *chain)h]j~)}(hstruct dma_fence_chain *chainh](j)}(hjh]hstruct}(hjR3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjN3ubj)}(h h]h }(hj_3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjN3ubh)}(hhh]j )}(hdma_fence_chainh]hdma_fence_chain}(hjp3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjm3ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetjr3modnameN classnameNjj)}j]j;)}j3j83sbc.dma_fence_chain_freeasbuh1hhjN3ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjN3ubjP)}(hjSh]h*}(hj3hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjN3ubj )}(hchainh]hchain}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjN3ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hjJ3ubah}(h]h ]h"]h$]h&]jjuh1jwhj3hhhj#3hKaubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj 3hhhj#3hKaubah}(h]j3ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj#3hKahj 3hhubj- )}(hhh]h}(h]h ]h"]h$]h&]uh1j, hj 3hhhj#3hKaubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j3jO j3jP jQ jR uh1jhhhj$hNhNubjT )}(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.zh](h)}(h**Parameters**h]j^ )}(hj3h]h Parameters}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj3ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKehj3ubj )}(hhh]j )}(h5``struct dma_fence_chain *chain`` chain node to free h](j )}(h!``struct dma_fence_chain *chain``h]j)}(hj4h]hstruct dma_fence_chain *chain}(hj 4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKbhj4ubj )}(hhh]h)}(hchain node to freeh]hchain node to free}(hj 4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hKbhj4ubah}(h]h ]h"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]uh1j hj4hKbhj3ubah}(h]h ]h"]h$]h&]uh1j hj3ubh)}(h**Description**h]j^ )}(hjB4h]h Description}(hjD4hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj@4ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKdhj3ubh)}(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.}(hjX4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKchj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj$hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_fence_chain_for_each (C macro)c.dma_fence_chain_for_eachhNtauh1jhj$hhhNhNubj)}(hhh](j)}(hdma_fence_chain_for_eachh]j)}(hdma_fence_chain_for_eachh]j)}(hdma_fence_chain_for_eachh]j )}(hj4h]hdma_fence_chain_for_each}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj4hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKoubah}(h]h ]h"]h$]h&]jjj uh1jj j hj4hhhj4hKoubah}(h]jz4ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj4hKohj|4hhubj- )}(hhh]h}(h]h ]h"]h$]h&]uh1j, hj|4hhhj4hKoubeh}(h]h ](jmacroeh"]h$]h&]jM jjN j4jO j4jP jQ jR uh1jhhhj$hNhNubh)}(h)``dma_fence_chain_for_each (iter, head)``h]j)}(hj4h]h%dma_fence_chain_for_each (iter, head)}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKqhj$hhubh)}(h!iterate over all fences in chain h]h)}(h iterate over all fences in chainh]h iterate over all fences in chain}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKohj4ubah}(h]h ]h"]h$]h&]uh1hhj4hKohj$hhubjT )}(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]j^ )}(hj4h]h Parameters}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj4ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKshj4ubj )}(hhh](j )}(h``iter`` current fence h](j )}(h``iter``h]j)}(hj5h]hiter}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKphj 5ubj )}(hhh]h)}(h current fenceh]h current fence}(hj*5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&5hKphj'5ubah}(h]h ]h"]h$]h&]uh1j hj 5ubeh}(h]h ]h"]h$]h&]uh1j hj&5hKphj5ubj )}(h``head`` starting point h](j )}(h``head``h]j)}(hjJ5h]hhead}(hjL5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH5ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKqhjD5ubj )}(hhh]h)}(hstarting pointh]hstarting point}(hjc5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_5hKqhj`5ubah}(h]h ]h"]h$]h&]uh1j hjD5ubeh}(h]h ]h"]h$]h&]uh1j hj_5hKqhj5ubeh}(h]h ]h"]h$]h&]uh1j hj4ubh)}(h**Description**h]j^ )}(hj5h]h Description}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj5ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKshj4ubh)}(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.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKrhj4ubh)}(h9For a deep dive iterator see dma_fence_unwrap_for_each().h]h9For a deep dive iterator see dma_fence_unwrap_for_each().}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKuhj4ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj$hhhNhNubeh}(h]dma-fence-chainah ]h"]dma fence chainah$]h&]uh1hhjwhhhhhKubh)}(hhh](h)}(hDMA Fence unwraph]hDMA Fence unwrap}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_unwrap (C struct)c.dma_fence_unwraphNtauh1jhj5hhhNhNubj)}(hhh](j)}(hdma_fence_unwraph]j)}(hstruct dma_fence_unwraph](j)}(hjh]hstruct}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5hhhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5hhhj5hKubj)}(hdma_fence_unwraph]j )}(hj5h]hdma_fence_unwrap}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj5hhhj5hKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj5hhhj5hKubah}(h]j5ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj5hKhj5hhubj- )}(hhh]h)}(h#cursor into the container structureh]h#cursor into the container structure}(hj46hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhj16hhubah}(h]h ]h"]h$]h&]uh1j, hj5hhhj5hKubeh}(h]h ](jstructeh"]h$]h&]jM jjN jL6jO jL6jP jQ jR uh1jhhhj5hNhNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hjX6hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjT6ubh:}(hjT6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhjP6ubj)}(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; };}hjq6sbah}(h]h ]h"]h$]h&]jjuh1jhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhjP6ubh)}(h **Members**h]j^ )}(hj6h]hMembers}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj6ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhjP6ubj )}(hhh](j )}(hD``chain`` potential dma_fence_chain, but can be other fence as well h](j )}(h ``chain``h]j)}(hj6h]hchain}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhj6ubj )}(hhh]h)}(h9potential dma_fence_chain, but can be other fence as wellh]h9potential dma_fence_chain, but can be other fence as well}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hKhj6ubah}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]uh1j hj6hKhj6ubj )}(hD``array`` potential dma_fence_array, but can be other fence as well h](j )}(h ``array``h]j)}(hj6h]harray}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhj6ubj )}(hhh]h)}(h9potential dma_fence_array, but can be other fence as wellh]h9potential dma_fence_array, but can be other fence as well}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hKhj6ubah}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]uh1j hj6hKhj6ubj )}(hF``index`` last returned index if **array** is really a dma_fence_arrayh](j )}(h ``index``h]j)}(hj7h]hindex}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhj 7ubj )}(hhh]h)}(hhj9ubj )}(hhh]j )}(h``...`` variable arguments h](j )}(h``...``h]j)}(hj9h]h...}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhj9ubj )}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hKhj9ubah}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]uh1j hj9hKhj9ubah}(h]h ]h"]h$]h&]uh1j hj9ubh)}(h**Description**h]j^ )}(hj9h]h Description}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj9ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhj9ubh)}(hAll fences given as parameters are unwrapped and merged back together as flat dma_fence_array. Useful if multiple containers need to be merged together.h]hAll fences given as parameters are unwrapped and merged back together as flat dma_fence_array. Useful if multiple containers need to be merged together.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK;hj9ubh)}(htImplemented as a macro to allocate the necessary arrays on the stack and account the stack frame size to the caller.h]htImplemented as a macro to allocate the necessary arrays on the stack and account the stack frame size to the caller.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK>hj9ubh)}(hjReturns NULL on memory allocation failure, a dma_fence object representing all the given fences otherwise.h]hjReturns NULL on memory allocation failure, a dma_fence object representing all the given fences otherwise.}(hj-:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKAhj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj5hhhNhNubeh}(h]dma-fence-unwrapah ]h"]dma fence unwrapah$]h&]uh1hhjwhhhhhKubh)}(hhh](h)}(hDMA Fence Sync Fileh]hDMA Fence Sync File}(hjN:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK:hhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jsync_file_create (C function)c.sync_file_createhNtauh1jhjK:hhhNhNubj)}(hhh](j)}(h=struct sync_file * sync_file_create (struct dma_fence *fence)h]j)}(h;struct sync_file *sync_file_create(struct dma_fence *fence)h](j)}(hjh]hstruct}(hju:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq:hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chK9ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq:hhhj:hK9ubh)}(hhh]j )}(h sync_fileh]h sync_file}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj:modnameN classnameNjj)}j]j;)}j3sync_file_createsbc.sync_file_createasbuh1hhjq:hhhj:hK9ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq:hhhj:hK9ubjP)}(hjSh]h*}(hj:hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjq:hhhj:hK9ubj)}(hsync_file_createh]j )}(hj:h]hsync_file_create}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjq:hhhj:hK9ubjx)}(h(struct dma_fence *fence)h]j~)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj: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&] refdomainjreftypej3 reftargetj;modnameN classnameNjj)}j]j:c.sync_file_createasbuh1hhj:ubj)}(h h]h }(hj+;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubjP)}(hjSh]h*}(hj9;hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhj:ubj )}(hfenceh]hfence}(hjF;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj:ubah}(h]h ]h"]h$]h&]jjuh1jwhjq:hhhj:hK9ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjm:hhhj:hK9ubah}(h]jh:ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj:hK9hjj:hhubj- )}(hhh]h)}(hcreates a sync fileh]hcreates a sync file}(hjp;hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chK9hjm;hhubah}(h]h ]h"]h$]h&]uh1j, hjj:hhhj:hK9ubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN j;jO j;jP jQ jR uh1jhhhjK:hNhNubjT )}(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]j^ )}(hj;h]h Parameters}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj;ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chK=hj;ubj )}(hhh]j )}(h;``struct dma_fence *fence`` fence to add to the sync_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:220: ./drivers/dma-buf/sync_file.chK:hj;ubj )}(hhh]h)}(hfence to add to the sync_fenceh]hfence to add to the sync_fence}(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;ubah}(h]h ]h"]h$]h&]uh1j hj;ubh)}(h**Description**h]j^ )}(hj;h]h Description}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj;ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKfile). Returns the sync_file or NULL in case of error.h](hCreates a sync_file containg }(hj<hhhNhNubj^ )}(h **fence**h]hfence}(hj <hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj<ubh5. This function acquires and additional reference of }(hj<hhhNhNubj^ )}(h **fence**h]hfence}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj<ubh for the newly-created }(hj<hhhNhNubh)}(h:c:type:`sync_file`h]j)}(hj0<h]h sync_file}(hj2<hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj.<ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj sync_fileuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chK;hj<ubh{, if it succeeds. The sync_file can be released with fput(sync_file->file). Returns the sync_file or NULL in case of error.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjM<hK;hj;ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjK:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_file_get_fence (C function)c.sync_file_get_fencehNtauh1jhjK:hhhNhNubj)}(hhh](j)}(h/struct dma_fence * sync_file_get_fence (int fd)h]j)}(h-struct dma_fence *sync_file_get_fence(int fd)h](j)}(hjh]hstruct}(hjx<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjt<hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKaubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjt<hhhj<hKaubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<ubah}(h]h ]h"]h$]h&] refdomainjreftypej3 reftargetj<modnameN classnameNjj)}j]j;)}j3sync_file_get_fencesbc.sync_file_get_fenceasbuh1hhjt<hhhj<hKaubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjt<hhhj<hKaubjP)}(hjSh]h*}(hj<hhhNhNubah}(h]h ]j\ah"]h$]h&]uh1jOhjt<hhhj<hKaubj)}(hsync_file_get_fenceh]j )}(hj<h]hsync_file_get_fence}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<ubah}(h]h ](j j eh"]h$]h&]jjuh1jhjt<hhhj<hKaubjx)}(h(int fd)h]j~)}(hint fdh](j9)}(hinth]hint}(hj<hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj<ubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubj )}(hfdh]hfd}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]noemphjjuh1j}hj<ubah}(h]h ]h"]h$]h&]jjuh1jwhjt<hhhj<hKaubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjp<hhhj<hKaubah}(h]jk<ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj<hKahjm<hhubj- )}(hhh]h)}(h)get the fence related to the sync_file fdh]h)get the fence related to the sync_file fd}(hj8=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKahj5=hhubah}(h]h ]h"]h$]h&]uh1j, hjm<hhhj<hKaubeh}(h]h ](jfunctioneh"]h$]h&]jM jjN jP=jO jP=jP jQ jR uh1jhhhjK:hNhNubjT )}(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]j^ )}(hjZ=h]h Parameters}(hj\=hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjX=ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKehjT=ubj )}(hhh]j )}(h.``int fd`` sync_file fd to get the fence from h](j )}(h ``int fd``h]j)}(hjy=h]hint fd}(hj{=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw=ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKbhjs=ubj )}(hhh]h)}(h"sync_file fd to get the fence fromh]h"sync_file fd to get the fence from}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hKbhj=ubah}(h]h ]h"]h$]h&]uh1j hjs=ubeh}(h]h ]h"]h$]h&]uh1j hj=hKbhjp=ubah}(h]h ]h"]h$]h&]uh1j hjT=ubh)}(h**Description**h]j^ )}(hj=h]h Description}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj=ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKdhjT=ubh)}(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 }(hj=hhhNhNubj^ )}(h**fd**h]hfd}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj=ubhx references a valid sync_file and returns a fence that represents all fence in the sync_file. On error NULL is returned.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKchjT=ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjK:hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jsync_file (C struct) c.sync_filehNtauh1jhjK:hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhNubj)}(hhh](j)}(h sync_fileh]j)}(hstruct sync_fileh](j)}(hjh]hstruct}(hj >hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKubj)}(h h]h }(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>hhhj>hKubj)}(h sync_fileh]j )}(hj>h]h sync_file}(hj,>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(>ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj>hhhj>hKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj>hhhj>hKubah}(h]j=ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj>hKhj>hhubj- )}(hhh]h)}(h$sync file to export to the userspaceh]h$sync file to export to the userspace}(hjN>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhjK>hhubah}(h]h ]h"]h$]h&]uh1j, hj>hhhj>hKubeh}(h]h ](jstructeh"]h$]h&]jM jjN jf>jO jf>jP jQ jR uh1jhhhjK:hj>hNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hjr>hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjn>ubh:}(hjn>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhjj>ubj)}(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; };}hj>sbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhjj>ubh)}(h **Members**h]j^ )}(hj>h]hMembers}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj>ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhK*hjj>ubj )}(hhh](j )}(h&``file`` file representing this fence h](j )}(h``file``h]j)}(hj>h]hfile}(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:223: ./include/linux/sync_file.hhKhj>ubj )}(hhh]h)}(hfile representing this fenceh]hfile representing this 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``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)}(hj>h]h user_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:223: ./include/linux/sync_file.hhK)hj>ubj )}(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).}(hj ?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhK'hj ?ubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hj ?hK)hj>ubj )}(h2``sync_file_list`` membership in global file list h](j )}(h``sync_file_list``h]j)}(hj.?h]hsync_file_list}(hj0?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:223: ./include/linux/sync_file.hhKhj(?ubj )}(hhh]h)}(hmembership in global file listh]hmembership in global file list}(hjG?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjC?hKhjD?ubah}(h]h ]h"]h$]h&]uh1j hj(?ubeh}(h]h ]h"]h$]h&]uh1j hjC?hKhj>ubj )}(h&``wq`` wait queue for fence signaling h](j )}(h``wq``h]j)}(hjg?h]hwq}(hji?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje?ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhja?ubj )}(hhh]h)}(hwait queue for fence signalingh]hwait queue for fence signaling}(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 )}(h"``flags`` flags for the sync_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:223: ./include/linux/sync_file.hhKhj?ubj )}(hhh]h)}(hflags for the sync_fileh]hflags for the sync_file}(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 )}(h1``fence`` fence with the fences in the sync_file h](j )}(h ``fence``h]j)}(hj?h]hfence}(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:223: ./include/linux/sync_file.hhKhj?ubj )}(hhh]h)}(h&fence with the fences in the sync_fileh]h&fence with the fences in the sync_file}(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!``cb`` fence callback informationh](j )}(h``cb``h]j)}(hj@h]hcb}(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:223: ./include/linux/sync_file.hhKhj @ubj )}(hhh]h)}(hfence callback informationh]hfence callback information}(hj+@hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.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 hjj>ubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hjK:hhhj>hNubh)}(h**Description**h]j^ )}(hjU@h]h Description}(hjW@hhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjS@ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhK"hjK:hhubh)}(hEflags: POLL_ENABLED: whether userspace is currently poll()'ing or noth]hGflags: POLL_ENABLED: whether userspace is currently poll()’ing or not}(hjk@hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhjK:hhubeh}(h]dma-fence-sync-fileah ]h"]dma fence sync fileah$]h&]uh1hhjwhhhhhKubh)}(hhh](h)}(hDMA Fence Sync File uABIh]hDMA Fence Sync File uABI}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jsync_merge_data (C struct)c.sync_merge_datahNtauh1jhj@hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhNubj)}(hhh](j)}(hsync_merge_datah]j)}(hstruct sync_merge_datah](j)}(hjh]hstruct}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKubj)}(h h]h }(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@hhhj@hKubj)}(hsync_merge_datah]j )}(hj@h]hsync_merge_data}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubah}(h]h ](j j eh"]h$]h&]jjuh1jhj@hhhj@hKubeh}(h]h ]h"]h$]h&]jjj uh1jj j hj@hhhj@hKubah}(h]j@ah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj@hKhj@hhubj- )}(hhh]h)}(h SYNC_IOC_MERGE: merge two fencesh]h SYNC_IOC_MERGE: merge two fences}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhj@hhubah}(h]h ]h"]h$]h&]uh1j, hj@hhhj@hKubeh}(h]h ](jstructeh"]h$]h&]jM jjN jAjO jAjP jQ jR uh1jhhhj@hj@hNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjAubh:}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhj Aubj)}(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; };}hj,Asbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhj Aubh)}(h **Members**h]j^ )}(hj=Ah]hMembers}(hj?AhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj;Aubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK!hj Aubj )}(hhh](j )}(h``name`` name of new fence h](j )}(h``name``h]j)}(hj\Ah]hname}(hj^AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZAubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjVAubj )}(hhh]h)}(hname of new fenceh]hname of new fence}(hjuAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqAhKhjrAubah}(h]h ]h"]h$]h&]uh1j hjVAubeh}(h]h ]h"]h$]h&]uh1j hjqAhKhjSAubj )}(h(``fd2`` file descriptor of second fence h](j )}(h``fd2``h]j)}(hjAh]hfd2}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjAubj )}(hhh]h)}(hfile descriptor of second fenceh]hfile descriptor of second fence}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhKhjAubah}(h]h ]h"]h$]h&]uh1j hjAubeh}(h]h ]h"]h$]h&]uh1j hjAhKhjSAubj )}(h7``fence`` returns the fd of the new fence to userspace h](j )}(h ``fence``h]j)}(hjAh]hfence}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjAubj )}(hhh]h)}(h,returns the fd of the new fence to userspaceh]h,returns the fd of the new fence to userspace}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhKhjAubah}(h]h ]h"]h$]h&]uh1j hjAubeh}(h]h ]h"]h$]h&]uh1j hjAhKhjSAubj )}(h``flags`` merge_data flags h](j )}(h ``flags``h]j)}(hjBh]hflags}(hj BhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjBubj )}(hhh]h)}(hmerge_data flagsh]hmerge_data flags}(hj BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhKhjBubah}(h]h ]h"]h$]h&]uh1j hjBubeh}(h]h ]h"]h$]h&]uh1j hjBhKhjSAubj )}(h;``pad`` padding for 64-bit alignment, should always be zeroh](j )}(h``pad``h]j)}(hj@Bh]hpad}(hjBBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>Bubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhj:Bubj )}(hhh]h)}(h3padding for 64-bit alignment, should always be zeroh]h3padding for 64-bit alignment, should always be zero}(hjYBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjVBubah}(h]h ]h"]h$]h&]uh1j hj:Bubeh}(h]h ]h"]h$]h&]uh1j hjUBhKhjSAubeh}(h]h ]h"]h$]h&]uh1j hj Aubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj@hhhj@hNubh)}(h**Description**h]j^ )}(hjBh]h Description}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjBubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhj@hhubh)}(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}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhj@hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jsync_fence_info (C struct)c.sync_fence_infohNtauh1jhj@hhhj@hNubj)}(hhh](j)}(hsync_fence_infoh]j)}(hstruct sync_fence_infoh](j)}(hjh]hstruct}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK ubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBhhhjBhK ubj)}(hsync_fence_infoh]j )}(hjBh]hsync_fence_info}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubah}(h]h ](j j eh"]h$]h&]jjuh1jhjBhhhjBhK ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjBhhhjBhK ubah}(h]jBah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjBhK hjBhhubj- )}(hhh]h)}(hdetailed fence informationh]hdetailed fence information}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK'hjChhubah}(h]h ]h"]h$]h&]uh1j, hjBhhhjBhK ubeh}(h]h ](jstructeh"]h$]h&]jM jjN jCjO jCjP jQ jR uh1jhhhj@hj@hNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hj'ChhhNhNubah}(h]h ]h"]h$]h&]uh1j] hj#Cubh:}(hj#ChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK+hjCubj)}(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@Csbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK-hjCubh)}(h **Members**h]j^ )}(hjQCh]hMembers}(hjSChhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjOCubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK5hjCubj )}(hhh](j )}(h*``obj_name`` name of parent sync_timeline h](j )}(h ``obj_name``h]j)}(hjpCh]hobj_name}(hjrChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnCubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK)hjjCubj )}(hhh]h)}(hname of parent sync_timelineh]hname of parent sync_timeline}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChK)hjCubah}(h]h ]h"]h$]h&]uh1j hjjCubeh}(h]h ]h"]h$]h&]uh1j hjChK)hjgCubj )}(h7``driver_name`` name of driver implementing the parent h](j )}(h``driver_name``h]j)}(hjCh]h driver_name}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK*hjCubj )}(hhh]h)}(h&name of driver implementing the parenth]h&name of driver implementing the parent}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChK*hjCubah}(h]h ]h"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]uh1j hjChK*hjgCubj )}(h<``status`` status of the fence 0:active 1:signaled <0:error h](j )}(h ``status``h]j)}(hjCh]hstatus}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK+hjCubj )}(hhh]h)}(h0status of the fence 0:active 1:signaled <0:errorh]h0status of the fence 0:active 1:signaled <0:error}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChK+hjCubah}(h]h ]h"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]uh1j hjChK+hjgCubj )}(h``flags`` fence_info flags h](j )}(h ``flags``h]j)}(hjDh]hflags}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK,hjDubj )}(hhh]h)}(hfence_info flagsh]hfence_info flags}(hj4DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0DhK,hj1Dubah}(h]h ]h"]h$]h&]uh1j hjDubeh}(h]h ]h"]h$]h&]uh1j hj0DhK,hjgCubj )}(h:``timestamp_ns`` timestamp of status change in nanosecondsh](j )}(h``timestamp_ns``h]j)}(hjTDh]h timestamp_ns}(hjVDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRDubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK,hjNDubj )}(hhh]h)}(h)timestamp of status change in nanosecondsh]h)timestamp of status change in nanoseconds}(hjmDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK-hjjDubah}(h]h ]h"]h$]h&]uh1j hjNDubeh}(h]h ]h"]h$]h&]uh1j hjiDhK,hjgCubeh}(h]h ]h"]h$]h&]uh1j hjCubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj@hhhj@hNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jsync_file_info (C struct)c.sync_file_infohNtauh1jhj@hhhj@hNubj)}(hhh](j)}(hsync_file_infoh]j)}(hstruct sync_file_infoh](j)}(hjh]hstruct}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK3ubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDhhhjDhK3ubj)}(hsync_file_infoh]j )}(hjDh]hsync_file_info}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDubah}(h]h ](j j eh"]h$]h&]jjuh1jhjDhhhjDhK3ubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjDhhhjDhK3ubah}(h]jDah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhjDhK3hjDhhubj- )}(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}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK7hjDhhubah}(h]h ]h"]h$]h&]uh1j, hjDhhhjDhK3ubeh}(h]h ](jstructeh"]h$]h&]jM jjN jEjO jEjP jQ jR uh1jhhhj@hj@hNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjEubh:}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK;hj Eubj)}(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-Esbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK=hj Eubh)}(h **Members**h]j^ )}(hj>Eh]hMembers}(hj@EhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjhjtFubj )}(hhh]h)}(hUpointer to array of struct :c:type:`sync_fence_info` with all fences in the sync_fileh](hpointer to array of struct }(hjFhhhNhNubh)}(h:c:type:`sync_fence_info`h]j)}(hjFh]hsync_fence_info}(hjFhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsync_fence_infouh1hhjFhK>hjFubh! with all fences in the sync_file}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhK>hjFubah}(h]h ]h"]h$]h&]uh1j hjtFubeh}(h]h ]h"]h$]h&]uh1j hjFhK>hjTEubeh}(h]h ]h"]h$]h&]uh1j hj Eubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj@hhhj@hNubh)}(h**Description**h]j^ )}(hjFh]h Description}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjFubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKBhj@hhubh)}(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.t}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK?hj@hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jsync_set_deadline (C struct)c.sync_set_deadlinehNtauh1jhj@hhhj@hNubj)}(hhh](j)}(hsync_set_deadlineh]j)}(hstruct sync_set_deadlineh](j)}(hjh]hstruct}(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKGubj)}(h h]h }(hj+GhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGhhhj*GhKGubj)}(hsync_set_deadlineh]j )}(hjGh]hsync_set_deadline}(hj=GhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9Gubah}(h]h ](j j eh"]h$]h&]jjuh1jhjGhhhj*GhKGubeh}(h]h ]h"]h$]h&]jjj uh1jj j hjGhhhj*GhKGubah}(h]jGah ](j$ j% eh"]h$]h&]j) j* )j+ huh1jhj*GhKGhjGhhubj- )}(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_GhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKPhj\Ghhubah}(h]h ]h"]h$]h&]uh1j, hjGhhhj*GhKGubeh}(h]h ](jstructeh"]h$]h&]jM jjN jwGjO jwGjP jQ jR uh1jhhhj@hj@hNubjT )}(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](j^ )}(h**Definition**h]h Definition}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjGubh:}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKThj{Gubj)}(hCstruct sync_set_deadline { __u64 deadline_ns; __u64 pad; };h]hCstruct sync_set_deadline { __u64 deadline_ns; __u64 pad; };}hjGsbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKVhj{Gubh)}(h **Members**h]j^ )}(hjGh]hMembers}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjGubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK[hj{Gubj )}(hhh](j )}(h.``deadline_ns`` absolute time of the deadline h](j )}(h``deadline_ns``h]j)}(hjGh]h deadline_ns}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKRhjGubj )}(hhh]h)}(habsolute time of the deadlineh]habsolute time of the deadline}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhKRhjGubah}(h]h ]h"]h$]h&]uh1j hjGubeh}(h]h ]h"]h$]h&]uh1j hjGhKRhjGubj )}(h``pad`` must be zeroh](j )}(h``pad``h]j)}(hjHh]hpad}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKRhjGubj )}(hhh]h)}(h must be zeroh]h must be zero}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKShjHubah}(h]h ]h"]h$]h&]uh1j hjGubeh}(h]h ]h"]h$]h&]uh1j hjHhKRhjGubeh}(h]h ]h"]h$]h&]uh1j hj{Gubeh}(h]h ] kernelindentah"]h$]h&]uh1jS hj@hhhj@hNubh)}(h**Description**h]j^ )}(hjHHh]h Description}(hjJHhhhNhNubah}(h]h ]h"]h$]h&]uh1j] hjFHubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKVhj@hhubh)}(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 }(hj^HhhhNhNubh)}(h :c:type:`dma_fence_set_deadline`h]j)}(hjhHh]hdma_fence_set_deadline}(hjjHhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjfHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_fence_set_deadlineuh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKShj^Hubeh}(h]h ]h"]h$]h&]uh1hhjHhKShj@hhubh)}(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}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKUhj@hhubh)}(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, }(hjHhhhNhNubh)}(h :c:type:`t`h]j)}(hjHh]ht}(hjHhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjtuh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKXhjHubhI); deadline_ns = (t.tv_sec * 1000000000L) + t.tv_nsec + ns_until_deadline}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjHhKXhjHubah}(h]h ]h"]h$]h&]uh1hhjHhKXhj@hhubeh}(h]dma-fence-sync-file-uabiah ]h"]dma fence sync file uabiah$]h&]uh1hhjwhhhhhKubh)}(hhh](h)}(hIndefinite DMA Fencesh]hIndefinite DMA Fences}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhhhhhKubh)}(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:}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjHhhubh)}(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.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjIubah}(h]h ]h"]h$]h&]uh1hhjHhhhhhNubh)}(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.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjIubah}(h]h ]h"]h$]h&]uh1hhjHhhhhhNubh)}(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.}(hj5IhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj1Iubah}(h]h ]h"]h$]h&]uh1hhjHhhhhhNubh)}(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.}(hjMIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjIIubah}(h]h ]h"]h$]h&]uh1hhjHhhhhhNubeh}(h]h ]h"]h$]h&]j>jSuh1hhhhKhjHhhubh)}(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:}(hjgIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjHhhubh)}(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|IhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjxIubah}(h]h ]h"]h$]h&]uh1hhjuIhhhhhNubh)}(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.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjIubah}(h]h ]h"]h$]h&]uh1hhjuIhhhhhNubeh}(h]h ]h"]h$]h&]j>jSuh1hhhhMhjHhhubh)}(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.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjHhhubhfigure)}(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 } }h]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 } }}hjIsbah}(h]h ]h"]h$]h&]jjuh1jhjIhhubah}(h]h ]h"]h$]h&]alt#Indefinite Fencing Dependency CyclesrclangDOTuh1jIhjIubhcaption)}(h#Indefinite Fencing Dependency Cycleh]h#Indefinite Fencing Dependency Cycle}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jIhhhKhjIubeh}(h]id1ah ]h"]h$]h&]altjIcaptionjIuh1jIhjHhhhhhNubh)}(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.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjHhhubh)}(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:}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjHhhubh)}(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.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hjJubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhNubh)}(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.}(hj3JhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj/Jubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhNubeh}(h]h ]h"]h$]h&]j>jSuh1hhhhM'hjHhhubeh}(h]indefinite-dma-fencesah ]h"]indefinite dma fencesah$]h&]uh1hhjwhhhhhKubh)}(hhh](h)}(h-Recoverable Hardware Page Faults Implicationsh]h-Recoverable Hardware Page Faults Implications}(hjXJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUJhhhhhM0ubh)}(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.}(hjfJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hjUJhhubh)}(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.}(hjtJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hjUJhhubh)}(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.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjUJhhubh)}(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:}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhjUJhhubh)}(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.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjJubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhNubh)}(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.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhjJubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhNubeh}(h]h ]h"]h$]h&]j>j?uh1hhhhMIhjUJhhubh)}(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:}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjUJhhubh)}(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.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjJubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhNubh)}(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.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjKubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhNubh)}(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().}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjKubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhNubh)}(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.}(hj4KhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hj0Kubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhNubh)}(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.}(hjLKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghjHKubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhNubeh}(h]h ]h"]h$]h&]j>j?uh1hhhhMRhjUJhhubh)}(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.}(hjfKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjUJhhubh)}(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 }(hjtKhhhNhNubhtitle_reference)}(h`Infinite DMA Fences`h]hInfinite DMA Fences}(hj~KhhhNhNubah}(h]h ]h"]h$]h&]uh1j|KhjtKubhXM 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.}(hjtKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMthjUJhhubeh}(h]-recoverable-hardware-page-faults-implicationsah ]h"]-recoverable hardware page faults implicationsah$]h&]uh1hhjwhhhhhM0ubeh}(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_handlerjKerror_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](jj1Qedma buffer ioctls]j aurefids}nameids}(jKjKjjjgj^j^j5j2j|jyjajjjjjjjj^j^jtjqjKjKj j j:j7jwjtjhjej$j$j5j5jH:jE:j@j|@jHjHjRJjOJjKjKu nametypes}(jKjjj^j5j|jajjjj^jtjKj j:jwjhj$j5jH:j@jHjRJjKuh}(jKhjgjFj^jmj2j#jyj8jjjjejjjjjL jQ j_ jd jjj^jjjj+j0jj"jjjQjVj j j"j"jM%jR%j'j'j(j(jR+jW+j-j-j0j0jH3jM3j4j4j'7j,7jS9jX9j<j<j_>jd>j@j@jBjBjDjDjLjMjSjSjJUjOUjWjWjfZjkZj[j[j]j]jqj^j^j^j/`j4`jajajcjcj{ejejhjhjkjkjmjmjojojnqjsqjMsjRsjwuj|ujxjxj{j{j~j~jjjjjjjvj{j jjՋjڋjĎjɎjdjijjjjjjjjjjj!j&jjjjjjjjj/j4jjjKjwj j!j7jjtj=jejzjjjjjjj jjtjyjjjjjjjjjyj~j j%jjjSjXjjjjjjjjj*j/jjj7j<jj j jj3j8j:j?jAjFjjj)j.jjjj jjj!j&jjjjjjjSjXjjjsjxjjjjj*j/jjj3 j8 j j j j jojtjjj$jkjjj jjj!jjjjj"j'j!j!j=#jB#j5j$j%j %j&j&j(j(j3,j8,j.j.j0j0jc2jh2j3j 3jz4j4jE:j5j5j5j7j7j'9j,9j|@jK:jh:jm:jk<jp<j=j>jHj@j@j@jBjBjDjDjGjGjOJjHjKjUJjIjIu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKKsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.