sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget&/translations/zh_CN/driver-api/dma-bufmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/zh_TW/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/it_IT/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ja_JP/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ko_KR/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/sp_SP/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h,Buffer Sharing and Synchronization (dma-buf)h]h,Buffer Sharing and Synchronization (dma-buf)}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh@/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf.rsthKubh paragraph)}(hThe dma-buf subsystem provides the framework for sharing buffers for hardware (DMA) access across multiple device drivers and subsystems, and for synchronizing asynchronous hardware access.h]hThe dma-buf subsystem provides the framework for sharing buffers for hardware (DMA) access across multiple device drivers and subsystems, and for synchronizing asynchronous hardware access.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hAs an example, it is used extensively by the DRM subsystem to exchange buffers between processes, contexts, library APIs within the same process, and also to exchange buffers with other subsystems such as V4L2.h]hAs an example, it is used extensively by the DRM subsystem to exchange buffers between processes, contexts, library APIs within the same process, and also to exchange buffers with other subsystems such as V4L2.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThis document describes the way in which kernel subsystems can use and interact with the three main primitives offered by dma-buf:h]hThis document describes the way in which kernel subsystems can use and interact with the three main primitives offered by dma-buf:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh block_quote)}(hX- dma-buf, representing a sg_table and exposed to userspace as a file descriptor to allow passing between processes, subsystems, devices, etc; - dma-fence, providing a mechanism to signal when an asynchronous hardware operation has completed; and - dma-resv, which manages a set of dma-fences for a particular dma-buf allowing implicit (kernel-ordered) synchronization of work to preserve the illusion of coherent access h]h bullet_list)}(hhh](h list_item)}(hdma-buf, representing a sg_table and exposed to userspace as a file descriptor to allow passing between processes, subsystems, devices, etc;h]h)}(hdma-buf, representing a sg_table and exposed to userspace as a file descriptor to allow passing between processes, subsystems, devices, etc;h]hdma-buf, representing a sg_table and exposed to userspace as a file descriptor to allow passing between processes, subsystems, devices, etc;}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hedma-fence, providing a mechanism to signal when an asynchronous hardware operation has completed; andh]h)}(hedma-fence, providing a mechanism to signal when an asynchronous hardware operation has completed; andh]hedma-fence, providing a mechanism to signal when an asynchronous hardware operation has completed; and}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hdma-resv, which manages a set of dma-fences for a particular dma-buf allowing implicit (kernel-ordered) synchronization of work to preserve the illusion of coherent access h]h)}(hdma-resv, which manages a set of dma-fences for a particular dma-buf allowing implicit (kernel-ordered) synchronization of work to preserve the illusion of coherent accessh]hdma-resv, which manages a set of dma-fences for a particular dma-buf allowing implicit (kernel-ordered) synchronization of work to preserve the illusion of coherent access}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Userspace API principles and useh]h Userspace API principles and use}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhKubh)}(hFor more details on how to design your subsystem's API for dma-buf use, please see Documentation/userspace-api/dma-buf-alloc-exchange.rst.h]hFor more details on how to design your subsystem’s API for dma-buf use, please see Documentation/userspace-api/dma-buf-alloc-exchange.rst.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjFhhubeh}(h] userspace-api-principles-and-useah ]h"] userspace api principles and useah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hShared DMA Buffersh]hShared DMA Buffers}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhhhhhK"ubh)}(hThis document serves as a guide to device-driver writers on what is the dma-buf buffer sharing API, how to use it for exporting and using shared buffers.h]hThis document serves as a guide to device-driver writers on what is the dma-buf buffer sharing API, how to use it for exporting and using shared buffers.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjmhhubh)}(hAny device driver which wishes to be a part of DMA buffer sharing, can do so as either the 'exporter' of buffers, or the 'user' or 'importer' of buffers.h]hAny device driver which wishes to be a part of DMA buffer sharing, can do so as either the ‘exporter’ of buffers, or the ‘user’ or ‘importer’ of buffers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjmhhubh)}(hwSay a driver A wants to use buffers created by driver B, then we call B as the exporter, and A as buffer-user/importer.h]hwSay a driver A wants to use buffers created by driver B, then we call B as the exporter, and A as buffer-user/importer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjmhhubh)}(h The exporterh]h The exporter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjmhhubh)}(hX- implements and manages operations in :c:type:`struct dma_buf_ops ` for the buffer, - allows other users to share the buffer by using dma_buf sharing APIs, - manages the details of buffer allocation, wrapped in a :c:type:`struct dma_buf `, - decides about the actual backing storage where this allocation happens, - and takes care of any migration of scatterlist - for all (shared) users of this buffer. h]h)}(hhh](h)}(h_implements and manages operations in :c:type:`struct dma_buf_ops ` for the buffer,h]h)}(h_implements and manages operations in :c:type:`struct dma_buf_ops ` for the buffer,h](h%implements and manages operations in }(hjhhhNhNubh)}(h*:c:type:`struct dma_buf_ops `h]hliteral)}(hjh]hstruct dma_buf_ops}(hjhhhNhNubah}(h]h ](xrefcc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocdriver-api/dma-buf refdomainjreftypetype refexplicitrefwarn reftarget dma_buf_opsuh1hhhhK/hjubh for the buffer,}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hEallows other users to share the buffer by using dma_buf sharing APIs,h]h)}(hjh]hEallows other users to share the buffer by using dma_buf sharing APIs,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hZmanages the details of buffer allocation, wrapped in a :c:type:`struct dma_buf `,h]h)}(hZmanages the details of buffer allocation, wrapped in a :c:type:`struct dma_buf `,h](h7manages the details of buffer allocation, wrapped in a }(hjhhhNhNubh)}(h":c:type:`struct dma_buf `h]j)}(hj#h]hstruct dma_buf}(hj%hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hhhhK2hjubh,}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK2hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hGdecides about the actual backing storage where this allocation happens,h]h)}(hjRh]hGdecides about the actual backing storage where this allocation happens,}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjPubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXand takes care of any migration of scatterlist - for all (shared) users of this buffer. h]h)}(hWand takes care of any migration of scatterlist - for all (shared) users of this buffer.h]hWand takes care of any migration of scatterlist - for all (shared) users of this buffer.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjgubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j?uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1hhhhK/hjmhhubh)}(hThe buffer-userh]hThe buffer-user}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjmhhubh)}(hX~- is one of (many) sharing users of the buffer. - doesn't need to worry about how the buffer is allocated, or where. - and needs a mechanism to get access to the scatterlist that makes up this buffer in memory, mapped into its own address space, so it can access the same area of memory. This interface is provided by :c:type:`struct dma_buf_attachment `. h]h)}(hhh](h)}(h-is one of (many) sharing users of the buffer.h]h)}(hjh]h-is one of (many) sharing users of the buffer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hBdoesn't need to worry about how the buffer is allocated, or where.h]h)}(hjh]hDdoesn’t need to worry about how the buffer is allocated, or where.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXand needs a mechanism to get access to the scatterlist that makes up this buffer in memory, mapped into its own address space, so it can access the same area of memory. This interface is provided by :c:type:`struct dma_buf_attachment `. h]h)}(hXand needs a mechanism to get access to the scatterlist that makes up this buffer in memory, mapped into its own address space, so it can access the same area of memory. This interface is provided by :c:type:`struct dma_buf_attachment `.h](hand needs a mechanism to get access to the scatterlist that makes up this buffer in memory, mapped into its own address space, so it can access the same area of memory. This interface is provided by }(hjhhhNhNubh)}(h8:c:type:`struct dma_buf_attachment `h]j)}(hjh]hstruct dma_buf_attachment}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_buf_attachmentuh1hhhhKj?uh1hhhhK:hjubah}(h]h ]h"]h$]h&]uh1hhhhK:hjmhhubh)}(hAny exporters or users of the dma-buf buffer sharing framework must have a 'select DMA_SHARED_BUFFER' in their respective Kconfigs.h]hAny exporters or users of the dma-buf buffer sharing framework must have a ‘select DMA_SHARED_BUFFER’ in their respective Kconfigs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhjmhhubh)}(hhh](h)}(hUserspace Interface Notesh]hUserspace Interface Notes}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hhhhhKEubh)}(hMostly a DMA buffer file descriptor is simply an opaque object for userspace, and hence the generic interface exposed is very minimal. There's a few things to consider though:h]hMostly a DMA buffer file descriptor is simply an opaque object for userspace, and hence the generic interface exposed is very minimal. There’s a few things to consider though:}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhj#hhubh)}(hhh](h)}(hXSince kernel 3.12 the dma-buf FD supports the llseek system call, but only with offset=0 and whence=SEEK_END|SEEK_SET. SEEK_SET is supported to allow the usual size discover pattern size = SEEK_END(0); SEEK_SET(0). Every other llseek operation will report -EINVAL. If llseek on dma-buf FDs isn't supported the kernel will report -ESPIPE for all cases. Userspace can use this to detect support for discovering the dma-buf size using llseek. h](h)}(hXSince kernel 3.12 the dma-buf FD supports the llseek system call, but only with offset=0 and whence=SEEK_END|SEEK_SET. SEEK_SET is supported to allow the usual size discover pattern size = SEEK_END(0); SEEK_SET(0). Every other llseek operation will report -EINVAL.h]hXSince kernel 3.12 the dma-buf FD supports the llseek system call, but only with offset=0 and whence=SEEK_END|SEEK_SET. SEEK_SET is supported to allow the usual size discover pattern size = SEEK_END(0); SEEK_SET(0). Every other llseek operation will report -EINVAL.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjEubh)}(hIf llseek on dma-buf FDs isn't supported the kernel will report -ESPIPE for all cases. Userspace can use this to detect support for discovering the dma-buf size using llseek.h]hIf llseek on dma-buf FDs isn’t supported the kernel will report -ESPIPE for all cases. Userspace can use this to detect support for discovering the dma-buf size using llseek.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhjEubeh}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubh)}(hXsIn order to avoid fd leaks on exec, the FD_CLOEXEC flag must be set on the file descriptor. This is not just a resource leak, but a potential security hole. It could give the newly exec'd application access to buffers, via the leaked fd, to which it should otherwise not be permitted access. The problem with doing this via a separate fcntl() call, versus doing it atomically when the fd is created, is that this is inherently racy in a multi-threaded app[3]. The issue is made worse when it is library code opening/creating the file descriptor, as the application may not even be aware of the fd's. To avoid this problem, userspace must have a way to request O_CLOEXEC flag be set when the dma-buf fd is created. So any API provided by the exporting driver to create a dmabuf fd must provide a way to let userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd(). h](h)}(hX%In order to avoid fd leaks on exec, the FD_CLOEXEC flag must be set on the file descriptor. This is not just a resource leak, but a potential security hole. It could give the newly exec'd application access to buffers, via the leaked fd, to which it should otherwise not be permitted access.h]hX'In order to avoid fd leaks on exec, the FD_CLOEXEC flag must be set on the file descriptor. This is not just a resource leak, but a potential security hole. It could give the newly exec’d application access to buffers, via the leaked fd, to which it should otherwise not be permitted access.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjkubh)}(hX4The problem with doing this via a separate fcntl() call, versus doing it atomically when the fd is created, is that this is inherently racy in a multi-threaded app[3]. The issue is made worse when it is library code opening/creating the file descriptor, as the application may not even be aware of the fd's.h]hX6The problem with doing this via a separate fcntl() call, versus doing it atomically when the fd is created, is that this is inherently racy in a multi-threaded app[3]. The issue is made worse when it is library code opening/creating the file descriptor, as the application may not even be aware of the fd’s.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjkubh)}(hXTo avoid this problem, userspace must have a way to request O_CLOEXEC flag be set when the dma-buf fd is created. So any API provided by the exporting driver to create a dmabuf fd must provide a way to let userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd().h]hXTo avoid this problem, userspace must have a way to request O_CLOEXEC flag be set when the dma-buf fd is created. So any API provided by the exporting driver to create a dmabuf fd must provide a way to let userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjkubeh}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubh)}(hMemory mapping the contents of the DMA buffer is also supported. See the discussion below on `CPU Access to DMA Buffer Objects`_ for the full details. h]h)}(hMemory mapping the contents of the DMA buffer is also supported. See the discussion below on `CPU Access to DMA Buffer Objects`_ for the full details.h](h]Memory mapping the contents of the DMA buffer is also supported. See the discussion below on }(hjhhhNhNubh reference)}(h#`CPU Access to DMA Buffer Objects`_h]h CPU Access to DMA Buffer Objects}(hjhhhNhNubah}(h]h ]h"]h$]h&]name CPU Access to DMA Buffer Objectsrefid cpu-access-to-dma-buffer-objectsuh1jhjresolvedKubh for the full details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKehjubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubh)}(hZThe DMA buffer FD is also pollable, see `Implicit Fence Poll Support`_ below for details. h]h)}(hYThe DMA buffer FD is also pollable, see `Implicit Fence Poll Support`_ below for details.h](h(The DMA buffer FD is also pollable, see }(hjhhhNhNubj)}(h`Implicit Fence Poll Support`_h]hImplicit Fence Poll Support}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameImplicit Fence Poll Supportjimplicit-fence-poll-supportuh1jhjjKubh below for details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubh)}(hkThe DMA buffer FD also supports a few dma-buf-specific ioctls, see `DMA Buffer ioctls`_ below for details. h]h)}(hjThe DMA buffer FD also supports a few dma-buf-specific ioctls, see `DMA Buffer ioctls`_ below for details.h](hCThe DMA buffer FD also supports a few dma-buf-specific ioctls, see }(hjhhhNhNubj)}(h`DMA Buffer ioctls`_h]hDMA Buffer ioctls}(hj hhhNhNubah}(h]h ]h"]h$]h&]nameDMA Buffer ioctlsjdma-buffer-ioctlsuh1jhjjKubh below for details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKkhjubah}(h]h ]h"]h$]h&]uh1hhjBhhhhhNubeh}(h]h ]h"]h$]h&]j>j?uh1hhhhKKhj#hhubeh}(h]userspace-interface-notesah ]h"]userspace interface notesah$]h&]uh1hhjmhhhhhKEubh)}(hhh](h)}(h%Basic Operation and Device DMA Accessh]h%Basic Operation and Device DMA Access}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hhhhhKoubh)}(h_For device DMA access to a shared DMA buffer the usual sequence of operations is fairly simple:h]h_For device DMA access to a shared DMA buffer the usual sequence of operations is fairly simple:}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chM{hj8hhubhenumerated_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.chM~hjaubh. 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_bufuh1hhjhM~hjaubh; to userspace as a file descriptor by calling dma_buf_fd().}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM~hj]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.chMhjhhubh)}(hhh](h)}(hX3Fallback operations in the kernel, for example when a device is connected over USB and the kernel needs to shuffle the data around first before sending it away. Cache coherency is handled by bracketing any transactions with calls to dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() access. Since for most kernel internal dma-buf accesses need the entire buffer, a vmap interface is introduced. Note that on very old 32-bit architectures vmalloc space might be limited and result in vmap calls failing. Interfaces: .. code-block:: c void *dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map) void dma_buf_vunmap(struct dma_buf *dmabuf, struct iosys_map *map) The vmap call can fail if there is no vmap support in the exporter, or if it runs out of vmalloc space. Note that the dma-buf layer keeps a reference count for all vmap access and calls down into the exporter's vmap function only when no vmapping exists, and only unmaps it once. Protection against concurrent vmap/vunmap calls is provided by taking the :c:type:`dma_buf.lock ` mutex. h](h)}(hX(Fallback operations in the kernel, for example when a device is connected over USB and the kernel needs to shuffle the data around first before sending it away. Cache coherency is handled by bracketing any transactions with calls to dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() access.h]hX(Fallback operations in the kernel, for example when a device is connected over USB and the kernel needs to shuffle the data around first before sending it away. Cache coherency is handled by bracketing any transactions with calls to dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() access.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh)}(hSince for most kernel internal dma-buf accesses need the entire buffer, a vmap interface is introduced. Note that on very old 32-bit architectures vmalloc space might be limited and result in vmap calls failing.h]hSince for most kernel internal dma-buf accesses need the entire buffer, a vmap interface is introduced. Note that on very old 32-bit architectures vmalloc space might be limited and result in vmap calls failing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh)}(h Interfaces:h]h Interfaces:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM hjubh 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.chM hjubh)}(hXThe vmap call can fail if there is no vmap support in the exporter, or if it runs out of vmalloc space. Note that the dma-buf layer keeps a reference count for all vmap access and calls down into the exporter's vmap function only when no vmapping exists, and only unmaps it once. Protection against concurrent vmap/vunmap calls is provided by taking the :c:type:`dma_buf.lock ` mutex.h](hXdThe vmap call can fail if there is no vmap support in the exporter, or if it runs out of vmalloc space. Note that the dma-buf layer keeps a reference count for all vmap access and calls down into the exporter’s vmap function only when no vmapping exists, and only unmaps it once. Protection against concurrent vmap/vunmap calls is provided by taking the }(hjhhhNhNubh)}(h :c:type:`dma_buf.lock `h]j)}(hjh]h dma_buf.lock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh mutex.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(hXFor full compatibility on the importer side with existing userspace interfaces, which might already support mmap'ing buffers. This is needed in many processing pipelines (e.g. feeding a software rendered image into a hardware pipeline, thumbnail creation, snapshots, ...). Also, Android's ION framework already supported this and for DMA buffer file descriptors to replace ION buffers mmap support was needed. There is no special interfaces, userspace simply calls mmap on the dma-buf fd. But like for CPU access there's a need to bracket the actual access, which is handled by the ioctl (DMA_BUF_IOCTL_SYNC). Note that DMA_BUF_IOCTL_SYNC can fail with -EAGAIN or -EINTR, in which case it must be restarted. Some systems might need some sort of cache coherency management e.g. when CPU and GPU domains are being accessed through dma-buf at the same time. To circumvent this problem there are begin/end coherency markers, that forward directly to existing dma-buf device drivers vfunc hooks. Userspace can make use of those markers through the DMA_BUF_IOCTL_SYNC ioctl. The sequence would be used like following: - mmap dma-buf fd - for each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write to mmap area 3. SYNC_END ioctl. This can be repeated as often as you want (with the new data being consumed by say the GPU or the scanout device) - munmap once you don't need the buffer any more For correctness and optimal performance, it is always required to use SYNC_START and SYNC_END before and after, respectively, when accessing the mapped address. Userspace cannot rely on coherent access, even when there are systems where it just works without calling these ioctls. h](h)}(hXFor full compatibility on the importer side with existing userspace interfaces, which might already support mmap'ing buffers. This is needed in many processing pipelines (e.g. feeding a software rendered image into a hardware pipeline, thumbnail creation, snapshots, ...). Also, Android's ION framework already supported this and for DMA buffer file descriptors to replace ION buffers mmap support was needed.h]hXFor full compatibility on the importer side with existing userspace interfaces, which might already support mmap’ing buffers. This is needed in many processing pipelines (e.g. feeding a software rendered image into a hardware pipeline, thumbnail creation, snapshots, ...). Also, Android’s ION framework already supported this and for DMA buffer file descriptors to replace ION buffers mmap support was needed.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhj"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.chMhj"ubh)}(hXSome systems might need some sort of cache coherency management e.g. when CPU and GPU domains are being accessed through dma-buf at the same time. To circumvent this problem there are begin/end coherency markers, that forward directly to existing dma-buf device drivers vfunc hooks. Userspace can make use of those markers through the DMA_BUF_IOCTL_SYNC ioctl. The sequence would be used like following:h]hXSome systems might need some sort of cache coherency management e.g. when CPU and GPU domains are being accessed through dma-buf at the same time. To circumvent this problem there are begin/end coherency markers, that forward directly to existing dma-buf device drivers vfunc hooks. Userspace can make use of those markers through the DMA_BUF_IOCTL_SYNC ioctl. The sequence would be used like following:}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM$hj"ubh)}(hXE - mmap dma-buf fd - for each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write to mmap area 3. SYNC_END ioctl. This can be repeated as often as you want (with the new data being consumed by say the GPU or the scanout device) - munmap once you don't need the buffer any more For correctness and optimal performance, it is always required to use SYNC_START and SYNC_END before and after, respectively, when accessing the mapped address. Userspace cannot rely on coherent access, even when there are systems where it just works without calling these ioctls. h](h)}(hX%- mmap dma-buf fd - for each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write to mmap area 3. SYNC_END ioctl. This can be repeated as often as you want (with the new data being consumed by say the GPU or the scanout device) - munmap once you don't need the buffer any more h]h)}(hhh](h)}(hmmap dma-buf fdh]h)}(hj`h]hmmap dma-buf fd}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM+hj^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.chM,hjvubah}(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.chM0hjubah}(h]h ]h"]h$]h&]uh1hhj[ubeh}(h]h ]h"]h$]h&]j>j?uh1hhjohM+hjWubah}(h]h ]h"]h$]h&]uh1hhjohM+hjSubh)}(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.chM2hjSubeh}(h]h ]h"]h$]h&]uh1hhjohM+hj"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.chM7hjubh)}(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.chM9hjubh)}(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.chM@hjubh)}(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.chMHhjubj)}(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.chMJhjubh)}(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.chMNhjubh0 will equally achieve that for a dma-buf object.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhMNhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j?uh1hhjhMhjhhubeh}(h]jah ]h"] cpu access to dma buffer objectsah$]h&]uh1hhjmhhhhhKu referencedKubh)}(hhh](h)}(hImplicit Fence Poll Supporth]hImplicit Fence Poll Support}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehhhhhK{ubh)}(hX1To support cross-device and cross-driver synchronization of buffer access implicit fences (represented internally in the kernel with :c:type:`struct dma_fence `) can be attached to a :c:type:`dma_buf`. The glue for that and a few related things are provided in the :c:type:`dma_resv` structure.h](hTo support cross-device and cross-driver synchronization of buffer access implicit fences (represented internally in the kernel with }(hjvhhhNhNubh)}(h&:c:type:`struct dma_fence `h]j)}(hjh]hstruct dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chKhjvubh) can be attached to a }(hjvhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjh]hdma_buf}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hhjhKhjvubhA. The glue for that and a few related things are provided in the }(hjvhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjh]hdma_resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_resvuh1hhjhKhjvubh structure.}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjehhubh)}(hgUserspace can query the state of these implicitly tracked fences using poll() and related system calls:h]hgUserspace can query the state of these implicitly tracked fences using poll() and related system calls:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.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.chMhjGubh 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_exportuh1hhjnhMhjGubh.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjnhMhjehhubeh}(h]jah ]h"]implicit fence poll supportah$]h&]uh1hhjmhhhhhK{jdKubh)}(hhh](h)}(hDMA-BUF statisticsh]hDMA-BUF statistics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h``/sys/kernel/debug/dma_buf/bufinfo`` provides an overview of every DMA-BUF in the system. However, since debugfs is not safe to be mounted in production, procfs and sysfs can be used to gather DMA-BUF statistics on production systems.h](j)}(h%``/sys/kernel/debug/dma_buf/bufinfo``h]h!/sys/kernel/debug/dma_buf/bufinfo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh provides an overview of every DMA-BUF in the system. However, since debugfs is not safe to be mounted in production, procfs and sysfs can be used to gather DMA-BUF statistics on production systems.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chKhjhhubh)}(hThe ``/proc//fdinfo/`` files in procfs can be used to gather information about DMA-BUF fds. Detailed documentation about the interface is present in Documentation/filesystems/proc.rst.h](hThe }(hjhhhNhNubj)}(h``/proc//fdinfo/``h]h/proc//fdinfo/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh files in procfs can be used to gather information about DMA-BUF fds. Detailed documentation about the interface is present in Documentation/filesystems/proc.rst.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chKhjhhubh)}(hX2Unfortunately, the existing procfs interfaces can only provide information about the DMA-BUFs for which processes hold fds or have the buffers mmapped into their address space. This necessitated the creation of the DMA-BUF sysfs statistics interface to provide per-buffer information on production systems.h]hX2Unfortunately, the existing procfs interfaces can only provide information about the DMA-BUFs for which processes hold fds or have the buffers mmapped into their address space. This necessitated the creation of the DMA-BUF sysfs statistics interface to provide per-buffer information on production systems.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chKhjhhubh)}(hThe interface at ``/sys/kernel/dmabuf/buffers`` exposes information about every DMA-BUF when ``CONFIG_DMABUF_SYSFS_STATS`` is enabled.h](hThe interface at }(hj hhhNhNubj)}(h``/sys/kernel/dmabuf/buffers``h]h/sys/kernel/dmabuf/buffers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh. exposes information about every DMA-BUF when }(hj hhhNhNubj)}(h``CONFIG_DMABUF_SYSFS_STATS``h]hCONFIG_DMABUF_SYSFS_STATS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is enabled.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chK"hjhhubh)}(h1The following stats are exposed by the interface:h]h1The following stats are exposed by the interface:}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chK%hjhhubh)}(hhh](h)}(h;``/sys/kernel/dmabuf/buffers//exporter_name``h]h)}(hjH h]j)}(hjH h]h7/sys/kernel/dmabuf/buffers//exporter_name}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ ubah}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chK'hjF ubah}(h]h ]h"]h$]h&]uh1hhjC ubh)}(h3``/sys/kernel/dmabuf/buffers//size`` h]h)}(h2``/sys/kernel/dmabuf/buffers//size``h]j)}(hjm h]h./sys/kernel/dmabuf/buffers//size}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk ubah}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chK(hjg ubah}(h]h ]h"]h$]h&]uh1hhjC ubeh}(h]h ]h"]h$]h&]j>*uh1hhj` hK'hjhhubh)}(hX%The information in the interface can also be used to derive per-exporter statistics. The data from the interface can be gathered on error conditions or other important events to provide a snapshot of DMA-BUF usage. It can also be collected periodically by telemetry to monitor various metrics.h]hX%The information in the interface can also be used to derive per-exporter statistics. The data from the interface can be gathered on error conditions or other important events to provide a snapshot of DMA-BUF usage. It can also be collected periodically by telemetry to monitor various metrics.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chK*hjhhubh)}(hoDetailed documentation about the interface is present in Documentation/ABI/testing/sysfs-kernel-dmabuf-buffers.h]hoDetailed documentation about the interface is present in Documentation/ABI/testing/sysfs-kernel-dmabuf-buffers.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhi/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:130: ./drivers/dma-buf/dma-buf-sysfs-stats.chK/hjhhubeh}(h]dma-buf-statisticsah ]h"]dma-buf statisticsah$]h&]uh1hhjmhhhhhKjdKubh)}(hhh](h)}(hDMA Buffer ioctlsh]hDMA Buffer ioctls}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singledma_buf_sync (C struct)c.dma_buf_synchNtauh1j hj hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhNubhdesc)}(hhh](hdesc_signature)}(h dma_buf_synch]hdesc_signature_line)}(hstruct dma_buf_synch](hdesc_sig_keyword)}(hstructh]hstruct}(hj hhhNhNubah}(h]h ]kah"]h$]h&]uh1j hj hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKubhdesc_sig_space)}(h h]h }(hj hhhNhNubah}(h]h ]wah"]h$]h&]uh1j hj hhhj hKubh desc_name)}(h dma_buf_synch]h desc_sig_name)}(hj h]h dma_buf_sync}(hj hhhNhNubah}(h]h ]nah"]h$]h&]uh1j hj ubah}(h]h ](sig-namedescnameeh"]h$]h&]jjuh1j hj hhhj hKubeh}(h]h ]h"]h$]h&]jj add_permalinkuh1j sphinx_line_type declaratorhj hhhj hKubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j hj hKhj hhubh desc_content)}(hhh]h)}(hSynchronize with CPU access.h]hSynchronize with CPU access.}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjA hhubah}(h]h ]h"]h$]h&]uh1j? hj hhhj hKubeh}(h]h ](jstructeh"]h$]h&]domainjobjtypej\ desctypej\ noindex noindexentrynocontentsentryuh1j hhhj hj hNubh container)}(hX8**Definition**:: struct dma_buf_sync { __u64 flags; }; **Members** ``flags`` Set of access flags DMA_BUF_SYNC_START: Indicates the start of a map access session. DMA_BUF_SYNC_END: Indicates the end of a map access session. DMA_BUF_SYNC_READ: Indicates that the mapped DMA buffer will be read by the client via the CPU map. DMA_BUF_SYNC_WRITE: Indicates that the mapped DMA buffer will be written by the client via the CPU map. DMA_BUF_SYNC_RW: An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.h](h)}(h**Definition**::h](hstrong)}(h**Definition**h]h Definition}(hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjl ubh:}(hjl hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjh ubj)}(h)struct dma_buf_sync { __u64 flags; };h]h)struct dma_buf_sync { __u64 flags; };}hj sbah}(h]h ]h"]h$]h&]jjuh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK hjh ubh)}(h **Members**h]jq )}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK$hjh ubhdefinition_list)}(hhh]hdefinition_list_item)}(hX``flags`` Set of access flags DMA_BUF_SYNC_START: Indicates the start of a map access session. DMA_BUF_SYNC_END: Indicates the end of a map access session. DMA_BUF_SYNC_READ: Indicates that the mapped DMA buffer will be read by the client via the CPU map. DMA_BUF_SYNC_WRITE: Indicates that the mapped DMA buffer will be written by the client via the CPU map. DMA_BUF_SYNC_RW: An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.h](hterm)}(h ``flags``h]j)}(hj h]hflags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKIhj ubh definition)}(hhh](h)}(hSet of access flagsh]hSet of access flags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK9hj ubj )}(hhh](j )}(hADMA_BUF_SYNC_START: Indicates the start of a map access session. h](j )}(hDMA_BUF_SYNC_START:h]hDMA_BUF_SYNC_START:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK huh1j hjy hK8hja hhubj@ )}(hhh]h)}(hGet a sync_file from a dma-bufh]hGet a sync_file from a dma-buf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKYhj hhubah}(h]h ]h"]h$]h&]uh1j? hja hhhjy hK8ubeh}(h]h ](jstructeh"]h$]h&]j` jja j jb j jc jd je uh1j hhhj hj hNubjg )}(hX**Definition**:: struct dma_buf_export_sync_file { __u32 flags; __s32 fd; }; **Members** ``flags`` Read/write flags Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both. If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, the returned sync file waits on any writers of the dma-buf to complete. Waiting on the returned sync file is equivalent to poll() with POLLIN. If DMA_BUF_SYNC_WRITE is set, the returned sync file waits on any users of the dma-buf (read or write) to complete. Waiting on the returned sync file is equivalent to poll() with POLLOUT. If both DMA_BUF_SYNC_WRITE and DMA_BUF_SYNC_READ are set, this is equivalent to just DMA_BUF_SYNC_WRITE. ``fd`` Returned sync file descriptorh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK]hj ubj)}(hCstruct dma_buf_export_sync_file { __u32 flags; __s32 fd; };h]hCstruct dma_buf_export_sync_file { __u32 flags; __s32 fd; };}hj sbah}(h]h ]h"]h$]h&]jjuh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK_hj ubh)}(h **Members**h]jq )}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKdhj ubj )}(hhh](j )}(hXK``flags`` Read/write flags Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both. If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, the returned sync file waits on any writers of the dma-buf to complete. Waiting on the returned sync file is equivalent to poll() with POLLIN. If DMA_BUF_SYNC_WRITE is set, the returned sync file waits on any users of the dma-buf (read or write) to complete. Waiting on the returned sync file is equivalent to poll() with POLLOUT. If both DMA_BUF_SYNC_WRITE and DMA_BUF_SYNC_READ are set, this is equivalent to just DMA_BUF_SYNC_WRITE. h](j )}(h ``flags``h]j)}(hj h]hflags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj ubj )}(hhh](h)}(hRead/write flagsh]hRead/write flags}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKyhj1 ubh)}(h7Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both.h]h7Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both.}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK{hj1 ubh)}(hIf DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, the returned sync file waits on any writers of the dma-buf to complete. Waiting on the returned sync file is equivalent to poll() with POLLIN.h]hIf DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, the returned sync file waits on any writers of the dma-buf to complete. Waiting on the returned sync file is equivalent to poll() with POLLIN.}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK}hj1 ubh)}(hX%If DMA_BUF_SYNC_WRITE is set, the returned sync file waits on any users of the dma-buf (read or write) to complete. Waiting on the returned sync file is equivalent to poll() with POLLOUT. If both DMA_BUF_SYNC_WRITE and DMA_BUF_SYNC_READ are set, this is equivalent to just DMA_BUF_SYNC_WRITE.h]hX%If DMA_BUF_SYNC_WRITE is set, the returned sync file waits on any users of the dma-buf (read or write) to complete. Waiting on the returned sync file is equivalent to poll() with POLLOUT. If both DMA_BUF_SYNC_WRITE and DMA_BUF_SYNC_READ are set, this is equivalent to just DMA_BUF_SYNC_WRITE.}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj1 ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj0 hKhj ubj )}(h$``fd`` Returned sync file descriptorh](j )}(h``fd``h]j)}(hj h]hfd}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj| ubj )}(hhh]h)}(hReturned sync file descriptorh]hReturned sync file descriptor}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj ubah}(h]h ]h"]h$]h&]uh1j hj| ubeh}(h]h ]h"]h$]h&]uh1j hj hKhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj hhhj hNubh)}(h**Description**h]jq )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj hhubh)}(hX2Userspace can perform a DMA_BUF_IOCTL_EXPORT_SYNC_FILE to retrieve the current set of fences on a dma-buf file descriptor as a sync_file. CPU waits via poll() or other driver-specific mechanisms typically wait on whatever fences are on the dma-buf at the time the wait begins. This is similar except that it takes a snapshot of the current fences on the dma-buf for waiting later instead of waiting immediately. This is useful for modern graphics APIs such as Vulkan which assume an explicit synchronization model but still need to inter-operate with dma-buf.h]hX2Userspace can perform a DMA_BUF_IOCTL_EXPORT_SYNC_FILE to retrieve the current set of fences on a dma-buf file descriptor as a sync_file. CPU waits via poll() or other driver-specific mechanisms typically wait on whatever fences are on the dma-buf at the time the wait begins. This is similar except that it takes a snapshot of the current fences on the dma-buf for waiting later instead of waiting immediately. This is useful for modern graphics APIs such as Vulkan which assume an explicit synchronization model but still need to inter-operate with dma-buf.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKZhj hhubh)}(h,The intended usage pattern is the following:h]h,The intended usage pattern is the following:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKchj hhubh)}(hX1. Export a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE. 2. Submit rendering work which uses the dma-buf. The work should wait on the exported sync file before rendering and produce another sync_file when complete. 3. Import the rendering-complete sync_file into the dma-buf with flags corresponding to the GPU usage via DMA_BUF_IOCTL_IMPORT_SYNC_FILE. h]jY)}(hhh](h)}(hjExport a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE. h]h)}(hiExport a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE.h]hiExport a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKehjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hSubmit rendering work which uses the dma-buf. The work should wait on the exported sync file before rendering and produce another sync_file when complete. h]h)}(hSubmit rendering work which uses the dma-buf. The work should wait on the exported sync file before rendering and produce another sync_file when complete.h]hSubmit rendering work which uses the dma-buf. The work should wait on the exported sync file before rendering and produce another sync_file when complete.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hImport the rendering-complete sync_file into the dma-buf with flags corresponding to the GPU usage via DMA_BUF_IOCTL_IMPORT_SYNC_FILE. h]h)}(hImport the rendering-complete sync_file into the dma-buf with flags corresponding to the GPU usage via DMA_BUF_IOCTL_IMPORT_SYNC_FILE.h]hImport the rendering-complete sync_file into the dma-buf with flags corresponding to the GPU usage via DMA_BUF_IOCTL_IMPORT_SYNC_FILE.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKlhj2ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]j?j@jAhjBjCuh1jXhj ubah}(h]h ]h"]h$]h&]uh1hhjhKehj hhubh)}(hXPUnlike doing implicit synchronization via a GPU kernel driver's exec ioctl, the above is not a single atomic operation. If userspace wants to ensure ordering via these fences, it is the respnosibility of userspace to use locks or other mechanisms to ensure that no other context adds fences or submits work between steps 1 and 3 above.h]hXRUnlike doing implicit synchronization via a GPU kernel driver’s exec ioctl, the above is not a single atomic operation. If userspace wants to ensure ordering via these fences, it is the respnosibility of userspace to use locks or other mechanisms to ensure that no other context adds fences or submits work between steps 1 and 3 above.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKohj hhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_buf_import_sync_file (C struct)c.dma_buf_import_sync_filehNtauh1j hj hhhj hNubj )}(hhh](j )}(hdma_buf_import_sync_fileh]j )}(hstruct dma_buf_import_sync_fileh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKxubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{hhhjhKxubj )}(hdma_buf_import_sync_fileh]j )}(hjyh]hdma_buf_import_sync_file}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj{hhhjhKxubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjwhhhjhKxubah}(h]jrah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKxhjthhubj@ )}(hhh]h)}(h!Insert a sync_file into a dma-bufh]h!Insert a sync_file into a dma-buf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjthhhjhKxubeh}(h]h ](jstructeh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj hj hNubjg )}(hXp**Definition**:: struct dma_buf_import_sync_file { __u32 flags; __s32 fd; }; **Members** ``flags`` Read/write flags Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both. If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, this inserts the sync_file as a read-only fence. Any subsequent implicitly synchronized writes to this dma-buf will wait on this fence but reads will not. If DMA_BUF_SYNC_WRITE is set, this inserts the sync_file as a write fence. All subsequent implicitly synchronized access to this dma-buf will wait on this fence. ``fd`` Sync file descriptorh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjubj)}(hCstruct dma_buf_import_sync_file { __u32 flags; __s32 fd; };h]hCstruct dma_buf_import_sync_file { __u32 flags; __s32 fd; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjubh)}(h **Members**h]jq )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjubj )}(hhh](j )}(hX``flags`` Read/write flags Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both. If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, this inserts the sync_file as a read-only fence. Any subsequent implicitly synchronized writes to this dma-buf will wait on this fence but reads will not. If DMA_BUF_SYNC_WRITE is set, this inserts the sync_file as a write fence. All subsequent implicitly synchronized access to this dma-buf will wait on this fence. h](j )}(h ``flags``h]j)}(hj.h]hflags}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj(ubj )}(hhh](h)}(hRead/write flagsh]hRead/write flags}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjDubh)}(h7Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both.h]h7Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjDubh)}(hIf DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, this inserts the sync_file as a read-only fence. Any subsequent implicitly synchronized writes to this dma-buf will wait on this fence but reads will not.h]hIf DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, this inserts the sync_file as a read-only fence. Any subsequent implicitly synchronized writes to this dma-buf will wait on this fence but reads will not.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjDubh)}(hIf DMA_BUF_SYNC_WRITE is set, this inserts the sync_file as a write fence. All subsequent implicitly synchronized access to this dma-buf will wait on this fence.h]hIf DMA_BUF_SYNC_WRITE is set, this inserts the sync_file as a write fence. All subsequent implicitly synchronized access to this dma-buf will wait on this fence.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjDubeh}(h]h ]h"]h$]h&]uh1j hj(ubeh}(h]h ]h"]h$]h&]uh1j hjChKhj%ubj )}(h``fd`` Sync file descriptorh](j )}(h``fd``h]j)}(hjh]hfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjubj )}(hhh]h)}(hSync file descriptorh]hSync file descriptor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhj%ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj hhhj hNubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj hhubh)}(hXbUserspace can perform a DMA_BUF_IOCTL_IMPORT_SYNC_FILE to insert a sync_file into a dma-buf for the purposes of implicit synchronization with other dma-buf consumers. This allows clients using explicitly synchronized APIs such as Vulkan to inter-op with dma-buf consumers which expect implicit synchronization such as OpenGL or most media drivers/video.h]hXbUserspace can perform a DMA_BUF_IOCTL_IMPORT_SYNC_FILE to insert a sync_file into a dma-buf for the purposes of implicit synchronization with other dma-buf consumers. This allows clients using explicitly synchronized APIs such as Vulkan to inter-op with dma-buf consumers which expect implicit synchronization such as OpenGL or most media drivers/video.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj hhubeh}(h]jah ]h"]dma buffer ioctlsah$]h&]uh1hhjmhhhhhKjdKubh)}(hhh](h)}(hDMA-BUF locking conventionh]hDMA-BUF locking convention}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hIn order to avoid deadlock situations between dma-buf exports and importers, all dma-buf API users must follow the common dma-buf locking convention.h]hIn order to avoid deadlock situations between dma-buf exports and importers, all dma-buf API users must follow the common dma-buf locking convention.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM_hjhhubh)}(hConvention for importersh]hConvention for importers}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMbhjhhubjY)}(hhh](h)}(hImporters must hold the dma-buf reservation lock when calling these functions: - dma_buf_pin() - dma_buf_unpin() - dma_buf_map_attachment() - dma_buf_unmap_attachment() - dma_buf_vmap() - dma_buf_vunmap() h](h)}(hNImporters must hold the dma-buf reservation lock when calling these functions:h]hNImporters must hold the dma-buf reservation lock when calling these functions:}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMdhj6ubh)}(h~- dma_buf_pin() - dma_buf_unpin() - dma_buf_map_attachment() - dma_buf_unmap_attachment() - dma_buf_vmap() - dma_buf_vunmap() h]h)}(hhh](h)}(h dma_buf_pin()h]h)}(hjRh]h dma_buf_pin()}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMghjPubah}(h]h ]h"]h$]h&]uh1hhjMubh)}(hdma_buf_unpin()h]h)}(hjjh]hdma_buf_unpin()}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMhhjhubah}(h]h ]h"]h$]h&]uh1hhjMubh)}(hdma_buf_map_attachment()h]h)}(hjh]hdma_buf_map_attachment()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMihjubah}(h]h ]h"]h$]h&]uh1hhjMubh)}(hdma_buf_unmap_attachment()h]h)}(hjh]hdma_buf_unmap_attachment()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMjhjubah}(h]h ]h"]h$]h&]uh1hhjMubh)}(hdma_buf_vmap()h]h)}(hjh]hdma_buf_vmap()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMkhjubah}(h]h ]h"]h$]h&]uh1hhjMubh)}(hdma_buf_vunmap() h]h)}(hdma_buf_vunmap()h]hdma_buf_vunmap()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMlhjubah}(h]h ]h"]h$]h&]uh1hhjMubeh}(h]h ]h"]h$]h&]j>j?uh1hhjahMghjIubah}(h]h ]h"]h$]h&]uh1hhjahMghj6ubeh}(h]h ]h"]h$]h&]uh1hhj3ubh)}(hXImporters must not hold the dma-buf reservation lock when calling these functions: - dma_buf_attach() - dma_buf_dynamic_attach() - dma_buf_detach() - dma_buf_export() - dma_buf_fd() - dma_buf_get() - dma_buf_put() - dma_buf_mmap() - dma_buf_begin_cpu_access() - dma_buf_end_cpu_access() - dma_buf_map_attachment_unlocked() - dma_buf_unmap_attachment_unlocked() - dma_buf_vmap_unlocked() - dma_buf_vunmap_unlocked() h](h)}(hRImporters must not hold the dma-buf reservation lock when calling these functions:h]hRImporters must not hold the dma-buf reservation lock when calling these functions:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMnhjubh)}(hXL- dma_buf_attach() - dma_buf_dynamic_attach() - dma_buf_detach() - dma_buf_export() - dma_buf_fd() - dma_buf_get() - dma_buf_put() - dma_buf_mmap() - dma_buf_begin_cpu_access() - dma_buf_end_cpu_access() - dma_buf_map_attachment_unlocked() - dma_buf_unmap_attachment_unlocked() - dma_buf_vmap_unlocked() - dma_buf_vunmap_unlocked() h]h)}(hhh](h)}(hdma_buf_attach()h]h)}(hjh]hdma_buf_attach()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMqhj ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_dynamic_attach()h]h)}(hj'h]hdma_buf_dynamic_attach()}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMrhj%ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_detach()h]h)}(hj?h]hdma_buf_detach()}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMshj=ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_export()h]h)}(hjWh]hdma_buf_export()}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMthjUubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h dma_buf_fd()h]h)}(hjoh]h dma_buf_fd()}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMuhjmubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h dma_buf_get()h]h)}(hjh]h dma_buf_get()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMvhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h dma_buf_put()h]h)}(hjh]h dma_buf_put()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMwhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_mmap()h]h)}(hjh]hdma_buf_mmap()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMxhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_begin_cpu_access()h]h)}(hjh]hdma_buf_begin_cpu_access()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMyhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_end_cpu_access()h]h)}(hjh]hdma_buf_end_cpu_access()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMzhjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h!dma_buf_map_attachment_unlocked()h]h)}(hjh]h!dma_buf_map_attachment_unlocked()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM{hjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h#dma_buf_unmap_attachment_unlocked()h]h)}(hjh]h#dma_buf_unmap_attachment_unlocked()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM|hjubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_vmap_unlocked()h]h)}(hj/h]hdma_buf_vmap_unlocked()}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM}hj-ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hdma_buf_vunmap_unlocked() h]h)}(hdma_buf_vunmap_unlocked()h]hdma_buf_vunmap_unlocked()}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM~hjEubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]j>j?uh1hhjhMqhjubah}(h]h ]h"]h$]h&]uh1hhjhMqhjubeh}(h]h ]h"]h$]h&]uh1hhj3ubeh}(h]h ]h"]h$]h&]j?j@jAhjBjCuh1jXhjhhhNhNubh)}(hConvention for exportersh]hConvention for exporters}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.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 }(hjhhhNhNubh)}(h:c:type:`dma_buf_ops`h]j)}(hjh]h dma_buf_ops}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]sbj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMhjubhX callbacks are invoked with unlocked dma-buf reservation and exporter can take the lock:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubh)}(hX7- :c:type:`dma_buf_ops.attach\(\) ` - :c:type:`dma_buf_ops.detach\(\) ` - :c:type:`dma_buf_ops.release\(\) ` - :c:type:`dma_buf_ops.begin_cpu_access\(\) ` - :c:type:`dma_buf_ops.end_cpu_access\(\) ` - :c:type:`dma_buf_ops.mmap\(\) ` h]h)}(hhh](h)}(h.:c:type:`dma_buf_ops.attach\(\) `h]h)}(hjh]h)}(h.:c:type:`dma_buf_ops.attach\(\) `h]j)}(hjh]hdma_buf_ops.attach()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.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)}(hj h]hdma_buf_ops.detach()}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhj&hMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h/:c:type:`dma_buf_ops.release\(\) `h]h)}(hj5h]h)}(h/:c:type:`dma_buf_ops.release\(\) `h]j)}(hj<h]hdma_buf_ops.release()}(hj>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMhj7ubah}(h]h ]h"]h$]h&]uh1hhjYhMhj3ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h8:c:type:`dma_buf_ops.begin_cpu_access\(\) `h]h)}(hjhh]h)}(h8:c:type:`dma_buf_ops.begin_cpu_access\(\) `h]j)}(hjoh]hdma_buf_ops.begin_cpu_access()}(hjqhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMhjjubah}(h]h ]h"]h$]h&]uh1hhjhMhjfubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h6:c:type:`dma_buf_ops.end_cpu_access\(\) `h]h)}(hjh]h)}(h6:c:type:`dma_buf_ops.end_cpu_access\(\) `h]j)}(hjh]hdma_buf_ops.end_cpu_access()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.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:141: ./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&]uh1hhjhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(hXThese :c:type:`dma_buf_ops` callbacks are invoked with locked dma-buf reservation and exporter can't take the lock: - :c:type:`dma_buf_ops.pin\(\) ` - :c:type:`dma_buf_ops.unpin\(\) ` - :c:type:`dma_buf_ops.map_dma_buf\(\) ` - :c:type:`dma_buf_ops.unmap_dma_buf\(\) ` - :c:type:`dma_buf_ops.vmap\(\) ` - :c:type:`dma_buf_ops.vunmap\(\) ` h](h)}(hsThese :c:type:`dma_buf_ops` callbacks are invoked with locked dma-buf reservation and exporter can't take the lock:h](hThese }(hjhhhNhNubh)}(h:c:type:`dma_buf_ops`h]j)}(hj h]h dma_buf_ops}(hj"hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.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)}(hjQh]h)}(h+:c:type:`dma_buf_ops.pin\(\) `h]j)}(hjXh]hdma_buf_ops.pin()}(hjZhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMhjSubah}(h]h ]h"]h$]h&]uh1hhjuhMhjOubah}(h]h ]h"]h$]h&]uh1hhjLubh)}(h-:c:type:`dma_buf_ops.unpin\(\) `h]h)}(hjh]h)}(h-:c:type:`dma_buf_ops.unpin\(\) `h]j)}(hjh]hdma_buf_ops.unpin()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjLubh)}(h3:c:type:`dma_buf_ops.map_dma_buf\(\) `h]h)}(hjh]h)}(h3:c:type:`dma_buf_ops.map_dma_buf\(\) `h]j)}(hjh]hdma_buf_ops.map_dma_buf()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjLubh)}(h5:c:type:`dma_buf_ops.unmap_dma_buf\(\) `h]h)}(hjh]h)}(h5:c:type:`dma_buf_ops.unmap_dma_buf\(\) `h]j)}(hjh]hdma_buf_ops.unmap_dma_buf()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjLubh)}(h,:c:type:`dma_buf_ops.vmap\(\) `h]h)}(hjh]h)}(h,:c:type:`dma_buf_ops.vmap\(\) `h]j)}(hj$h]hdma_buf_ops.vmap()}(hj&hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjAhMhjubah}(h]h ]h"]h$]h&]uh1hhjLubh)}(h/:c:type:`dma_buf_ops.vunmap\(\) ` h]h)}(h.:c:type:`dma_buf_ops.vunmap\(\) `h]h)}(h.:c:type:`dma_buf_ops.vunmap\(\) `h]j)}(hjXh]hdma_buf_ops.vunmap()}(hjZhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMhjRubah}(h]h ]h"]h$]h&]uh1hhjuhMhjNubah}(h]h ]h"]h$]h&]uh1hhjLubeh}(h]h ]h"]h$]h&]j>j?uh1hhjuhMhjHubah}(h]h ]h"]h$]h&]uh1hhjuhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(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:141: ./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:141: ./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&]uh1hhjubeh}(h]h ]h"]h$]h&]j?j@jAhjBjCuh1jXhjhhhNhNubeh}(h]dma-buf-locking-conventionah ]h"]dma-buf locking conventionah$]h&]uh1hhjmhhhhhKubh)}(hhh](h)}(h)Kernel Functions and Structures Referenceh]h)Kernel Functions and Structures Reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_export (C function)c.dma_buf_exporthNtauh1j hjhhhNhNubj )}(hhh](j )}(hLstruct dma_buf * dma_buf_export (const struct dma_buf_export_info *exp_info)h]j )}(hJstruct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhjhMubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetj2modnameN classnameNjj)}j]j ASTIdentifier)}jFdma_buf_exportsbc.dma_buf_exportasbuh1hhj hhhjhMubj )}(h h]h }(hjThhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhjhMubhdesc_sig_punctuation)}(hj h]h*}(hjdhhhNhNubah}(h]h ]pah"]h$]h&]uh1jbhj hhhjhMubj )}(hdma_buf_exporth]j )}(hjQh]hdma_buf_export}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj hhhjhMubhdesc_parameterlist)}(h,(const struct dma_buf_export_info *exp_info)h]hdesc_parameter)}(h*const struct dma_buf_export_info *exp_infoh](j )}(hconsth]hconst}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_buf_export_infoh]hdma_buf_export_info}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jOc.dma_buf_exportasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hexp_infoh]hexp_info}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj hhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj hhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(hCreates a new dma_buf, and associates an anon file with this buffer, so it can be exported. Also connect the allocator specific data and ops to the buffer. Additionally, provide a name string for exporter; useful in debugging.h]hCreates a new dma_buf, and associates an anon file with this buffer, so it can be exported. Also connect the allocator specific data and ops to the buffer. Additionally, provide a name string for exporter; useful in debugging.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj/hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jJjb jJjc jd je uh1j hhhjhNhNubjg )}(hXD**Parameters** ``const struct dma_buf_export_info *exp_info`` [in] holds all the export related information provided by the exporter. see :c:type:`struct dma_buf_export_info ` for further details. **Description** Returns, on success, a newly created struct dma_buf object, which wraps the supplied private data and operations for struct dma_buf_ops. On either missing ops, or error in allocating struct dma_buf, will return negative error. For most cases the easiest way to create **exp_info** is through the ``DEFINE_DMA_BUF_EXPORT_INFO`` macro.h](h)}(h**Parameters**h]jq )}(hjTh]h Parameters}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjRubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjNubj )}(hhh]j )}(h``const struct dma_buf_export_info *exp_info`` [in] holds all the export related information provided by the exporter. see :c:type:`struct dma_buf_export_info ` for further details. h](j )}(h.``const struct dma_buf_export_info *exp_info``h]j)}(hjsh]h*const struct dma_buf_export_info *exp_info}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjmubj )}(hhh]h)}(h[in] holds all the export related information provided by the exporter. see :c:type:`struct dma_buf_export_info ` for further details.h](hO[in] holds all the export related information provided by the exporter. see }(hjhhhNhNubh)}(h::c:type:`struct dma_buf_export_info `h]j)}(hjh]hstruct dma_buf_export_info}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_export_infouh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubh for further details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjmubeh}(h]h ]h"]h$]h&]uh1j hjhMhjjubah}(h]h ]h"]h$]h&]uh1j hjNubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjNubh)}(hReturns, on success, a newly created struct dma_buf object, which wraps the supplied private data and operations for struct dma_buf_ops. On either missing ops, or error in allocating struct dma_buf, will return negative error.h]hReturns, on success, a newly created struct dma_buf object, which wraps the supplied private data and operations for struct dma_buf_ops. On either missing ops, or error in allocating struct dma_buf, will return negative error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjNubh)}(hjFor most cases the easiest way to create **exp_info** is through the ``DEFINE_DMA_BUF_EXPORT_INFO`` macro.h](h)For most cases the easiest way to create }(hjhhhNhNubjq )}(h **exp_info**h]hexp_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh is through the }(hjhhhNhNubj)}(h``DEFINE_DMA_BUF_EXPORT_INFO``h]hDEFINE_DMA_BUF_EXPORT_INFO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh macro.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjNubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_fd (C function) c.dma_buf_fdhNtauh1j hjhhhNhNubj )}(hhh](j )}(h2int dma_buf_fd (struct dma_buf *dmabuf, int flags)h]j )}(h1int dma_buf_fd(struct dma_buf *dmabuf, int flags)h](hdesc_sig_keyword_type)}(hinth]hint}(hjLhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jJhjFhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjFhhhj[hMubj )}(h dma_buf_fdh]j )}(h dma_buf_fdh]h dma_buf_fd}(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjFhhhj[hMubj)}(h#(struct dma_buf *dmabuf, int flags)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjpsb c.dma_buf_fdasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hdmabufh]hdmabuf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h int flagsh](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hflagsh]hflags}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjFhhhj[hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjBhhhj[hMubah}(h]j=ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj[hMhj?hhubj@ )}(hhh]h)}(h6returns a file descriptor for the given struct dma_bufh]h6returns a file descriptor for the given struct dma_buf}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj?hhubah}(h]h ]h"]h$]h&]uh1j? hj?hhhj[hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jZjb jZjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] pointer to dma_buf for which fd is required. ``int flags`` [in] flags to give to fd **Description** On success, returns an associated 'fd'. Else, returns error.h](h)}(h**Parameters**h]jq )}(hjdh]h Parameters}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjbubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj^ubj )}(hhh](j )}(hP``struct dma_buf *dmabuf`` [in] pointer to dma_buf for which fd is required. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjh]hstruct dma_buf *dmabuf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj}ubj )}(hhh]h)}(h4[in] pointer to dma_buf for which fd is required.h]h4[in] pointer to dma_buf for which fd is required.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hj}ubeh}(h]h ]h"]h$]h&]uh1j hjhMhjzubj )}(h*``int flags`` [in] flags to give to fd h](j )}(h ``int flags``h]j)}(hjh]h int flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]h)}(hn] flags to give to fdh]hn] flags to give to fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjzubeh}(h]h ]h"]h$]h&]uh1j hj^ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj^ubh)}(h huh1j hjIhMhj1hhubj@ )}(hhh]h)}(h+returns the struct dma_buf related to an fdh]h+returns the struct dma_buf related to an fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hj1hhhjIhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``int fd`` [in] fd associated with the struct dma_buf to be returned **Description** On success, returns the struct dma_buf associated with an fd; uses file's refcounting done by fget to increase refcount. returns ERR_PTR otherwise.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]j )}(hH``int fd`` [in] fd associated with the struct dma_buf to be returned h](j )}(h ``int fd``h]j)}(hj=h]hint fd}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj7ubj )}(hhh]h)}(h<[in] fd associated with the struct dma_buf to be returnedh]h<[in] fd associated with the struct dma_buf to be returned}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjSubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hjRhMhj4ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjxh]h Description}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjvubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubh)}(hOn success, returns the struct dma_buf associated with an fd; uses file's refcounting done by fget to increase refcount. returns ERR_PTR otherwise.h]hOn success, returns the struct dma_buf associated with an fd; uses file’s refcounting done by fget to increase refcount. returns ERR_PTR otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_put (C function) c.dma_buf_puthNtauh1j hjhhhNhNubj )}(hhh](j )}(h)void dma_buf_put (struct dma_buf *dmabuf)h]j )}(h(void dma_buf_put(struct dma_buf *dmabuf)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM-ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhM-ubj )}(h dma_buf_put"h]j )}(h dma_buf_puth]h dma_buf_put}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhM-ubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsb c.dma_buf_putasbuh1hhjubj )}(h h]h }(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjFhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hdmabufh]hdmabuf}(hjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM-ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhM-ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhM-hjhhubj@ )}(hhh]h)}(h decreases refcount of the bufferh]h decreases refcount of the buffer}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM-hjzhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhM-ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to reduce refcount of **Description** Uses file's refcounting done implicitly by fput(). If, as a result of this call, the refcount becomes 0, the 'release' file operation related to this fd is called. It calls :c:type:`dma_buf_ops.release ` vfunc in turn, and frees the memory allocated for dmabuf when exported.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM1hjubj )}(hhh]j )}(h@``struct dma_buf *dmabuf`` [in] buffer to reduce refcount of h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjh]hstruct dma_buf *dmabuf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM.hjubj )}(hhh]h)}(h$[in] buffer to reduce refcount ofh]h$[in] buffer to reduce refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM.hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM.hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM0hjubh)}(h2Uses file's refcounting done implicitly by fput().h]h4Uses file’s refcounting done implicitly by fput().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM0hjubh)}(hIf, as a result of this call, the refcount becomes 0, the 'release' file operation related to this fd is called. It calls :c:type:`dma_buf_ops.release ` vfunc in turn, and frees the memory allocated for dmabuf when exported.h](h~If, as a result of this call, the refcount becomes 0, the ‘release’ file operation related to this fd is called. It calls }(hjhhhNhNubh)}(h+:c:type:`dma_buf_ops.release `h]j)}(hj(h]hdma_buf_ops.release}(hj*hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM2hjubhH vfunc in turn, and frees the memory allocated for dmabuf when exported.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjEhM2hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_buf_dynamic_attach (C function)c.dma_buf_dynamic_attachhNtauh1j hjhhhNhNubj )}(hhh](j )}(hstruct dma_buf_attachment * dma_buf_dynamic_attach (struct dma_buf *dmabuf, struct device *dev, const struct dma_buf_attach_ops *importer_ops, void *importer_priv)h]j )}(hstruct dma_buf_attachment *dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev, const struct dma_buf_attach_ops *importer_ops, void *importer_priv)h](j )}(hj h]hstruct}(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlhhhj}hMubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_buf_dynamic_attachsbc.dma_buf_dynamic_attachasbuh1hhjlhhhj}hMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlhhhj}hMubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjlhhhj}hMubj )}(hdma_buf_dynamic_attachh]j )}(hjh]hdma_buf_dynamic_attach}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjlhhhj}hMubj)}(hp(struct dma_buf *dmabuf, struct device *dev, const struct dma_buf_attach_ops *importer_ops, void *importer_priv)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj modnameN classnameNjj)}j]jc.dma_buf_dynamic_attachasbuh1hhjubj )}(h h]h }(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj4hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hdmabufh]hdmabuf}(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct device *devh](j )}(hj h]hstruct}(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubj )}(h h]h }(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubh)}(hhh]j )}(hdeviceh]hdevice}(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjzmodnameN classnameNjj)}j]jc.dma_buf_dynamic_attachasbuh1hhjVubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjVubj )}(hdevh]hdev}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h-const struct dma_buf_attach_ops *importer_opsh](j )}(hjh]hconst}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_buf_attach_opsh]hdma_buf_attach_ops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_buf_dynamic_attachasbuh1hhjubj )}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj/hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(h importer_opsh]h importer_ops}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hvoid *importer_privh](jK)}(hvoidh]hvoid}(hjUhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjQubj )}(h h]h }(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQubjc)}(hj h]h*}(hjqhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjQubj )}(h importer_privh]h importer_priv}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjlhhhj}hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhhj}hMubah}(h]jcah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj}hMhjehhubj@ )}(hhh]h)}(h,Add the device to dma_buf's attachments listh]h.Add the device to dma_buf’s attachments list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjehhhj}hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX~**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to attach device to. ``struct device *dev`` [in] device to be attached. ``const struct dma_buf_attach_ops *importer_ops`` [in] importer operations for the attachment ``void *importer_priv`` [in] importer private pointer for the attachment **Description** Returns struct dma_buf_attachment pointer for this attachment. Attachments must be cleaned up by calling dma_buf_detach(). Optionally this calls :c:type:`dma_buf_ops.attach ` to allow device-specific attach functionality. A pointer to newly created :c:type:`dma_buf_attachment` on success, or a negative error code wrapped into a pointer on failure. Note that this can fail if the backing storage of **dmabuf** is in a place not accessible to **dev**, and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh](j )}(h?``struct dma_buf *dmabuf`` [in] buffer to attach device to. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjh]hstruct dma_buf *dmabuf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]h)}(h#[in] buffer to attach device to.h]h#[in] buffer to attach device to.}(hj hhhNhNubah}(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)}(hj" h]hstruct device *dev}(hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj ubj )}(hhh]h)}(h[in] device to be attached.h]h[in] device to be attached.}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7 hMhj8 ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj7 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)}(hj[ h]h-const struct dma_buf_attach_ops *importer_ops}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjY ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjU ubj )}(hhh]h)}(h.[in] importer operations for the attachmenth]h.[in] importer operations for the attachment}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjp hMhjq ubah}(h]h ]h"]h$]h&]uh1j hjU ubeh}(h]h ]h"]h$]h&]uh1j hjp hMhjubj )}(hL``void *importer_priv`` [in] importer private pointer for the attachment h](j )}(h``void *importer_priv``h]j)}(hj h]hvoid *importer_priv}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj ubj )}(hhh]h)}(h3[in] importer private pointer for the attachmenth]h3[in] importer private pointer for the attachment}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.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().}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./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 }(hj hhhNhNubh)}(h*:c:type:`dma_buf_ops.attach `h]j)}(hj h]hdma_buf_ops.attach}(hj!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj ubh/ to allow device-specific attach functionality.}(hj hhhNhNubeh}(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)}(hj0!h]hdma_buf_attachment}(hj2!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj.!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj&!ubhH on success, or a negative error code wrapped into a pointer on failure.}(hj&!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjM!hMhjubh)}(hNote that this can fail if the backing storage of **dmabuf** is in a place not accessible to **dev**, and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY.h](h2Note that this can fail if the backing storage of }(hjX!hhhNhNubjq )}(h **dmabuf**h]hdmabuf}(hj`!hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjX!ubh! is in a place not accessible to }(hjX!hhhNhNubjq )}(h**dev**h]hdev}(hjr!hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjX!ubh], and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY.}(hjX!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_attach (C function)c.dma_buf_attachhNtauh1j hjhhhNhNubj )}(hhh](j )}(hWstruct dma_buf_attachment * dma_buf_attach (struct dma_buf *dmabuf, struct device *dev)h]j )}(hUstruct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, struct device *dev)h](j )}(hj h]hstruct}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!hhhj!hMubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj!modnameN classnameNjj)}j]jN)}jFdma_buf_attachsbc.dma_buf_attachasbuh1hhj!hhhj!hMubj )}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!hhhj!hMubjc)}(hj h]h*}(hj!hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj!hhhj!hMubj )}(hdma_buf_attachh]j )}(hj!h]hdma_buf_attach}(hj "hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj!hhhj!hMubj)}(h,(struct dma_buf *dmabuf, struct device *dev)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj%"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!"ubj )}(h h]h }(hj2"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!"ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjC"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@"ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjE"modnameN classnameNjj)}j]j!c.dma_buf_attachasbuh1hhj!"ubj )}(h h]h }(hja"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!"ubjc)}(hj h]h*}(hjo"hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj!"ubj )}(hdmabufh]hdmabuf}(hj|"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!"ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubj)}(hstruct device *devh](j )}(hj h]hstruct}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubj )}(h h]h }(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubh)}(hhh]j )}(hdeviceh]hdevice}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj"modnameN classnameNjj)}j]j!c.dma_buf_attachasbuh1hhj"ubj )}(h h]h }(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubjc)}(hj h]h*}(hj"hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj"ubj )}(hdevh]hdev}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubeh}(h]h ]h"]h$]h&]jjuh1jhj!hhhj!hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj!hhhj!hMubah}(h]j!ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj!hMhj!hhubj@ )}(hhh]h)}(h"Wrapper for dma_buf_dynamic_attachh]h"Wrapper for dma_buf_dynamic_attach}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj#hhubah}(h]h ]h"]h$]h&]uh1j? hj!hhhj!hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j.#jb j.#jc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to attach device to. ``struct device *dev`` [in] device to be attached. **Description** Wrapper to call dma_buf_dynamic_attach() for drivers which still use a static mapping.h](h)}(h**Parameters**h]jq )}(hj8#h]h Parameters}(hj:#hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj6#ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj2#ubj )}(hhh](j )}(h?``struct dma_buf *dmabuf`` [in] buffer to attach device to. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjW#h]hstruct dma_buf *dmabuf}(hjY#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjU#ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjQ#ubj )}(hhh]h)}(h#[in] buffer to attach device to.h]h#[in] buffer to attach device to.}(hjp#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl#hMhjm#ubah}(h]h ]h"]h$]h&]uh1j hjQ#ubeh}(h]h ]h"]h$]h&]uh1j hjl#hMhjN#ubj )}(h6``struct device *dev`` [in] device to be attached. h](j )}(h``struct device *dev``h]j)}(hj#h]hstruct device *dev}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj#ubj )}(hhh]h)}(h[in] device to be attached.h]h[in] device to be attached.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMhj#ubah}(h]h ]h"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]uh1j hj#hMhjN#ubeh}(h]h ]h"]h$]h&]uh1j hj2#ubh)}(h**Description**h]jq )}(hj#h]h Description}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj#ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj2#ubh)}(hVWrapper to call dma_buf_dynamic_attach() for drivers which still use a static mapping.h]hVWrapper to call dma_buf_dynamic_attach() for drivers which still use a static mapping.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj2#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_detach (C function)c.dma_buf_detachhNtauh1j hjhhhNhNubj )}(hhh](j )}(hOvoid dma_buf_detach (struct dma_buf *dmabuf, struct dma_buf_attachment *attach)h]j )}(hNvoid dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)h](jK)}(hvoidh]hvoid}(hj$hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj $hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj $hhhj$hMubj )}(hdma_buf_detachh]j )}(hdma_buf_detachh]hdma_buf_detach}(hj1$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-$ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj $hhhj$hMubj)}(h;(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hjM$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjI$ubj )}(h h]h }(hjZ$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjI$ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjk$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh$ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjm$modnameN classnameNjj)}j]jN)}jFj3$sbc.dma_buf_detachasbuh1hhjI$ubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjI$ubjc)}(hj h]h*}(hj$hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjI$ubj )}(hdmabufh]hdmabuf}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjI$ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjE$ubj)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj$modnameN classnameNjj)}j]j$c.dma_buf_detachasbuh1hhj$ubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubjc)}(hj h]h*}(hj %hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj$ubj )}(hattachh]hattach}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjE$ubeh}(h]h ]h"]h$]h&]jjuh1jhj $hhhj$hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj$hhhj$hMubah}(h]j$ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj$hMhj$hhubj@ )}(hhh]h)}(h:Remove the given attachment from dmabuf's attachments listh]h` for device-specific detach.h](h)}(h**Parameters**h]jq )}(hjb%h]h Parameters}(hjd%hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj`%ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj\%ubj )}(hhh](j )}(h:``struct dma_buf *dmabuf`` [in] buffer to detach from. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj%h]hstruct dma_buf *dmabuf}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj{%ubj )}(hhh]h)}(h[in] buffer to detach from.h]h[in] buffer to detach from.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hMhj%ubah}(h]h ]h"]h$]h&]uh1j hj{%ubeh}(h]h ]h"]h$]h&]uh1j hj%hMhjx%ubj )}(hd``struct dma_buf_attachment *attach`` [in] attachment to be detached; is free'd after this call. h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj%h]h!struct dma_buf_attachment *attach}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj%ubj )}(hhh]h)}(h=[in] attachment to be detached; is free'd after this call.h]h?[in] attachment to be detached; is free’d after this call.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hMhj%ubah}(h]h ]h"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]uh1j hj%hMhjx%ubeh}(h]h ]h"]h$]h&]uh1j hj\%ubh)}(h**Description**h]jq )}(hj%h]h Description}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj%ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj\%ubh)}(hBClean up a device attachment obtained by calling dma_buf_attach().h]hBClean up a device attachment obtained by calling dma_buf_attach().}(hj &hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj\%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:147: ./drivers/dma-buf/dma-buf.chMhj&ubh for device-specific detach.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjA&hMhj\%ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_pin (C function) c.dma_buf_pinhNtauh1j hjhhhNhNubj )}(hhh](j )}(h3int dma_buf_pin (struct dma_buf_attachment *attach)h]j )}(h2int dma_buf_pin(struct dma_buf_attachment *attach)h](jK)}(hinth]hint}(hjl&hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjh&hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj{&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh&hhhjz&hMubj )}(h dma_buf_pinh]j )}(h dma_buf_pinh]h dma_buf_pin}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjh&hhhjz&hMubj)}(h#(struct dma_buf_attachment *attach)h]j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubj )}(h h]h }(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj&modnameN classnameNjj)}j]jN)}jFj&sb c.dma_buf_pinasbuh1hhj&ubj )}(h h]h }(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubjc)}(hj h]h*}(hj&hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj&ubj )}(hattachh]hattach}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj&ubah}(h]h ]h"]h$]h&]jjuh1jhjh&hhhjz&hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjd&hhhjz&hMubah}(h]j_&ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjz&hMhja&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:147: ./drivers/dma-buf/dma-buf.chMhj)'hhubah}(h]h ]h"]h$]h&]uh1j? hja&hhhjz&hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jD'jb jD'jc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment which should be pinned **Description** Only dynamic importers (who set up **attach** with dma_buf_dynamic_attach()) may call this, and only for limited use cases like scanout and not for temporary pin operations. It is not permitted to allow userspace to pin arbitrary amounts of buffers through this interface. Buffers must be unpinned by calling dma_buf_unpin(). **Return** 0 on success, negative error code on failure.h](h)}(h**Parameters**h]jq )}(hjN'h]h Parameters}(hjP'hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjL'ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM hjH'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)}(hjm'h]h!struct dma_buf_attachment *attach}(hjo'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk'ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjg'ubj )}(hhh]h)}(h)[in] attachment which should be pinnedh]h)[in] attachment which should be pinned}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hMhj'ubah}(h]h ]h"]h$]h&]uh1j hjg'ubeh}(h]h ]h"]h$]h&]uh1j hj'hMhjd'ubah}(h]h ]h"]h$]h&]uh1j hjH'ubh)}(h**Description**h]jq )}(hj'h]h Description}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj'ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM hjH'ubh)}(hXOnly dynamic importers (who set up **attach** with dma_buf_dynamic_attach()) may call this, and only for limited use cases like scanout and not for temporary pin operations. It is not permitted to allow userspace to pin arbitrary amounts of buffers through this interface.h](h#Only dynamic importers (who set up }(hj'hhhNhNubjq )}(h **attach**h]hattach}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj'ubh with dma_buf_dynamic_attach()) may call this, and only for limited use cases like scanout and not for temporary pin operations. It is not permitted to allow userspace to pin arbitrary amounts of buffers through this interface.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM hjH'ubh)}(h4Buffers must be unpinned by calling dma_buf_unpin().h]h4Buffers must be unpinned by calling dma_buf_unpin().}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjH'ubh)}(h **Return**h]jq )}(hj'h]hReturn}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj'ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjH'ubh)}(h-0 on success, negative error code on failure.h]h-0 on success, negative error code on failure.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjH'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_unpin (C function)c.dma_buf_unpinhNtauh1j hjhhhNhNubj )}(hhh](j )}(h6void dma_buf_unpin (struct dma_buf_attachment *attach)h]j )}(h5void dma_buf_unpin(struct dma_buf_attachment *attach)h](jK)}(hvoidh]hvoid}(hj5(hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj1(hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM%ubj )}(h h]h }(hjD(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1(hhhjC(hM%ubj )}(h dma_buf_unpinh]j )}(h dma_buf_unpinh]h dma_buf_unpin}(hjV(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjR(ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj1(hhhjC(hM%ubj)}(h#(struct dma_buf_attachment *attach)h]j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hjr(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjn(ubj )}(h h]h }(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjn(ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj(modnameN classnameNjj)}j]jN)}jFjX(sbc.dma_buf_unpinasbuh1hhjn(ubj )}(h h]h }(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjn(ubjc)}(hj h]h*}(hj(hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjn(ubj )}(hattachh]hattach}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjn(ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjj(ubah}(h]h ]h"]h$]h&]jjuh1jhj1(hhhjC(hM%ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj-(hhhjC(hM%ubah}(h]j((ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjC(hM%hj*(hhubj@ )}(hhh]h)}(hUnpin a DMA-bufh]hUnpin a DMA-buf}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM%hj(hhubah}(h]h ]h"]h$]h&]uh1j? hj*(hhhjC(hM%ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j )jb j )jc jd je uh1j hhhjhNhNubjg )}(hXA**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment which should be unpinned **Description** This unpins a buffer pinned by dma_buf_pin() and allows the exporter to move any mapping of **attach** again and inform the importer through :c:type:`dma_buf_attach_ops.move_notify `.h](h)}(h**Parameters**h]jq )}(hj)h]h Parameters}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj)ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM)hj)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)}(hj6)h]h!struct dma_buf_attachment *attach}(hj8)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4)ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM&hj0)ubj )}(hhh]h)}(h+[in] attachment which should be unpinnedh]h+[in] attachment which should be unpinned}(hjO)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK)hM&hjL)ubah}(h]h ]h"]h$]h&]uh1j hj0)ubeh}(h]h ]h"]h$]h&]uh1j hjK)hM&hj-)ubah}(h]h ]h"]h$]h&]uh1j hj)ubh)}(h**Description**h]jq )}(hjq)h]h Description}(hjs)hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjo)ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM(hj)ubh)}(hThis unpins a buffer pinned by dma_buf_pin() and allows the exporter to move any mapping of **attach** again and inform the importer through :c:type:`dma_buf_attach_ops.move_notify `.h](h\This unpins a buffer pinned by dma_buf_pin() and allows the exporter to move any mapping of }(hj)hhhNhNubjq )}(h **attach**h]hattach}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj)ubh' again and inform the importer through }(hj)hhhNhNubh)}(h=:c:type:`dma_buf_attach_ops.move_notify `h]j)}(hj)h]hdma_buf_attach_ops.move_notify}(hj)hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attach_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM(hj)ubh.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj)hM(hj)ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_buf_map_attachment (C function)c.dma_buf_map_attachmenthNtauh1j hjhhhNhNubj )}(hhh](j )}(hostruct sg_table * dma_buf_map_attachment (struct dma_buf_attachment *attach, enum dma_data_direction direction)h]j )}(hmstruct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j )}(hj h]hstruct}(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM:ubj )}(h h]h }(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)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&] refdomainjreftypejF reftargetj *modnameN classnameNjj)}j]jN)}jFdma_buf_map_attachmentsbc.dma_buf_map_attachmentasbuh1hhj)hhhj)hM:ubj )}(h h]h }(hj+*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)hhhj)hM:ubjc)}(hj h]h*}(hj9*hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj)hhhj)hM:ubj )}(hdma_buf_map_attachmenth]j )}(hj(*h]hdma_buf_map_attachment}(hjJ*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjF*ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj)hhhj)hM:ubj)}(hF(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hje*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hja*ubj )}(h h]h }(hjr*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hja*ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj*modnameN classnameNjj)}j]j&*c.dma_buf_map_attachmentasbuh1hhja*ubj )}(h h]h }(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hja*ubjc)}(hj h]h*}(hj*hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhja*ubj )}(hattachh]hattach}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hja*ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj]*ubj)}(h!enum dma_data_direction directionh](j )}(henumh]henum}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubj )}(h h]h }(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj*modnameN classnameNjj)}j]j&*c.dma_buf_map_attachmentasbuh1hhj*ubj )}(h h]h }(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubj )}(h directionh]h direction}(hj +hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj]*ubeh}(h]h ]h"]h$]h&]jjuh1jhj)hhhj)hM:ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj)hhhj)hM:ubah}(h]j)ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj)hM:hj)hhubj@ )}(hhh]h)}(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.}(hjJ+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM:hjG+hhubah}(h]h ]h"]h$]h&]uh1j? hj)hhhj)hM:ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jb+jb jb+jc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment whose scatterlist is to be returned ``enum dma_data_direction direction`` [in] direction of DMA transfer **Description** Returns sg_table containing the scatterlist to be returned; returns ERR_PTR on error. May return -EINTR if it is interrupted by a signal. On success, the DMA addresses and lengths in the returned scatterlist are PAGE_SIZE aligned. A mapping must be unmapped by using dma_buf_unmap_attachment(). Note that the underlying backing storage is pinned for as long as a mapping exists, therefore users/importers should not hold onto a mapping for undue amounts of time. Important: Dynamic importers must wait for the exclusive fence of the struct dma_resv attached to the DMA-BUF first.h](h)}(h**Parameters**h]jq )}(hjl+h]h Parameters}(hjn+hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjj+ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM>hjf+ubj )}(hhh](j )}(h]``struct dma_buf_attachment *attach`` [in] attachment whose scatterlist is to be returned h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj+h]h!struct dma_buf_attachment *attach}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM=hj+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+hM=hj+ubah}(h]h ]h"]h$]h&]uh1j hj+ubeh}(h]h ]h"]h$]h&]uh1j hj+hM=hj+ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hj+h]h!enum dma_data_direction direction}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM>hj+ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(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 hjf+ubh)}(h**Description**h]jq )}(hj+h]h Description}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj+ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM@hjf+ubh)}(hReturns sg_table containing the scatterlist to be returned; returns ERR_PTR on error. May return -EINTR if it is interrupted by a signal.h]hReturns sg_table containing the scatterlist to be returned; returns ERR_PTR on error. May return -EINTR if it is interrupted by a signal.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM@hjf+ubh)}(h\On success, the DMA addresses and lengths in the returned scatterlist are PAGE_SIZE aligned.h]h\On success, the DMA addresses and lengths in the returned scatterlist are PAGE_SIZE aligned.}(hj$,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMChjf+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.}(hj3,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMFhjf+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.}(hjB,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMKhjf+ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j ,dma_buf_map_attachment_unlocked (C function)!c.dma_buf_map_attachment_unlockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(hxstruct sg_table * dma_buf_map_attachment_unlocked (struct dma_buf_attachment *attach, enum dma_data_direction direction)h]j )}(hvstruct sg_table *dma_buf_map_attachment_unlocked(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j )}(hj h]hstruct}(hjq,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjm,hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjm,hhhj~,hMubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj,modnameN classnameNjj)}j]jN)}jFdma_buf_map_attachment_unlockedsb!c.dma_buf_map_attachment_unlockedasbuh1hhjm,hhhj~,hMubj )}(h h]h }(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjm,hhhj~,hMubjc)}(hj h]h*}(hj,hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjm,hhhj~,hMubj )}(hdma_buf_map_attachment_unlockedh]j )}(hj,h]hdma_buf_map_attachment_unlocked}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjm,hhhj~,hMubj)}(hF(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubj )}(h h]h }(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj -hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj -modnameN classnameNjj)}j]j,!c.dma_buf_map_attachment_unlockedasbuh1hhj,ubj )}(h h]h }(hj'-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubjc)}(hj h]h*}(hj5-hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj,ubj )}(hattachh]hattach}(hjB-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj,ubj)}(h!enum dma_data_direction directionh](j )}(hj*h]henum}(hj[-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjW-ubj )}(h h]h }(hjh-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjW-ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hjy-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjv-ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj{-modnameN classnameNjj)}j]j,!c.dma_buf_map_attachment_unlockedasbuh1hhjW-ubj )}(h h]h }(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjW-ubj )}(h directionh]h direction}(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjW-ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj,ubeh}(h]h ]h"]h$]h&]jjuh1jhjm,hhhj~,hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hji,hhhj~,hMubah}(h]jd,ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj~,hMhjf,hhubj@ )}(hhh]h)}(hReturns the scatterlist table of the attachment; mapped into _device_ address space. Is a wrapper for map_dma_buf() of the dma_buf_ops.h]hReturns the scatterlist table of the attachment; mapped into _device_ address space. Is a wrapper for map_dma_buf() of the dma_buf_ops.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj-hhubah}(h]h ]h"]h$]h&]uh1j? hjf,hhhj~,hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j-jb j-jc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment whose scatterlist is to be returned ``enum dma_data_direction direction`` [in] direction of DMA transfer **Description** Unlocked variant of dma_buf_map_attachment().h](h)}(h**Parameters**h]jq )}(hj-h]h Parameters}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj-ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj-ubj )}(hhh](j )}(h]``struct dma_buf_attachment *attach`` [in] attachment whose scatterlist is to be returned h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj.h]h!struct dma_buf_attachment *attach}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj .ubj )}(hhh]h)}(h6[in] attachment whose scatterlist is to be returnedh]h6[in] attachment whose scatterlist is to be returned}(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)}(hjI.h]h!enum dma_data_direction direction}(hjK.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjG.ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjC.ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hjb.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^.hMhj_.ubah}(h]h ]h"]h$]h&]uh1j hjC.ubeh}(h]h ]h"]h$]h&]uh1j hj^.hMhj.ubeh}(h]h ]h"]h$]h&]uh1j hj-ubh)}(h**Description**h]jq )}(hj.h]h Description}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj.ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj-ubh)}(h-Unlocked variant of dma_buf_map_attachment().h]h-Unlocked variant of dma_buf_map_attachment().}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j %dma_buf_unmap_attachment (C function)c.dma_buf_unmap_attachmenthNtauh1j hjhhhNhNubj )}(hhh](j )}(hvoid dma_buf_unmap_attachment (struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h]j )}(h~void dma_buf_unmap_attachment(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h](jK)}(hvoidh]hvoid}(hj.hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj.hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.hhhj.hMubj )}(hdma_buf_unmap_attachmenth]j )}(hdma_buf_unmap_attachmenth]hdma_buf_unmap_attachment}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj.hhhj.hMubj)}(ha(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubj )}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj$/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!/ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj&/modnameN classnameNjj)}j]jN)}jFj.sbc.dma_buf_unmap_attachmentasbuh1hhj/ubj )}(h h]h }(hjD/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubjc)}(hj h]h*}(hjR/hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj/ubj )}(hattachh]hattach}(hj_/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj.ubj)}(hstruct sg_table *sg_tableh](j )}(hj h]hstruct}(hjx/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjt/ubj )}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjt/ubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj/modnameN classnameNjj)}j]j@/c.dma_buf_unmap_attachmentasbuh1hhjt/ubj )}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjt/ubjc)}(hj h]h*}(hj/hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjt/ubj )}(hsg_tableh]hsg_table}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjt/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj.ubj)}(h!enum dma_data_direction directionh](j )}(hj*h]henum}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubj )}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj0modnameN classnameNjj)}j]j@/c.dma_buf_unmap_attachmentasbuh1hhj/ubj )}(h h]h }(hj$0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubj )}(h directionh]h direction}(hj20hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj.ubeh}(h]h ]h"]h$]h&]jjuh1jhj.hhhj.hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj.hhhj.hMubah}(h]j.ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj.hMhj.hhubj@ )}(hhh]h)}(hunmaps and decreases usecount of the buffer;might deallocate the scatterlist associated. Is a wrapper for unmap_dma_buf() of dma_buf_ops.h]hunmaps and decreases usecount of the buffer;might deallocate the scatterlist associated. Is a wrapper for unmap_dma_buf() of dma_buf_ops.}(hj\0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.c$hMhjY0hhubah}(h]h ]h"]h$]h&]uh1j? hj.hhhj.hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jt0jb jt0jc jd je uh1j hhhjhNhNubjg )}(hX^**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from ``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap ``enum dma_data_direction direction`` [in] direction of DMA transfer **Description** This unmaps a DMA mapping for **attached** obtained by dma_buf_map_attachment().h](h)}(h**Parameters**h]jq )}(hj~0h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj|0ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjx0ubj )}(hhh](j )}(hN``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj0h]h!struct dma_buf_attachment *attach}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj0ubj )}(hhh]h)}(h'[in] attachment to unmap buffer fromh]h'[in] attachment to unmap buffer from}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMhj0ubah}(h]h ]h"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]uh1j hj0hMhj0ubj )}(hN``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap h](j )}(h``struct sg_table *sg_table``h]j)}(hj0h]hstruct sg_table *sg_table}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj0ubj )}(hhh]h)}(h/[in] scatterlist info of the buffer to unmaph]h/[in] scatterlist info of the buffer to unmap}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMhj0ubah}(h]h ]h"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]uh1j hj0hMhj0ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hj1h]h!enum dma_data_direction direction}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj 1ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj 1ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hj(1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$1hMhj%1ubah}(h]h ]h"]h$]h&]uh1j hj 1ubeh}(h]h ]h"]h$]h&]uh1j hj$1hMhj0ubeh}(h]h ]h"]h$]h&]uh1j hjx0ubh)}(h**Description**h]jq )}(hjJ1h]h Description}(hjL1hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjH1ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjx0ubh)}(hPThis unmaps a DMA mapping for **attached** obtained by dma_buf_map_attachment().h](hThis unmaps a DMA mapping for }(hj`1hhhNhNubjq )}(h **attached**h]hattached}(hjh1hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj`1ubh& obtained by dma_buf_map_attachment().}(hj`1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjx0ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j .dma_buf_unmap_attachment_unlocked (C function)#c.dma_buf_unmap_attachment_unlockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(hvoid dma_buf_unmap_attachment_unlocked (struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h]j )}(hvoid dma_buf_unmap_attachment_unlocked(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h](jK)}(hvoidh]hvoid}(hj1hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj1hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1hhhj1hMubj )}(h!dma_buf_unmap_attachment_unlockedh]j )}(h!dma_buf_unmap_attachment_unlockedh]h!dma_buf_unmap_attachment_unlocked}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj1hhhj1hMubj)}(ha(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubj )}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj1modnameN classnameNjj)}j]jN)}jFj1sb#c.dma_buf_unmap_attachment_unlockedasbuh1hhj1ubj )}(h h]h }(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubjc)}(hj h]h*}(hj*2hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj1ubj )}(hattachh]hattach}(hj72hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj1ubj)}(hstruct sg_table *sg_tableh](j )}(hj h]hstruct}(hjP2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjL2ubj )}(h h]h }(hj]2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjL2ubh)}(hhh]j )}(hsg_tableh]hsg_table}(hjn2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjk2ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjp2modnameN classnameNjj)}j]j2#c.dma_buf_unmap_attachment_unlockedasbuh1hhjL2ubj )}(h h]h }(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjL2ubjc)}(hj h]h*}(hj2hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjL2ubj )}(hsg_tableh]hsg_table}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjL2ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj1ubj)}(h!enum dma_data_direction directionh](j )}(hj*h]henum}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubj )}(h h]h }(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj2modnameN classnameNjj)}j]j2#c.dma_buf_unmap_attachment_unlockedasbuh1hhj2ubj )}(h h]h }(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubj )}(h directionh]h direction}(hj 3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj1ubeh}(h]h ]h"]h$]h&]jjuh1jhj1hhhj1hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj1hhhj1hMubah}(h]j1ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj1hMhj1hhubj@ )}(hhh]h)}(hunmaps and decreases usecount of the buffer;might deallocate the scatterlist associated. Is a wrapper for unmap_dma_buf() of dma_buf_ops.h]hunmaps and decreases usecount of the buffer;might deallocate the scatterlist associated. Is a wrapper for unmap_dma_buf() of dma_buf_ops.}(hj43hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj13hhubah}(h]h ]h"]h$]h&]uh1j? hj1hhhj1hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jL3jb jL3jc jd je uh1j hhhjhNhNubjg )}(hX=**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from ``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap ``enum dma_data_direction direction`` [in] direction of DMA transfer **Description** Unlocked variant of dma_buf_unmap_attachment().h](h)}(h**Parameters**h]jq )}(hjV3h]h Parameters}(hjX3hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjT3ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjP3ubj )}(hhh](j )}(hN``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hju3h]h!struct dma_buf_attachment *attach}(hjw3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjs3ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjo3ubj )}(hhh]h)}(h'[in] attachment to unmap buffer fromh]h'[in] attachment to unmap buffer from}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMhj3ubah}(h]h ]h"]h$]h&]uh1j hjo3ubeh}(h]h ]h"]h$]h&]uh1j hj3hMhjl3ubj )}(hN``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap h](j )}(h``struct sg_table *sg_table``h]j)}(hj3h]hstruct sg_table *sg_table}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj3ubj )}(hhh]h)}(h/[in] scatterlist info of the buffer to unmaph]h/[in] scatterlist info of the buffer to unmap}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMhj3ubah}(h]h ]h"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]uh1j hj3hMhjl3ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hj3h]h!enum dma_data_direction direction}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj3ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMhj3ubah}(h]h ]h"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]uh1j hj3hMhjl3ubeh}(h]h ]h"]h$]h&]uh1j hjP3ubh)}(h**Description**h]jq )}(hj"4h]h Description}(hj$4hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj 4ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjP3ubh)}(h/Unlocked variant of dma_buf_unmap_attachment().h]h/Unlocked variant of dma_buf_unmap_attachment().}(hj84hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjP3ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_move_notify (C function)c.dma_buf_move_notifyhNtauh1j hjhhhNhNubj )}(hhh](j )}(h1void dma_buf_move_notify (struct dma_buf *dmabuf)h]j )}(h0void dma_buf_move_notify(struct dma_buf *dmabuf)h](jK)}(hvoidh]hvoid}(hjg4hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjc4hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hjv4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjc4hhhju4hMubj )}(hdma_buf_move_notifyh]j )}(hdma_buf_move_notifyh]hdma_buf_move_notify}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjc4hhhju4hMubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubj )}(h h]h }(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj4modnameN classnameNjj)}j]jN)}jFj4sbc.dma_buf_move_notifyasbuh1hhj4ubj )}(h h]h }(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubjc)}(hj h]h*}(hj4hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj4ubj )}(hdmabufh]hdmabuf}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj4ubah}(h]h ]h"]h$]h&]jjuh1jhjc4hhhju4hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj_4hhhju4hMubah}(h]jZ4ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hju4hMhj\4hhubj@ )}(hhh]h)}(h)notify attachments that DMA-buf is movingh]h)notify attachments that DMA-buf is moving}(hj'5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj$5hhubah}(h]h ]h"]h$]h&]uh1j? hj\4hhhju4hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j?5jb j?5jc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer which is moving **Description** Informs all attachments that they need to destroy and recreate all their mappings.h](h)}(h**Parameters**h]jq )}(hjI5h]h Parameters}(hjK5hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjG5ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjC5ubj )}(hhh]j )}(h:``struct dma_buf *dmabuf`` [in] buffer which is moving h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjh5h]hstruct dma_buf *dmabuf}(hjj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjf5ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjb5ubj )}(hhh]h)}(h[in] buffer which is movingh]h[in] buffer which is moving}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}5hMhj~5ubah}(h]h ]h"]h$]h&]uh1j hjb5ubeh}(h]h ]h"]h$]h&]uh1j hj}5hMhj_5ubah}(h]h ]h"]h$]h&]uh1j hjC5ubh)}(h**Description**h]jq )}(hj5h]h Description}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj5ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjC5ubh)}(hRInforms all attachments that they need to destroy and recreate all their mappings.h]hRInforms all attachments that they need to destroy and recreate all their mappings.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjC5ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j %dma_buf_begin_cpu_access (C function)c.dma_buf_begin_cpu_accesshNtauh1j hjhhhNhNubj )}(hhh](j )}(hXint dma_buf_begin_cpu_access (struct dma_buf *dmabuf, enum dma_data_direction direction)h]j )}(hWint dma_buf_begin_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction)h](jK)}(hinth]hint}(hj5hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj5hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMgubj )}(h h]h }(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5hhhj5hMgubj )}(hdma_buf_begin_cpu_accessh]j )}(hdma_buf_begin_cpu_accessh]hdma_buf_begin_cpu_access}(hj 6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj5hhhj5hMgubj)}(h;(struct dma_buf *dmabuf, enum dma_data_direction direction)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj%6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!6ubj )}(h h]h }(hj26hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!6ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjC6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@6ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjE6modnameN classnameNjj)}j]jN)}jFj 6sbc.dma_buf_begin_cpu_accessasbuh1hhj!6ubj )}(h h]h }(hjc6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!6ubjc)}(hj h]h*}(hjq6hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj!6ubj )}(hdmabufh]hdmabuf}(hj~6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!6ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj6ubj)}(h!enum dma_data_direction directionh](j )}(hj*h]henum}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubj )}(h h]h }(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj6modnameN classnameNjj)}j]j_6c.dma_buf_begin_cpu_accessasbuh1hhj6ubj )}(h h]h }(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubj )}(h directionh]h direction}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj6ubeh}(h]h ]h"]h$]h&]jjuh1jhj5hhhj5hMgubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj5hhhj5hMgubah}(h]j5ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj5hMghj5hhubj@ )}(hhh]h)}(hMust be called before accessing a dma_buf from the cpu in the kernel context. Calls begin_cpu_access to allow exporter-specific preparations. Coherency is only guaranteed in the specified range for the specified access direction.h]hMust be called before accessing a dma_buf from the cpu in the kernel context. Calls begin_cpu_access to allow exporter-specific preparations. Coherency is only guaranteed in the specified range for the specified access direction.}(hj 7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMghj7hhubah}(h]h ]h"]h$]h&]uh1j? hj5hhhj5hMgubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j#7jb j#7jc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to prepare cpu access for. ``enum dma_data_direction direction`` [in] direction of access. **Description** After the cpu access is complete the caller should call dma_buf_end_cpu_access(). Only when cpu access is bracketed by both calls is it guaranteed to be coherent with other DMA access. This function will also wait for any DMA transactions tracked through implicit synchronization in :c:type:`dma_buf.resv `. For DMA transactions with explicit synchronization this function will only ensure cache coherency, callers must ensure synchronization with such DMA transactions on their own. Can return negative error values, returns 0 on success.h](h)}(h**Parameters**h]jq )}(hj-7h]h Parameters}(hj/7hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj+7ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMkhj'7ubj )}(hhh](j )}(hE``struct dma_buf *dmabuf`` [in] buffer to prepare cpu access for. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjL7h]hstruct dma_buf *dmabuf}(hjN7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ7ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMkhjF7ubj )}(hhh]h)}(h)[in] buffer to prepare cpu access for.h]h)[in] buffer to prepare cpu access for.}(hje7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhja7hMkhjb7ubah}(h]h ]h"]h$]h&]uh1j hjF7ubeh}(h]h ]h"]h$]h&]uh1j hja7hMkhjC7ubj )}(hC``enum dma_data_direction direction`` [in] direction of access. h](j )}(h%``enum dma_data_direction direction``h]j)}(hj7h]h!enum dma_data_direction direction}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMlhj7ubj )}(hhh]h)}(h[in] direction of access.h]h[in] direction of access.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMlhj7ubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hj7hMlhjC7ubeh}(h]h ]h"]h$]h&]uh1j hj'7ubh)}(h**Description**h]jq )}(hj7h]h Description}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj7ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMnhj'7ubh)}(hAfter the cpu access is complete the caller should call dma_buf_end_cpu_access(). Only when cpu access is bracketed by both calls is it guaranteed to be coherent with other DMA access.h]hAfter the cpu access is complete the caller should call dma_buf_end_cpu_access(). Only when cpu access is bracketed by both calls is it guaranteed to be coherent with other DMA access.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMnhj'7ubh)}(hX3This function will also wait for any DMA transactions tracked through implicit synchronization in :c:type:`dma_buf.resv `. For DMA transactions with explicit synchronization this function will only ensure cache coherency, callers must ensure synchronization with such DMA transactions on their own.h](hbThis function will also wait for any DMA transactions tracked through implicit synchronization in }(hj7hhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hj7h]h dma_buf.resv}(hj7hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMrhj7ubh. For DMA transactions with explicit synchronization this function will only ensure cache coherency, callers must ensure synchronization with such DMA transactions on their own.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj 8hMrhj'7ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMwhj'7ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_buf_end_cpu_access (C function)c.dma_buf_end_cpu_accesshNtauh1j hjhhhNhNubj )}(hhh](j )}(hVint dma_buf_end_cpu_access (struct dma_buf *dmabuf, enum dma_data_direction direction)h]j )}(hUint dma_buf_end_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction)h](jK)}(hinth]hint}(hjF8hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjB8hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hjU8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjB8hhhjT8hMubj )}(hdma_buf_end_cpu_accessh]j )}(hdma_buf_end_cpu_accessh]hdma_buf_end_cpu_access}(hjg8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjc8ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjB8hhhjT8hMubj)}(h;(struct dma_buf *dmabuf, enum dma_data_direction direction)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubj )}(h h]h }(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj8modnameN classnameNjj)}j]jN)}jFji8sbc.dma_buf_end_cpu_accessasbuh1hhj8ubj )}(h h]h }(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubjc)}(hj h]h*}(hj8hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj8ubj )}(hdmabufh]hdmabuf}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj{8ubj)}(h!enum dma_data_direction directionh](j )}(hj*h]henum}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubj )}(h h]h }(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj9modnameN classnameNjj)}j]j8c.dma_buf_end_cpu_accessasbuh1hhj8ubj )}(h h]h }(hj19hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubj )}(h directionh]h direction}(hj?9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj{8ubeh}(h]h ]h"]h$]h&]jjuh1jhjB8hhhjT8hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj>8hhhjT8hMubah}(h]j98ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjT8hMhj;8hhubj@ )}(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.}(hji9hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjf9hhubah}(h]h ]h"]h$]h&]uh1j? hj;8hhhjT8hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j9jb j9jc jd je uh1j hhhjhNhNubjg )}(hX,**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to complete cpu access for. ``enum dma_data_direction direction`` [in] direction of access. **Description** This terminates CPU access started with dma_buf_begin_cpu_access(). Can return negative error values, returns 0 on success.h](h)}(h**Parameters**h]jq )}(hj9h]h Parameters}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj9ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubj )}(hhh](j )}(hF``struct dma_buf *dmabuf`` [in] buffer to complete cpu access for. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj9h]hstruct dma_buf *dmabuf}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubj )}(hhh]h)}(h*[in] buffer to complete cpu access for.h]h*[in] buffer to complete cpu access for.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj9ubah}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]uh1j hj9hMhj9ubj )}(hC``enum dma_data_direction direction`` [in] direction of access. h](j )}(h%``enum dma_data_direction direction``h]j)}(hj9h]h!enum dma_data_direction direction}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubj )}(hhh]h)}(h[in] direction of access.h]h[in] direction of access.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj9ubah}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]uh1j hj9hMhj9ubeh}(h]h ]h"]h$]h&]uh1j hj9ubh)}(h**Description**h]jq )}(hj:h]h Description}(hj :hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj:ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubh)}(hCThis terminates CPU access started with dma_buf_begin_cpu_access().h]hCThis terminates CPU access started with dma_buf_begin_cpu_access().}(hj4:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hjC:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_mmap (C function)c.dma_buf_mmaphNtauh1j hjhhhNhNubj )}(hhh](j )}(hZint dma_buf_mmap (struct dma_buf *dmabuf, struct vm_area_struct *vma, unsigned long pgoff)h]j )}(hYint dma_buf_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma, unsigned long pgoff)h](jK)}(hinth]hint}(hjr:hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjn:hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjn:hhhj:hMubj )}(h dma_buf_mmaph]j )}(h dma_buf_mmaph]h dma_buf_mmap}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjn:hhhj:hMubj)}(hI(struct dma_buf *dmabuf, struct vm_area_struct *vma, unsigned long pgoff)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubj )}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj:modnameN classnameNjj)}j]jN)}jFj:sbc.dma_buf_mmapasbuh1hhj:ubj )}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubjc)}(hj h]h*}(hj:hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj:ubj )}(hdmabufh]hdmabuf}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj:ubj)}(hstruct vm_area_struct *vmah](j )}(hj h]hstruct}(hj!;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubj )}(h h]h }(hj.;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubh)}(hhh]j )}(hvm_area_structh]hvm_area_struct}(hj?;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<;ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjA;modnameN classnameNjj)}j]j:c.dma_buf_mmapasbuh1hhj;ubj )}(h h]h }(hj];hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubjc)}(hj h]h*}(hjk;hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj;ubj )}(hvmah]hvma}(hjx;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj:ubj)}(hunsigned long pgoffh](jK)}(hunsignedh]hunsigned}(hj;hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj;ubj )}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubjK)}(hlongh]hlong}(hj;hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj;ubj )}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubj )}(hpgoffh]hpgoff}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj:ubeh}(h]h ]h"]h$]h&]jjuh1jhjn:hhhj:hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjj:hhhj:hMubah}(h]je:ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj:hMhjg:hhubj@ )}(hhh]h)}(h,Setup up a userspace mmap with the given vmah]h,Setup up a userspace mmap with the given vma}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj;hhubah}(h]h ]h"]h$]h&]uh1j? hjg:hhhj:hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j <jb j <jc jd je uh1j hhhjhNhNubjg )}(hX<**Parameters** ``struct dma_buf *dmabuf`` [in] buffer that should back the vma ``struct vm_area_struct *vma`` [in] vma for the mmap ``unsigned long pgoff`` [in] offset in pages where this mmap should start within the dma-buf buffer. **Description** This function adjusts the passed in vma so that it points at the file of the dma_buf operation. It also adjusts the starting pgoff and does bounds checking on the size of the vma. Then it calls the exporters mmap function to set up the mapping. Can return negative error values, returns 0 on success.h](h)}(h**Parameters**h]jq )}(hj<h]h Parameters}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj<ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj<ubj )}(hhh](j )}(hC``struct dma_buf *dmabuf`` [in] buffer that should back the vma h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj4<h]hstruct dma_buf *dmabuf}(hj6<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2<ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj.<ubj )}(hhh]h)}(h'[in] buffer that should back the vmah]h'[in] buffer that should back the vma}(hjM<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjI<hMhjJ<ubah}(h]h ]h"]h$]h&]uh1j hj.<ubeh}(h]h ]h"]h$]h&]uh1j hjI<hMhj+<ubj )}(h8``struct vm_area_struct *vma`` [in] vma for the mmap h](j )}(h``struct vm_area_struct *vma``h]j)}(hjm<h]hstruct vm_area_struct *vma}(hjo<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk<ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjg<ubj )}(hhh]h)}(h[in] vma for the mmaph]h[in] vma for the mmap}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hMhj<ubah}(h]h ]h"]h$]h&]uh1j hjg<ubeh}(h]h ]h"]h$]h&]uh1j hj<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:147: ./drivers/dma-buf/dma-buf.chMhj<ubj )}(hhh]h)}(hO[in] offset in pages where this mmap should start within the dma-buf buffer.h]hO[in] offset in pages where this mmap should start within the dma-buf buffer.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj<ubah}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hj<hMhj+<ubeh}(h]h ]h"]h$]h&]uh1j hj<ubh)}(h**Description**h]jq )}(hj<h]h Description}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj<ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj<ubh)}(hThis function adjusts the passed in vma so that it points at the file of the dma_buf operation. It also adjusts the starting pgoff and does bounds checking on the size of the vma. Then it calls the exporters mmap function to set up the mapping.h]hThis function adjusts the passed in vma so that it points at the file of the dma_buf operation. It also adjusts the starting pgoff and does bounds checking on the size of the vma. Then it calls the exporters mmap function to set up the mapping.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj<ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_vmap (C function)c.dma_buf_vmaphNtauh1j hjhhhNhNubj )}(hhh](j )}(h@int dma_buf_vmap (struct dma_buf *dmabuf, struct iosys_map *map)h]j )}(h?int dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map)h](jK)}(hinth]hint}(hj6=hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj2=hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hjE=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2=hhhjD=hMubj )}(h dma_buf_vmaph]j )}(h dma_buf_vmaph]h dma_buf_vmap}(hjW=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjS=ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj2=hhhjD=hMubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hjs=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjo=ubj )}(h h]h }(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjo=ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj=modnameN classnameNjj)}j]jN)}jFjY=sbc.dma_buf_vmapasbuh1hhjo=ubj )}(h h]h }(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjo=ubjc)}(hj h]h*}(hj=hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjo=ubj )}(hdmabufh]hdmabuf}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjo=ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjk=ubj)}(hstruct iosys_map *maph](j )}(hj h]hstruct}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubj )}(h h]h }(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj>ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj>modnameN classnameNjj)}j]j=c.dma_buf_vmapasbuh1hhj=ubj )}(h h]h }(hj!>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubjc)}(hj h]h*}(hj/>hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj=ubj )}(hmaph]hmap}(hj<>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjk=ubeh}(h]h ]h"]h$]h&]jjuh1jhj2=hhhjD=hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj.=hhhjD=hMubah}(h]j)=ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjD=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.}(hjf>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjc>hhubah}(h]h ]h"]h$]h&]uh1j? hj+=hhhjD=hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j~>jb j~>jc jd je uh1j hhhjhNhNubjg )}(hX%**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vmap ``struct iosys_map *map`` [out] returns the vmap pointer **Description** This call may fail due to lack of virtual mapping address space. These calls are optional in drivers. The intended use for them is for mapping objects linear in kernel space for high use objects. To ensure coherency users must call dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() around any cpu access performed through this mapping. Returns 0 on success, or a negative errno code otherwise.h](h)}(h**Parameters**h]jq )}(hj>h]h Parameters}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj>ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubj )}(hhh](j )}(h2``struct dma_buf *dmabuf`` [in] buffer to vmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj>h]hstruct dma_buf *dmabuf}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubj )}(hhh]h)}(h[in] buffer to vmaph]h[in] buffer to vmap}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hMhj>ubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hj>hMhj>ubj )}(h;``struct iosys_map *map`` [out] returns the vmap pointer h](j )}(h``struct iosys_map *map``h]j)}(hj>h]hstruct iosys_map *map}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubj )}(hhh]h)}(h [out] returns the vmap pointerh]h [out] returns the vmap pointer}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hMhj>ubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hj>hMhj>ubeh}(h]h ]h"]h$]h&]uh1j hj>ubh)}(h**Description**h]jq )}(hj?h]h Description}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj?ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubh)}(hThis 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.}(hj1?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubh)}(hTo ensure coherency users must call dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() around any cpu access performed through this mapping.h]hTo ensure coherency users must call dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() around any cpu access performed through this mapping.}(hj@?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubh)}(h9Returns 0 on success, or a negative errno code otherwise.h]h9Returns 0 on success, or a negative errno code otherwise.}(hjO?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj>ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_buf_vmap_unlocked (C function)c.dma_buf_vmap_unlockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(hIint dma_buf_vmap_unlocked (struct dma_buf *dmabuf, struct iosys_map *map)h]j )}(hHint dma_buf_vmap_unlocked(struct dma_buf *dmabuf, struct iosys_map *map)h](jK)}(hinth]hint}(hj~?hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjz?hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM ubj )}(h h]h }(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjz?hhhj?hM ubj )}(hdma_buf_vmap_unlockedh]j )}(hdma_buf_vmap_unlockedh]hdma_buf_vmap_unlocked}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjz?hhhj?hM ubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubj )}(h h]h }(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj?modnameN classnameNjj)}j]jN)}jFj?sbc.dma_buf_vmap_unlockedasbuh1hhj?ubj )}(h h]h }(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubjc)}(hj h]h*}(hj@hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj?ubj )}(hdmabufh]hdmabuf}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj?ubj)}(hstruct iosys_map *maph](j )}(hj h]hstruct}(hj-@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)@ubj )}(h h]h }(hj:@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)@ubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hjK@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjH@ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjM@modnameN classnameNjj)}j]j?c.dma_buf_vmap_unlockedasbuh1hhj)@ubj )}(h h]h }(hji@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)@ubjc)}(hj h]h*}(hjw@hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj)@ubj )}(hmaph]hmap}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)@ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj?ubeh}(h]h ]h"]h$]h&]jjuh1jhjz?hhhj?hM ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjv?hhhj?hM ubah}(h]jq?ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj?hM hjs?hhubj@ )}(hhh]h)}(hxCreate virtual mapping for the buffer object into kernel address space. Same restrictions as for vmap and friends apply.h]hxCreate virtual mapping for the buffer object into kernel address space. Same restrictions as for vmap and friends apply.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM hj@hhubah}(h]h ]h"]h$]h&]uh1j? hjs?hhhj?hM ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j@jb j@jc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vmap ``struct iosys_map *map`` [out] returns the vmap pointer **Description** Unlocked version of dma_buf_vmap() Returns 0 on success, or a negative errno code otherwise.h](h)}(h**Parameters**h]jq )}(hj@h]h Parameters}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj@ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj@ubj )}(hhh](j )}(h2``struct dma_buf *dmabuf`` [in] buffer to vmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj@h]hstruct dma_buf *dmabuf}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj@ubj )}(hhh]h)}(h[in] buffer to vmaph]h[in] buffer to vmap}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMhjAubah}(h]h ]h"]h$]h&]uh1j hj@ubeh}(h]h ]h"]h$]h&]uh1j hjAhMhj@ubj )}(h;``struct iosys_map *map`` [out] returns the vmap pointer h](j )}(h``struct iosys_map *map``h]j)}(hj(Ah]hstruct iosys_map *map}(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:147: ./drivers/dma-buf/dma-buf.chMhj"Aubj )}(hhh]h)}(h [out] returns the vmap pointerh]h [out] returns the vmap pointer}(hjAAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=AhMhj>Aubah}(h]h ]h"]h$]h&]uh1j hj"Aubeh}(h]h ]h"]h$]h&]uh1j hj=AhMhj@ubeh}(h]h ]h"]h$]h&]uh1j hj@ubh)}(h**Description**h]jq )}(hjcAh]h Description}(hjeAhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjaAubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj@ubh)}(h"Unlocked version of dma_buf_vmap()h]h"Unlocked version of dma_buf_vmap()}(hjyAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj@ubh)}(h9Returns 0 on success, or a negative errno code otherwise.h]h9Returns 0 on success, or a negative errno code otherwise.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_vunmap (C function)c.dma_buf_vunmaphNtauh1j hjhhhNhNubj )}(hhh](j )}(hCvoid dma_buf_vunmap (struct dma_buf *dmabuf, struct iosys_map *map)h]j )}(hBvoid dma_buf_vunmap(struct dma_buf *dmabuf, struct iosys_map *map)h](jK)}(hvoidh]hvoid}(hjAhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjAhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM(ubj )}(h h]h }(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAhhhjAhM(ubj )}(hdma_buf_vunmaph]j )}(hdma_buf_vunmaph]hdma_buf_vunmap}(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjAhhhjAhM(ubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubj )}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjBmodnameN classnameNjj)}j]jN)}jFjAsbc.dma_buf_vunmapasbuh1hhjAubj )}(h h]h }(hj2BhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubjc)}(hj h]h*}(hj@BhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjAubj )}(hdmabufh]hdmabuf}(hjMBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjAubj)}(hstruct iosys_map *maph](j )}(hj h]hstruct}(hjfBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbBubj )}(h h]h }(hjsBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbBubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjBmodnameN classnameNjj)}j]j.Bc.dma_buf_vunmapasbuh1hhjbBubj )}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbBubjc)}(hj h]h*}(hjBhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjbBubj )}(hmaph]hmap}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbBubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjAubeh}(h]h ]h"]h$]h&]jjuh1jhjAhhhjAhM(ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjAhhhjAhM(ubah}(h]jAah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjAhM(hjAhhubj@ )}(hhh]h)}(h&Unmap a vmap obtained by dma_buf_vmap.h]h&Unmap a vmap obtained by dma_buf_vmap.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM(hjBhhubah}(h]h ]h"]h$]h&]uh1j? hjAhhhjAhM(ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jBjb jBjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vunmap ``struct iosys_map *map`` [in] vmap pointer to vunmaph](h)}(h**Parameters**h]jq )}(hj Ch]h Parameters}(hj ChhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjCubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM,hjCubj )}(hhh](j )}(h4``struct dma_buf *dmabuf`` [in] buffer to vunmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj(Ch]hstruct dma_buf *dmabuf}(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:147: ./drivers/dma-buf/dma-buf.chM)hj"Cubj )}(hhh]h)}(h[in] buffer to vunmaph]h[in] buffer to vunmap}(hjAChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=ChM)hj>Cubah}(h]h ]h"]h$]h&]uh1j hj"Cubeh}(h]h ]h"]h$]h&]uh1j hj=ChM)hjCubj )}(h8``struct iosys_map *map`` [in] vmap pointer to vunmaph](j )}(h``struct iosys_map *map``h]j)}(hjaCh]hstruct iosys_map *map}(hjcChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_Cubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM+hj[Cubj )}(hhh]h)}(h[in] vmap pointer to vunmaph]h[in] vmap pointer to vunmap}(hjzChhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM*hjwCubah}(h]h ]h"]h$]h&]uh1j hj[Cubeh}(h]h ]h"]h$]h&]uh1j hjvChM+hjCubeh}(h]h ]h"]h$]h&]uh1j hjCubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_buf_vunmap_unlocked (C function)c.dma_buf_vunmap_unlockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(hLvoid dma_buf_vunmap_unlocked (struct dma_buf *dmabuf, struct iosys_map *map)h]j )}(hKvoid dma_buf_vunmap_unlocked(struct dma_buf *dmabuf, struct iosys_map *map)h](jK)}(hvoidh]hvoid}(hjChhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjChhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM@ubj )}(h h]h }(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjChhhjChM@ubj )}(hdma_buf_vunmap_unlockedh]j )}(hdma_buf_vunmap_unlockedh]hdma_buf_vunmap_unlocked}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjChhhjChM@ubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubj )}(h h]h }(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjDmodnameN classnameNjj)}j]jN)}jFjCsbc.dma_buf_vunmap_unlockedasbuh1hhjCubj )}(h h]h }(hj6DhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubjc)}(hj h]h*}(hjDDhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjCubj )}(hdmabufh]hdmabuf}(hjQDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjCubj)}(hstruct iosys_map *maph](j )}(hj h]hstruct}(hjjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjfDubj )}(h h]h }(hjwDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjfDubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjDmodnameN classnameNjj)}j]j2Dc.dma_buf_vunmap_unlockedasbuh1hhjfDubj )}(h h]h }(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjfDubjc)}(hj h]h*}(hjDhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjfDubj )}(hmaph]hmap}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjfDubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjCubeh}(h]h ]h"]h$]h&]jjuh1jhjChhhjChM@ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjChhhjChM@ubah}(h]jCah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjChM@hjChhubj@ )}(hhh]h)}(h&Unmap a vmap obtained by dma_buf_vmap.h]h&Unmap a vmap obtained by dma_buf_vmap.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM@hjDhhubah}(h]h ]h"]h$]h&]uh1j? hjChhhjChM@ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jEjb jEjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vunmap ``struct iosys_map *map`` [in] vmap pointer to vunmaph](h)}(h**Parameters**h]jq )}(hj Eh]h Parameters}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj Eubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMDhjEubj )}(hhh](j )}(h4``struct dma_buf *dmabuf`` [in] buffer to vunmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj,Eh]hstruct dma_buf *dmabuf}(hj.EhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*Eubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMAhj&Eubj )}(hhh]h)}(h[in] buffer to vunmaph]h[in] buffer to vunmap}(hjEEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAEhMAhjBEubah}(h]h ]h"]h$]h&]uh1j hj&Eubeh}(h]h ]h"]h$]h&]uh1j hjAEhMAhj#Eubj )}(h8``struct iosys_map *map`` [in] vmap pointer to vunmaph](j )}(h``struct iosys_map *map``h]j)}(hjeEh]hstruct iosys_map *map}(hjgEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcEubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMChj_Eubj )}(hhh]h)}(h[in] vmap pointer to vunmaph]h[in] vmap pointer to vunmap}(hj~EhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMBhj{Eubah}(h]h ]h"]h$]h&]uh1j hj_Eubeh}(h]h ]h"]h$]h&]uh1j hjzEhMChj#Eubeh}(h]h ]h"]h$]h&]uh1j hjEubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_ops (C struct) c.dma_buf_opshNtauh1j hjhhhNhNubj )}(hhh](j )}(h dma_buf_opsh]j )}(hstruct dma_buf_opsh](j )}(hj h]hstruct}(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKubj )}(h h]h }(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEhhhjEhKubj )}(h dma_buf_opsh]j )}(hjEh]h dma_buf_ops}(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjEhhhjEhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjEhhhjEhKubah}(h]jEah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjEhKhjEhhubj@ )}(hhh]h)}(h%operations possible on struct dma_bufh]h%operations possible on struct dma_buf}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjEhhubah}(h]h ]h"]h$]h&]uh1j? hjEhhhjEhKubeh}(h]h ](jstructeh"]h$]h&]j` jja jFjb jFjc jd je uh1j hhhjhNhNubjg )}(hXf#**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](jq )}(h**Definition**h]h Definition}(hj%FhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj!Fubh:}(hj!FhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK#hjFubj)}(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>Fsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK%hjFubh)}(h **Members**h]jq )}(hjOFh]hMembers}(hjQFhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjMFubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK4hjFubj )}(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)}(hjnFh]hattach}(hjpFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlFubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK` can access the provided :c:type:`dma_buf`. Exporters which support buffer objects in special locations like VRAM or device-specific carveout areas should check whether the buffer could be move to system memory (or directly accessed by the provided device), and otherwise need to fail the attach operation.h](h?This is called from dma_buf_attach() to make sure that a given }(hjFhhhNhNubh)}(h5:c:type:`dma_buf_attachment.dev `h]j)}(hjFh]hdma_buf_attachment.dev}(hjFhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK'hjFubh can access the provided }(hjFhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjFh]hdma_buf}(hjFhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hhjFhK'hjFubhX. Exporters which support buffer objects in special locations like VRAM or device-specific carveout areas should check whether the buffer could be move to system memory (or directly accessed by the provided device), and otherwise need to fail the attach operation.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhK'hjFubh)}(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.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK.hjFubh)}(h{Any exporter-private housekeeping data can be stored in the :c:type:`dma_buf_attachment.priv ` pointer.h](h`h]j)}(hjFh]hdma_buf_attachment.priv}(hjFhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK3hjFubh pointer.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjGhK3hjFubh)}(hThis callback is optional.h]hThis callback is optional.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK6hjFubh)}(hReturns:h]hReturns:}(hj,GhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK8hjFubh)}(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;GhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK:hjFubeh}(h]h ]h"]h$]h&]uh1j hjhFubeh}(h]h ]h"]h$]h&]uh1j hjFhK` 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)}(hjGh]hpin}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKahjGubj )}(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.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKNhjHubh)}(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 }(hjHhhhNhNubh)}(h:c:type:`dmabuf.resv `h]j)}(hjHh]h dmabuf.resv}(hjHhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdmabufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKShjHubh, object locked and is mutual exclusive with }(hjHhhhNhNubjq )}(h**cache_sgt_mapping**h]hcache_sgt_mapping}(hj>HhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjHubh.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj9HhKShjHubh)}(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().}(hjVHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKVhjHubh)}(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 }(hjeHhhhNhNubjq )}(h**map_dma_buf**h]h map_dma_buf}(hjmHhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjeHubh 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.}(hjeHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKYhjHubh)}(hReturns:h]hReturns:}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK_hjHubh)}(h-0 on success, negative error code on failure.h]h-0 on success, negative error code on failure.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhKahjHubeh}(h]h ]h"]h$]h&]uh1j hjGubeh}(h]h ]h"]h$]h&]uh1j hjGhKahjeFubj )}(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)}(hjHh]hunpin}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKnhjHubj )}(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.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhhjHubh)}(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 }(hjHhhhNhNubjq )}(h**cache_sgt_mapping**h]hcache_sgt_mapping}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjHubh.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKkhjHubh)}(hThis callback is optional.h]hThis callback is optional.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhKnhjHubeh}(h]h ]h"]h$]h&]uh1j hjHubeh}(h]h ]h"]h$]h&]uh1j hjHhKnhjeFubj )}(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)}(hjIh]h map_dma_buf}(hj IhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubj )}(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 }(hj7IhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjAIh]hdma_buf}(hjCIhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj?Iubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKuhj7IubhJ into device address space, and it is mandatory. It can only be called if }(hj7IhhhNhNubjq )}(h **attach**h]hattach}(hjcIhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj7Iubh has been called successfully.}(hj7IhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj^IhKuhj4Iubh)}(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.}(hj{IhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKyhj4Iubh)}(hXNote that any specific buffer attributes required for this function should get added to device_dma_parameters accessible via :c:type:`device.dma_params ` from the :c:type:`dma_buf_attachment`. The **attach** callback should also check these constraints.h](h}Note that any specific buffer attributes required for this function should get added to device_dma_parameters accessible via }(hjIhhhNhNubh)}(h$:c:type:`device.dma_params `h]j)}(hjIh]hdevice.dma_params}(hjIhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdeviceuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK}hjIubh from the }(hjIhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjIh]hdma_buf_attachment}(hjIhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hhjIhK}hjIubh. The }(hjIhhhNhNubjq )}(h **attach**h]hattach}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjIubh. callback should also check these constraints.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjIhK}hj4Iubh)}(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.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj4Iubh)}(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.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj4Iubh)}(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.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj4Iubh)}(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 }(hjJhhhNhNubjq )}(h**pin**h]hpin}(hj&JhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjJubhc, which has the same requirements. Dynamic importers otoh are required to obey the dma_resv fences.}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj4Iubh)}(hReturns:h]hReturns:}(hj?JhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj4Iubh)}(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 }(hjNJhhhNhNubh)}(h:c:type:`sg_table`h]j)}(hjXJh]hsg_table}(hjZJhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjVJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsg_tableuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjNJubhl scatter list of the backing storage of the DMA buffer, already mapped into the device address space of the }(hjNJhhhNhNubh)}(h:c:type:`device`h]j)}(hj|Jh]hdevice}(hj~JhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjzJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdeviceuh1hhjuJhKhjNJubh attached with the provided }(hjNJhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjJh]hdma_buf_attachment}(hjJhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hhjuJhKhjNJubhF. The addresses and lengths in the scatter list are PAGE_SIZE aligned.}(hjNJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjuJhKhj4Iubh)}(hOn failure, returns a negative error value wrapped into a pointer. May also return -EINTR when a signal was received while being blocked.h]hOn failure, returns a negative error value wrapped into a pointer. May also return -EINTR when a signal was received while being blocked.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj4Iubh)}(hXNote that exporters should not try to cache the scatter list, or return the same one for multiple calls. Caching is done either by the DMA-BUF code (for non-dynamic importers) or the importer. Ownership of the scatter list is transferred to the caller, and returned by **unmap_dma_buf**.h](hX Note that exporters should not try to cache the scatter list, or return the same one for multiple calls. Caching is done either by the DMA-BUF code (for non-dynamic importers) or the importer. Ownership of the scatter list is transferred to the caller, and returned by }(hjJhhhNhNubjq )}(h**unmap_dma_buf**h]h unmap_dma_buf}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjJubh.}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj4Iubeh}(h]h ]h"]h$]h&]uh1j hjIubeh}(h]h ]h"]h$]h&]uh1j hj3IhKhjeFubj )}(hX``unmap_dma_buf`` This is called by dma_buf_unmap_attachment() and should unmap and release the :c:type:`sg_table` allocated in **map_dma_buf**, and it is mandatory. For static dma_buf handling this might also unpin the backing storage if this is the last mapping of the DMA buffer. h](j )}(h``unmap_dma_buf``h]j)}(hjKh]h unmap_dma_buf}(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:150: ./include/linux/dma-buf.hhKhjKubj )}(hhh]h)}(hXThis is called by dma_buf_unmap_attachment() and should unmap and release the :c:type:`sg_table` allocated in **map_dma_buf**, and it is mandatory. For static dma_buf handling this might also unpin the backing storage if this is the last mapping of the DMA buffer.h](hNThis is called by dma_buf_unmap_attachment() and should unmap and release the }(hj!KhhhNhNubh)}(h:c:type:`sg_table`h]j)}(hj+Kh]hsg_table}(hj-KhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj)Kubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsg_tableuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj!Kubh allocated in }(hj!KhhhNhNubjq )}(h**map_dma_buf**h]h map_dma_buf}(hjMKhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj!Kubh, 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.}(hj!KhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjHKhKhjKubah}(h]h ]h"]h$]h&]uh1j hjKubeh}(h]h ]h"]h$]h&]uh1j hjKhKhjeFubj )}(h_``release`` Called after the last dma_buf_put to release the :c:type:`dma_buf`, and mandatory. h](j )}(h ``release``h]j)}(hjwKh]hrelease}(hjyKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuKubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjqKubj )}(hhh]h)}(hRCalled after the last dma_buf_put to release the :c:type:`dma_buf`, and mandatory.h](h1Called after the last dma_buf_put to release the }(hjKhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjKh]hdma_buf}(hjKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjKubh, and mandatory.}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjKhKhjKubah}(h]h ]h"]h$]h&]uh1j hjqKubeh}(h]h ]h"]h$]h&]uh1j hjKhKhjeFubj )}(hX``begin_cpu_access`` This is called from dma_buf_begin_cpu_access() and allows the exporter to ensure that the memory is actually coherent for cpu access. The exporter also needs to ensure that cpu access is coherent for the access direction. The direction can be used by the exporter to optimize the cache flushing, i.e. access with a different direction (read instead of write) might return stale or even bogus data (e.g. when the exporter needs to copy the data to temporary storage). Note that this is both called through the DMA_BUF_IOCTL_SYNC IOCTL command for userspace mappings established through **mmap**, and also for kernel mappings established with **vmap**. This callback is optional. Returns: 0 on success or a negative error code on failure. This can for example fail when the backing storage can't be allocated. Can also return -ERESTARTSYS or -EINTR when the call has been interrupted and needs to be restarted. h](j )}(h``begin_cpu_access``h]j)}(hjKh]hbegin_cpu_access}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjKubj )}(hhh](h)}(hXThis is called from dma_buf_begin_cpu_access() and allows the exporter to ensure that the memory is actually coherent for cpu access. The exporter also needs to ensure that cpu access is coherent for the access direction. The direction can be used by the exporter to optimize the cache flushing, i.e. access with a different direction (read instead of write) might return stale or even bogus data (e.g. when the exporter needs to copy the data to temporary storage).h]hXThis is called from dma_buf_begin_cpu_access() and allows the exporter to ensure that the memory is actually coherent for cpu access. The exporter also needs to ensure that cpu access is coherent for the access direction. The direction can be used by the exporter to optimize the cache flushing, i.e. access with a different direction (read instead of write) might return stale or even bogus data (e.g. when the exporter needs to copy the data to temporary storage).}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjKubh)}(hNote 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**.h](hvNote that this is both called through the DMA_BUF_IOCTL_SYNC IOCTL command for userspace mappings established through }(hjKhhhNhNubjq )}(h**mmap**h]hmmap}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjKubh0, and also for kernel mappings established with }(hjKhhhNhNubjq )}(h**vmap**h]hvmap}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjKubh.}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjKubh)}(hThis callback is optional.h]hThis callback is optional.}(hj/LhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjKubh)}(hReturns:h]hReturns:}(hj>LhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjKubh)}(h0 on success or a negative error code on failure. This can for example fail when the backing storage can't be allocated. Can also return -ERESTARTSYS or -EINTR when the call has been interrupted and needs to be restarted.h]h0 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.}(hjMLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjKubeh}(h]h ]h"]h$]h&]uh1j hjKubeh}(h]h ]h"]h$]h&]uh1j hjKhKhjeFubj )}(hX``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. h](j )}(h``end_cpu_access``h]j)}(hjnLh]hend_cpu_access}(hjpLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlLubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjhLubj )}(hhh](h)}(hThis 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**.h](hThis 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 }(hjLhhhNhNubjq )}(h**begin_cpu_access**h]hbegin_cpu_access}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjLubh.}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjLubh)}(hThis callback is optional.h]hThis callback is optional.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjLubh)}(hReturns:h]hReturns:}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjLubh)}(h0 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.h]h0 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.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjLubeh}(h]h ]h"]h$]h&]uh1j hjhLubeh}(h]h ]h"]h$]h&]uh1j hjLhKhjeFubj )}(hXf``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. h](j )}(h``mmap``h]j)}(hjLh]hmmap}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjLubj )}(hhh](h)}(h4This callback is used by the dma_buf_mmap() functionh]h4This callback is used by the dma_buf_mmap() function}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjLubh)}(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.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjLubh)}(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.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjLubh)}(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.}(hj-MhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjLubh)}(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 huh1j hj*NhK)hjNhhubj@ )}(hhh]h)}(hshared buffer objecth]hshared buffer object}(hj_NhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj\Nhhubah}(h]h ]h"]h$]h&]uh1j? hjNhhhj*NhK)ubeh}(h]h ](jstructeh"]h$]h&]j` jja jwNjb jwNjc jd je uh1j hhhjhNhNubjg )}(hX**Definition**:: struct dma_buf { size_t size; struct file *file; struct list_head attachments; const struct dma_buf_ops *ops; unsigned vmapping_counter; struct iosys_map vmap_ptr; const char *exp_name; const char *name; spinlock_t name_lock; struct module *owner; 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; #ifdef CONFIG_DMABUF_SYSFS_STATS; struct dma_buf_sysfs_entry { struct kobject kobj; struct dma_buf *dmabuf; } *sysfs_entry; #endif; }; **Members** ``size`` Size of the buffer; invariant over the lifetime of the buffer. ``file`` File pointer used for sharing buffers across, and for refcounting. See dma_buf_get() and dma_buf_put(). ``attachments`` List of dma_buf_attachment that denotes all devices attached, protected by :c:type:`dma_resv` lock **resv**. ``ops`` dma_buf_ops associated with this buffer object. ``vmapping_counter`` Used internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by **lock**. ``vmap_ptr`` The current vmap ptr if **vmapping_counter** > 0. Protected by **lock**. ``exp_name`` Name of the exporter; useful for debugging. Must not be NULL ``name`` Userspace-provided name. Default value is NULL. If not NULL, length cannot be longer than DMA_BUF_NAME_LEN, including NIL char. Useful for accounting and debugging. Read/Write accesses are protected by **name_lock** See the IOCTLs DMA_BUF_SET_NAME or DMA_BUF_SET_NAME_A/B ``name_lock`` Spinlock to protect name access for read access. ``owner`` Pointer to exporter module; used for refcounting when exporter is a kernel module. ``list_node`` node for dma_buf accounting and debugging. ``priv`` exporter specific private data for this buffer object. ``resv`` Reservation object linked to this dma-buf. IMPLICIT SYNCHRONIZATION RULES: Drivers which support implicit synchronization of buffer access as e.g. exposed in `Implicit Fence Poll Support`_ must follow the below rules. - Drivers must add a read fence through dma_resv_add_fence() with the DMA_RESV_USAGE_READ flag for anything the userspace API considers a read access. This highly depends upon the API and window system. - Similarly drivers must add a write fence through dma_resv_add_fence() with the DMA_RESV_USAGE_WRITE flag for anything the userspace API considers write access. - Drivers may just always add a write fence, since that only causes unnecessary synchronization, but no correctness issues. - Some drivers only expose a synchronous userspace API with no pipelining across drivers. These do not set any fences for their access. An example here is v4l. - Driver should use dma_resv_usage_rw() when retrieving fences as dependency for implicit synchronization. DYNAMIC IMPORTER RULES: Dynamic importers, see dma_buf_attachment_is_dynamic(), have additional constraints on how they set up fences: - Dynamic importers must obey the write fences and wait for them to signal before allowing access to the buffer's underlying storage through the device. - Dynamic importers should set fences for any access that they can't disable immediately from their :c:type:`dma_buf_attach_ops.move_notify ` callback. IMPORTANT: All drivers and memory management related functions must obey the struct dma_resv rules, specifically the rules for updating and obeying fences. See enum dma_resv_usage for further descriptions. ``poll`` for userspace poll support ``cb_in`` for userspace poll support ``cb_out`` for userspace poll support ``sysfs_entry`` For exposing information about this buffer in sysfs. See also `DMA-BUF statistics`_ for the uapi this enables.h](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjNubh:}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj{Nubj)}(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; #ifdef CONFIG_DMABUF_SYSFS_STATS; struct dma_buf_sysfs_entry { struct kobject kobj; struct dma_buf *dmabuf; } *sysfs_entry; #endif; };h]hXstruct dma_buf { size_t size; struct file *file; struct list_head attachments; const struct dma_buf_ops *ops; unsigned vmapping_counter; struct iosys_map vmap_ptr; const char *exp_name; const char *name; spinlock_t name_lock; struct module *owner; 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; #ifdef CONFIG_DMABUF_SYSFS_STATS; struct dma_buf_sysfs_entry { struct kobject kobj; struct dma_buf *dmabuf; } *sysfs_entry; #endif; };}hjNsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM hj{Nubh)}(h **Members**h]jq )}(hjNh]hMembers}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM<hj{Nubj )}(hhh](j )}(hH``size`` Size of the buffer; invariant over the lifetime of the buffer. h](j )}(h``size``h]j)}(hjNh]hsize}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM(hjNubj )}(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.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhM(hjNubah}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]uh1j hjNhM(hjNubj )}(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)}(hjOh]hfile}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM0hjNubj )}(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().}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM/hjOubah}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]uh1j hjOhM0hjNubj )}(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?Oh]h attachments}(hjAOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=Oubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM8hj9Oubj )}(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 }(hjXOhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjbOh]hdma_resv}(hjdOhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj`Oubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM7hjXOubh lock }(hjXOhhhNhNubjq )}(h**resv**h]hresv}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjXOubh.}(hjXOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjOhM7hjUOubah}(h]h ]h"]h$]h&]uh1j hj9Oubeh}(h]h ]h"]h$]h&]uh1j hjTOhM8hjNubj )}(h8``ops`` dma_buf_ops associated with this buffer object. h](j )}(h``ops``h]j)}(hjOh]hops}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjOubj )}(hhh]h)}(h/dma_buf_ops associated with this buffer object.h]h/dma_buf_ops associated with this buffer object.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhKhjOubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1j hjOhKhjNubj )}(hl``vmapping_counter`` Used internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by **lock**. h](j )}(h``vmapping_counter``h]j)}(hjOh]hvmapping_counter}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMChjOubj )}(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 }(hjPhhhNhNubjq )}(h**lock**h]hlock}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjPubh.}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMBhjOubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1j hjOhMChjNubj )}(hV``vmap_ptr`` The current vmap ptr if **vmapping_counter** > 0. Protected by **lock**. h](j )}(h ``vmap_ptr``h]j)}(hj3Ph]hvmap_ptr}(hj5PhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1Pubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMJhj-Pubj )}(hhh]h)}(hHThe current vmap ptr if **vmapping_counter** > 0. Protected by **lock**.h](hThe current vmap ptr if }(hjLPhhhNhNubjq )}(h**vmapping_counter**h]hvmapping_counter}(hjTPhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjLPubh > 0. Protected by }(hjLPhhhNhNubjq )}(h**lock**h]hlock}(hjfPhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjLPubh.}(hjLPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjHPhMJhjIPubah}(h]h ]h"]h$]h&]uh1j hj-Pubeh}(h]h ]h"]h$]h&]uh1j hjHPhMJhjNubj )}(hJ``exp_name`` Name of the exporter; useful for debugging. Must not be NULL h](j )}(h ``exp_name``h]j)}(hjPh]hexp_name}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMPhjPubj )}(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)}(hjRh]hresv}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjQubj )}(hhh](h)}(h*Reservation object linked to this dma-buf.h]h*Reservation object linked to this dma-buf.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMthjRubh)}(hIMPLICIT SYNCHRONIZATION RULES:h]hIMPLICIT SYNCHRONIZATION RULES:}(hj,RhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMvhjRubh)}(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;RhhhNhNubj)}(h`Implicit Fence Poll Support`_h]hImplicit Fence Poll Support}(hjCRhhhNhNubah}(h]h ]h"]h$]h&]nameImplicit Fence Poll Supportjjuh1jhj;RjKubh must follow the below rules.}(hj;RhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMxhjRubh)}(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.}(hjeRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM|hjaRubah}(h]h ]h"]h$]h&]uh1hhj^Rubh)}(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.}(hj~RhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjzRubah}(h]h ]h"]h$]h&]uh1hhj^Rubh)}(hzDrivers may just always add a write fence, since that only causes unnecessary synchronization, but no correctness issues. h]h)}(hyDrivers may just always add a write fence, since that only causes unnecessary synchronization, but no correctness issues.h]hyDrivers may just always add a write fence, since that only causes unnecessary synchronization, but no correctness issues.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubah}(h]h ]h"]h$]h&]uh1hhj^Rubh)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubah}(h]h ]h"]h$]h&]uh1hhj^Rubh)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubah}(h]h ]h"]h$]h&]uh1hhj^Rubeh}(h]h ]h"]h$]h&]j>j?uh1hhjsRhM|hjRubh)}(hDYNAMIC IMPORTER RULES:h]hDYNAMIC IMPORTER RULES:}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubh)}(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:}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubh)}(hhh](h)}(hDynamic importers must obey the write fences and wait for them to signal before allowing access to the buffer's underlying storage through the device. h]h)}(hDynamic importers must obey the write fences and wait for them to signal before allowing access to the buffer's underlying storage through the device.h]hDynamic importers must obey the write fences and wait for them to signal before allowing access to the buffer’s underlying storage through the device.}(hj ShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjSubah}(h]h ]h"]h$]h&]uh1hhjSubh)}(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 }(hj"ShhhNhNubh)}(h=:c:type:`dma_buf_attach_ops.move_notify `h]j)}(hj,Sh]hdma_buf_attach_ops.move_notify}(hj.ShhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj*Subah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attach_opsuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj"Subh callback.}(hj"ShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjIShMhjSubah}(h]h ]h"]h$]h&]uh1hhjSubeh}(h]h ]h"]h$]h&]j>j?uh1hhjShMhjRubh)}(h IMPORTANT:h]h IMPORTANT:}(hj`ShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubh)}(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.}(hjoShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubeh}(h]h ]h"]h$]h&]uh1j hjQubeh}(h]h ]h"]h$]h&]uh1j hjRhMhjNubj )}(h$``poll`` for userspace poll support h](j )}(h``poll``h]j)}(hjSh]hpoll}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjSubj )}(hhh]h)}(hfor userspace poll supporth]hfor userspace poll support}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShKhjSubah}(h]h ]h"]h$]h&]uh1j hjSubeh}(h]h ]h"]h$]h&]uh1j hjShKhjNubj )}(h%``cb_in`` for userspace poll support h](j )}(h ``cb_in``h]j)}(hjSh]hcb_in}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjSubj )}(hhh]h)}(hfor userspace poll supporth]hfor userspace poll support}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShKhjSubah}(h]h ]h"]h$]h&]uh1j hjSubeh}(h]h ]h"]h$]h&]uh1j hjShKhjNubj )}(h&``cb_out`` for userspace poll support h](j )}(h ``cb_out``h]j)}(hjTh]hcb_out}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjSubj )}(hhh]h)}(hfor userspace poll supporth]hfor userspace poll support}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThKhjTubah}(h]h ]h"]h$]h&]uh1j hjSubeh}(h]h ]h"]h$]h&]uh1j hjThKhjNubj )}(h~``sysfs_entry`` For exposing information about this buffer in sysfs. See also `DMA-BUF statistics`_ for the uapi this enables.h](j )}(h``sysfs_entry``h]j)}(hj;Th]h sysfs_entry}(hj=ThhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9Tubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj5Tubj )}(hhh]h)}(hnFor exposing information about this buffer in sysfs. See also `DMA-BUF statistics`_ for the uapi this enables.h](h>For exposing information about this buffer in sysfs. See also }(hjTThhhNhNubj)}(h`DMA-BUF statistics`_h]hDMA-BUF statistics}(hj\ThhhNhNubah}(h]h ]h"]h$]h&]nameDMA-BUF statisticsjj uh1jhjTTjKubh for the uapi this enables.}(hjTThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjPThMhjQTubah}(h]h ]h"]h$]h&]uh1j hj5Tubeh}(h]h ]h"]h$]h&]uh1j hjPThMhjNubeh}(h]h ]h"]h$]h&]uh1j hj{Nubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubh)}(h**Description**h]jq )}(hjTh]h Description}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjTubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubh)}(hThis represents a shared buffer, created by calling dma_buf_export(). The userspace representation is a normal file descriptor, which can be created by calling dma_buf_fd().h]hThis represents a shared buffer, created by calling dma_buf_export(). The userspace representation is a normal file descriptor, which can be created by calling dma_buf_fd().}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.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().}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubh)}(hfDevice DMA access is handled by the separate :c:type:`struct dma_buf_attachment `.h](h-Device DMA access is handled by the separate }(hjThhhNhNubh)}(h8:c:type:`struct dma_buf_attachment `h]j)}(hjTh]hstruct dma_buf_attachment}(hjThhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM"hjTubh.}(hjThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjThM"hjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_attach_ops (C struct)c.dma_buf_attach_opshNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_buf_attach_opsh]j )}(hstruct dma_buf_attach_opsh](j )}(hj h]hstruct}(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj Uhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM'ubj )}(h h]h }(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj UhhhjUhM'ubj )}(hdma_buf_attach_opsh]j )}(hj Uh]hdma_buf_attach_ops}(hj0UhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,Uubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj UhhhjUhM'ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjUhhhjUhM'ubah}(h]jUah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjUhM'hjUhhubj@ )}(hhh]h)}(h%importer operations for an attachmenth]h%importer operations for an attachment}(hjRUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjOUhhubah}(h]h ]h"]h$]h&]uh1j? hjUhhhjUhM'ubeh}(h]h ](jstructeh"]h$]h&]j` jja jjUjb jjUjc jd je uh1j hhhjhNhNubjg )}(hX **Definition**:: struct dma_buf_attach_ops { bool allow_peer2peer; void (*move_notify)(struct dma_buf_attachment *attach); }; **Members** ``allow_peer2peer`` If this is set to true the importer must be able to handle peer resources without struct pages. ``move_notify`` [optional] notification that the DMA-buf is moving If this callback is provided the framework can avoid pinning the backing store while mappings exists. This callback is called with the lock of the reservation object associated with the dma_buf held and the mapping function must be called with this lock held as well. This makes sure that no mapping is created concurrently with an ongoing move operation. Mappings stay valid and are not directly affected by this callback. But the DMA-buf can now be in a different physical location, so all mappings should be destroyed and re-created as soon as possible. New mappings can be created after this callback returns, and will point to the new location of the DMA-buf.h](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjvUhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjrUubh:}(hjrUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjnUubj)}(htstruct dma_buf_attach_ops { bool allow_peer2peer; void (*move_notify)(struct dma_buf_attachment *attach); };h]htstruct dma_buf_attach_ops { bool allow_peer2peer; void (*move_notify)(struct dma_buf_attachment *attach); };}hjUsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjnUubh)}(h **Members**h]jq )}(hjUh]hMembers}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjUubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjnUubj )}(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)}(hjUh]hallow_peer2peer}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjUubj )}(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.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjUubah}(h]h ]h"]h$]h&]uh1j hjUubeh}(h]h ]h"]h$]h&]uh1j hjUhMhjUubj )}(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)}(hjUh]h move_notify}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjUubj )}(hhh](h)}(h2[optional] notification that the DMA-buf is movingh]h2[optional] notification that the DMA-buf is moving}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjVubh)}(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.}(hj!VhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjVubh)}(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.}(hj0VhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjVubh)}(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.}(hj?VhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjVubh)}(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.}(hjNVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjVubeh}(h]h ]h"]h$]h&]uh1j hjUubeh}(h]h ]h"]h$]h&]uh1j hjVhMhjUubeh}(h]h ]h"]h$]h&]uh1j hjnUubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubh)}(h**Description**h]jq )}(hjwVh]h Description}(hjyVhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjuVubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubh)}(h2Attachment operations implemented by the importer.h]h2Attachment operations implemented by the importer.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_attachment (C struct)c.dma_buf_attachmenthNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_buf_attachmenth]j )}(hstruct dma_buf_attachmenth](j )}(hj h]hstruct}(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMubj )}(h h]h }(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVhhhjVhMubj )}(hdma_buf_attachmenth]j )}(hjVh]hdma_buf_attachment}(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjVhhhjVhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjVhhhjVhMubah}(h]jVah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjVhMhjVhhubj@ )}(hhh]h)}(h#holds device-buffer attachment datah]h#holds device-buffer attachment data}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjVhhubah}(h]h ]h"]h$]h&]uh1j? hjVhhhjVhMubeh}(h]h ](jstructeh"]h$]h&]j` jja jWjb jWjc jd je uh1j hhhjhNhNubjg )}(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](jq )}(h**Definition**h]h Definition}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjWubh:}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjWubj)}(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; };}hj4Wsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjWubh)}(h **Members**h]jq )}(hjEWh]hMembers}(hjGWhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjCWubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjWubj )}(hhh](j )}(h'``dmabuf`` buffer for this attachment. h](j )}(h ``dmabuf``h]j)}(hjdWh]hdmabuf}(hjfWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbWubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj^Wubj )}(hhh]h)}(hbuffer for this attachment.h]hbuffer for this attachment.}(hj}WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyWhMhjzWubah}(h]h ]h"]h$]h&]uh1j hj^Wubeh}(h]h ]h"]h$]h&]uh1j hjyWhMhj[Wubj )}(h'``dev`` device attached to the buffer. h](j )}(h``dev``h]j)}(hjWh]hdev}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjWubj )}(hhh]h)}(hdevice attached to the buffer.h]hdevice attached to the buffer.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhMhjWubah}(h]h ]h"]h$]h&]uh1j hjWubeh}(h]h ]h"]h$]h&]uh1j hjWhMhj[Wubj )}(hO``node`` list of dma_buf_attachment, protected by dma_resv lock of the dmabuf. h](j )}(h``node``h]j)}(hjWh]hnode}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjWubj )}(hhh]h)}(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.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhMhjWubah}(h]h ]h"]h$]h&]uh1j hjWubeh}(h]h ]h"]h$]h&]uh1j hjWhMhj[Wubj )}(hL``peer2peer`` true if the importer can handle peer resources without pages. h](j )}(h ``peer2peer``h]j)}(hjXh]h peer2peer}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj Xubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj Xubj )}(hhh]h)}(h=true if the importer can handle peer resources without pages.h]h=true if the importer can handle peer resources without pages.}(hj(XhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$XhMhj%Xubah}(h]h ]h"]h$]h&]uh1j hj Xubeh}(h]h ]h"]h$]h&]uh1j hj$XhMhj[Wubj )}(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)}(hjHXh]h importer_ops}(hjJXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFXubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjBXubj )}(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.}(hjaXhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj^Xubah}(h]h ]h"]h$]h&]uh1j hjBXubeh}(h]h ]h"]h$]h&]uh1j hj]XhMhj[Wubj )}(h5``importer_priv`` importer specific attachment data. h](j )}(h``importer_priv``h]j)}(hjXh]h importer_priv}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj|Xubj )}(hhh]h)}(h"importer specific attachment data.h]h"importer specific attachment data.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhMhjXubah}(h]h ]h"]h$]h&]uh1j hj|Xubeh}(h]h ]h"]h$]h&]uh1j hjXhMhj[Wubj )}(h+``priv`` exporter specific attachment data.h](j )}(h``priv``h]j)}(hjXh]hpriv}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjXubj )}(hhh]h)}(h"exporter specific attachment data.h]h"exporter specific attachment data.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjXubah}(h]h ]h"]h$]h&]uh1j hjXubeh}(h]h ]h"]h$]h&]uh1j hjXhMhj[Wubeh}(h]h ]h"]h$]h&]uh1j hjWubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubh)}(h**Description**h]jq )}(hjXh]h Description}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjXubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubh)}(hThis structure holds the attachment information between the dma_buf buffer and its user device(s). The list contains one attachment struct per device attached to the buffer.h]hThis structure holds the attachment information between the dma_buf buffer and its user device(s). The list contains one attachment struct per device attached to the buffer.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubh)}(hAn attachment is created by calling dma_buf_attach(), and released again by calling dma_buf_detach(). The DMA mapping itself needed to initiate a transfer is created by dma_buf_map_attachment() and freed again by calling dma_buf_unmap_attachment().h]hAn attachment is created by calling dma_buf_attach(), and released again by calling dma_buf_detach(). The DMA mapping itself needed to initiate a transfer is created by dma_buf_map_attachment() and freed again by calling dma_buf_unmap_attachment().}(hj#YhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_export_info (C struct)c.dma_buf_export_infohNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_buf_export_infoh]j )}(hstruct dma_buf_export_infoh](j )}(hj h]hstruct}(hjKYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjGYhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMubj )}(h h]h }(hjYYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjGYhhhjXYhMubj )}(hdma_buf_export_infoh]j )}(hjEYh]hdma_buf_export_info}(hjkYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgYubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjGYhhhjXYhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjCYhhhjXYhMubah}(h]j>Yah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjXYhMhj@Yhhubj@ )}(hhh]h)}(h,holds information needed to export a dma_bufh]h,holds information needed to export a dma_buf}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjYhhubah}(h]h ]h"]h$]h&]uh1j? hj@YhhhjXYhMubeh}(h]h ](jstructeh"]h$]h&]j` jja jYjb jYjc jd je uh1j hhhjhNhNubjg )}(hX**Definition**:: struct dma_buf_export_info { const char *exp_name; struct module *owner; const struct dma_buf_ops *ops; size_t size; int flags; struct dma_resv *resv; void *priv; }; **Members** ``exp_name`` name of the exporter - useful for debugging. ``owner`` pointer to exporter module - used for refcounting kernel module ``ops`` Attach allocator-defined dma buf ops to the new buffer ``size`` Size of the buffer - invariant over the lifetime of the buffer ``flags`` mode flags for the file ``resv`` reservation-object, NULL to allocate default one ``priv`` Attach private data of allocator to this bufferh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjYubh:}(hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjYubj)}(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; };}hjYsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjYubh)}(h **Members**h]jq )}(hjYh]hMembers}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjYubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjYubj )}(hhh](j )}(h:``exp_name`` name of the exporter - useful for debugging. h](j )}(h ``exp_name``h]j)}(hjYh]hexp_name}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjYubj )}(hhh]h)}(h,name of the exporter - useful for debugging.h]h,name of the exporter - useful for debugging.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhMhjZubah}(h]h ]h"]h$]h&]uh1j hjYubeh}(h]h ]h"]h$]h&]uh1j hjZhMhjYubj )}(hJ``owner`` pointer to exporter module - used for refcounting kernel module h](j )}(h ``owner``h]j)}(hj3Zh]howner}(hj5ZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1Zubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj-Zubj )}(hhh]h)}(h?pointer to exporter module - used for refcounting kernel moduleh]h?pointer to exporter module - used for refcounting kernel module}(hjLZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHZhMhjIZubah}(h]h ]h"]h$]h&]uh1j hj-Zubeh}(h]h ]h"]h$]h&]uh1j hjHZhMhjYubj )}(h?``ops`` Attach allocator-defined dma buf ops to the new buffer h](j )}(h``ops``h]j)}(hjlZh]hops}(hjnZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjZubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjfZubj )}(hhh]h)}(h6Attach allocator-defined dma buf ops to the new bufferh]h6Attach allocator-defined dma buf ops to the new buffer}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhMhjZubah}(h]h ]h"]h$]h&]uh1j hjfZubeh}(h]h ]h"]h$]h&]uh1j hjZhMhjYubj )}(hH``size`` Size of the buffer - invariant over the lifetime of the buffer h](j )}(h``size``h]j)}(hjZh]hsize}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjZubj )}(hhh]h)}(h>Size of the buffer - invariant over the lifetime of the bufferh]h>Size of the buffer - invariant over the lifetime of the buffer}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhMhjZubah}(h]h ]h"]h$]h&]uh1j hjZubeh}(h]h ]h"]h$]h&]uh1j hjZhMhjYubj )}(h"``flags`` mode flags for the file h](j )}(h ``flags``h]j)}(hjZh]hflags}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjZubj )}(hhh]h)}(hmode flags for the fileh]hmode flags for the file}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhMhjZubah}(h]h ]h"]h$]h&]uh1j hjZubeh}(h]h ]h"]h$]h&]uh1j hjZhMhjYubj )}(h:``resv`` reservation-object, NULL to allocate default one h](j )}(h``resv``h]j)}(hj[h]hresv}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj[ubj )}(hhh]h)}(h0reservation-object, NULL to allocate default oneh]h0reservation-object, NULL to allocate default one}(hj0[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,[hMhj-[ubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hj,[hMhjYubj )}(h8``priv`` Attach private data of allocator to this bufferh](j )}(h``priv``h]j)}(hjP[h]hpriv}(hjR[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjN[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjJ[ubj )}(hhh]h)}(h/Attach private data of allocator to this bufferh]h/Attach private data of allocator to this buffer}(hji[hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjf[ubah}(h]h ]h"]h$]h&]uh1j hjJ[ubeh}(h]h ]h"]h$]h&]uh1j hje[hMhjYubeh}(h]h ]h"]h$]h&]uh1j hjYubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubh)}(h**Description**h]jq )}(hj[h]h Description}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj[ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM hjhhubh)}(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.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $DEFINE_DMA_BUF_EXPORT_INFO (C macro)c.DEFINE_DMA_BUF_EXPORT_INFOhNtauh1j hjhhhNhNubj )}(hhh](j )}(hDEFINE_DMA_BUF_EXPORT_INFOh]j )}(hDEFINE_DMA_BUF_EXPORT_INFOh]j )}(hDEFINE_DMA_BUF_EXPORT_INFOh]j )}(hj[h]hDEFINE_DMA_BUF_EXPORT_INFO}(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj[ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj[hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj[hhhj[hMubah}(h]j[ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj[hMhj[hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hj[hhhj[hMubeh}(h]h ](jmacroeh"]h$]h&]j` jja j\jb j\jc jd je uh1j hhhjhNhNubh)}(h%``DEFINE_DMA_BUF_EXPORT_INFO (name)``h]j)}(hj\h]h!DEFINE_DMA_BUF_EXPORT_INFO (name)}(hj \hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubh)}(hhelper macro for exporters h]h)}(hhelper macro for exportersh]hhelper macro for exporters}(hj!\hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj\ubah}(h]h ]h"]h$]h&]uh1hhj/\hMhjhhubjg )}(h**Parameters** ``name`` export-info name **Description** DEFINE_DMA_BUF_EXPORT_INFO macro defines the :c:type:`struct dma_buf_export_info `, zeroes it out and pre-populates exp_name in it.h](h)}(h**Parameters**h]jq )}(hj<\h]h Parameters}(hj>\hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj:\ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj6\ubj )}(hhh]j )}(h``name`` export-info name h](j )}(h``name``h]j)}(hj[\h]hname}(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:150: ./include/linux/dma-buf.hhMhjU\ubj )}(hhh]h)}(hexport-info nameh]hexport-info name}(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\hMhjR\ubah}(h]h ]h"]h$]h&]uh1j hj6\ubh)}(h**Description**h]jq )}(hj\h]h Description}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj\ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj6\ubh)}(hDEFINE_DMA_BUF_EXPORT_INFO macro defines the :c:type:`struct dma_buf_export_info `, zeroes it out and pre-populates exp_name in it.h](h-DEFINE_DMA_BUF_EXPORT_INFO macro defines the }(hj\hhhNhNubh)}(h::c:type:`struct dma_buf_export_info `h]j)}(hj\h]hstruct dma_buf_export_info}(hj\hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_export_infouh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj\ubh1, zeroes it out and pre-populates exp_name in it.}(hj\hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj\hMhj6\ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j get_dma_buf (C function) c.get_dma_bufhNtauh1j hjhhhNhNubj )}(hhh](j )}(h)void get_dma_buf (struct dma_buf *dmabuf)h]j )}(h(void get_dma_buf(struct dma_buf *dmabuf)h](jK)}(hvoidh]hvoid}(hj\hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj\hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM!ubj )}(h h]h }(hj ]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj\hhhj ]hM!ubj )}(h get_dma_bufh]j )}(h get_dma_bufh]h get_dma_buf}(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj\hhhj ]hM!ubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj;]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7]ubj )}(h h]h }(hjH]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7]ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjY]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjV]ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj[]modnameN classnameNjj)}j]jN)}jFj!]sb c.get_dma_bufasbuh1hhj7]ubj )}(h h]h }(hjy]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7]ubjc)}(hj h]h*}(hj]hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj7]ubj )}(hdmabufh]hdmabuf}(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7]ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj3]ubah}(h]h ]h"]h$]h&]jjuh1jhj\hhhj ]hM!ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj\hhhj ]hM!ubah}(h]j\ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj ]hM!hj\hhubj@ )}(hhh]h)}(h!convenience wrapper for get_file.h]h!convenience wrapper for get_file.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM!hj]hhubah}(h]h ]h"]h$]h&]uh1j? hj\hhhj ]hM!ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j]jb j]jc jd je uh1j hhhjhNhNubjg )}(hXe**Parameters** ``struct dma_buf *dmabuf`` [in] pointer to dma_buf **Description** Increments the reference count on the dma-buf, needed in case of drivers that either need to create additional references to the dmabuf on the kernel side. For example, an exporter that needs to keep a dmabuf ptr so that subsequent exports don't create a new dmabuf.h](h)}(h**Parameters**h]jq )}(hj]h]h Parameters}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj]ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM%hj]ubj )}(hhh]j )}(h6``struct dma_buf *dmabuf`` [in] pointer to dma_buf h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj]h]hstruct dma_buf *dmabuf}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM"hj]ubj )}(hhh]h)}(h[in] pointer to dma_bufh]h[in] pointer to dma_buf}(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]ubah}(h]h ]h"]h$]h&]uh1j hj]ubh)}(h**Description**h]jq )}(hj:^h]h Description}(hj<^hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj8^ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM$hj]ubh)}(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.}(hjP^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM$hj]ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf_is_dynamic (C function)c.dma_buf_is_dynamichNtauh1j hjhhhNhNubj )}(hhh](j )}(h0bool dma_buf_is_dynamic (struct dma_buf *dmabuf)h]j )}(h/bool dma_buf_is_dynamic(struct dma_buf *dmabuf)h](jK)}(hboolh]hbool}(hj^hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj{^hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM/ubj )}(h h]h }(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{^hhhj^hM/ubj )}(hdma_buf_is_dynamich]j )}(hdma_buf_is_dynamich]hdma_buf_is_dynamic}(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj{^hhhj^hM/ubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubj )}(h h]h }(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj^modnameN classnameNjj)}j]jN)}jFj^sbc.dma_buf_is_dynamicasbuh1hhj^ubj )}(h h]h }(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubjc)}(hj h]h*}(hj_hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj^ubj )}(hdmabufh]hdmabuf}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj^ubah}(h]h ]h"]h$]h&]jjuh1jhj{^hhhj^hM/ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjw^hhhj^hM/ubah}(h]jr^ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj^hM/hjt^hhubj@ )}(hhh]h)}(h)check if a DMA-buf uses dynamic mappings.h]h)check if a DMA-buf uses dynamic mappings.}(hj?_hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM/hj<_hhubah}(h]h ]h"]h$]h&]uh1j? hjt^hhhj^hM/ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jW_jb jW_jc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_buf *dmabuf`` the DMA-buf to check **Description** Returns true if a DMA-buf exporter wants to be called with the dma_resv locked for the map/unmap callbacks, false if it doesn't wants to be called with the lock held.h](h)}(h**Parameters**h]jq )}(hja_h]h Parameters}(hjc_hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj__ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM3hj[_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:150: ./include/linux/dma-buf.hhM0hjz_ubj )}(hhh]h)}(hthe DMA-buf to checkh]hthe DMA-buf to check}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_hM0hj_ubah}(h]h ]h"]h$]h&]uh1j hjz_ubeh}(h]h ]h"]h$]h&]uh1j hj_hM0hjw_ubah}(h]h ]h"]h$]h&]uh1j hj[_ubh)}(h**Description**h]jq )}(hj_h]h Description}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj_ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM2hj[_ubh)}(hReturns true if a DMA-buf exporter wants to be called with the dma_resv locked for the map/unmap callbacks, false if it doesn't wants to be called with the lock held.h]hReturns true if a DMA-buf exporter wants to be called with the dma_resv locked for the map/unmap callbacks, false if it doesn’t wants to be called with the lock held.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM2hj[_ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubeh}(h])kernel-functions-and-structures-referenceah ]h"])kernel functions and structures referenceah$]h&]uh1hhjmhhhhhKubeh}(h]shared-dma-buffersah ]h"]shared dma buffersah$]h&]uh1hhhhhhhhK"ubh)}(hhh](h)}(hReservation Objectsh]hReservation Objects}(hj_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:156: ./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:156: ./drivers/dma-buf/dma-resv.chK4hj_hhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_init (C function)c.dma_resv_inithNtauh1j hj_hhhNhNubj )}(hhh](j )}(h)void dma_resv_init (struct dma_resv *obj)h]j )}(h(void dma_resv_init(struct dma_resv *obj)h](jK)}(hvoidh]hvoid}(hj?`hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj;`hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKubj )}(h h]h }(hjN`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;`hhhjM`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&]jjuh1j hj;`hhhjM`hKubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hj|`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjx`ubj )}(h h]h }(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjx`ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj`modnameN classnameNjj)}j]jN)}jFjb`sbc.dma_resv_initasbuh1hhjx`ubj )}(h h]h }(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjx`ubjc)}(hj h]h*}(hj`hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjx`ubj )}(hobjh]hobj}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjx`ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjt`ubah}(h]h ]h"]h$]h&]jjuh1jhj;`hhhjM`hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj7`hhhjM`hKubah}(h]j2`ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjM`hKhj4`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:159: ./drivers/dma-buf/dma-resv.chKhj`hhubah}(h]h ]h"]h$]h&]uh1j? hj4`hhhjM`hKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jajb jajc jd je uh1j hhhj_hNhNubjg )}(hA**Parameters** ``struct dma_resv *obj`` the reservation objecth](h)}(h**Parameters**h]jq )}(hj!ah]h Parameters}(hj#ahhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjaubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./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}(hjBahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>aubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj:aubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjYahhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjVaubah}(h]h ]h"]h$]h&]uh1j hj:aubeh}(h]h ]h"]h$]h&]uh1j hjUahKhj7aubah}(h]h ]h"]h$]h&]uh1j hjaubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_fini (C function)c.dma_resv_finihNtauh1j hj_hhhNhNubj )}(hhh](j )}(h)void dma_resv_fini (struct dma_resv *obj)h]j )}(h(void dma_resv_fini(struct dma_resv *obj)h](jK)}(hvoidh]hvoid}(hjahhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjahhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKubj )}(h h]h }(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjahhhjahKubj )}(h dma_resv_finih]j )}(h dma_resv_finih]h dma_resv_fini}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjahhhjahKubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubj )}(h h]h }(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjamodnameN classnameNjj)}j]jN)}jFjasbc.dma_resv_finiasbuh1hhjaubj )}(h h]h }(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubjc)}(hj h]h*}(hj#bhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjaubj )}(hobjh]hobj}(hj0bhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjaubah}(h]h ]h"]h$]h&]jjuh1jhjahhhjahKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjahhhjahKubah}(h]jaah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjahKhjahhubj@ )}(hhh]h)}(hdestroys a reservation objecth]hdestroys a reservation object}(hjZbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjWbhhubah}(h]h ]h"]h$]h&]uh1j? hjahhhjahKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jrbjb jrbjc jd je uh1j hhhj_hNhNubjg )}(hA**Parameters** ``struct dma_resv *obj`` the reservation objecth](h)}(h**Parameters**h]jq )}(hj|bh]h Parameters}(hj~bhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjzbubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjvbubj )}(hhh]j )}(h/``struct dma_resv *obj`` the reservation objecth](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:159: ./drivers/dma-buf/dma-resv.chKhjbubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjbubah}(h]h ]h"]h$]h&]uh1j hjbubeh}(h]h ]h"]h$]h&]uh1j hjbhKhjbubah}(h]h ]h"]h$]h&]uh1j hjvbubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_resv_reserve_fences (C function)c.dma_resv_reserve_fenceshNtauh1j hj_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](jK)}(hinth]hint}(hjbhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjbhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKubj )}(h h]h }(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbhhhjchKubj )}(hdma_resv_reserve_fencesh]j )}(hdma_resv_reserve_fencesh]hdma_resv_reserve_fences}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjbhhhjchKubj)}(h/(struct dma_resv *obj, unsigned int num_fences)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hj2chhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.cubj )}(h h]h }(hj?chhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.cubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjPchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjMcubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjRcmodnameN classnameNjj)}j]jN)}jFjcsbc.dma_resv_reserve_fencesasbuh1hhj.cubj )}(h h]h }(hjpchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.cubjc)}(hj h]h*}(hj~chhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj.cubj )}(hobjh]hobj}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.cubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj*cubj)}(hunsigned int num_fencesh](jK)}(hunsignedh]hunsigned}(hjchhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjcubj )}(h h]h }(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubjK)}(hinth]hint}(hjchhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjcubj )}(h h]h }(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubj )}(h num_fencesh]h num_fences}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj*cubeh}(h]h ]h"]h$]h&]jjuh1jhjbhhhjchKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjbhhhjchKubah}(h]jbah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjchKhjbhhubj@ )}(hhh]h)}(h1Reserve space to add fences to a dma_resv object.h]h1Reserve space to add fences to a dma_resv object.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjdhhubah}(h]h ]h"]h$]h&]uh1j? hjbhhhjchKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jdjb jdjc jd je uh1j hhhj_hNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` reservation object ``unsigned int num_fences`` number of fences we want to add **Description** Should be called before dma_resv_add_fence(). Must be called with **obj** locked through dma_resv_lock(). Note that the preallocated slots need to be re-reserved if **obj** is unlocked at any time before calling dma_resv_add_fence(). This is validated when CONFIG_DEBUG_MUTEXES is enabled. RETURNS Zero for success, or -errnoh](h)}(h**Parameters**h]jq )}(hj(dh]h Parameters}(hj*dhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj&dubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj"dubj )}(hhh](j )}(h,``struct dma_resv *obj`` reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjGdh]hstruct dma_resv *obj}(hjIdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEdubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjAdubj )}(hhh]h)}(hreservation objecth]hreservation object}(hj`dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\dhKhj]dubah}(h]h ]h"]h$]h&]uh1j hjAdubeh}(h]h ]h"]h$]h&]uh1j hj\dhKhj>dubj )}(h<``unsigned int num_fences`` number of fences we want to add h](j )}(h``unsigned int num_fences``h]j)}(hjdh]hunsigned int num_fences}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~dubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjzdubj )}(hhh]h)}(hnumber of fences we want to addh]hnumber of fences we want to add}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhKhjdubah}(h]h ]h"]h$]h&]uh1j hjzdubeh}(h]h ]h"]h$]h&]uh1j hjdhKhj>dubeh}(h]h ]h"]h$]h&]uh1j hj"dubh)}(h**Description**h]jq )}(hjdh]h Description}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjdubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj"dubh)}(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 }(hjdhhhNhNubjq )}(h**obj**h]hobj}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjdubh locked through dma_resv_lock().}(hjdhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj"dubh)}(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 }(hjdhhhNhNubjq )}(h**obj**h]hobj}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjdubhu is unlocked at any time before calling dma_resv_add_fence(). This is validated when CONFIG_DEBUG_MUTEXES is enabled.}(hjdhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj"dubh)}(h#RETURNS Zero for success, or -errnoh]h#RETURNS Zero for success, or -errno}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj"dubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j &dma_resv_reset_max_fences (C function)c.dma_resv_reset_max_fenceshNtauh1j hj_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](jK)}(hvoidh]hvoid}(hjBehhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj>ehhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjQehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj>ehhhjPehMubj )}(hdma_resv_reset_max_fencesh]j )}(hdma_resv_reset_max_fencesh]hdma_resv_reset_max_fences}(hjcehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_eubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj>ehhhjPehMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{eubj )}(h h]h }(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{eubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjemodnameN classnameNjj)}j]jN)}jFjeesbc.dma_resv_reset_max_fencesasbuh1hhj{eubj )}(h h]h }(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{eubjc)}(hj h]h*}(hjehhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj{eubj )}(hobjh]hobj}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{eubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjweubah}(h]h ]h"]h$]h&]jjuh1jhj>ehhhjPehMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj:ehhhjPehMubah}(h]j5eah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjPehMhj7ehhubj@ )}(hhh]h)}(hreset fences for debuggingh]hreset fences for debugging}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjehhubah}(h]h ]h"]h$]h&]uh1j? hj7ehhhjPehMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jfjb jfjc jd je uh1j hhhj_hNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the dma_resv object to reset **Description** Reset the number of pre-reserved fence slots to test that drivers do correct slot allocation using dma_resv_reserve_fences(). See also :c:type:`dma_resv_list.max_fences `.h](h)}(h**Parameters**h]jq )}(hj$fh]h Parameters}(hj&fhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj"fubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjfubj )}(hhh]j )}(h6``struct dma_resv *obj`` the dma_resv object to reset h](j )}(h``struct dma_resv *obj``h]j)}(hjCfh]hstruct dma_resv *obj}(hjEfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAfubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj=fubj )}(hhh]h)}(hthe dma_resv object to reseth]hthe dma_resv object to reset}(hj\fhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXfhMhjYfubah}(h]h ]h"]h$]h&]uh1j hj=fubeh}(h]h ]h"]h$]h&]uh1j hjXfhMhj:fubah}(h]h ]h"]h$]h&]uh1j hjfubh)}(h**Description**h]jq )}(hj~fh]h Description}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj|fubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjfubh)}(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 }(hjfhhhNhNubh)}(h2:c:type:`dma_resv_list.max_fences `h]j)}(hjfh]hdma_resv_list.max_fences}(hjfhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_resv_listuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjfubh.}(hjfhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjfhMhjfubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_add_fence (C function)c.dma_resv_add_fencehNtauh1j hj_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](jK)}(hvoidh]hvoid}(hjfhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjfhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjfhhhjfhMubj )}(hdma_resv_add_fenceh]j )}(hdma_resv_add_fenceh]hdma_resv_add_fence}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjfhhhjfhMubj)}(hJ(struct dma_resv *obj, struct dma_fence *fence, enum dma_resv_usage usage)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hj#ghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubj )}(h h]h }(hj0ghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjAghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj>gubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjCgmodnameN classnameNjj)}j]jN)}jFj gsbc.dma_resv_add_fenceasbuh1hhjgubj )}(h h]h }(hjaghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubjc)}(hj h]h*}(hjoghhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjgubj )}(hobjh]hobj}(hj|ghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjgubj)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubj )}(h h]h }(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjgmodnameN classnameNjj)}j]j]gc.dma_resv_add_fenceasbuh1hhjgubj )}(h h]h }(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubjc)}(hj h]h*}(hjghhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjgubj )}(hfenceh]hfence}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjgubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubj )}(h h]h }(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hj#hhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj%hmodnameN classnameNjj)}j]j]gc.dma_resv_add_fenceasbuh1hhjhubj )}(h h]h }(hjAhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubj )}(husageh]husage}(hjOhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjgubeh}(h]h ]h"]h$]h&]jjuh1jhjfhhhjfhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjfhhhjfhMubah}(h]jfah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjfhMhjfhhubj@ )}(hhh]h)}(hAdd a fence to the dma_resv objh]hAdd a fence to the dma_resv obj}(hjyhhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjvhhhubah}(h]h ]h"]h$]h&]uh1j? hjfhhhjfhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jhjb jhjc jd je uh1j hhhj_hNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``struct dma_fence *fence`` the fence to add ``enum dma_resv_usage usage`` how the fence is used, see enum dma_resv_usage **Description** Add a fence to a slot, **obj** must be locked with dma_resv_lock(), and dma_resv_reserve_fences() has been called. See also :c:type:`dma_resv.fence ` for a discussion of the semantics.h](h)}(h**Parameters**h]jq )}(hjhh]h Parameters}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjhubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjhubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjhh]hstruct dma_resv *obj}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjhubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMhjhubah}(h]h ]h"]h$]h&]uh1j hjhubeh}(h]h ]h"]h$]h&]uh1j hjhhMhjhubj )}(h-``struct dma_fence *fence`` the fence to add h](j )}(h``struct dma_fence *fence``h]j)}(hjhh]hstruct dma_fence *fence}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjhubj )}(hhh]h)}(hthe fence to addh]hthe fence to add}(hj ihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihMhj iubah}(h]h ]h"]h$]h&]uh1j hjhubeh}(h]h ]h"]h$]h&]uh1j hjihMhjhubj )}(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)}(hj,ih]henum dma_resv_usage usage}(hj.ihhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*iubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj&iubj )}(hhh]h)}(h.how the fence is used, see enum dma_resv_usageh]h.how the fence is used, see enum dma_resv_usage}(hjEihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAihMhjBiubah}(h]h ]h"]h$]h&]uh1j hj&iubeh}(h]h ]h"]h$]h&]uh1j hjAihMhjhubeh}(h]h ]h"]h$]h&]uh1j hjhubh)}(h**Description**h]jq )}(hjgih]h Description}(hjiihhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjeiubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjhubh)}(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, }(hj}ihhhNhNubjq )}(h**obj**h]hobj}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj}iubhT must be locked with dma_resv_lock(), and dma_resv_reserve_fences() has been called.}(hj}ihhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjhubh)}(hOSee also :c:type:`dma_resv.fence ` for a discussion of the semantics.h](h See also }(hjihhhNhNubh)}(h#:c:type:`dma_resv.fence `h]j)}(hjih]hdma_resv.fence}(hjihhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjiubh# for a discussion of the semantics.}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjihMhjhubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_resv_replace_fences (C function)c.dma_resv_replace_fenceshNtauh1j hj_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](jK)}(hvoidh]hvoid}(hjihhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjihhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMJubj )}(h h]h }(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjihhhjihMJubj )}(hdma_resv_replace_fencesh]j )}(hdma_resv_replace_fencesh]hdma_resv_replace_fences}(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj jubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjihhhjihMJubj)}(hb(struct dma_resv *obj, uint64_t context, struct dma_fence *replacement, enum dma_resv_usage usage)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hj-jhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)jubj )}(h h]h }(hj:jhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)jubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjKjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjHjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjMjmodnameN classnameNjj)}j]jN)}jFjjsbc.dma_resv_replace_fencesasbuh1hhj)jubj )}(h h]h }(hjkjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)jubjc)}(hj h]h*}(hjyjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj)jubj )}(hobjh]hobj}(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)jubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%jubj)}(huint64_t contexth](h)}(hhh]j )}(huint64_th]huint64_t}(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjjmodnameN classnameNjj)}j]jgjc.dma_resv_replace_fencesasbuh1hhjjubj )}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubj )}(hcontexth]hcontext}(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%jubj)}(hstruct dma_fence *replacementh](j )}(hj h]hstruct}(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubj )}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjkubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjkmodnameN classnameNjj)}j]jgjc.dma_resv_replace_fencesasbuh1hhjjubj )}(h h]h }(hj#khhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubjc)}(hj h]h*}(hj1khhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjjubj )}(h replacementh]h replacement}(hj>khhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%jubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjWkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSkubj )}(h h]h }(hjdkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSkubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjukhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrkubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjwkmodnameN classnameNjj)}j]jgjc.dma_resv_replace_fencesasbuh1hhjSkubj )}(h h]h }(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSkubj )}(husageh]husage}(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSkubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%jubeh}(h]h ]h"]h$]h&]jjuh1jhjihhhjihMJubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjihhhjihMJubah}(h]jiah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjihMJhjihhubj@ )}(hhh]h)}(h"replace fences in the dma_resv objh]h"replace fences in the dma_resv obj}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMJhjkhhubah}(h]h ]h"]h$]h&]uh1j? hjihhhjihMJubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jkjb jkjc jd je uh1j hhhj_hNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``uint64_t context`` the context of the fences to replace ``struct dma_fence *replacement`` the new fence to use instead ``enum dma_resv_usage usage`` how the new fence is used, see enum dma_resv_usage **Description** Replace fences with a specified context with a new fence. Only valid if the operation represented by the original fence has no longer access to the resources represented by the dma_resv object when the new fence completes. And example for using this is replacing a preemption fence with a page table update fence which makes the resource inaccessible.h](h)}(h**Parameters**h]jq )}(hjkh]h Parameters}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjkubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMNhjkubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj lh]hstruct dma_resv *obj}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj lubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMKhjlubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj%lhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!lhMKhj"lubah}(h]h ]h"]h$]h&]uh1j hjlubeh}(h]h ]h"]h$]h&]uh1j hj!lhMKhjlubj )}(h:``uint64_t context`` the context of the fences to replace h](j )}(h``uint64_t context``h]j)}(hjElh]huint64_t context}(hjGlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjClubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMLhj?lubj )}(hhh]h)}(h$the context of the fences to replaceh]h$the context of the fences to replace}(hj^lhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZlhMLhj[lubah}(h]h ]h"]h$]h&]uh1j hj?lubeh}(h]h ]h"]h$]h&]uh1j hjZlhMLhjlubj )}(h?``struct dma_fence *replacement`` the new fence to use instead h](j )}(h!``struct dma_fence *replacement``h]j)}(hj~lh]hstruct dma_fence *replacement}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|lubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMMhjxlubj )}(hhh]h)}(hthe new fence to use insteadh]hthe new fence to use instead}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhMMhjlubah}(h]h ]h"]h$]h&]uh1j hjxlubeh}(h]h ]h"]h$]h&]uh1j hjlhMMhjlubj )}(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)}(hjlh]henum dma_resv_usage usage}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMNhjlubj )}(hhh]h)}(h2how the new fence is used, see enum dma_resv_usageh]h2how the new fence is used, see enum dma_resv_usage}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhMNhjlubah}(h]h ]h"]h$]h&]uh1j hjlubeh}(h]h ]h"]h$]h&]uh1j hjlhMNhjlubeh}(h]h ]h"]h$]h&]uh1j hjkubh)}(h**Description**h]jq )}(hjlh]h Description}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjlubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMPhjkubh)}(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.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMPhjkubh)}(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.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMThjkubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j )dma_resv_iter_first_unlocked (C function)c.dma_resv_iter_first_unlockedhNtauh1j hj_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 )}(hj h]hstruct}(hjFmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBmhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjTmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBmhhhjSmhMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjemhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbmubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjgmmodnameN classnameNjj)}j]jN)}jFdma_resv_iter_first_unlockedsbc.dma_resv_iter_first_unlockedasbuh1hhjBmhhhjSmhMubj )}(h h]h }(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBmhhhjSmhMubjc)}(hj h]h*}(hjmhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjBmhhhjSmhMubj )}(hdma_resv_iter_first_unlockedh]j )}(hjmh]hdma_resv_iter_first_unlocked}(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjBmhhhjSmhMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubj )}(h h]h }(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmmodnameN classnameNjj)}j]jmc.dma_resv_iter_first_unlockedasbuh1hhjmubj )}(h h]h }(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubjc)}(hj h]h*}(hj nhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjmubj )}(hcursorh]hcursor}(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjmubah}(h]h ]h"]h$]h&]jjuh1jhjBmhhhjSmhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj>mhhhjSmhMubah}(h]j9mah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjSmhMhj;mhhubj@ )}(hhh]h)}(h(first fence in an unlocked dma_resv obj.h]h(first fence in an unlocked dma_resv obj.}(hjAnhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj>nhhubah}(h]h ]h"]h$]h&]uh1j? hj;mhhhjSmhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jYnjb jYnjc jd je uh1j hhhj_hNhNubjg )}(hX**Parameters** ``struct dma_resv_iter *cursor`` the cursor with the current position **Description** Subsequent fences are iterated with dma_resv_iter_next_unlocked(). Beware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_first() whenever possible. Returns the first fence from an unlocked dma_resv obj.h](h)}(h**Parameters**h]jq )}(hjcnh]h Parameters}(hjenhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjanubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj]nubj )}(hhh]j )}(hF``struct dma_resv_iter *cursor`` the cursor with the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjnh]hstruct dma_resv_iter *cursor}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj|nubj )}(hhh]h)}(h$the cursor with the current positionh]h$the cursor with the current position}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhMhjnubah}(h]h ]h"]h$]h&]uh1j hj|nubeh}(h]h ]h"]h$]h&]uh1j hjnhMhjynubah}(h]h ]h"]h$]h&]uh1j hj]nubh)}(h**Description**h]jq )}(hjnh]h Description}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjnubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj]nubh)}(hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().h]hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj]nubh)}(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.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj]nubh)}(h6Returns the first fence from an unlocked dma_resv obj.h]h6Returns the first fence from an unlocked dma_resv obj.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj]nubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j (dma_resv_iter_next_unlocked (C function)c.dma_resv_iter_next_unlockedhNtauh1j hj_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 )}(hj h]hstruct}(hj ohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjohhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hj.ohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjohhhj-ohMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj?ohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj huh1j hj-ohMhjohhubj@ )}(hhh]h)}(h'next fence in an unlocked dma_resv obj.h]h'next fence in an unlocked dma_resv obj.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjphhubah}(h]h ]h"]h$]h&]uh1j? hjohhhj-ohMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j3pjb j3pjc jd je uh1j hhhj_hNhNubjg )}(hX~**Parameters** ``struct dma_resv_iter *cursor`` the cursor with the current position **Description** Beware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_next() whenever possible. Returns the next fence from an unlocked dma_resv obj.h](h)}(h**Parameters**h]jq )}(hj=ph]h Parameters}(hj?phhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj;pubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj7pubj )}(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\ph]hstruct dma_resv_iter *cursor}(hj^phhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZpubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjVpubj )}(hhh]h)}(h$the cursor with the current positionh]h$the cursor with the current position}(hjuphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqphMhjrpubah}(h]h ]h"]h$]h&]uh1j hjVpubeh}(h]h ]h"]h$]h&]uh1j hjqphMhjSpubah}(h]h ]h"]h$]h&]uh1j hj7pubh)}(h**Description**h]jq )}(hjph]h Description}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjpubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj7pubh)}(hBeware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_next() whenever possible.h]hBeware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_next() whenever possible.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj7pubh)}(h5Returns the next fence from an unlocked dma_resv obj.h]h5Returns the next fence from an unlocked dma_resv obj.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj7pubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_first (C function)c.dma_resv_iter_firsthNtauh1j hj_hhhNhNubj )}(hhh](j )}(hEstruct dma_fence * dma_resv_iter_first (struct dma_resv_iter *cursor)h]j )}(hCstruct dma_fence *dma_resv_iter_first(struct dma_resv_iter *cursor)h](j )}(hj h]hstruct}(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjphhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjphhhjphMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj qhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj qmodnameN classnameNjj)}j]jN)}jFdma_resv_iter_firstsbc.dma_resv_iter_firstasbuh1hhjphhhjphMubj )}(h h]h }(hj+qhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjphhhjphMubjc)}(hj h]h*}(hj9qhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjphhhjphMubj )}(hdma_resv_iter_firsth]j )}(hj(qh]hdma_resv_iter_first}(hjJqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjFqubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjphhhjphMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hjeqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaqubj )}(h h]h }(hjrqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaqubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjqmodnameN classnameNjj)}j]j&qc.dma_resv_iter_firstasbuh1hhjaqubj )}(h h]h }(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaqubjc)}(hj h]h*}(hjqhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjaqubj )}(hcursorh]hcursor}(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaqubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj]qubah}(h]h ]h"]h$]h&]jjuh1jhjphhhjphMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjphhhjphMubah}(h]jpah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjphMhjphhubj@ )}(hhh]h)}(h)first fence from a locked dma_resv objecth]h)first fence from a locked dma_resv object}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjqhhubah}(h]h ]h"]h$]h&]uh1j? hjphhhjphMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jqjb jqjc jd je uh1j hhhj_hNhNubjg )}(hX**Parameters** ``struct dma_resv_iter *cursor`` cursor to record the current position **Description** Subsequent fences are iterated with dma_resv_iter_next_unlocked(). Return the first fence in the dma_resv object while holding the :c:type:`dma_resv.lock `.h](h)}(h**Parameters**h]jq )}(hjrh]h Parameters}(hj rhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjrubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.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)}(hj'rh]hstruct dma_resv_iter *cursor}(hj)rhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%rubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj!rubj )}(hhh]h)}(h%cursor to record the current positionh]h%cursor to record the current position}(hj@rhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`.h](h@Return the first fence in the dma_resv object while holding the }(hjrhhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjrh]h dma_resv.lock}(hjrhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjrubh.}(hjrhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjrhMhjrubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_next (C function)c.dma_resv_iter_nexthNtauh1j hj_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 )}(hj h]hstruct}(hjrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrhhhjrhMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjrmodnameN classnameNjj)}j]jN)}jFdma_resv_iter_nextsbc.dma_resv_iter_nextasbuh1hhjrhhhjrhMubj )}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrhhhjrhMubjc)}(hj h]h*}(hj'shhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjrhhhjrhMubj )}(hdma_resv_iter_nexth]j )}(hjsh]hdma_resv_iter_next}(hj8shhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4subah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjrhhhjrhMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hjSshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjOsubj )}(h h]h }(hj`shhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjOsubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjqshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjnsubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjssmodnameN classnameNjj)}j]jsc.dma_resv_iter_nextasbuh1hhjOsubj )}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjOsubjc)}(hj h]h*}(hjshhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjOsubj )}(hcursorh]hcursor}(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjOsubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjKsubah}(h]h ]h"]h$]h&]jjuh1jhjrhhhjrhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjrhhhjrhMubah}(h]jrah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjrhMhjrhhubj@ )}(hhh]h)}(h(next fence from a locked dma_resv objecth]h(next fence from a locked dma_resv object}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjshhubah}(h]h ]h"]h$]h&]uh1j? hjrhhhjrhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jsjb jsjc jd je uh1j hhhj_hNhNubjg )}(h**Parameters** ``struct dma_resv_iter *cursor`` cursor to record the current position **Description** Return the next fences from the dma_resv object while holding the :c:type:`dma_resv.lock `.h](h)}(h**Parameters**h]jq )}(hjsh]h Parameters}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjsubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjsubj )}(hhh]j )}(hG``struct dma_resv_iter *cursor`` cursor to record the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjth]hstruct dma_resv_iter *cursor}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjtubj )}(hhh]h)}(h%cursor to record the current positionh]h%cursor to record the current position}(hj.thhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*thMhj+tubah}(h]h ]h"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]uh1j hj*thMhj tubah}(h]h ]h"]h$]h&]uh1j hjsubh)}(h**Description**h]jq )}(hjPth]h Description}(hjRthhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjNtubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjsubh)}(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 }(hjfthhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjpth]h dma_resv.lock}(hjrthhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjntubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjftubh.}(hjfthhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjthMhjsubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_resv_copy_fences (C function)c.dma_resv_copy_fenceshNtauh1j hj_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](jK)}(hinth]hint}(hjthhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjthhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjthhhjthMubj )}(hdma_resv_copy_fencesh]j )}(hdma_resv_copy_fencesh]hdma_resv_copy_fences}(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjthhhjthMubj)}(h,(struct dma_resv *dst, struct dma_resv *src)h](j)}(hstruct dma_resv *dsth](j )}(hj h]hstruct}(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubj )}(h h]h }(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjumodnameN classnameNjj)}j]jN)}jFjtsbc.dma_resv_copy_fencesasbuh1hhjtubj )}(h h]h }(hj3uhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubjc)}(hj h]h*}(hjAuhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjtubj )}(hdsth]hdst}(hjNuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjtubj)}(hstruct dma_resv *srch](j )}(hj h]hstruct}(hjguhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcuubj )}(h h]h }(hjtuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcuubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjumodnameN classnameNjj)}j]j/uc.dma_resv_copy_fencesasbuh1hhjcuubj )}(h h]h }(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcuubjc)}(hj h]h*}(hjuhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjcuubj )}(hsrch]hsrc}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcuubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjtubeh}(h]h ]h"]h$]h&]jjuh1jhjthhhjthMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjthhhjthMubah}(h]jtah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjthMhjthhubj@ )}(hhh]h)}(h Copy all fences from src to dst.h]h Copy all fences from src to dst.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjuhhubah}(h]h ]h"]h$]h&]uh1j? hjthhhjthMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jvjb jvjc jd je uh1j hhhj_hNhNubjg )}(h**Parameters** ``struct dma_resv *dst`` the destination reservation object ``struct dma_resv *src`` the source reservation object **Description** Copy all fences from src to dst. dst-lock must be held.h](h)}(h**Parameters**h]jq )}(hj vh]h Parameters}(hj vhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjvubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjvubj )}(hhh](j )}(h<``struct dma_resv *dst`` the destination reservation object h](j )}(h``struct dma_resv *dst``h]j)}(hj)vh]hstruct dma_resv *dst}(hj+vhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'vubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj#vubj )}(hhh]h)}(h"the destination reservation objecth]h"the destination reservation object}(hjBvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>vhMhj?vubah}(h]h ]h"]h$]h&]uh1j hj#vubeh}(h]h ]h"]h$]h&]uh1j hj>vhMhj vubj )}(h7``struct dma_resv *src`` the source reservation object h](j )}(h``struct dma_resv *src``h]j)}(hjbvh]hstruct dma_resv *src}(hjdvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`vubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj\vubj )}(hhh]h)}(hthe source reservation objecth]hthe source reservation object}(hj{vhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwvhMhjxvubah}(h]h ]h"]h$]h&]uh1j hj\vubeh}(h]h ]h"]h$]h&]uh1j hjwvhMhj vubeh}(h]h ]h"]h$]h&]uh1j hjvubh)}(h**Description**h]jq )}(hjvh]h Description}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjvubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjvubh)}(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.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjvubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_get_fences (C function)c.dma_resv_get_fenceshNtauh1j hj_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](jK)}(hinth]hint}(hjvhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjvhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM.ubj )}(h h]h }(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjvhhhjvhM.ubj )}(hdma_resv_get_fencesh]j )}(hdma_resv_get_fencesh]hdma_resv_get_fences}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjvubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjvhhhjvhM.ubj)}(hg(struct dma_resv *obj, enum dma_resv_usage usage, unsigned int *num_fences, struct dma_fence ***fences)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubj )}(h h]h }(hj,whhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj=whhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:wubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj?wmodnameN classnameNjj)}j]jN)}jFjwsbc.dma_resv_get_fencesasbuh1hhjwubj )}(h h]h }(hj]whhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubjc)}(hj h]h*}(hjkwhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjwubj )}(hobjh]hobj}(hjxwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjwubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubj )}(h h]h }(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjwmodnameN classnameNjj)}j]jYwc.dma_resv_get_fencesasbuh1hhjwubj )}(h h]h }(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubj )}(husageh]husage}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjwubj)}(hunsigned int *num_fencesh](jK)}(hunsignedh]hunsigned}(hjwhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjwubj )}(h h]h }(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubjK)}(hinth]hint}(hjxhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjwubj )}(h h]h }(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubjc)}(hj h]h*}(hj,xhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjwubj )}(h num_fencesh]h num_fences}(hj9xhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjwubj)}(hstruct dma_fence ***fencesh](j )}(hj h]hstruct}(hjRxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNxubj )}(h h]h }(hj_xhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNxubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjpxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmxubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjrxmodnameN classnameNjj)}j]jYwc.dma_resv_get_fencesasbuh1hhjNxubj )}(h h]h }(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNxubjc)}(hj h]h*}(hjxhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjNxubjc)}(hj h]h*}(hjxhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjNxubjc)}(hj h]h*}(hjxhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjNxubj )}(hfencesh]hfences}(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNxubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjwubeh}(h]h ]h"]h$]h&]jjuh1jhjvhhhjvhM.ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjvhhhjvhM.ubah}(h]jvah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjvhM.hjvhhubj@ )}(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}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM.hjxhhubah}(h]h ]h"]h$]h&]uh1j? hjvhhhjvhM.ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jyjb jyjc jd je uh1j hhhj_hNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. ``unsigned int *num_fences`` the number of fences returned ``struct dma_fence ***fences`` the array of fence ptrs returned (array is krealloc'd to the required size, and must be freed by caller) **Description** Retrieve all fences from the reservation object. Returns either zero or -ENOMEM.h](h)}(h**Parameters**h]jq )}(hjyh]h Parameters}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj yubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM2hj yubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj.yh]hstruct dma_resv *obj}(hj0yhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,yubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM0hj(yubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjGyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCyhM0hjDyubah}(h]h ]h"]h$]h&]uh1j hj(yubeh}(h]h ]h"]h$]h&]uh1j hjCyhM0hj%yubj )}(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)}(hjgyh]henum dma_resv_usage usage}(hjiyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeyubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM1hjayubj )}(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.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|yhM1hj}yubah}(h]h ]h"]h$]h&]uh1j hjayubeh}(h]h ]h"]h$]h&]uh1j hj|yhM1hj%yubj )}(h;``unsigned int *num_fences`` the number of fences returned h](j )}(h``unsigned int *num_fences``h]j)}(hjyh]hunsigned int *num_fences}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM2hjyubj )}(hhh]h)}(hthe number of fences returnedh]hthe number of fences returned}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhM2hjyubah}(h]h ]h"]h$]h&]uh1j hjyubeh}(h]h ]h"]h$]h&]uh1j hjyhM2hj%yubj )}(h``struct dma_fence ***fences`` the array of fence ptrs returned (array is krealloc'd to the required size, and must be freed by caller) h](j )}(h``struct dma_fence ***fences``h]j)}(hjyh]hstruct dma_fence ***fences}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM4hjyubj )}(hhh]h)}(hhthe array of fence ptrs returned (array is krealloc'd to the required size, and must be freed by caller)h]hjthe array of fence ptrs returned (array is krealloc’d to the required size, and must be freed by caller)}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM3hjyubah}(h]h ]h"]h$]h&]uh1j hjyubeh}(h]h ]h"]h$]h&]uh1j hjyhM4hj%yubeh}(h]h ]h"]h$]h&]uh1j hj yubh)}(h**Description**h]jq )}(hjzh]h Description}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjzubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM6hj yubh)}(hPRetrieve all fences from the reservation object. Returns either zero or -ENOMEM.h]hPRetrieve all fences from the reservation object. Returns either zero or -ENOMEM.}(hj+zhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM6hj yubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_resv_get_singleton (C function)c.dma_resv_get_singletonhNtauh1j hj_hhhNhNubj )}(hhh](j )}(hfint dma_resv_get_singleton (struct dma_resv *obj, enum dma_resv_usage usage, struct dma_fence **fence)h]j )}(heint dma_resv_get_singleton(struct dma_resv *obj, enum dma_resv_usage usage, struct dma_fence **fence)h](jK)}(hinth]hint}(hjZzhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjVzhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMeubj )}(h h]h }(hjizhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVzhhhjhzhMeubj )}(hdma_resv_get_singletonh]j )}(hdma_resv_get_singletonh]hdma_resv_get_singleton}(hj{zhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwzubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjVzhhhjhzhMeubj)}(hK(struct dma_resv *obj, enum dma_resv_usage usage, struct dma_fence **fence)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubj )}(h h]h }(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjzmodnameN classnameNjj)}j]jN)}jFj}zsbc.dma_resv_get_singletonasbuh1hhjzubj )}(h h]h }(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubjc)}(hj h]h*}(hjzhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjzubj )}(hobjh]hobj}(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjzubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hj {hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubj )}(h h]h }(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hj'{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj${ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj){modnameN classnameNjj)}j]jzc.dma_resv_get_singletonasbuh1hhj{ubj )}(h h]h }(hjE{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubj )}(husageh]husage}(hjS{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjzubj)}(hstruct dma_fence **fenceh](j )}(hj h]hstruct}(hjl{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh{ubj )}(h h]h }(hjy{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh{ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj{modnameN classnameNjj)}j]jzc.dma_resv_get_singletonasbuh1hhjh{ubj )}(h h]h }(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh{ubjc)}(hj h]h*}(hj{hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjh{ubjc)}(hj h]h*}(hj{hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjh{ubj )}(hfenceh]hfence}(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh{ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjzubeh}(h]h ]h"]h$]h&]jjuh1jhjVzhhhjhzhMeubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjRzhhhjhzhMeubah}(h]jMzah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhzhMehjOzhhubj@ )}(hhh]h)}(h%Get a single fence for all the fencesh]h%Get a single fence for all the fences}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMehj{hhubah}(h]h ]h"]h$]h&]uh1j? hjOzhhhjhzhMeubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j|jb j|jc jd je uh1j hhhj_hNhNubjg )}(hX1**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. ``struct dma_fence **fence`` the resulting fence **Description** Get a single fence representing all the fences inside the resv object. Returns either 0 for success or -ENOMEM. Warning: This can't be used like this when adding the fence back to the resv object since that can lead to stack corruption when finalizing the dma_fence_array. Returns 0 on success and negative error values on failure.h](h)}(h**Parameters**h]jq )}(hj|h]h Parameters}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj|ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMihj|ubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj;|h]hstruct dma_resv *obj}(hj=|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9|ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMfhj5|ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjT|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjP|hMfhjQ|ubah}(h]h ]h"]h$]h&]uh1j hj5|ubeh}(h]h ]h"]h$]h&]uh1j hjP|hMfhj2|ubj )}(hY``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. h](j )}(h``enum dma_resv_usage usage``h]j)}(hjt|h]henum dma_resv_usage usage}(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:159: ./drivers/dma-buf/dma-resv.chMghjn|ubj )}(hhh]h)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hMghj|ubah}(h]h ]h"]h$]h&]uh1j hjn|ubeh}(h]h ]h"]h$]h&]uh1j hj|hMghj2|ubj )}(h1``struct dma_fence **fence`` the resulting fence h](j )}(h``struct dma_fence **fence``h]j)}(hj|h]hstruct dma_fence **fence}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhhj|ubj )}(hhh]h)}(hthe resulting fenceh]hthe resulting fence}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hMhhj|ubah}(h]h ]h"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]uh1j hj|hMhhj2|ubeh}(h]h ]h"]h$]h&]uh1j hj|ubh)}(h**Description**h]jq )}(hj|h]h Description}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj|ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMjhj|ubh)}(hoGet a single fence representing all the fences inside the resv object. Returns either 0 for success or -ENOMEM.h]hoGet a single fence representing all the fences inside the resv object. Returns either 0 for success or -ENOMEM.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMjhj|ubh)}(hWarning: This can't be used like this when adding the fence back to the resv object since that can lead to stack corruption when finalizing the dma_fence_array.h]hWarning: This can’t be used like this when adding the fence back to the resv object since that can lead to stack corruption when finalizing the dma_fence_array.}(hj }hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMmhj|ubh)}(h:Returns 0 on success and negative error values on failure.h]h:Returns 0 on success and negative error values on failure.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMqhj|ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_resv_wait_timeout (C function)c.dma_resv_wait_timeouthNtauh1j hj_hhhNhNubj )}(hhh](j )}(hnlong dma_resv_wait_timeout (struct dma_resv *obj, enum dma_resv_usage usage, bool intr, unsigned long timeout)h]j )}(hmlong dma_resv_wait_timeout(struct dma_resv *obj, enum dma_resv_usage usage, bool intr, unsigned long timeout)h](jK)}(hlongh]hlong}(hjK}hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjG}hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjZ}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjG}hhhjY}hMubj )}(hdma_resv_wait_timeouth]j )}(hdma_resv_wait_timeouth]hdma_resv_wait_timeout}(hjl}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh}ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjG}hhhjY}hMubj)}(hS(struct dma_resv *obj, enum dma_resv_usage usage, bool intr, unsigned long timeout)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubj )}(h h]h }(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj}modnameN classnameNjj)}j]jN)}jFjn}sbc.dma_resv_wait_timeoutasbuh1hhj}ubj )}(h h]h }(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubjc)}(hj h]h*}(hj}hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj}ubj )}(hobjh]hobj}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj}ubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubj )}(h h]h }(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj~modnameN classnameNjj)}j]j}c.dma_resv_wait_timeoutasbuh1hhj}ubj )}(h h]h }(hj6~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubj )}(husageh]husage}(hjD~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj}ubj)}(h bool intrh](jK)}(hj^h]hbool}(hj]~hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjY~ubj )}(h h]h }(hjj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjY~ubj )}(hintrh]hintr}(hjx~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjY~ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj}ubj)}(hunsigned long timeouth](jK)}(hunsignedh]hunsigned}(hj~hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj~ubj )}(h h]h }(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~ubjK)}(hlongh]hlong}(hj~hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj~ubj )}(h h]h }(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~ubj )}(htimeouth]htimeout}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj}ubeh}(h]h ]h"]h$]h&]jjuh1jhjG}hhhjY}hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjC}hhhjY}hMubah}(h]j>}ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjY}hMhj@}hhubj@ )}(hhh]h)}(h$Wait on reservation's objects fencesh]h&Wait on reservation’s objects fences}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj~hhubah}(h]h ]h"]h$]h&]uh1j? hj@}hhhjY}hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j jb j jc jd je uh1j hhhj_hNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. ``bool intr`` if true, do interruptible wait ``unsigned long timeout`` timeout value in jiffies or zero to return immediately **Description** Callers are not required to hold specific locks, but maybe hold dma_resv_lock() already RETURNS Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or greater than zero on success.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj4h]hstruct dma_resv *obj}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj.ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhMhjJubah}(h]h ]h"]h$]h&]uh1j hj.ubeh}(h]h ]h"]h$]h&]uh1j hjIhMhj+ubj )}(hY``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. h](j )}(h``enum dma_resv_usage usage``h]j)}(hjmh]henum dma_resv_usage usage}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjgubj )}(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 hjgubeh}(h]h ]h"]h$]h&]uh1j hjhMhj+ubj )}(h-``bool intr`` if true, do interruptible wait h](j )}(h ``bool intr``h]j)}(hjh]h bool intr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(hif true, do interruptible waith]hif true, do interruptible wait}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhj+ubj )}(hQ``unsigned long timeout`` timeout value in jiffies or zero to return immediately h](j )}(h``unsigned long timeout``h]j)}(hjh]hunsigned 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:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(h6timeout value in jiffies or zero to return immediatelyh]h6timeout value in jiffies or zero to return immediately}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhj+ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubh)}(hCallers are not required to hold specific locks, but maybe hold dma_resv_lock() already RETURNS Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or greater than zero on success.h]hCallers are not required to hold specific locks, but maybe hold dma_resv_lock() already RETURNS Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or greater than zero on success.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_resv_set_deadline (C function)c.dma_resv_set_deadlinehNtauh1j hj_hhhNhNubj )}(hhh](j )}(h^void dma_resv_set_deadline (struct dma_resv *obj, enum dma_resv_usage usage, ktime_t deadline)h]j )}(h]void dma_resv_set_deadline(struct dma_resv *obj, enum dma_resv_usage usage, ktime_t deadline)h](jK)}(hvoidh]hvoid}(hj_hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj[hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj[hhhjmhMubj )}(hdma_resv_set_deadlineh]j )}(hdma_resv_set_deadlineh]hdma_resv_set_deadline}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj[hhhjmhMubj)}(hC(struct dma_resv *obj, enum dma_resv_usage usage, ktime_t deadline)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_resv_set_deadlineasbuh1hhjubj )}(h h]h }(hjڀhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj.modnameN classnameNjj)}j]jրc.dma_resv_set_deadlineasbuh1hhj ubj )}(h h]h }(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(husageh]husage}(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hktime_t deadlineh](h)}(hhh]j )}(hktime_th]hktime_t}(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjvmodnameN classnameNjj)}j]jրc.dma_resv_set_deadlineasbuh1hhjmubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubj )}(hdeadlineh]hdeadline}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhj[hhhjmhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjWhhhjmhMubah}(h]jRah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjmhMhjThhubj@ )}(hhh]h)}(h.Set a deadline on reservation's objects fencesh]h0Set a deadline on reservation’s objects fences}(hjʁhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjǁhhubah}(h]h ]h"]h$]h&]uh1j? hjThhhjmhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj_hNhNubjg )}(hXS**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. ``ktime_t deadline`` the requested deadline (MONOTONIC) **Description** May be called without holding the dma_resv lock. Sets **deadline** on all fences filtered by **usage**.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj h]hstruct dma_resv *obj}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.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)}(hjDh]henum dma_resv_usage usage}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj>ubj )}(hhh]h)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhMhjZubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hjYhMhjubj )}(h8``ktime_t deadline`` the requested deadline (MONOTONIC) h](j )}(h``ktime_t deadline``h]j)}(hj}h]hktime_t deadline}(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:159: ./drivers/dma-buf/dma-resv.chMhjwubj )}(hhh]h)}(h"the requested deadline (MONOTONIC)h]h"the requested deadline (MONOTONIC)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjwubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./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 }(hj΂hhhNhNubjq )}(h **deadline**h]hdeadline}(hjւhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj΂ubh on all fences filtered by }(hj΂hhhNhNubjq )}(h **usage**h]husage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj΂ubh.}(hj΂hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_resv_test_signaled (C function)c.dma_resv_test_signaledhNtauh1j hj_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](jK)}(hj^h]hbool}(hj!hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj.hMubj )}(hdma_resv_test_signaledh]j )}(hdma_resv_test_signaledh]hdma_resv_test_signaled}(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhj.hMubj)}(h1(struct dma_resv *obj, enum dma_resv_usage usage)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjYubj )}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjYubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjxubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj}modnameN classnameNjj)}j]jN)}jFjCsbc.dma_resv_test_signaledasbuh1hhjYubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjYubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjYubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjYubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjUubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjσhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj˃ubj )}(h h]h }(hj܃hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj˃ubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_resv_test_signaledasbuh1hhj˃ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj˃ubj )}(husageh]husage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj˃ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjUubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj.hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhj.hMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj.hMhjhhubj@ )}(hhh]h)}(h9Test if a reservation object's fences have been signaled.h]h;Test if a reservation object’s fences have been signaled.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj@hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj.hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j[jb j[jc jd je uh1j hhhj_hNhNubjg )}(hX;**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. **Description** Callers are not required to hold specific locks, but maybe hold dma_resv_lock() already. RETURNS True if all fences signaled, else false.h](h)}(h**Parameters**h]jq )}(hjeh]h Parameters}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjcubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj_ubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj~ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hj~ubeh}(h]h ]h"]h$]h&]uh1j hjhMhj{ubj )}(hY``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. h](j )}(h``enum dma_resv_usage usage``h]j)}(hjh]henum dma_resv_usage usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(hjքhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj҄hMhjӄubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj҄hMhj{ubeh}(h]h ]h"]h$]h&]uh1j hj_ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj_ubh)}(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:159: ./drivers/dma-buf/dma-resv.chMhj_ubh)}(hRETURNSh]hRETURNS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj_ubh)}(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:159: ./drivers/dma-buf/dma-resv.chMhj_ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_describe (C function)c.dma_resv_describehNtauh1j hj_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](jK)}(hvoidh]hvoid}(hj[hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjWhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjWhhhjihMubj )}(hdma_resv_describeh]j )}(hdma_resv_describeh]hdma_resv_describe}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjxubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjWhhhjihMubj)}(h,(struct dma_resv *obj, struct seq_file *seq)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFj~sbc.dma_resv_describeasbuh1hhjubj )}(h h]h }(hjօhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct seq_file *seqh](j )}(hj h]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hseq_fileh]hseq_file}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj*modnameN classnameNjj)}j]j҅c.dma_resv_describeasbuh1hhjubj )}(h h]h }(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjThhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hseqh]hseq}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjWhhhjihMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjShhhjihMubah}(h]jNah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjihMhjPhhubj@ )}(hhh]h)}(h1Dump description of the resv object into seq_fileh]h1Dump description of the resv object into seq_file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjPhhhjihMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj_hNhNubjg )}(h**Parameters** ``struct dma_resv *obj`` the reservation object ``struct seq_file *seq`` the seq_file to dump the description into **Description** Dump a textual description of the fences inside an dma_resv object into the seq_file.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj̆h]hstruct dma_resv *obj}(hjΆhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjʆubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjƆubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjƆubeh}(h]h ]h"]h$]h&]uh1j hjhMhjÆubj )}(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:159: ./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 hjhMhjÆubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj@h]h Description}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj>ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubh)}(hUDump a textual description of the fences inside an dma_resv object into the seq_file.h]hUDump a textual description of the fences inside an dma_resv object into the seq_file.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_usage (C enum)c.dma_resv_usagehNtauh1j hj_hhhNhNubj )}(hhh](j )}(hdma_resv_usageh]j )}(henum dma_resv_usageh](j )}(hj*h]henum}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubj )}(hdma_resv_usageh]j )}(hjh]hdma_resv_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj}hhhjhKubah}(h]jxah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjzhhubj@ )}(hhh]h)}(h+how the fences from a dma_resv obj are usedh]h+how the fences from a dma_resv obj are used}(hjLJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK5hjćhhubah}(h]h ]h"]h$]h&]uh1j? hjzhhhjhKubeh}(h]h ](jenumeh"]h$]h&]j` jja j߇jb j߇jc jd je uh1j hhhj_hNhNubjg )}(hX**Constants** ``DMA_RESV_USAGE_KERNEL`` For in kernel memory management only. This should only be used for things like copying or clearing memory with a DMA hardware engine for the purpose of kernel memory management. Drivers *always* must wait for those fences before accessing the resource protected by the dma_resv object. The only exception for that is when the resource is known to be locked down in place by pinning it previously. ``DMA_RESV_USAGE_WRITE`` Implicit write synchronization. This should only be used for userspace command submissions which add an implicit write dependency. ``DMA_RESV_USAGE_READ`` Implicit read synchronization. This should only be used for userspace command submissions which add an implicit read dependency. ``DMA_RESV_USAGE_BOOKKEEP`` No implicit sync. This should be used by submissions which don't want to participate in any implicit synchronization. The most common cases are preemption fences, page table updates, TLB flushes as well as explicitly synced user submissions. Explicitly synced user submissions can be promoted to DMA_RESV_USAGE_READ or DMA_RESV_USAGE_WRITE as needed using dma_buf_import_sync_file() when implicit synchronization should become necessary after initial adding of the fence.h](h)}(h **Constants**h]jq )}(hjh]h Constants}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.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:162: ./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 }(hj?hhhNhNubhemphasis)}(h*always*h]halways}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj?ubh 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.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./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)}(hjth]hDMA_RESV_USAGE_WRITE}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKKhjnubj )}(hhh](h)}(hImplicit write synchronization.h]hImplicit write synchronization.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKHhjubh)}(hbThis should only be used for userspace command submissions which add an implicit write dependency.h]hbThis should only be used for userspace command submissions which add an implicit write dependency.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKJhjubeh}(h]h ]h"]h$]h&]uh1j hjnubeh}(h]h ]h"]h$]h&]uh1j hjhKKhjubj )}(h``DMA_RESV_USAGE_READ`` Implicit read synchronization. This should only be used for userspace command submissions which add an implicit read dependency. h](j )}(h``DMA_RESV_USAGE_READ``h]j)}(hjh]hDMA_RESV_USAGE_READ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKQhjubj )}(hhh](h)}(hImplicit read synchronization.h]hImplicit read synchronization.}(hjֈhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKNhjӈubh)}(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:162: ./include/linux/dma-resv.hhKPhjӈubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj҈hKQhjubj )}(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:162: ./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:162: ./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:162: ./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:162: ./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.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./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&]uh1jf hj_hhhNhNubh)}(h**Description**h]jq )}(hjvh]h Description}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjtubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK6hj_hhubh)}(hAn important fact is that there is the order KERNEL huh1j hjhKxhj։hhubj@ )}(hhh]h)}(hhelper for implicit synch]hhelper for implicit sync}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKxhjhhubah}(h]h ]h"]h$]h&]uh1j? hj։hhhjhKxubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj_hNhNubjg )}(h**Parameters** ``bool write`` true if we create a new implicit sync write **Description** This returns the implicit synchronization usage for write or read accesses, see enum dma_resv_usage and :c:type:`dma_buf.resv `.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK|hjubj )}(hhh]j )}(h;``bool write`` true if we create a new implicit sync write h](j )}(h``bool write``h]j)}(hjԊh]h bool write}(hj֊hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjҊubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKyhjΊubj )}(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 hjΊubeh}(h]h ]h"]h$]h&]uh1j hjhKyhjˊubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK{hjubh)}(hThis returns the implicit synchronization usage for write or read accesses, see enum dma_resv_usage and :c:type:`dma_buf.resv `.h](hhThis returns the implicit synchronization usage for write or read accesses, see enum dma_resv_usage and }(hj%hhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hj/h]h dma_buf.resv}(hj1hhhNhNubah}(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:162: ./include/linux/dma-resv.hhK{hj%ubh.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjLhK{hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv (C struct) c.dma_resvhNtauh1j hj_hhhNhNubj )}(hhh](j )}(hdma_resvh]j )}(hstruct dma_resvh](j )}(hj h]hstruct}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjshhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjshhhjhKubj )}(hdma_resvh]j )}(hjqh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjshhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjohhhjhKubah}(h]jjah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjlhhubj@ )}(hhh]h)}(h0a reservation object manages fences for a bufferh]h0a reservation object manages fences for a buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjlhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j` jja jыjb jыjc jd je uh1j hhhj_hNhNubjg )}(hX**Definition**:: struct dma_resv { struct ww_mutex lock; struct dma_resv_list __rcu *fences; }; **Members** ``lock`` Update side lock. Don't use directly, instead use the wrapper functions like dma_resv_lock() and dma_resv_unlock(). Drivers which use the reservation object to manage memory dynamically also use this lock to protect buffer object state like placement, allocation policies or throughout command submission. ``fences`` Array of fences which where added to the dma_resv object A new fence is added by calling dma_resv_add_fence(). Since this often needs to be done past the point of no return in command submission it cannot fail, and therefore sufficient slots need to be reserved by calling dma_resv_reserve_fences().h](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj݋hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjًubh:}(hjًhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjՋubj)}(hVstruct dma_resv { struct ww_mutex lock; struct dma_resv_list __rcu *fences; };h]hVstruct dma_resv { struct ww_mutex lock; struct dma_resv_list __rcu *fences; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjՋubh)}(h **Members**h]jq )}(hjh]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjՋubj )}(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&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./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().}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj<ubh)}(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.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj<ubeh}(h]h ]h"]h$]h&]uh1j 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)}(hjoh]hfences}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjiubj )}(hhh](h)}(h8Array of fences which where added to the dma_resv objecth]h8Array of fences which where added to the dma_resv object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubh)}(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().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubeh}(h]h ]h"]h$]h&]uh1j hjiubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjՋubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubh)}(h**Description**h]jq )}(hjh]h Description}(hjÌhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.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.}(hj׌hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./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:162: ./include/linux/dma-resv.hhKhjubh for a more in-depth discussion.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hKhj_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:162: ./include/linux/dma-resv.hhKhj_hhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter (C struct)c.dma_resv_iterhNtauh1j hj_hhhNhNubj )}(hhh](j )}(h dma_resv_iterh]j )}(hstruct dma_resv_iterh](j )}(hj h]hstruct}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<hhhjMhKubj )}(h dma_resv_iterh]j )}(hj:h]h dma_resv_iter}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj\ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj<hhhjMhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj8hhhjMhKubah}(h]j3ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjMhKhj5hhubj@ )}(hhh]h)}(h)current position into the dma_resv fencesh]h)current position into the dma_resv fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hj5hhhjMhKubeh}(h]h ](jstructeh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj_hNhNubjg )}(hX**Definition**:: struct dma_resv_iter { struct dma_resv *obj; enum dma_resv_usage usage; struct dma_fence *fence; enum dma_resv_usage fence_usage; unsigned int index; struct dma_resv_list *fences; unsigned int num_fences; bool is_restarted; }; **Members** ``obj`` The dma_resv object we iterate over ``usage`` Return fences with this usage or lower. ``fence`` the currently handled fence ``fence_usage`` the usage of the current fence ``index`` index into the shared fences ``fences`` the shared fences; private, *MUST* not dereference ``num_fences`` number of fences ``is_restarted`` true if this is the first returned fenceh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj)}(hXstruct dma_resv_iter { struct dma_resv *obj; enum dma_resv_usage usage; struct dma_fence *fence; enum dma_resv_usage fence_usage; unsigned int index; struct dma_resv_list *fences; unsigned int num_fences; bool is_restarted; };h]hXstruct dma_resv_iter { struct dma_resv *obj; enum dma_resv_usage usage; struct dma_fence *fence; enum dma_resv_usage fence_usage; unsigned int index; struct dma_resv_list *fences; unsigned int num_fences; bool is_restarted; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubh)}(h **Members**h]jq )}(hjЍh]hMembers}(hjҍhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj΍ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(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:162: ./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}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj"ubj )}(hhh]h)}(h'Return fences with this usage or lower.h]h'Return fences with this usage or lower.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hKhj>ubah}(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)}(hjah]hfence}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj[ubj )}(hhh]h)}(hthe currently handled fenceh]hthe currently handled fence}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhKhjwubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hjvhKhjubj )}(h/``fence_usage`` the usage of the current fence h](j )}(h``fence_usage``h]j)}(hjh]h fence_usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(hthe usage of the current fenceh]hthe usage of the current fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h'``index`` index into the shared fences h](j )}(h ``index``h]j)}(hjӎh]hindex}(hjՎhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjюubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj͎ubj )}(hhh]h)}(hindex into the shared fencesh]hindex into the shared fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hj͎ubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h>``fences`` the shared fences; private, *MUST* not dereference h](j )}(h ``fences``h]j)}(hj h]hfences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(h2the shared fences; private, *MUST* not dereferenceh](hthe shared fences; private, }(hj%hhhNhNubjH)}(h*MUST*h]hMUST}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj%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)}(hjWh]h num_fences}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjQubj )}(hhh]h)}(hnumber of fencesh]hnumber of fences}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhKhjmubah}(h]h ]h"]h$]h&]uh1j hjQubeh}(h]h ]h"]h$]h&]uh1j hjlhKhjubj )}(h9``is_restarted`` true if this is the first returned fenceh](j )}(h``is_restarted``h]j)}(hjh]h is_restarted}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(h(true if this is the first returned fenceh]h(true if this is the first returned fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubh)}(h**Description**h]jq )}(hjӏh]h Description}(hjՏhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjяubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./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:162: ./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:162: ./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:162: ./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_beginhNtauh1j hj_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](jK)}(hvoidh]hvoid}(hj/hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj+hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+hhhj=hKubj )}(hdma_resv_iter_beginh]j )}(hdma_resv_iter_beginh]hdma_resv_iter_begin}(hjPhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjLubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj+hhhj=hKubj)}(hO(struct dma_resv_iter *cursor, struct dma_resv *obj, enum dma_resv_usage usage)h](j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubj )}(h h]h }(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjRsbc.dma_resv_iter_beginasbuh1hhjhubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjhubj )}(hcursorh]hcursor}(hjŐhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubj)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjސhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjڐubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjڐubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_resv_iter_beginasbuh1hhjڐubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjڐubjc)}(hj h]h*}(hj(hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjڐubj )}(hobjh]hobj}(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjڐubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubj)}(henum dma_resv_usage usageh](j )}(hj*h]henum}(hjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubj )}(h h]h }(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjnmodnameN classnameNjj)}j]jc.dma_resv_iter_beginasbuh1hhjJubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubj )}(husageh]husage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubeh}(h]h ]h"]h$]h&]jjuh1jhj+hhhj=hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj'hhhj=hKubah}(h]j"ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj=hKhj$hhubj@ )}(hhh]h)}(h!initialize a dma_resv_iter objecth]h!initialize a dma_resv_iter object}(hj‘hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hj$hhhj=hKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jڑjb jڑjc jd je uh1j hhhj_hNhNubjg )}(hX**Parameters** ``struct dma_resv_iter *cursor`` The dma_resv_iter object to initialize ``struct dma_resv *obj`` The dma_resv object which we want to iterate over ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjޑubj )}(hhh](j )}(hH``struct dma_resv_iter *cursor`` The dma_resv_iter object to initialize h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjh]hstruct dma_resv_iter *cursor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(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}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj6ubj )}(hhh]h)}(h1The dma_resv object which we want to iterate overh]h1The dma_resv object which we want to iterate over}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhKhjRubah}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]uh1j hjQhKhjubj )}(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)}(hjuh]henum dma_resv_usage usage}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjoubj )}(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&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjoubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjޑubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_end (C function)c.dma_resv_iter_endhNtauh1j hj_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](jK)}(hvoidh]hvoid}(hjϒhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj˒hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hjޒhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj˒hhhjݒhKubj )}(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&]jjuh1j hj˒hhhjݒhKubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj,modnameN classnameNjj)}j]jN)}jFjsbc.dma_resv_iter_endasbuh1hhjubj )}(h h]h }(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjXhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hcursorh]hcursor}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj˒hhhjݒhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjǒhhhjݒhKubah}(h]j’ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjݒhKhjĒhhubj@ )}(hhh]h)}(hcleanup a dma_resv_iter objecth]hcleanup a dma_resv_iter object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjĒhhhjݒhKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj_hNhNubjg )}(h**Parameters** ``struct dma_resv_iter *cursor`` the dma_resv_iter object which should be cleaned up **Description** Make sure that the reference to the fence in the cursor is properly dropped.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]j )}(hU``struct dma_resv_iter *cursor`` the dma_resv_iter object which should be cleaned up h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjГh]hstruct dma_resv_iter *cursor}(hjғhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjΓubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjʓubj )}(hhh]h)}(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 hjʓubeh}(h]h ]h"]h$]h&]uh1j hjhKhjǓubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubh)}(hLMake sure that the reference to the fence in the cursor is properly dropped.h]hLMake sure that the reference to the fence in the cursor is properly dropped.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_usage (C function)c.dma_resv_iter_usagehNtauh1j hj_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}(hjPhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjLhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjLhhhj]hKubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjqmodnameN classnameNjj)}j]jN)}jFdma_resv_iter_usagesbc.dma_resv_iter_usageasbuh1hhjLhhhj]hKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjLhhhj]hKubj )}(hdma_resv_iter_usageh]j )}(hjh]hdma_resv_iter_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjLhhhj]hKubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjʔhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hj۔hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjؔubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjݔmodnameN classnameNjj)}j]jc.dma_resv_iter_usageasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hcursorh]hcursor}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjLhhhj]hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjHhhhj]hKubah}(h]jCah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj]hKhjEhhubj@ )}(hhh]h)}(h%Return the usage of the current fenceh]h%Return the usage of the current fence}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj;hhubah}(h]h ]h"]h$]h&]uh1j? hjEhhhj]hKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jVjb jVjc jd je uh1j hhhj_hNhNubjg )}(h**Parameters** ``struct dma_resv_iter *cursor`` the cursor of the current position **Description** Returns the usage of the currently processed fence.h](h)}(h**Parameters**h]jq )}(hj`h]h Parameters}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj^ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjZubj )}(hhh]j )}(hD``struct dma_resv_iter *cursor`` the cursor of 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&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjyubj )}(hhh]h)}(h"the cursor of the current positionh]h"the cursor of the current position}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjyubeh}(h]h ]h"]h$]h&]uh1j hjhKhjvubah}(h]h ]h"]h$]h&]uh1j hjZubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjZubh)}(h3Returns the usage of the currently processed fence.h]h3Returns the usage of the currently processed fence.}(hjЕhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjZubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_resv_iter_is_restarted (C function)c.dma_resv_iter_is_restartedhNtauh1j hj_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](jK)}(hj^h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj hMubj )}(hdma_resv_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&]jjuh1j hjhhhj hMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubj )}(h h]h }(hjHhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj[modnameN classnameNjj)}j]jN)}jFj!sbc.dma_resv_iter_is_restartedasbuh1hhj7ubj )}(h h]h }(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj7ubj )}(hcursorh]hcursor}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj3ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhj hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhj hMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj hMhjhhubj@ )}(hhh]h)}(h/test if this is the first fence after a restarth]h/test if this is the first fence after a restart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j֖jb j֖jc jd je uh1j hhhj_hNhNubjg )}(h**Parameters** ``struct dma_resv_iter *cursor`` the cursor with the current position **Description** Return true if this is the first fence in an iteration after a restart.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjޖubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./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:162: ./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]jq )}(hj:h]h Description}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj8ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./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.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM hjږubeh}(h]h ] kernelindentah"]h$]h&]uh1jf 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_unlockedhNtauh1j hj_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 )}(hjyh]h dma_resv_for_each_fence_unlocked}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj{hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjwhhhjhMubah}(h]jrah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjthhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hjthhhjhMubeh}(h]h ](jmacroeh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj_hNhNubh)}(h4``dma_resv_for_each_fence_unlocked (cursor, fence)``h]j)}(hjh]h0dma_resv_for_each_fence_unlocked (cursor, fence)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj_hhubh)}(hunlocked fence iterator h]h)}(hunlocked fence iteratorh]hunlocked fence iterator}(hjϗhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj˗ubah}(h]h ]h"]h$]h&]uh1hhjݗhMhj_hhubjg )}(hX**Parameters** ``cursor`` a struct dma_resv_iter pointer ``fence`` the current fence **Description** Iterate over the fences in a struct dma_resv object without holding the :c:type:`dma_resv.lock ` and using RCU instead. The cursor needs to be initialized with dma_resv_iter_begin() and cleaned up with dma_resv_iter_end(). Inside the iterator a reference to the dma_fence is held and the RCU lock dropped. Beware that the iterator can be restarted when the struct dma_resv for **cursor** is modified. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the lock iterator dma_resv_for_each_fence() whenever possible.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh](j )}(h*``cursor`` a struct dma_resv_iter pointer h](j )}(h ``cursor``h]j)}(hj h]hcursor}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(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)}(hjBh]hfence}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj<ubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhMhjXubah}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hjWhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj}h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj{ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.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 }(hjhhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjh]h dma_resv.lock}(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:162: ./include/linux/dma-resv.hhMhjubh 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.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubh)}(hXBeware that the iterator can be restarted when the struct dma_resv for **cursor** is modified. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the lock iterator dma_resv_for_each_fence() whenever possible.h](hGBeware that the iterator can be restarted when the struct dma_resv for }(hjŘhhhNhNubjq )}(h **cursor**h]hcursor}(hj͘hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjŘubh is modified. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the lock iterator dma_resv_for_each_fence() whenever possible.}(hjŘhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_resv_for_each_fence (C macro)c.dma_resv_for_each_fencehNtauh1j hj_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}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM&ubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhM&ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhM&hjhhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hjhhhjhM&ubeh}(h]h ](jmacroeh"]h$]h&]j` jja j6jb j6jc jd je uh1j hhhj_hNhNubh)}(h7``dma_resv_for_each_fence (cursor, obj, usage, fence)``h]j)}(hj<h]h3dma_resv_for_each_fence (cursor, obj, usage, fence)}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM(hj_hhubh)}(hfence iterator h]h)}(hfence iteratorh]hfence iterator}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM&hjRubah}(h]h ]h"]h$]h&]uh1hhjdhM&hj_hhubjg )}(hX**Parameters** ``cursor`` a struct dma_resv_iter pointer ``obj`` a dma_resv object pointer ``usage`` controls which fences to return ``fence`` the current fence **Description** Iterate over the fences in a struct dma_resv object while holding the :c:type:`dma_resv.lock `. **all_fences** controls if the shared fences are returned as well. The cursor initialisation is part of the iterator and the fence stays valid as long as the lock is held and so no extra reference to the fence is taken.h](h)}(h**Parameters**h]jq )}(hjqh]h Parameters}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjoubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM*hjkubj )}(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:162: ./include/linux/dma-resv.hhM'hjubj )}(hhh]h)}(ha struct dma_resv_iter pointerh]ha struct dma_resv_iter pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM'hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM'hjubj )}(h"``obj`` a dma_resv object pointer h](j )}(h``obj``h]j)}(hjəh]hobj}(hj˙hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjǙubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM(hjÙubj )}(hhh]h)}(ha dma_resv object pointerh]ha dma_resv object pointer}(hjhhhNhNubah}(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(hjubj )}(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:162: ./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)hjubj )}(h``fence`` the current fence h](j )}(h ``fence``h]j)}(hj;h]hfence}(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:162: ./include/linux/dma-resv.hhM*hj5ubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhM*hjQubah}(h]h ]h"]h$]h&]uh1j hj5ubeh}(h]h ]h"]h$]h&]uh1j hjPhM*hjubeh}(h]h ]h"]h$]h&]uh1j hjkubh)}(h**Description**h]jq )}(hjvh]h Description}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjtubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM,hjkubh)}(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 }(hjhhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjh]h dma_resv.lock}(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:162: ./include/linux/dma-resv.hhM,hjubh. }(hjhhhNhNubjq )}(h**all_fences**h]h all_fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh 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.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM,hjkubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_lock (C function)c.dma_resv_lockhNtauh1j hj_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](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMAubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMAubj )}(h dma_resv_lockh]j )}(h dma_resv_lockh]h dma_resv_lock}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMAubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubj )}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjKhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjHubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjMmodnameN classnameNjj)}j]jN)3}jFjsbc.dma_resv_lockasbuh1hhj)ubj )}(h h]h }(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubjc)}(hj h]h*}(hjyhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj)ubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%ubj)}(hstruct ww_acquire_ctx *ctxh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jgc.dma_resv_lockasbuh1hhjubj )}(h h]h }(hjۛhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMAubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMAubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMAhjhhubj@ )}(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:162: ./include/linux/dma-resv.hhMAhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMAubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j8jb j8jc jd je uh1j hhhj_hNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``struct ww_acquire_ctx *ctx`` the locking context **Description** Locks the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer. As the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as **ctx**. When a die situation is indicated by returning -EDEADLK all locks held by **ctx** must be unlocked and then dma_resv_lock_slow() called on **obj**. Unlocked by calling dma_resv_unlock(). See also dma_resv_lock_interruptible() for the interruptible variant.h](h)}(h**Parameters**h]jq )}(hjBh]h Parameters}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj@ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMEhj<ubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjah]hstruct dma_resv *obj}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMBhj[ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhMBhjwubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hjvhMBhjXubj )}(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:162: ./include/linux/dma-resv.hhMChjubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMChjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMChjXubeh}(h]h ]h"]h$]h&]uh1j hj<ubh)}(h**Description**h]jq )}(hj՜h]h Description}(hjלhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjӜubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./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:162: ./include/linux/dma-resv.hhMEhj<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 }(hjhhhNhNubjq )}(h**ctx**h]hctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMJhj<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 }(hjhhhNhNubjq )}(h**ctx**h]hctx}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh: must be unlocked and then dma_resv_lock_slow() called on }(hjhhhNhNubjq )}(h**obj**h]hobj}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMOhj<ubh)}(h&Unlocked by calling dma_resv_unlock().h]h&Unlocked by calling dma_resv_unlock().}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMRhj<ubh)}(hESee also dma_resv_lock_interruptible() for the interruptible variant.h]hESee also dma_resv_lock_interruptible() for the interruptible variant.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMThj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j (dma_resv_lock_interruptible (C function)c.dma_resv_lock_interruptiblehNtauh1j hj_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](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM]ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhM]ubj )}(hdma_resv_lock_interruptibleh]j )}(hdma_resv_lock_interruptibleh]hdma_resv_lock_interruptible}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhM]ubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjɝhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjŝubj )}(h h]h }(hj֝hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjŝubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_resv_lock_interruptibleasbuh1hhjŝubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjŝubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjŝubj )}(hobjh]hobj}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjŝubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct ww_acquire_ctx *ctxh](j )}(hj h]hstruct}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubj )}(h h]h }(hjHhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj[modnameN classnameNjj)}j]jc.dma_resv_lock_interruptibleasbuh1hhj7ubj )}(h h]h }(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj7ubj )}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM]ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhM]ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhM]hjhhubj@ )}(hhh]h)}(hlock the reservation objecth]hlock the reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM]hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhM]ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jԞjb jԞjc jd je uh1j hhhj_hNhNubjg )}(hX[**Parameters** ``struct dma_resv *obj`` the reservation object ``struct ww_acquire_ctx *ctx`` the locking context **Description** Locks the reservation object interruptible for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer. As the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as **ctx**. When a die situation is indicated by returning -EDEADLK all locks held by **ctx** must be unlocked and then dma_resv_lock_slow_interruptible() called on **obj**. Unlocked by calling dma_resv_unlock().h](h)}(h**Parameters**h]jq )}(hjޞh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjܞubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMahj؞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:162: ./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)}(hj6h]hstruct ww_acquire_ctx *ctx}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM_hj0ubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhM_hjLubah}(h]h ]h"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]uh1j hjKhM_hjubeh}(h]h ]h"]h$]h&]uh1j hj؞ubh)}(h**Description**h]jq )}(hjqh]h Description}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjoubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMahj؞ubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMahj؞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 }(hjhhhNhNubjq )}(h**ctx**h]hctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMfhj؞ubh)}(hWhen a die situation is indicated by returning -EDEADLK all locks held by **ctx** must be unlocked and then dma_resv_lock_slow_interruptible() called on **obj**.h](hJWhen a die situation is indicated by returning -EDEADLK all locks held by }(hjhhhNhNubjq )}(h**ctx**h]hctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubhH must be unlocked and then dma_resv_lock_slow_interruptible() called on }(hjhhhNhNubjq )}(h**obj**h]hobj}(hjџhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMkhj؞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:162: ./include/linux/dma-resv.hhMohj؞ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_lock_slow (C function)c.dma_resv_lock_slowhNtauh1j hj_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](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMxubj )}(h h]h }(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj'hMxubj )}(hdma_resv_lock_slowh]j )}(hdma_resv_lock_slowh]hdma_resv_lock_slow}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhj'hMxubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubj )}(h h]h }(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjvmodnameN classnameNjj)}j]jN)}jFj<sbc.dma_resv_lock_slowasbuh1hhjRubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjRubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjNubj)}(hstruct ww_acquire_ctx *ctxh](j )}(hj h]hstruct}(hjȠhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjĠubj )}(h h]h }(hjՠhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjĠubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_resv_lock_slowasbuh1hhjĠubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjĠubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjĠubj )}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjĠubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjNubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj'hMxubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhj'hMxubah}(h]j ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj'hMxhjhhubj@ )}(hhh]h)}(h$slowpath lock the reservation objecth]h$slowpath lock the reservation object}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMxhjFhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj'hMxubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jajb jajc jd je uh1j hhhj_hNhNubjg )}(hX_**Parameters** ``struct dma_resv *obj`` the reservation object ``struct ww_acquire_ctx *ctx`` the locking context **Description** Acquires the reservation object after a die case. This function will sleep until the lock becomes available. See dma_resv_lock() as well. See also dma_resv_lock_slow_interruptible() for the interruptible variant.h](h)}(h**Parameters**h]jq )}(hjkh]h Parameters}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjiubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM|hjeubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMyhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMyhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMyhjubj )}(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&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMzhjubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjܡhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjءhMzhj١ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjءhMzhjubeh}(h]h ]h"]h$]h&]uh1j hjeubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM|hjeubh)}(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:162: ./include/linux/dma-resv.hhM|hjeubh)}(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:162: ./include/linux/dma-resv.hhMhjeubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j -dma_resv_lock_slow_interruptible (C function)"c.dma_resv_lock_slow_interruptiblehNtauh1j hj_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](jK)}(hinth]hint}(hjRhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjNhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNhhhj`hMubj )}(h dma_resv_lock_slow_interruptibleh]j )}(h dma_resv_lock_slow_interruptibleh]h dma_resv_lock_slow_interruptible}(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjoubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjNhhhj`hMubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjusb"c.dma_resv_lock_slow_interruptibleasbuh1hhjubj )}(h h]h }(hj͢hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjۢhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct ww_acquire_ctx *ctxh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj!modnameN classnameNjj)}j]jɢ"c.dma_resv_lock_slow_interruptibleasbuh1hhjubj )}(h h]h }(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjKhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hctxh]hctx}(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjNhhhj`hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjJhhhj`hMubah}(h]jEah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj`hMhjGhhubj@ )}(hhh]h)}(h3slowpath lock the reservation object, interruptibleh]h3slowpath lock the reservation object, interruptible}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjGhhhj`hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj_hNhNubjg )}(hX/**Parameters** ``struct dma_resv *obj`` the reservation object ``struct ww_acquire_ctx *ctx`` the locking context **Description** Acquires the reservation object interruptible after a die case. This function will sleep until the lock becomes available. See dma_resv_lock_interruptible() as well.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjãh]hstruct dma_resv *obj}(hjţhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjܣhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjأhMhj٣ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjأhMhjubj )}(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:162: ./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 hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj7h]h Description}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj5ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubh)}(hAcquires the reservation object interruptible after a die case. This function will sleep until the lock becomes available. See dma_resv_lock_interruptible() as well.h]hAcquires the reservation object interruptible after a die case. This function will sleep until the lock becomes available. See dma_resv_lock_interruptible() as well.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_trylock (C function)c.dma_resv_trylockhNtauh1j hj_hhhNhNubj )}(hhh](j )}(h,bool dma_resv_trylock (struct dma_resv *obj)h]j )}(h+bool dma_resv_trylock(struct dma_resv *obj)h](jK)}(hj^h]hbool}(hj|hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjxhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjxhhhjhMubj )}(hdma_resv_trylockh]j )}(hdma_resv_trylockh]hdma_resv_trylock}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjxhhhjhMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjŤhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj֤hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjӤubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjؤmodnameN classnameNjj)}j]jN)}jFjsbc.dma_resv_trylockasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjxhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjthhhjhMubah}(h]joah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjqhhubj@ )}(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:162: ./include/linux/dma-resv.hhMhj8hhubah}(h]h ]h"]h$]h&]uh1j? hjqhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jSjb jSjc jd je uh1j hhhj_hNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Tries to lock the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer. Also note that since no context is provided, no deadlock protection is possible, which is also not needed for a trylock. Returns true if the lock was acquired, false otherwise.h](h)}(h**Parameters**h]jq )}(hj]h]h Parameters}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj[ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjWubj )}(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&]uh1jhjzubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjvubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(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]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjWubh)}(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.}(hjͥhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjWubh)}(hxAlso note that since no context is provided, no deadlock protection is possible, which is also not needed for a trylock.h]hxAlso note that since no context is provided, no deadlock protection is possible, which is also not needed for a trylock.}(hjܥhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjWubh)}(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:162: ./include/linux/dma-resv.hhMhjWubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_is_locked (C function)c.dma_resv_is_lockedhNtauh1j hj_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](jK)}(hj^h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj'hMubj )}(hdma_resv_is_lockedh]j )}(hdma_resv_is_lockedh]hdma_resv_is_locked}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhj'hMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubj )}(h h]h }(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjvmodnameN classnameNjj)}j]jN)}jFj<sbc.dma_resv_is_lockedasbuh1hhjRubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjRubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjNubah}(h]h ]h"]h$]h&]jjuh1jhjhhhj'hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhj'hMubah}(h]j ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj'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:162: ./include/linux/dma-resv.hhMhj֦hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj'hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj_hNhNubjg )}(h**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Returns true if the mutex is locked, false if unlocked.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hMhj0ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj/hMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjUh]h Description}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjSubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubh)}(h7Returns true if the mutex is locked, false if unlocked.h]h7Returns true if the mutex is locked, false if unlocked.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_resv_locking_ctx (C function)c.dma_resv_locking_ctxhNtauh1j hj_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 )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_resv_locking_ctxsbc.dma_resv_locking_ctxasbuh1hhjhhhjhMubj )}(h h]h }(hjڧhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjhhhjhMubj )}(hdma_resv_locking_ctxh]j )}(hjקh]hdma_resv_locking_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj4modnameN classnameNjj)}j]jէc.dma_resv_locking_ctxasbuh1hhjubj )}(h h]h }(hjPhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj^hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h+returns the context used to lock the objecth]h+returns the context used to lock the object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj_hNhNubjg )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Returns the context used to lock a reservation object or NULL if no context was used or the object is not locked at all. WARNING: This interface is pretty horrible, but TTM needs it because it doesn't pass the struct ww_acquire_ctx around in some very long callchains. Everyone else just uses it to check whether they're holding a reservation or not.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj֨h]hstruct dma_resv *obj}(hjبhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjԨubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjШubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjШubeh}(h]h ]h"]h$]h&]uh1j hjhMhjͨubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubh)}(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:162: ./include/linux/dma-resv.hhMhjubh)}(hWARNING: This interface is pretty horrible, but TTM needs it because it doesn't pass the struct ww_acquire_ctx around in some very long callchains. Everyone else just uses it to check whether they're holding a reservation or not.h]hWARNING: This interface is pretty horrible, but TTM needs it because it doesn’t pass the struct ww_acquire_ctx around in some very long callchains. Everyone else just uses it to check whether they’re holding a reservation or not.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_unlock (C function)c.dma_resv_unlockhNtauh1j hj_hhhNhNubj )}(hhh](j )}(h+void dma_resv_unlock (struct dma_resv *obj)h]j )}(h*void dma_resv_unlock(struct dma_resv *obj)h](jK)}(hvoidh]hvoid}(hjehhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjahhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjahhhjshMubj )}(hdma_resv_unlockh]j )}(hdma_resv_unlockh]hdma_resv_unlock}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjahhhjshMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj©modnameN classnameNjj)}j]jN)}jFjsbc.dma_resv_unlockasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjahhhjshMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj]hhhjshMubah}(h]jXah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjshMhjZhhubj@ )}(hhh]h)}(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:162: ./include/linux/dma-resv.hhMhj"hhubah}(h]h ]h"]h$]h&]uh1j? hjZhhhjshMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j=jb j=jc jd je uh1j hhhj_hNhNubjg )}(h**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Unlocks the reservation object following exclusive access.h](h)}(h**Parameters**h]jq )}(hjGh]h Parameters}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjEubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjAubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjfh]hstruct dma_resv *obj}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj`ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hMhj|ubah}(h]h ]h"]h$]h&]uh1j hj`ubeh}(h]h ]h"]h$]h&]uh1j hj{hMhj]ubah}(h]h ]h"]h$]h&]uh1j hjAubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjAubh)}(h:Unlocks the reservation object following exclusive access.h]h:Unlocks the reservation object following exclusive access.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjAubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj_hhhNhNubeh}(h]reservation-objectsah ]h"]reservation objectsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h DMA Fencesh]h DMA Fences}(hjتhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjժhhhhhKubh)}(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:168: ./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&]uh1hhj hK'hjժhhubh)}(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:168: ./drivers/dma-buf/dma-fence.chK+hjժhhubh)}(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:168: ./drivers/dma-buf/dma-fence.chK0hjժhhubh)}(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)}(hjGh]h sync_file}(hjIhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj sync_fileuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:168: ./drivers/dma-buf/dma-fence.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&]uh1hhjdhK3hj9ubah}(h]h ]h"]h$]h&]uh1hhj6ubh)}(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 }(hjyhhhNhNubh)}(h:c:type:`drm_syncobj`h]j)}(hjh]h drm_syncobj}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj drm_syncobjuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:168: ./drivers/dma-buf/dma-fence.chK8hjyubh. Compared to }(hjyhhhNhNubh)}(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_fileuh1hhjhK8hjyubh, a }(hjyhhhNhNubh)}(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_syncobjuh1hhjhK8hjyubh+ allows the underlying fence to be updated.}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK8hjuubah}(h]h ]h"]h$]h&]uh1hhj6ubh)}(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:168: ./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)}(hjLh]h dma_buf.resv}(hjNhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hhj"hKj?uh1hhjdhK3hjժhhubh)}(hhh](h)}(hDMA Fence Cross-Driver Contracth]hDMA Fence Cross-Driver Contract}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hbSince :c:type:`dma_fence` provide a cross driver contract, all drivers must follow the same rules:h](hSince }(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:174: ./drivers/dma-buf/dma-fence.chKEhjubhI provide a cross driver contract, all drivers must follow the same rules:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKEhjhhubh)}(hhh](h)}(hX Fences must complete in a reasonable time. Fences which represent kernels and shaders submitted by userspace, which could run forever, must be backed up by timeout and gpu hang recovery code. Minimally that code must prevent further command submission and force complete all in-flight fences, e.g. when the driver or hardware do not support gpu reset, or if the gpu reset failed for some reason. Ideally the driver supports gpu recovery which only affects the offending userspace context, and no other userspace submissions. h]h)}(hX Fences must complete in a reasonable time. Fences which represent kernels and shaders submitted by userspace, which could run forever, must be backed up by timeout and gpu hang recovery code. Minimally that code must prevent further command submission and force complete all in-flight fences, e.g. when the driver or hardware do not support gpu reset, or if the gpu reset failed for some reason. Ideally the driver supports gpu recovery which only affects the offending userspace context, and no other userspace submissions.h]hX Fences must complete in a reasonable time. Fences which represent kernels and shaders submitted by userspace, which could run forever, must be backed up by timeout and gpu hang recovery code. Minimally that code must prevent further command submission and force complete all in-flight fences, e.g. when the driver or hardware do not support gpu reset, or if the gpu reset failed for some reason. Ideally the driver supports gpu recovery which only affects the offending userspace context, and no other userspace submissions.}(hjɬhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKHhjŬubah}(h]h ]h"]h$]h&]uh1hhj¬ubh)}(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:174: ./drivers/dma-buf/dma-fence.chKQhjެubah}(h]h ]h"]h$]h&]uh1hhj¬ubh)}(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:174: ./drivers/dma-buf/dma-fence.chKWhjubah}(h]h ]h"]h$]h&]uh1hhj¬ubh)}(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:174: ./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&]uh1hhj¬ubh)}(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 }(hjPhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hjZh]hshrinker}(hj\hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKahjPubhe callbacks. This means any code required for fence completion cannot allocate memory with GFP_KERNEL.}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjwhKahjLubah}(h]h ]h"]h$]h&]uh1hhj¬ubh)}(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 }(hjhhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hjh]h mmu_notifier}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKehjubh respectively }(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_notifieruh1hhjhKehjubh 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.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKehjubah}(h]h ]h"]h$]h&]uh1hhj¬ubeh}(h]h ]h"]h$]h&]j>j uh1hhj׬hKHhjhhubh)}(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:174: ./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)}(hj>h]h dma_fence}(hj@hhhNhNubah}(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&]uh1hhjhKjhjhhubeh}(h]dma-fence-cross-driver-contractah ]h"]dma fence cross-driver contractah$]h&]uh1hhjժhhhhhKubh)}(hhh](h)}(h DMA Fence Signalling Annotationsh]h DMA Fence Signalling Annotations}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhhhhhKubh)}(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)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhj~ubh= through code review and testing is tricky for a few reasons:}(hj~hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjmhhubh)}(hhh](h)}(hXIt is a cross-driver contract, and therefore all drivers must follow the same rules for lock nesting order, calling contexts for various functions and anything else significant for in-kernel interfaces. But it is also impossible to test all drivers in a single machine, hence brute-force N vs. N testing of all combinations is impossible. Even just limiting to the possible combinations is infeasible. h]h)}(hXIt is a cross-driver contract, and therefore all drivers must follow the same rules for lock nesting order, calling contexts for various functions and anything else significant for in-kernel interfaces. But it is also impossible to test all drivers in a single machine, hence brute-force N vs. N testing of all combinations is impossible. Even just limiting to the possible combinations is infeasible.h]hXIt is a cross-driver contract, and therefore all drivers must follow the same rules for lock nesting order, calling contexts for various functions and anything else significant for in-kernel interfaces. But it is also impossible to test all drivers in a single machine, hence brute-force N vs. N testing of all combinations is impossible. Even just limiting to the possible combinations is infeasible.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXThere is an enormous amount of driver code involved. For render drivers there's the tail of command submission, after fences are published, scheduler code, interrupt and workers to process job completion, and timeout, gpu reset and gpu hang recovery code. Plus for integration with core mm with have :c:type:`mmu_notifier`, respectively :c:type:`mmu_interval_notifier`, and :c:type:`shrinker`. For modesetting drivers there's the commit tail functions between when fences for an atomic modeset are published, and when the corresponding vblank completes, including any interrupt processing and related workers. Auditing all that code, across all drivers, is not feasible. h]h)}(hXThere is an enormous amount of driver code involved. For render drivers there's the tail of command submission, after fences are published, scheduler code, interrupt and workers to process job completion, and timeout, gpu reset and gpu hang recovery code. Plus for integration with core mm with have :c:type:`mmu_notifier`, respectively :c:type:`mmu_interval_notifier`, and :c:type:`shrinker`. For modesetting drivers there's the commit tail functions between when fences for an atomic modeset are published, and when the corresponding vblank completes, including any interrupt processing and related workers. Auditing all that code, across all drivers, is not feasible.h](hX.There is an enormous amount of driver code involved. For render drivers there’s the tail of command submission, after fences are published, scheduler code, interrupt and workers to process job completion, and timeout, gpu reset and gpu hang recovery code. Plus for integration with core mm with have }(hjЮhhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hjڮh]h mmu_notifier}(hjܮhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjخubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjЮubh, respectively }(hjЮhhhNhNubh)}(h:c:type:`mmu_interval_notifier`h]j)}(hjh]hmmu_interval_notifier}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmmu_interval_notifieruh1hhjhKhjЮubh, and }(hjЮhhhNhNubh)}(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 refexplicitrefwarnjjjshrinkeruh1hhjhKhjЮubhX. 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.}(hjЮhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhj̮ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXDue to how many other subsystems are involved and the locking hierarchies this pulls in there is extremely thin wiggle-room for driver-specific differences. :c:type:`dma_fence` interacts with almost all of the core memory handling through page fault handlers via :c:type:`dma_resv`, dma_resv_lock() and dma_resv_unlock(). On the other side it also interacts through all allocation sites through :c:type:`mmu_notifier` and :c:type:`shrinker`. h]h)}(hXDue to how many other subsystems are involved and the locking hierarchies this pulls in there is extremely thin wiggle-room for driver-specific differences. :c:type:`dma_fence` interacts with almost all of the core memory handling through page fault handlers via :c:type:`dma_resv`, dma_resv_lock() and dma_resv_unlock(). On the other side it also interacts through all allocation sites through :c:type:`mmu_notifier` and :c:type:`shrinker`.h](hDue to how many other subsystems are involved and the locking hierarchies this pulls in there is extremely thin wiggle-room for driver-specific differences. }(hjRhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hj\h]h dma_fence}(hj^hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjRubhW interacts with almost all of the core memory handling through page fault handlers via }(hjRhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjh]hdma_resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hhjyhKhjRubhr, dma_resv_lock() and dma_resv_unlock(). On the other side it also interacts through all allocation sites through }(hjRhhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hjh]h mmu_notifier}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hhjyhKhjRubh and }(hjRhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hjƯh]hshrinker}(hjȯhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjįubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hhjyhKhjRubh.}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjyhKhjNubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j uh1hhjŮhKhjmhhubh)}(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}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjubh while holding a lock:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hKhjmhhubj)}(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:180: ./drivers/dma-buf/dma-fence.chKhjmhhubh)}(hwhile the other thread is stuck trying to acquire the same lock, which prevents it from signalling the fence the previous thread is stuck waiting on::h]hwhile the other thread is stuck trying to acquire the same lock, which prevents it from signalling the fence the previous thread is stuck waiting on:}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjmhhubj)}(h(lock(A); unlock(A); dma_fence_signal(B);h]h(lock(A); unlock(A); dma_fence_signal(B);}hjIsbah}(h]h ]h"]h$]h&]jjuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjmhhubh)}(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 }(hjXhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjbh]h dma_fence}(hjdhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjXubh we can teach lockdep about these dependencies, which also helps with the validation headache since now lockdep can check all the rules for us:}(hjXhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjmhhubj)}(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);}hjsbah}(h]h ]h"]h$]h&]jjuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjmhhubh)}(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:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjmhhubh)}(hhh](h)}(hXgAll code necessary to complete a :c:type:`dma_fence` must be annotated, from the point where a fence is accessible to other threads, to the point where dma_fence_signal() is called. Un-annotated code can contain deadlock issues, and due to the very strict rules and many corner cases it is infeasible to catch these just with review or normal stress testing. h]h)}(hXfAll code necessary to complete a :c:type:`dma_fence` must be annotated, from the point where a fence is accessible to other threads, to the point where dma_fence_signal() is called. Un-annotated code can contain deadlock issues, and due to the very strict rules and many corner cases it is infeasible to catch these just with review or normal stress testing.h](h!All code necessary to complete a }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjubhX2 must be annotated, from the point where a fence is accessible to other threads, to the point where dma_fence_signal() is called. Un-annotated code can contain deadlock issues, and due to the very strict rules and many corner cases it is infeasible to catch these just with review or normal stress testing.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjְhKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h:c:type:`struct dma_resv ` deserves a special note, since the readers are only protected by rcu. This means the signalling critical section starts as soon as the new fences are installed, even before dma_resv_unlock() is called. h]h)}(h:c:type:`struct dma_resv ` deserves a special note, since the readers are only protected by rcu. This means the signalling critical section starts as soon as the new fences are installed, even before dma_resv_unlock() is called.h](h)}(h$:c:type:`struct dma_resv `h]j)}(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:180: ./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&]uh1hhjubh)}(hXqThe only exception are fast paths and opportunistic signalling code, which calls dma_fence_signal() purely as an optimization, but is not required to guarantee completion of a :c:type:`dma_fence`. The usual example is a wait IOCTL which calls dma_fence_signal(), while the mandatory completion path goes through a hardware interrupt and possible job completion worker. h]h)}(hXpThe only exception are fast paths and opportunistic signalling code, which calls dma_fence_signal() purely as an optimization, but is not required to guarantee completion of a :c:type:`dma_fence`. The usual example is a wait IOCTL which calls dma_fence_signal(), while the mandatory completion path goes through a hardware interrupt and possible job completion worker.h](hThe only exception are fast paths and opportunistic signalling code, which calls dma_fence_signal() purely as an optimization, but is not required to guarantee completion of a }(hj#hhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hj-h]h dma_fence}(hj/hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.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&]uh1hhjJhMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hXMTo aid composability of code, the annotations can be freely nested, as long as the overall locking hierarchy is consistent. The annotations also work both in interrupt and process context. Due to implementation details this requires that callers pass an opaque cookie from dma_fence_begin_signalling() to dma_fence_end_signalling(). h]h)}(hXLTo aid composability of code, the annotations can be freely nested, as long as the overall locking hierarchy is consistent. The annotations also work both in interrupt and process context. Due to implementation details this requires that callers pass an opaque cookie from dma_fence_begin_signalling() to dma_fence_end_signalling().h]hXLTo aid composability of code, the annotations can be freely nested, as long as the overall locking hierarchy is consistent. The annotations also work both in interrupt and process context. Due to implementation details this requires that callers pass an opaque cookie from dma_fence_begin_signalling() to dma_fence_end_signalling().}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chM hj[ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hX'Validation against the cross driver contract is implemented by priming lockdep with the relevant hierarchy at boot-up. This means even just testing with a single device is enough to validate a driver, at least as far as deadlocks with dma_fence_wait() against dma_fence_signal() are concerned. h]h)}(hX%Validation against the cross driver contract is implemented by priming lockdep with the relevant hierarchy at boot-up. This means even just testing with a single device is enough to validate a driver, at least as far as deadlocks with dma_fence_wait() against dma_fence_signal() are concerned.h]hX%Validation against the cross driver contract is implemented by priming lockdep with the relevant hierarchy at boot-up. This means even just testing with a single device is enough to validate a driver, at least as far as deadlocks with dma_fence_wait() against dma_fence_signal() are concerned.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chMhjtubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j uh1hhjְhKhjmhhubeh}(h] dma-fence-signalling-annotationsah ]h"] dma fence signalling annotationsah$]h&]uh1hhjժhhhhhKubh)}(hhh](h)}(hDMA Fence Deadline Hintsh]hDMA Fence Deadline Hints}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hX`In an ideal world, it would be possible to pipeline a workload sufficiently that a utilization based device frequency governor could arrive at a minimum frequency that meets the requirements of the use-case, in order to minimize power consumption. But in the real world there are many workloads which defy this ideal. For example, but not limited to:h]hX`In an ideal world, it would be possible to pipeline a workload sufficiently that a utilization based device frequency governor could arrive at a minimum frequency that meets the requirements of the use-case, in order to minimize power consumption. But in the real world there are many workloads which defy this ideal. For example, but not limited to:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhjhhubh)}(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.}(hj±hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(hX}Workloads that interact with a periodic time based deadline, such as double buffered GPU rendering vs vblank sync'd page flipping. In this scenario, missing a vblank deadline results in an *increase* in idle time on the GPU (since it has to wait an additional vblank period), sending a signal to the GPU's devfreq to reduce frequency, when in fact the opposite is what is needed. h]h)}(hX|Workloads that interact with a periodic time based deadline, such as double buffered GPU rendering vs vblank sync'd page flipping. In this scenario, missing a vblank deadline results in an *increase* in idle time on the GPU (since it has to wait an additional vblank period), sending a signal to the GPU's devfreq to reduce frequency, when in fact the opposite is what is needed.h](hWorkloads that interact with a periodic time based deadline, such as double buffered GPU rendering vs vblank sync’d page flipping. In this scenario, missing a vblank deadline results in an }(hj۱hhhNhNubjH)}(h *increase*h]hincrease}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhj۱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:186: ./drivers/dma-buf/dma-fence.chMhjױubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j>j uh1hhjбhMhjhhubh)}(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:186: ./drivers/dma-buf/dma-fence.chMhjubh via }(hjhhhNhNubh)}(h :c:type:`dma_fence_set_deadline`h]j)}(hj6h]hdma_fence_set_deadline}(hj8hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj4ubah}(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)}(hjYh]hsync_set_deadline}(hj[hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjWubah}(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/hMhjhhubh)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhjhhubh)}(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 }(hjhhhNhNubh)}(h4:c:type:`dma_fence_ops.set_deadline `h]j)}(hjh]hdma_fence_ops.set_deadline}(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:186: ./drivers/dma-buf/dma-fence.chMhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjhhubh)}(hThe deadline hint is just that, a hint. The driver that created the fence may react by increasing frequency, making different scheduling choices, etc. Or doing nothing at all.h]hThe deadline hint is just that, a hint. The driver that created the fence may react by increasing frequency, making different scheduling choices, etc. Or doing nothing at all.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhjhhubeh}(h]dma-fence-deadline-hintsah ]h"]dma fence deadline hintsah$]h&]uh1hhjժhhhhhKubh)}(hhh](h)}(hDMA Fences Functions Referenceh]hDMA Fences Functions Reference}(hj۲hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjزhhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_get_stub (C function)c.dma_fence_get_stubhNtauh1j hjزhhhNhNubj )}(hhh](j )}(h,struct dma_fence * dma_fence_get_stub (void)h]j )}(h*struct dma_fence *dma_fence_get_stub(void)h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chK}ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhK}ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj#modnameN classnameNjj)}j]jN)}jFdma_fence_get_stubsbc.dma_fence_get_stubasbuh1hhjhhhjhK}ubj )}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhK}ubjc)}(hj h]h*}(hjPhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjhhhjhK}ubj )}(hdma_fence_get_stubh]j )}(hj?h]hdma_fence_get_stub}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhK}ubj)}(h(void)h]j)}(hvoidh]jK)}(hvoidh]hvoid}(hj|hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjxubah}(h]h ]h"]h$]h&]noemphjjuh1jhjtubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhK}ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhK}ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhK}hjhhubj@ )}(hhh]h)}(hreturn a signaled fenceh]hreturn a signaled fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chK}hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhK}ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(h**Parameters** ``void`` no arguments **Description** Return a stub fence which is already signaled. The fence's timestamp corresponds to the first time after boot this function is called.h](h)}(h**Parameters**h]jq )}(hjȳh]h Parameters}(hjʳhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjƳubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhj³ubj )}(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:192: ./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 hjhKhj޳ubah}(h]h ]h"]h$]h&]uh1j hj³ubh)}(h**Description**h]jq )}(hj"h]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhj³ubh)}(hReturn a stub fence which is already signaled. The fence's timestamp corresponds to the first time after boot this function is called.h]hReturn a stub fence which is already signaled. The fence’s timestamp corresponds to the first time after boot this function is called.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chK~hj³ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j ,dma_fence_allocate_private_stub (C function)!c.dma_fence_allocate_private_stubhNtauh1j hjزhhhNhNubj )}(hhh](j )}(hFstruct dma_fence * dma_fence_allocate_private_stub (ktime_t timestamp)h]j )}(hDstruct dma_fence *dma_fence_allocate_private_stub(ktime_t timestamp)h](j )}(hj h]hstruct}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjchhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKubj )}(h h]h }(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjchhhjthKubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_fence_allocate_private_stubsb!c.dma_fence_allocate_private_stubasbuh1hhjchhhjthKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjchhhjthKubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjchhhjthKubj )}(hdma_fence_allocate_private_stubh]j )}(hjh]hdma_fence_allocate_private_stub}(hjƴhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj´ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjchhhjthKubj)}(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&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]j!c.dma_fence_allocate_private_stubasbuh1hhjݴubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjݴubj )}(h timestamph]h timestamp}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjݴubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjٴubah}(h]h ]h"]h$]h&]jjuh1jhjchhhjthKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj_hhhjthKubah}(h]jZah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjthKhj\hhubj@ )}(hhh]h)}(h return a private, signaled fenceh]h return a private, signaled fence}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhj7hhubah}(h]h ]h"]h$]h&]uh1j? hj\hhhjthKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jRjb jRjc jd je uh1j hhhjزhNhNubjg )}(h**Parameters** ``ktime_t timestamp`` timestamp when the fence was signaled **Description** Return a newly allocated and signaled stub fence.h](h)}(h**Parameters**h]jq )}(hj\h]h Parameters}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjZubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjVubj )}(hhh]j )}(h<``ktime_t timestamp`` timestamp when the fence was signaled h](j )}(h``ktime_t timestamp``h]j)}(hj{h]hktime_t timestamp}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjuubj )}(hhh]h)}(h%timestamp when the fence was signaledh]h%timestamp when the fence was signaled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjuubeh}(h]h ]h"]h$]h&]uh1j hjhKhjrubah}(h]h ]h"]h$]h&]uh1j hjVubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjVubh)}(h1Return a newly allocated and signaled stub fence.h]h1Return a newly allocated and signaled stub fence.}(hj̵hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjVubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_fence_context_alloc (C function)c.dma_fence_context_allochNtauh1j hjزhhhNhNubj )}(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&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_fence_context_allocsbc.dma_fence_context_allocasbuh1hhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubj )}(hdma_fence_context_alloch]j )}(hjh]hdma_fence_context_alloc}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKubj)}(h(unsigned num)h]j)}(h unsigned numh](jK)}(hunsignedh]hunsigned}(hjMhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjIubj )}(h h]h }(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjIubj )}(hnumh]hnum}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjIubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjEubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjhhubj@ )}(hhh]h)}(h#allocate an array of fence contextsh]h#allocate an array of fence contexts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX6**Parameters** ``unsigned num`` amount of contexts to allocate **Description** This function will return the first index of the number of fence contexts allocated. The fence context is used for setting :c:type:`dma_fence.context ` to a unique number by passing the context to dma_fence_init().h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]j )}(h0``unsigned num`` amount of contexts to allocate h](j )}(h``unsigned num``h]j)}(hjԶh]h unsigned num}(hjֶhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjҶubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjζubj )}(hhh]h)}(hamount of contexts to allocateh]hamount of contexts to allocate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjζubeh}(h]h ]h"]h$]h&]uh1j hjhKhj˶ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubh)}(hThis function will return the first index of the number of fence contexts allocated. The fence context is used for setting :c:type:`dma_fence.context ` to a unique number by passing the context to dma_fence_init().h](h|This function will return the first index of the number of fence contexts allocated. The fence context is used for setting }(hj%hhhNhNubh)}(h':c:type:`dma_fence.context `h]j)}(hj/h]hdma_fence.context}(hj1hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhj%ubh? to a unique number by passing the context to dma_fence_init().}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjLhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_begin_signalling (C function)c.dma_fence_begin_signallinghNtauh1j hjزhhhNhNubj )}(hhh](j )}(h&bool dma_fence_begin_signalling (void)h]j )}(h%bool dma_fence_begin_signalling(void)h](jK)}(hj^h]hbool}(hjwhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjshhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM!ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjshhhjhM!ubj )}(hdma_fence_begin_signallingh]j )}(hdma_fence_begin_signallingh]hdma_fence_begin_signalling}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjshhhjhM!ubj)}(h(void)h]j)}(hvoidh]jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubah}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjshhhjhM!ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjohhhjhM!ubah}(h]jjah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhM!hjlhhubj@ )}(hhh]h)}(h-begin a critical DMA fence signalling sectionh]h-begin a critical DMA fence signalling section}(hjݷhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM!hjڷhhubah}(h]h ]h"]h$]h&]uh1j? hjlhhhjhM!ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(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]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM%hjubj )}(hhh]j )}(h``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:192: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]h)}(h no argumentsh]h no arguments}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hKhj4ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj3hKhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjYh]h Description}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjWubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./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 }(hjohhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjyh]h dma_fence}(hj{hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM"hjoubh by calling dma_fence_signal().}(hjohhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM"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().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./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().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM(hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j %dma_fence_end_signalling (C function)c.dma_fence_end_signallinghNtauh1j hjزhhhNhNubj )}(hhh](j )}(h+void dma_fence_end_signalling (bool cookie)h]j )}(h*void dma_fence_end_signalling(bool cookie)h](jK)}(hvoidh]hvoid}(hj߸hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj۸hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM@ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj۸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&]jjuh1j hj۸hhhjhM@ubj)}(h (bool cookie)h]j)}(h bool cookieh](jK)}(hj^h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hcookieh]hcookie}(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj۸hhhjhM@ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj׸hhhjhM@ubah}(h]jҸah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhM@hjԸhhubj@ )}(hhh]h)}(h+end a critical DMA fence signalling sectionh]h+end a critical DMA fence signalling section}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM@hj^hhubah}(h]h ]h"]h$]h&]uh1j? hjԸhhhjhM@ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jyjb jyjc jd je uh1j hhhjزhNhNubjg )}(h**Parameters** ``bool cookie`` opaque cookie from dma_fence_begin_signalling() **Description** Closes a critical section annotation opened by dma_fence_begin_signalling().h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMDhj}ubj )}(hhh]j )}(h@``bool cookie`` opaque cookie from dma_fence_begin_signalling() h](j )}(h``bool cookie``h]j)}(hjh]h bool cookie}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMAhjubj )}(hhh]h)}(h/opaque cookie from dma_fence_begin_signalling()h]h/opaque cookie from dma_fence_begin_signalling()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMAhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMAhjubah}(h]h ]h"]h$]h&]uh1j hj}ubh)}(h**Description**h]jq )}(hjݹh]h Description}(hj߹hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj۹ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMChj}ubh)}(hLCloses a critical section annotation opened by dma_fence_begin_signalling().h]hLCloses a critical section annotation opened by dma_fence_begin_signalling().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMChj}ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j .dma_fence_signal_timestamp_locked (C function)#c.dma_fence_signal_timestamp_lockedhNtauh1j hjزhhhNhNubj )}(hhh](j )}(hRint dma_fence_signal_timestamp_locked (struct dma_fence *fence, ktime_t timestamp)h]j )}(hQint dma_fence_signal_timestamp_locked(struct dma_fence *fence, ktime_t timestamp)h](jK)}(hinth]hint}(hj"hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM^ubj )}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj0hM^ubj )}(h!dma_fence_signal_timestamp_lockedh]j )}(h!dma_fence_signal_timestamp_lockedh]h!dma_fence_signal_timestamp_locked}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhj0hM^ubj)}(h,(struct dma_fence *fence, ktime_t timestamp)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj[ubj )}(h h]h }(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj[ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjEsb#c.dma_fence_signal_timestamp_lockedasbuh1hhj[ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj[ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj[ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWubj)}(hktime_t timestamph](h)}(hhh]j )}(hktime_th]hktime_t}(hjԺhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjѺubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjֺmodnameN classnameNjj)}j]j#c.dma_fence_signal_timestamp_lockedasbuh1hhjͺubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjͺubj )}(h timestamph]h timestamp}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjͺubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj0hM^ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhj0hM^ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj0hM^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:192: ./drivers/dma-buf/dma-fence.chM^hj'hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj0hM^ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jBjb jBjc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to signal ``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain **Description** Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp. Unlike dma_fence_signal_timestamp(), this function must be called with :c:type:`dma_fence.lock ` held. Returns 0 on success and a negative error value when **fence** has been signalled already.h](h)}(h**Parameters**h]jq )}(hjLh]h Parameters}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjJubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMbhjFubj )}(hhh](j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hjkh]hstruct dma_fence *fence}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM_hjeubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM_hjubah}(h]h ]h"]h$]h&]uh1j hjeubeh}(h]h ]h"]h$]h&]uh1j hjhM_hjbubj )}(hU``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain h](j )}(h``ktime_t timestamp``h]j)}(hjh]hktime_t timestamp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM`hjubj )}(hhh]h)}(h>fence signal timestamp in kernel's CLOCK_MONOTONIC time domainh]h@fence signal timestamp in kernel’s CLOCK_MONOTONIC time domain}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM`hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM`hjbubeh}(h]h ]h"]h$]h&]uh1j hjFubh)}(h**Description**h]jq )}(hj߻h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjݻubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMbhjFubh)}(hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.h]hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMbhjFubh)}(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&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMihjubh held.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj+hMihjFubh)}(hZReturns 0 on success and a negative error value when **fence** has been signalled already.h](h5Returns 0 on success and a negative error value when }(hj6hhhNhNubjq )}(h **fence**h]hfence}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj6ubh has been signalled already.}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMlhjFubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_signal_timestamp (C function)c.dma_fence_signal_timestamphNtauh1j hjزhhhNhNubj )}(hhh](j )}(hKint dma_fence_signal_timestamp (struct dma_fence *fence, ktime_t timestamp)h]j )}(hJint dma_fence_signal_timestamp(struct dma_fence *fence, ktime_t timestamp)h](jK)}(hinth]hint}(hjwhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjshhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjshhhjhMubj )}(hdma_fence_signal_timestamph]j )}(hdma_fence_signal_timestamph]hdma_fence_signal_timestamp}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjshhhjhMubj)}(h,(struct dma_fence *fence, ktime_t timestamp)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjҼhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjϼubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjԼmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_signal_timestampasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hktime_t timestamph](h)}(hhh]j )}(hktime_th]hktime_t}(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj+modnameN classnameNjj)}j]jc.dma_fence_signal_timestampasbuh1hhj"ubj )}(h h]h }(hjGhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubj )}(h timestamph]h timestamp}(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjshhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjohhhjhMubah}(h]jjah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjlhhubj@ )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj|hhubah}(h]h ]h"]h$]h&]uh1j? hjlhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX|**Parameters** ``struct dma_fence *fence`` the fence to signal ``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain **Description** Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp. Returns 0 on success and a negative error value when **fence** has been signalled already.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh](j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hj½hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to signalh]hthe fence to 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սhMhjubj )}(hU``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain h](j )}(h``ktime_t timestamp``h]j)}(hjh]hktime_t timestamp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(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 hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj4h]h Description}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj2ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.h]hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hZReturns 0 on success and a negative error value when **fence** has been signalled already.h](h5Returns 0 on success and a negative error value when }(hjYhhhNhNubjq )}(h **fence**h]hfence}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjYubh has been signalled already.}(hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_fence_signal_locked (C function)c.dma_fence_signal_lockedhNtauh1j hjزhhhNhNubj )}(hhh](j )}(h5int dma_fence_signal_locked (struct dma_fence *fence)h]j )}(h4int dma_fence_signal_locked(struct dma_fence *fence)h](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_signal_lockedh]j )}(hdma_fence_signal_lockedh]hdma_fence_signal_locked}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj׾hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjӾubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjӾubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_signal_lockedasbuh1hhjӾubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjӾubjc)}(hj h]h*}(hj#hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjӾubj )}(hfenceh]hfence}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjӾubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjϾubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjWhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jrjb jrjc jd je uh1j hhhjزhNhNubjg )}(hXS**Parameters** ``struct dma_fence *fence`` the fence to signal **Description** Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Unlike dma_fence_signal(), this function must be called with :c:type:`dma_fence.lock ` held. Returns 0 on success and a negative error value when **fence** has been signalled already.h](h)}(h**Parameters**h]jq )}(hj|h]h Parameters}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjzubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjvubj )}(hhh]j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjvubh)}(h**Description**h]jq )}(hjֿh]h Description}(hjؿhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjԿubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjvubh)}(hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.h]hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjvubh)}(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 }(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:192: ./drivers/dma-buf/dma-fence.chMhjubh held.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj"hMhjvubh)}(hZReturns 0 on success and a negative error value when **fence** has been signalled already.h](h5Returns 0 on success and a negative error value when }(hj-hhhNhNubjq )}(h **fence**h]hfence}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj-ubh has been signalled already.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjvubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_signal (C function)c.dma_fence_signalhNtauh1j hjزhhhNhNubj )}(hhh](j )}(h.int dma_fence_signal (struct dma_fence *fence)h]j )}(h-int dma_fence_signal(struct dma_fence *fence)h](jK)}(hinth]hint}(hjnhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjhhhj|hMubj )}(hdma_fence_signalh]j )}(hdma_fence_signalh]hdma_fence_signal}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjjhhhj|hMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_signalasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjjhhhj|hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjfhhhj|hMubah}(h]jaah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj|hMhjchhubj@ )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj+hhubah}(h]h ]h"]h$]h&]uh1j? hjchhhj|hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jFjb jFjc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to signal **Description** Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Returns 0 on success and a negative error value when **fence** has been signalled already.h](h)}(h**Parameters**h]jq )}(hjPh]h Parameters}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjJubj )}(hhh]j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hjoh]hstruct dma_fence *fence}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjiubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjiubeh}(h]h ]h"]h$]h&]uh1j hjhMhjfubah}(h]h ]h"]h$]h&]uh1j hjJubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjJubh)}(hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.h]hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjJubh)}(hZReturns 0 on success and a negative error value when **fence** has been signalled already.h](h5Returns 0 on success and a negative error value when }(hjhhhNhNubjq )}(h **fence**h]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh has been signalled already.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjJubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_wait_timeout (C function)c.dma_fence_wait_timeouthNtauh1j hjزhhhNhNubj )}(hhh](j )}(h\signed long dma_fence_wait_timeout (struct dma_fence *fence, bool intr, signed long timeout)h]j )}(h[signed long dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout)h](jK)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhjhMubjK)}(hlongh]hlong}(hj-hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj hhhjhMubj )}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhjhMubj )}(hdma_fence_wait_timeouth]j )}(hdma_fence_wait_timeouth]hdma_fence_wait_timeout}(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjIubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj hhhjhMubj)}(h9(struct dma_fence *fence, bool intr, signed long timeout)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubj )}(h h]h }(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjOsbc.dma_fence_wait_timeoutasbuh1hhjeubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjeubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjaubj)}(h bool intrh](jK)}(hj^h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hintrh]hintr}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjaubj)}(hsigned long timeouth](jK)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjK)}(hlongh]hlong}(hj+hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj ubj )}(h h]h }(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(htimeouth]htimeout}(hjGhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjaubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h huh1j hjhM hjhhubj@ )}(hhh]h)}(h#default release function for fencesh]h#default release function for fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhM ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(h**Parameters** ``struct kref *kref`` :c:type:`dma_fence.recfount ` **Description** This is the default release functions for :c:type:`dma_fence`. Drivers shouldn't call this directly, but instead call dma_fence_put().h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h?``struct kref *kref`` :c:type:`dma_fence.recfount ` h](j )}(h``struct kref *kref``h]j)}(hjh]hstruct kref *kref}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h(:c:type:`dma_fence.recfount `h]h)}(hjh]j)}(hjh]hdma_fence.recfount}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(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 }(hj.hhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hj8h]h dma_fence}(hj:hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj.ubhK. Drivers shouldn’t call this directly, but instead call dma_fence_put().}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjUhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_free (C function)c.dma_fence_freehNtauh1j hjزhhhNhNubj )}(hhh](j )}(h-void dma_fence_free (struct dma_fence *fence)h]j )}(h,void dma_fence_free(struct dma_fence *fence)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj|hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM7ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|hhhjhM7ubj )}(hdma_fence_freeh]j )}(hdma_fence_freeh]hdma_fence_free}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj|hhhjhM7ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_freeasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj|hhhjhM7ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjxhhhjhM7ubah}(h]jsah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhM7hjuhhubj@ )}(hhh]h)}(h1default release function for :c:type:`dma_fence`.h](hdefault release function for }(hj@hhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjJh]h dma_fence}(hjLhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjj)}j]jc.dma_fence_freeasbj dma_fenceuh1hhjhK}hj@ubh.}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM7hj=hhubah}(h]h ]h"]h$]h&]uh1j? hjuhhhjhM7ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` fence to release **Description** This is the default implementation for :c:type:`dma_fence_ops.release `. It calls kfree_rcu() on **fence**.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM;hjubj )}(hhh]j )}(h-``struct dma_fence *fence`` fence to release h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM8hjubj )}(hhh]h)}(hfence to releaseh]hfence to release}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM8hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM8hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM:hjubh)}(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:192: ./drivers/dma-buf/dma-fence.chM:hjubh. It calls kfree_rcu() on }(hjhhhNhNubjq )}(h **fence**h]hfence}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj!hM:hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j *dma_fence_enable_sw_signaling (C function)c.dma_fence_enable_sw_signalinghNtauh1j hjزhhhNhNubj )}(hhh](j )}(h huh1j hjlhM\hjShhubj@ )}(hhh]h)}(henable signaling on fenceh]henable signaling on fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM\hjhhubah}(h]h ]h"]h$]h&]uh1j? hjShhhjlhM\ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j6jb j6jc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to enable **Description** This will request for sw signaling to be enabled, to make the fence complete as soon as possible. This calls :c:type:`dma_fence_ops.enable_signaling ` internally.h](h)}(h**Parameters**h]jq )}(hj@h]h Parameters}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj>ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM`hj:ubj )}(hhh]j )}(h0``struct dma_fence *fence`` the fence to enable h](j )}(h``struct dma_fence *fence``h]j)}(hj_h]hstruct dma_fence *fence}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM]hjYubj )}(hhh]h)}(hthe fence to enableh]hthe fence to enable}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthM]hjuubah}(h]h ]h"]h$]h&]uh1j hjYubeh}(h]h ]h"]h$]h&]uh1j hjthM]hjVubah}(h]h ]h"]h$]h&]uh1j hj:ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM_hj:ubh)}(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 }(hjhhhNhNubh)}(h8:c:type:`dma_fence_ops.enable_signaling `h]j)}(hjh]hdma_fence_ops.enable_signaling}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM_hjubh internally.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM_hj:ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_add_callback (C function)c.dma_fence_add_callbackhNtauh1j hjزhhhNhNubj )}(hhh](j )}(hdint dma_fence_add_callback (struct dma_fence *fence, struct dma_fence_cb *cb, dma_fence_func_t func)h]j )}(hcint dma_fence_add_callback(struct dma_fence *fence, struct dma_fence_cb *cb, dma_fence_func_t func)h](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMnubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMnubj )}(hdma_fence_add_callbackh]j )}(hdma_fence_add_callbackh]hdma_fence_add_callback}(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMnubj)}(hI(struct dma_fence *fence, struct dma_fence_cb *cb, dma_fence_func_t func)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubj )}(h h]h }(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj_modnameN classnameNjj)}j]jN)}jFj%sbc.dma_fence_add_callbackasbuh1hhj;ubj )}(h h]h }(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj;ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj7ubj)}(hstruct dma_fence_cb *cbh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fence_cbh]h dma_fence_cb}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jyc.dma_fence_add_callbackasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hcbh]hcb}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj7ubj)}(hdma_fence_func_t funch](h)}(hhh]j )}(hdma_fence_func_th]hdma_fence_func_t}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj&modnameN classnameNjj)}j]jyc.dma_fence_add_callbackasbuh1hhjubj )}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hfunch]hfunc}(hjPhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj7ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMnubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMnubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMnhjhhubj@ )}(hhh]h)}(h6add a callback to be called when the fence is signaledh]h6add a callback to be called when the fence is signaled}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMnhjwhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMnubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to wait on ``struct dma_fence_cb *cb`` the callback to register ``dma_fence_func_t func`` the function to call **Description** Add a software callback to the fence. The caller should keep a reference to the fence. **cb** will be initialized by dma_fence_add_callback(), no initialization by the caller is required. Any number of callbacks can be registered to a fence, but a callback can only be registered to one fence at a time. If fence is already signaled, this function will return -ENOENT (and *not* call the callback). Note that the callback can be called from an atomic context or irq context. Returns 0 in case of success, -ENOENT if the fence is already signaled and -EINVAL in case of error.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMrhjubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMphjubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMphjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMphjubj )}(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:192: ./drivers/dma-buf/dma-fence.chMqhjubj )}(hhh]h)}(hthe callback to registerh]hthe callback to register}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMqhj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj hMqhjubj )}(h/``dma_fence_func_t func`` the function to call h](j )}(h``dma_fence_func_t func``h]j)}(hj-h]hdma_fence_func_t func}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMrhj'ubj )}(hhh]h)}(hthe function to callh]hthe function to call}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhMrhjCubah}(h]h ]h"]h$]h&]uh1j hj'ubeh}(h]h ]h"]h$]h&]uh1j hjBhMrhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjhh]h Description}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjfubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMthjubh)}(hVAdd a software callback to the fence. The caller should keep a reference to the fence.h]hVAdd a software callback to the fence. The caller should keep a reference to the fence.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMthjubh)}(h**cb** will be initialized by dma_fence_add_callback(), no initialization by the caller is required. Any number of callbacks can be registered to a fence, but a callback can only be registered to one fence at a time.h](jq )}(h**cb**h]hcb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh will be initialized by dma_fence_add_callback(), no initialization by the caller is required. Any number of callbacks can be registered to a fence, but a callback can only be registered to one fence at a time.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMwhjubh)}(h^If fence is already signaled, this function will return -ENOENT (and *not* call the callback).h](hEIf fence is already signaled, this function will return -ENOENT (and }(hjhhhNhNubjH)}(h*not*h]hnot}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubh call the callback).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM{hjubh)}(hKNote that the callback can be called from an atomic context or irq context.h]hKNote that the callback can be called from an atomic context or irq context.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM~hjubh)}(hdReturns 0 in case of success, -ENOENT if the fence is already signaled and -EINVAL in case of error.h]hdReturns 0 in case of success, -ENOENT if the fence is already signaled and -EINVAL in case of error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_fence_get_status (C function)c.dma_fence_get_statushNtauh1j hjزhhhNhNubj )}(hhh](j )}(h2int dma_fence_get_status (struct dma_fence *fence)h]j )}(h1int dma_fence_get_status(struct dma_fence *fence)h](jK)}(hinth]hint}(hj hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_get_statush]j )}(hdma_fence_get_statush]hdma_fence_get_status}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubj )}(h h]h }(hjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjfmodnameN classnameNjj)}j]jN)}jFj,sbc.dma_fence_get_statusasbuh1hhjBubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjBubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj>ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h"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:192: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the dma_fence to query **Description** This wraps dma_fence_get_status_locked() to return the error status condition on a signaled fence. See dma_fence_get_status_locked() for more details. Returns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h3``struct dma_fence *fence`` the dma_fence to query h](j )}(h``struct dma_fence *fence``h]j)}(hj h]hstruct dma_fence *fence}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe dma_fence to queryh]hthe dma_fence to query}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjEh]h Description}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjCubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./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.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./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.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j &dma_fence_remove_callback (C function)c.dma_fence_remove_callbackhNtauh1j hjزhhhNhNubj )}(hhh](j )}(hQbool dma_fence_remove_callback (struct dma_fence *fence, struct dma_fence_cb *cb)h]j )}(hPbool dma_fence_remove_callback(struct dma_fence *fence, struct dma_fence_cb *cb)h](jK)}(hj^h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_remove_callbackh]j )}(hdma_fence_remove_callbackh]hdma_fence_remove_callback}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h2(struct dma_fence *fence, struct dma_fence_cb *cb)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_remove_callbackasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj!hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence_cb *cbh](j )}(hj h]hstruct}(hjGhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubj )}(h h]h }(hjThhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubh)}(hhh]j )}(h dma_fence_cbh]h dma_fence_cb}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjgmodnameN classnameNjj)}j]jc.dma_fence_remove_callbackasbuh1hhjCubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjCubj )}(hcbh]hcb}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h)remove a callback from the signaling listh]h)remove a callback from the signaling list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to wait on ``struct dma_fence_cb *cb`` the callback to remove **Description** Remove a previously queued callback from the fence. This function returns true if the callback is successfully removed, or false if the fence has already been signaled. *WARNING*: Cancelling a callback should only be done if you really know what you're doing, since deadlocks and race conditions could occur all too easily. For this reason, it should only ever be done on hardware lockup recovery, with a reference held to the fence. Behaviour is undefined if **cb** has not been added to **fence** using dma_fence_add_callback() beforehand.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hj h]hstruct dma_fence *fence}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hj"hhhNhNubah}(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)}(hjBh]hstruct dma_fence_cb *cb}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj<ubj )}(hhh]h)}(hthe callback to removeh]hthe callback to remove}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhMhjXubah}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hjWhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj}h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj{ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./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](jH)}(h *WARNING*h]hWARNING}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jGhjubhX: Cancelling a callback should only be done if you really know what you’re doing, since deadlocks and race conditions could occur all too easily. For this reason, it should only ever be done on hardware lockup recovery, with a reference held to the fence.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hkBehaviour is undefined if **cb** has not been added to **fence** using dma_fence_add_callback() beforehand.h](hBehaviour is undefined if }(hjhhhNhNubjq )}(h**cb**h]hcb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh has not been added to }(hjhhhNhNubjq )}(h **fence**h]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh+ using dma_fence_add_callback() beforehand.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_default_wait (C function)c.dma_fence_default_waithNtauh1j hjزhhhNhNubj )}(hhh](j )}(h\signed long dma_fence_default_wait (struct dma_fence *fence, bool intr, signed long timeout)h]j )}(h[signed long dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)h](jK)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj hMubjK)}(hlongh]hlong}(hj/hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhhj hMubj )}(h h]h }(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj hMubj )}(hdma_fence_default_waith]j )}(hdma_fence_default_waith]hdma_fence_default_wait}(hjOhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjKubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhj hMubj)}(h9(struct dma_fence *fence, bool intr, signed long timeout)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubj )}(h h]h }(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjQsbc.dma_fence_default_waitasbuh1hhjgubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjgubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjcubj)}(h bool intrh](jK)}(hj^h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hintrh]hintr}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjcubj)}(hsigned long timeouth](jK)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjK)}(hlongh]hlong}(hj-hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj ubj )}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(htimeouth]htimeout}(hjIhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjcubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj hhhj hMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj hMhjhhubj@ )}(hhh]h)}(hDdefault sleep until the fence gets signaled or until timeout elapsesh]hDdefault sleep until the fence gets signaled or until timeout elapses}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjphhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to wait on ``bool intr`` if true, do an interruptible wait ``signed long timeout`` timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT **Description** Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success. If timeout is zero the value one is returned if the fence is already signaled for consistency with other functions taking a jiffies timeout.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.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 )}(h0``bool intr`` if true, do an interruptible wait h](j )}(h ``bool intr``h]j)}(hjh]h bool intr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.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 hjhMhjubj )}(hJ``signed long timeout`` timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT h](j )}(h``signed long timeout``h]j)}(hj&h]hsigned long timeout}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj ubj )}(hhh]h)}(h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUTh]h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hMhj<ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj;hMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjah]h Description}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj_ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hReturns -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success. If timeout is zero the value one is returned if the fence is already signaled for consistency with other functions taking a jiffies timeout.h]hReturns -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success. If timeout is zero the value one is returned if the fence is already signaled for consistency with other functions taking a jiffies timeout.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_wait_any_timeout (C function)c.dma_fence_wait_any_timeouthNtauh1j hjزhhhNhNubj )}(hhh](j )}(hsigned long dma_fence_wait_any_timeout (struct dma_fence **fences, uint32_t count, bool intr, signed long timeout, uint32_t *idx)h]j )}(hsigned long dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count, bool intr, signed long timeout, uint32_t *idx)h](jK)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM<ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhM<ubjK)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhhjhM<ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhM<ubj )}(hdma_fence_wait_any_timeouth]j )}(hdma_fence_wait_any_timeouth]hdma_fence_wait_any_timeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhM<ubj)}(hZ(struct dma_fence **fences, uint32_t count, bool intr, signed long timeout, uint32_t *idx)h](j)}(hstruct dma_fence **fencesh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_wait_any_timeoutasbuh1hhjubj )}(h h]h }(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjKhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubjc)}(hj h]h*}(hjXhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfencesh]hfences}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(huint32_t counth](h)}(hhh]j )}(huint32_th]huint32_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]j9c.dma_fence_wait_any_timeoutasbuh1hhjzubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubj )}(hcounth]hcount}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h bool intrh](jK)}(hj^h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hintrh]hintr}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hsigned long timeouth](jK)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjK)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(htimeouth]htimeout}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h uint32_t *idxh](h)}(hhh]j )}(huint32_th]huint32_t}(hjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjKubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjPmodnameN classnameNjj)}j]j9c.dma_fence_wait_any_timeoutasbuh1hhjGubj )}(h h]h }(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjGubjc)}(hj h]h*}(hjzhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjGubj )}(hidxh]hidx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjGubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM<ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhM<ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhM<hjhhubj@ )}(hhh]h)}(hhjubj )}(hhh]h)}(harray of fences to wait onh]harray of fences to wait on}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM>hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM>hjubj )}(h/``uint32_t count`` number of fences to wait on h](j )}(h``uint32_t count``h]j)}(hj+h]huint32_t count}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM?hj%ubj )}(hhh]h)}(hnumber of fences to wait onh]hnumber of fences to wait on}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hM?hjAubah}(h]h ]h"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]uh1j hj@hM?hjubj )}(h0``bool intr`` if true, do an interruptible wait h](j )}(h ``bool intr``h]j)}(hjdh]h bool intr}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM@hj^ubj )}(hhh]h)}(h!if true, do an interruptible waith]h!if true, do an interruptible wait}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhM@hjzubah}(h]h ]h"]h$]h&]uh1j hj^ubeh}(h]h ]h"]h$]h&]uh1j hjyhM@hjubj )}(hJ``signed long timeout`` timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT h](j )}(h``signed long timeout``h]j)}(hjh]hsigned long timeout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMAhjubj )}(hhh]h)}(h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUTh]h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMAhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMAhjubj )}(hc``uint32_t *idx`` used to store the first signaled fence index, meaningful only on positive return h](j )}(h``uint32_t *idx``h]j)}(hjh]h uint32_t *idx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMChjubj )}(hhh]h)}(hPused to store the first signaled fence index, meaningful only on positive returnh]hPused to store the first signaled fence index, meaningful only on positive return}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMBhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMChjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMEhjubh)}(hReturns -EINVAL on custom fence wait implementation, -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success.h]hReturns -EINVAL on custom fence wait implementation, -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMEhjubh)}(hSynchronous waits for the first fence in the array to be signaled. The caller needs to hold a reference to all fences in the array, otherwise a fence might be freed before return, resulting in undefined behavior.h]hSynchronous waits for the first fence in the array to be signaled. The caller needs to hold a reference to all fences in the array, otherwise a fence might be freed before return, resulting in undefined behavior.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMIhjubh)}(h7See also dma_fence_wait() and dma_fence_wait_timeout().h]h7See also dma_fence_wait() and dma_fence_wait_timeout().}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_set_deadline (C function)c.dma_fence_set_deadlinehNtauh1j hjزhhhNhNubj )}(hhh](j )}(hGvoid dma_fence_set_deadline (struct dma_fence *fence, ktime_t deadline)h]j )}(hFvoid dma_fence_set_deadline(struct dma_fence *fence, ktime_t deadline)h](jK)}(hvoidh]hvoid}(hjuhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjqhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqhhhjhMubj )}(hdma_fence_set_deadlineh]j )}(hdma_fence_set_deadlineh]hdma_fence_set_deadline}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjqhhhjhMubj)}(h+(struct dma_fence *fence, ktime_t deadline)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_set_deadlineasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hktime_t deadlineh](h)}(hhh]j )}(hktime_th]hktime_t}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj)modnameN classnameNjj)}j]jc.dma_fence_set_deadlineasbuh1hhj ubj )}(h h]h }(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hdeadlineh]hdeadline}(hjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjqhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjmhhhjhMubah}(h]jhah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjjhhubj@ )}(hhh]h)}(h$set desired fence-wait deadline hinth]h$set desired fence-wait deadline hint}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjzhhubah}(h]h ]h"]h$]h&]uh1j? hjjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence that is to be waited on ``ktime_t deadline`` the time by which the waiter hopes for the fence to be signaled **Description** Give the fence signaler a hint about an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency if a periodic vblank deadline is approaching but the fence is not yet signaled..h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh](j )}(h>``struct dma_fence *fence`` the fence that is to be waited on h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h!the fence that is to be waited onh]h!the fence that is to be waited on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(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:192: ./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:192: ./drivers/dma-buf/dma-fence.chMhj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj hMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj3h]h Description}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj1ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hX]Give the fence signaler a hint about an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency if a periodic vblank deadline is approaching but the fence is not yet signaled..h]hX]Give the fence signaler a hint about an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency if a periodic vblank deadline is approaching but the fence is not yet signaled..}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_describe (C function)c.dma_fence_describehNtauh1j hjزhhhNhNubj )}(hhh](j )}(hGvoid dma_fence_describe (struct dma_fence *fence, struct seq_file *seq)h]j )}(hFvoid dma_fence_describe(struct dma_fence *fence, struct seq_file *seq)h](jK)}(hvoidh]hvoid}(hjxhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjthhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjthhhjhMubj )}(hdma_fence_describeh]j )}(hdma_fence_describeh]hdma_fence_describe}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjthhhjhMubj)}(h/(struct dma_fence *fence, struct seq_file *seq)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_describeasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct seq_file *seqh](j )}(hj h]hstruct}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubj )}(h h]h }(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubh)}(hhh]j )}(hseq_fileh]hseq_file}(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjGmodnameN classnameNjj)}j]jc.dma_fence_describeasbuh1hhj#ubj )}(h h]h }(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubjc)}(hj h]h*}(hjqhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj#ubj )}(hseqh]hseq}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjthhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjphhhjhMubah}(h]jkah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjmhhubj@ )}(hhh]h)}(h$Dump fence description into seq_fileh]h$Dump fence description into seq_file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjmhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` the fence to describe ``struct seq_file *seq`` the seq_file to put the textual description into **Description** Dump a textual description of the fence and it's state into the seq_file.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh](j )}(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:192: ./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 hjhMhjubj )}(hJ``struct seq_file *seq`` the seq_file to put the textual description into h](j )}(h``struct seq_file *seq``h]j)}(hj"h]hstruct seq_file *seq}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h0the seq_file to put the textual description intoh]h0the seq_file to put the textual description into}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMhj8ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj7hMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj]h]h Description}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj[ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(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.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_init (C function)c.dma_fence_inithNtauh1j hjزhhhNhNubj )}(hhh](j )}(hxvoid dma_fence_init (struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h]j )}(hwvoid dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_inith]j )}(hdma_fence_inith]hdma_fence_init}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(hd(struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_initasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj+hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hconst struct dma_fence_ops *opsh](j )}(hjh]hconst}(hjQhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjMubj )}(h h]h }(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjMubj )}(hj h]hstruct}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjMubj )}(h h]h }(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjMubh)}(hhh]j )}(h dma_fence_opsh]h dma_fence_ops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_fence_initasbuh1hhjMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjMubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjMubj )}(hopsh]hops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjMubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(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&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_fence_initasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hlockh]hlock}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj6modnameN classnameNjj)}j]jc.dma_fence_initasbuh1hhj-ubj )}(h h]h }(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubj )}(hcontexth]hcontext}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h u64 seqnoh](h)}(hhh]j )}(hu64h]hu64}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj~modnameN classnameNjj)}j]jc.dma_fence_initasbuh1hhjuubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubj )}(hseqnoh]hseqno}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(hInitialize a custom fence.h]hInitialize a custom fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to initialize ``const struct dma_fence_ops *ops`` the dma_fence_ops for operations on this fence ``spinlock_t *lock`` the irqsafe spinlock to use for locking this fence ``u64 context`` the execution context this fence is run on ``u64 seqno`` a linear increasing sequence number for this context **Description** Initializes an allocated fence, the caller doesn't have to keep its refcount after committing with this fence, but it will need to hold a refcount again if :c:type:`dma_fence_ops.enable_signaling ` gets called. context and seqno are used for easy comparison between fences, allowing to check which fence is later by simply using dma_fence_later().h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh](j )}(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:192: ./drivers/dma-buf/dma-fence.chMhj ubj )}(hhh]h)}(hthe fence to initializeh]hthe fence to initialize}(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 )}(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)}(hjLh]hconst struct dma_fence_ops *ops}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjFubj )}(hhh]h)}(h.the dma_fence_ops for operations on this fenceh]h.the dma_fence_ops for operations on this fence}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahMhjbubah}(h]h ]h"]h$]h&]uh1j hjFubeh}(h]h ]h"]h$]h&]uh1j hjahMhj ubj )}(hH``spinlock_t *lock`` the irqsafe spinlock to use for locking this fence h](j )}(h``spinlock_t *lock``h]j)}(hjh]hspinlock_t *lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h2the irqsafe spinlock to use for locking this fenceh]h2the irqsafe spinlock to use for locking this fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhj ubj )}(h;``u64 context`` the execution context this fence is run on h](j )}(h``u64 context``h]j)}(hjh]h u64 context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h*the execution context this fence is run onh]h*the execution context this fence is run on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhj ubj )}(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:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h4a linear increasing sequence number for this contexth]h4a linear increasing sequence number for this context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj hMhj ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj2h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj0ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(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 }(hjHhhhNhNubh)}(h8:c:type:`dma_fence_ops.enable_signaling `h]j)}(hjRh]hdma_fence_ops.enable_signaling}(hjThhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjHubh gets called.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjohMhjubh)}(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().}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence (C struct) c.dma_fencehNtauh1j hjزhhhNhNubj )}(hhh](j )}(h dma_fenceh]j )}(hstruct dma_fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubj )}(h dma_fenceh]j )}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjhhubj@ )}(hhh]h)}(h"software synchronization primitiveh]h"software synchronization primitive}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hXQ**Definition**:: struct dma_fence { spinlock_t *lock; const struct dma_fence_ops *ops; union { struct list_head cb_list; ktime_t timestamp; struct rcu_head rcu; }; u64 context; u64 seqno; unsigned long flags; struct kref refcount; int error; }; **Members** ``lock`` spin_lock_irqsave used for locking ``ops`` dma_fence_ops associated with this fence ``{unnamed_union}`` anonymous ``cb_list`` list of all callbacks to call ``timestamp`` Timestamp when the fence was signaled. ``rcu`` used for releasing fence with kfree_rcu ``context`` execution context this fence belongs to, returned by dma_fence_context_alloc() ``seqno`` the sequence number of this fence inside the execution context, can be compared to decide which fence would be signaled later. ``flags`` A mask of DMA_FENCE_FLAG_* defined below ``refcount`` refcount for this fence ``error`` Optional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.h](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./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; };}hj(sbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK%hjubh)}(h **Members**h]jq )}(hj9h]hMembers}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj7ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK4hjubj )}(hhh](j )}(h,``lock`` spin_lock_irqsave used for locking h](j )}(h``lock``h]j)}(hjXh]hlock}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK%hjRubj )}(hhh]h)}(h"spin_lock_irqsave used for lockingh]h"spin_lock_irqsave used for locking}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhK%hjnubah}(h]h ]h"]h$]h&]uh1j hjRubeh}(h]h ]h"]h$]h&]uh1j hjmhK%hjOubj )}(h1``ops`` dma_fence_ops associated with this fence h](j )}(h``ops``h]j)}(hjh]hops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK"hjubj )}(hhh]h)}(h(dma_fence_ops associated with this fenceh]h(dma_fence_ops associated with this fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK"hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK"hjOubj )}(h``{unnamed_union}`` anonymous h](j )}(h``{unnamed_union}``h]j)}(hjh]h{unnamed_union}}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj )}(hhh]h)}(h anonymoush]h anonymous}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjOubj )}(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:195: ./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$hjOubj )}(h5``timestamp`` Timestamp when the fence was signaled. h](j )}(h ``timestamp``h]j)}(hj<h]h timestamp}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK+hj6ubj )}(hhh]h)}(h&Timestamp when the fence was signaled.h]h&Timestamp when the fence was signaled.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhK+hjRubah}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]uh1j hjQhK+hjOubj )}(h0``rcu`` used for releasing fence with kfree_rcu h](j )}(h``rcu``h]j)}(hjuh]hrcu}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK#hjoubj )}(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 hjoubeh}(h]h ]h"]h$]h&]uh1j hjhK#hjOubj )}(h[``context`` execution context this fence belongs to, returned by dma_fence_context_alloc() h](j )}(h ``context``h]j)}(hjh]hcontext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK'hjubj )}(hhh]h)}(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()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK&hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK'hjOubj )}(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)}(hjh]hseqno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK)hjubj )}(hhh]h)}(h~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:195: ./include/linux/dma-fence.hhK(hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK)hjOubj )}(h3``flags`` A mask of DMA_FENCE_FLAG_* defined below 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:195: ./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}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hK*hj8ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj7hK*hjOubj )}(h%``refcount`` refcount for this fence h](j )}(h ``refcount``h]j)}(hj[h]hrefcount}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK!hjUubj )}(hhh]h)}(hrefcount for this fenceh]hrefcount for this fence}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphK!hjqubah}(h]h ]h"]h$]h&]uh1j hjUubeh}(h]h ]h"]h$]h&]uh1j hjphK!hjOubj )}(h``error`` Optional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.h](j )}(h ``error``h]j)}(hjh]herror}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK,hjubj )}(hhh]h)}(hOptional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.h]hOptional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK,hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK,hjOubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK0hjزhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK.hjزhhubh)}(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:195: ./include/linux/dma-fence.hhK2hjزhhubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK9hjزhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_cb (C struct)c.dma_fence_cbhNtauh1j hjزhhhNhNubj )}(hhh](j )}(h dma_fence_cbh]j )}(hstruct dma_fence_cbh](j )}(hj h]hstruct}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKEubj )}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.hhhj?hKEubj )}(h dma_fence_cbh]j )}(hj,h]h dma_fence_cb}(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj.hhhj?hKEubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj*hhhj?hKEubah}(h]j%ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj?hKEhj'hhubj@ )}(hhh]h)}(h%callback for dma_fence_add_callback()h]h%callback for dma_fence_add_callback()}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKnhjqhhubah}(h]h ]h"]h$]h&]uh1j? hj'hhhj?hKEubeh}(h]h ](jstructeh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(h**Definition**:: struct dma_fence_cb { struct list_head node; dma_fence_func_t func; }; **Members** ``node`` used by dma_fence_add_callback() to append this struct to fence::cb_list ``func`` dma_fence_func_t to callh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKrhjubj)}(hNstruct dma_fence_cb { struct list_head node; dma_fence_func_t func; };h]hNstruct dma_fence_cb { struct list_head node; dma_fence_func_t func; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKthjubh)}(h **Members**h]jq )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKyhjubj )}(hhh](j )}(hR``node`` used by dma_fence_add_callback() to append this struct to fence::cb_list h](j )}(h``node``h]j)}(hjh]hnode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKphjubj )}(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&]uh1hhjhKphjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKphjubj )}(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:195: ./include/linux/dma-fence.hhKphjubj )}(hhh]h)}(hdma_fence_func_t to callh]hdma_fence_func_t to call}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKqhj0ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj/hKphjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubh)}(h**Description**h]jq )}(hj]h]h Description}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj[ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKthjزhhubh)}(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.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKrhjزhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_ops (C struct)c.dma_fence_opshNtauh1j hjزhhhNhNubj )}(hhh](j )}(h dma_fence_opsh]j )}(hstruct dma_fence_opsh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKxubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKxubj )}(h dma_fence_opsh]j )}(hjh]h dma_fence_ops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKxubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKxubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKxhjhhubj@ )}(hhh]h)}(h operations implemented for fenceh]h operations implemented for fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK{hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKxubeh}(h]h ](jstructeh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX**Definition**:: struct dma_fence_ops { bool use_64bit_seqno; const char * (*get_driver_name)(struct dma_fence *fence); const char * (*get_timeline_name)(struct dma_fence *fence); bool (*enable_signaling)(struct dma_fence *fence); bool (*signaled)(struct dma_fence *fence); signed long (*wait)(struct dma_fence *fence, bool intr, signed long timeout); void (*release)(struct dma_fence *fence); void (*set_deadline)(struct dma_fence *fence, ktime_t deadline); }; **Members** ``use_64bit_seqno`` True if this dma_fence implementation uses 64bit seqno, false otherwise. ``get_driver_name`` Returns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. ``get_timeline_name`` Return the name of the context this fence belongs to. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. ``enable_signaling`` Enable software signaling of fence. For fence implementations that have the capability for hw->hw signaling, they can implement this op to enable the necessary interrupts, or insert commands into cmdstream, etc, to avoid these costly operations for the common case where only hw->hw synchronization is required. This is called in the first dma_fence_wait() or dma_fence_add_callback() path to let the fence implementation know that there is another driver waiting on the signal (ie. hw->sw case). This 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](jq )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj)}(hXstruct dma_fence_ops { bool use_64bit_seqno; const char * (*get_driver_name)(struct dma_fence *fence); const char * (*get_timeline_name)(struct dma_fence *fence); bool (*enable_signaling)(struct dma_fence *fence); bool (*signaled)(struct dma_fence *fence); signed long (*wait)(struct dma_fence *fence, bool intr, signed long timeout); void (*release)(struct dma_fence *fence); void (*set_deadline)(struct dma_fence *fence, ktime_t deadline); };h]hXstruct dma_fence_ops { bool use_64bit_seqno; const char * (*get_driver_name)(struct dma_fence *fence); const char * (*get_timeline_name)(struct dma_fence *fence); bool (*enable_signaling)(struct dma_fence *fence); bool (*signaled)(struct dma_fence *fence); signed long (*wait)(struct dma_fence *fence, bool intr, signed long timeout); void (*release)(struct dma_fence *fence); void (*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:195: ./include/linux/dma-fence.hhKhjubh)}(h **Members**h]jq )}(hj+h]hMembers}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj)ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj )}(hhh](j )}(h]``use_64bit_seqno`` True if this dma_fence implementation uses 64bit seqno, false otherwise. h](j )}(h``use_64bit_seqno``h]j)}(hjJh]huse_64bit_seqno}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjDubj )}(hhh]h)}(hHTrue if this dma_fence implementation uses 64bit seqno, false otherwise.h]hHTrue if this dma_fence implementation uses 64bit seqno, false otherwise.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhj`ubah}(h]h ]h"]h$]h&]uh1j hjDubeh}(h]h ]h"]h$]h&]uh1j hj_hKhjAubj )}(h``get_driver_name`` Returns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. h](j )}(h``get_driver_name``h]j)}(hjh]hget_driver_name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhj~ubj )}(hhh](h)}(hReturns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort.h]hReturns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hThis callback is mandatory.h]hThis callback is mandatory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1j hj~ubeh}(h]h ]h"]h$]h&]uh1j hjhKhjAubj )}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj )}(hhh](h)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hThis callback is mandatory.h]hThis callback is mandatory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjAubj )}(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)}(hjh]henable_signaling}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj )}(hhh](h)}(h#Enable software signaling of fence.h]h#Enable software signaling of fence.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./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).}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./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.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./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.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./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)}(hjoh]hdma_fence.error}(hjqhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjiubhA may be set in enable_signaling, but only when false is returned.}(hjihhhNhNubeh}(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 }(hjhhhNhNubjq )}(h**enable_signaling**h]henable_signaling}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubhXM has been called there’s a race window, where the dma_fence_signal() might result in the final fence reference being released and its memory freed. To avoid this, implementations of this callback should grab their own reference using dma_fence_get(), to be released when the fence is signalled (through e.g. the interrupt handler).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhj*ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj)hKhjAubj )}(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)}(hjh]hsignaled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj )}(hhh](h)}(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().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(h@May set :c:type:`dma_fence.error ` if returning true.h](hMay set }(hjhhhNhNubh)}(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:195: ./include/linux/dma-fence.hhKhjubh if returning true.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj(hKhjubh)}(hThis callback is optional.h]hThis callback is optional.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjAubj )}(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)}(hjSh]hwait}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjMubj )}(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.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjiubh)}(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.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjiubh)}(hXDMust return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that.h]hXDMust return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjiubeh}(h]h ]h"]h$]h&]uh1j hjMubeh}(h]h ]h"]h$]h&]uh1j hjhhKhjAubj )}(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:195: ./include/linux/dma-fence.hhKhjubj )}(hhh]h)}(hCalled on destruction of fence to release additional resources. Can be called from irq context. This callback is optional. If it is NULL, then dma_fence_free() is instead called as the default implementation.h]hCalled on destruction of fence to release additional resources. Can be called from irq context. This callback is optional. If it is NULL, then dma_fence_free() is instead called as the default implementation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjAubj )}(hX``set_deadline`` Callback to allow a fence waiter to inform the fence signaler of an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency. This is called without :c:type:`dma_fence.lock ` held, it can be called multiple times and from any context. Locking is up to the callee if it has some state to manage. If multiple deadlines are set, the expectation is to track the soonest one. If the deadline is before the current time, it should be interpreted as an immediate deadline. This callback is optional.h](j )}(h``set_deadline``h]j)}(hjh]h set_deadline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj )}(hhh](h)}(hX)Callback to allow a fence waiter to inform the fence signaler of an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency.h]hX)Callback to allow a fence waiter to inform the fence signaler of an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(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)}(hjh]hdma_fence.lock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.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&]uh1hhj4hKhjubh)}(hThis callback is optional.h]hThis callback is optional.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjAubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_put (C function)c.dma_fence_puthNtauh1j hjزhhhNhNubj )}(hhh](j )}(h,void dma_fence_put (struct dma_fence *fence)h]j )}(h+void dma_fence_put(struct dma_fence *fence)h](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj|hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|hhhjhMubj )}(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&]jjuh1j hj|hhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_putasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj|hhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjxhhhjhMubah}(h]jsah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjuhhubj@ )}(hhh]h)}(hdecreases refcount of the fenceh]hdecreases refcount of the fence}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj=hhubah}(h]h ]h"]h$]h&]uh1j? hjuhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jXjb jXjc jd je uh1j hhhjزhNhNubjg )}(hI**Parameters** ``struct dma_fence *fence`` fence to reduce refcount ofh](h)}(h**Parameters**h]jq )}(hjbh]h Parameters}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj`ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj\ubj )}(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:195: ./include/linux/dma-fence.hhMhj{ubj )}(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:195: ./include/linux/dma-fence.hhMhjubah}(h]h ]h"]h$]h&]uh1j hj{ubeh}(h]h ]h"]h$]h&]uh1j hjhMhjxubah}(h]h ]h"]h$]h&]uh1j hj\ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_get (C function)c.dma_fence_gethNtauh1j hjزhhhNhNubj )}(hhh](j )}(h:struct dma_fence * dma_fence_get (struct dma_fence *fence)h]j )}(h8struct dma_fence *dma_fence_get(struct dma_fence *fence)h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jF dma_fence_getsbc.dma_fence_getasbuh1hhjhhhjhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubjc)}(hj h]h*}(hj)hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjhhhjhMubj )}(h dma_fence_geth]j )}(hjh]h dma_fence_get}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQubj )}(h h]h }(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjpubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjumodnameN classnameNjj)}j]jc.dma_fence_getasbuh1hhjQubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjQubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjMubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(hincreases refcount of the fenceh]hincreases refcount of the fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` fence to increase refcount of **Description** Returns the same fence, with refcount increased by 1.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h:``struct dma_fence *fence`` fence to increase refcount of h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hfence to increase refcount ofh]hfence to increase refcount of}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hMhj-ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj,hMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjRh]h Description}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjPubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(h5Returns the same fence, with refcount increased by 1.h]h5Returns the same fence, with refcount increased by 1.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_get_rcu (C function)c.dma_fence_get_rcuhNtauh1j hjزhhhNhNubj )}(hhh](j )}(h>struct dma_fence * dma_fence_get_rcu (struct dma_fence *fence)h]j )}(h huh1j hjhM%hjhhubj@ )}(hhh]h)}(h3get a fence from a dma_resv_list with rcu read lockh]h3get a fence from a dma_resv_list with rcu read lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM%hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhM%ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` fence to increase refcount of **Description** Function returns NULL if no refcount could be obtained, or the fence.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM)hjubj )}(hhh]j )}(h:``struct dma_fence *fence`` fence to increase refcount of h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM'hjubj )}(hhh]h)}(hfence to increase refcount ofh]hfence to increase refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM'hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM'hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM)hjubh)}(hEFunction returns NULL if no refcount could be obtained, or the fence.h]hEFunction returns NULL if no refcount could be obtained, or the fence.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM)hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_get_rcu_safe (C function)c.dma_fence_get_rcu_safehNtauh1j hjزhhhNhNubj )}(hhh](j )}(hKstruct dma_fence * dma_fence_get_rcu_safe (struct dma_fence __rcu **fencep)h]j )}(hIstruct dma_fence *dma_fence_get_rcu_safe(struct dma_fence __rcu **fencep)h](j )}(hj h]hstruct}(hjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjOhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM4ubj )}(h h]h }(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjOhhhj`hM4ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjoubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjtmodnameN classnameNjj)}j]jN)}jFdma_fence_get_rcu_safesbc.dma_fence_get_rcu_safeasbuh1hhjOhhhj`hM4ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjOhhhj`hM4ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjOhhhj`hM4ubj )}(hdma_fence_get_rcu_safeh]j )}(hjh]hdma_fence_get_rcu_safe}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjOhhhj`hM4ubj)}(h!(struct dma_fence __rcu **fencep)h]j)}(hstruct dma_fence __rcu **fenceph](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_fence_get_rcu_safeasbuh1hhjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh__rcu}(hjhhhNhNubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj)hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubjc)}(hj h]h*}(hj6hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceph]hfencep}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjOhhhj`hM4ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjKhhhj`hM4ubah}(h]jFah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj`hM4hjHhhubj@ )}(hhh]h)}(h+acquire a reference to an RCU tracked fenceh]h+acquire a reference to an RCU tracked fence}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM4hjjhhubah}(h]h ]h"]h$]h&]uh1j? hjHhhhj`hM4ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence __rcu **fencep`` pointer to fence to increase refcount of **Description** Function returns NULL if no refcount could be obtained, or the fence. This function handles acquiring a reference to a fence that may be reallocated within the RCU grace period (such as with SLAB_TYPESAFE_BY_RCU), so long as the caller is using RCU on the pointer to the fence. An alternative mechanism is to employ a seqlock to protect a bunch of fences, such as used by struct dma_resv. When using a seqlock, the seqlock must be taken before and checked after a reference to the fence is acquired (as shown here). The caller is required to hold the RCU read lock.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM8hjubj )}(hhh]j )}(hM``struct dma_fence __rcu **fencep`` pointer to fence to increase refcount of h](j )}(h#``struct dma_fence __rcu **fencep``h]j)}(hjh]hstruct dma_fence __rcu **fencep}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM5hjubj )}(hhh]h)}(h(pointer to fence to increase refcount ofh]h(pointer to fence to increase refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM5hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM5hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM7hjubh)}(hXFunction returns NULL if no refcount could be obtained, or the fence. This function handles acquiring a reference to a fence that may be reallocated within the RCU grace period (such as with SLAB_TYPESAFE_BY_RCU), so long as the caller is using RCU on the pointer to the fence.h]hXFunction returns NULL if no refcount could be obtained, or the fence. This function handles acquiring a reference to a fence that may be reallocated within the RCU grace period (such as with SLAB_TYPESAFE_BY_RCU), so long as the caller is using RCU on the pointer to the fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM7hjubh)}(hAn alternative mechanism is to employ a seqlock to protect a bunch of fences, such as used by struct dma_resv. When using a seqlock, the seqlock must be taken before and checked after a reference to the fence is acquired (as shown here).h]hAn alternative mechanism is to employ a seqlock to protect a bunch of fences, such as used by struct dma_resv. When using a seqlock, the seqlock must be taken before and checked after a reference to the fence is acquired (as shown here).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM<hjubh)}(h1The caller is required to hold the RCU read lock.h]h1The caller is required to hold the RCU read lock.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMAhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j )dma_fence_is_signaled_locked (C function)c.dma_fence_is_signaled_lockedhNtauh1j hjزhhhNhNubj )}(hhh](j )}(h;bool dma_fence_is_signaled_locked (struct dma_fence *fence)h]j )}(h:bool dma_fence_is_signaled_locked(struct dma_fence *fence)h](jK)}(hj^h]hbool}(hjLhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjHhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjHhhhjYhMubj )}(hdma_fence_is_signaled_lockedh]j )}(hdma_fence_is_signaled_lockedh]hdma_fence_is_signaled_locked}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjHhhhjYhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjnsbc.dma_fence_is_signaled_lockedasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjHhhhjYhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjDhhhjYhMubah}(h]j?ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjYhMhjAhhubj@ )}(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:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjAhhhjYhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j#jb j#jc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to check **Description** Returns true if the fence was already signaled, false if not. Since this function doesn't enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven't been called before. This function requires :c:type:`dma_fence.lock ` to be held. See also dma_fence_is_signaled().h](h)}(h**Parameters**h]jq )}(hj-h]h Parameters}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj+ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj'ubj )}(hhh]j )}(h/``struct dma_fence *fence`` the fence to check h](j )}(h``struct dma_fence *fence``h]j)}(hjLh]hstruct dma_fence *fence}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjFubj )}(hhh]h)}(hthe fence to checkh]hthe fence to check}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahMhjbubah}(h]h ]h"]h$]h&]uh1j hjFubeh}(h]h ]h"]h$]h&]uh1j hjahMhjCubah}(h]h ]h"]h$]h&]uh1j hj'ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj'ubh)}(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:195: ./include/linux/dma-fence.hhMhj'ubh)}(hGThis function requires :c:type:`dma_fence.lock ` to be held.h](hThis function requires }(hjhhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjh]hdma_fence.lock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh to be held.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhj'ubh)}(h!See also dma_fence_is_signaled().h]h!See also dma_fence_is_signaled().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_fence_is_signaled (C function)c.dma_fence_is_signaledhNtauh1j hjزhhhNhNubj )}(hhh](j )}(h4bool dma_fence_is_signaled (struct dma_fence *fence)h]j )}(h3bool dma_fence_is_signaled(struct dma_fence *fence)h](jK)}(hj^h]hbool}(hj hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhjhMubj )}(hdma_fence_is_signaledh]j )}(hdma_fence_is_signaledh]hdma_fence_is_signaled}(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj hhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjIhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubj )}(h h]h }(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjimodnameN classnameNjj)}j]jN)}jFj/sbc.dma_fence_is_signaledasbuh1hhjEubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjEubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjAubah}(h]h ]h"]h$]h&]jjuh1jhj hhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h2Return an indication if the fence is signaled yet.h]h2Return an indication if the fence is signaled yet.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the fence to check **Description** Returns true if the fence was already signaled, false if not. Since this function doesn't enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven't been called before. It's recommended for seqno fences to call dma_fence_signal when the operation is complete, it makes it possible to prevent issues from wraparound between time of issue and time of use by checking the return value of this function before calling hardware-specific wait instructions. See also dma_fence_is_signaled_locked().h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h/``struct dma_fence *fence`` the fence to check h](j )}(h``struct dma_fence *fence``h]j)}(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:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe fence to checkh]hthe fence to check}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMhj#ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj"hMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjHh]h Description}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjFubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hXReturns true if the fence was already signaled, false if not. Since this function doesn't enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven't been called before.h]hXReturns true if the fence was already signaled, false if not. Since this function doesn’t enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven’t been called before.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hXIt's recommended for seqno fences to call dma_fence_signal when the operation is complete, it makes it possible to prevent issues from wraparound between time of issue and time of use by checking the return value of this function before calling hardware-specific wait instructions.h]hXIt’s recommended for seqno fences to call dma_fence_signal when the operation is complete, it makes it possible to prevent issues from wraparound between time of issue and time of use by checking the return value of this function before calling hardware-specific wait instructions.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(h(See also dma_fence_is_signaled_locked().h]h(See also dma_fence_is_signaled_locked().}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !__dma_fence_is_later (C function)c.__dma_fence_is_laterhNtauh1j hjزhhhNhNubj )}(hhh](j )}(hKbool __dma_fence_is_later (u64 f1, u64 f2, const struct dma_fence_ops *ops)h]j )}(hJbool __dma_fence_is_later(u64 f1, u64 f2, const struct dma_fence_ops *ops)h](jK)}(hj^h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(h__dma_fence_is_laterh]j )}(h__dma_fence_is_laterh]h__dma_fence_is_later}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h1(u64 f1, u64 f2, const struct dma_fence_ops *ops)h](j)}(hu64 f1h](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.__dma_fence_is_laterasbuh1hhjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hf1h]hf1}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hu64 f2h](h)}(hhh]j )}(hu64h]hu64}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj6modnameN classnameNjj)}j]jc.__dma_fence_is_laterasbuh1hhj-ubj )}(h h]h }(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubj )}(hf2h]hf2}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubeh}(h]h ]h"]h$]h&]noemphjjuh1Hjhjubj)}(hconst struct dma_fence_ops *opsh](j )}(hjh]hconst}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubj )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubh)}(hhh]j )}(h dma_fence_opsh]h dma_fence_ops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.__dma_fence_is_laterasbuh1hhjuubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjuubj )}(hopsh]hops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h-return if f1 is chronologically later than f2h]h-return if f1 is chronologically later than f2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j-jb j-jc jd je uh1j hhhjزhNhNubjg )}(hX_**Parameters** ``u64 f1`` the first fence's seqno ``u64 f2`` the second fence's seqno from the same context ``const struct dma_fence_ops *ops`` dma_fence_ops associated with the seqno **Description** Returns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not common across contexts.h](h)}(h**Parameters**h]jq )}(hj7h]h Parameters}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj5ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj1ubj )}(hhh](j )}(h#``u64 f1`` the first fence's seqno h](j )}(h ``u64 f1``h]j)}(hjVh]hu64 f1}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjPubj )}(hhh]h)}(hthe first fence's seqnoh]hthe first fence’s seqno}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhMhjlubah}(h]h ]h"]h$]h&]uh1j hjPubeh}(h]h ]h"]h$]h&]uh1j hjkhMhjMubj )}(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:195: ./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 hjhMhjMubj )}(hL``const struct dma_fence_ops *ops`` dma_fence_ops associated with the seqno h](j )}(h#``const struct dma_fence_ops *ops``h]j)}(hjh]hconst struct dma_fence_ops *ops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h'dma_fence_ops associated with the seqnoh]h'dma_fence_ops associated with the seqno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjMubeh}(h]h ]h"]h$]h&]uh1j hj1ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj1ubh)}(hReturns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not common across contexts.h]hReturns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not common across contexts.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj1ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_is_later (C function)c.dma_fence_is_laterhNtauh1j hjزhhhNhNubj )}(hhh](j )}(hDbool dma_fence_is_later (struct dma_fence *f1, struct dma_fence *f2)h]j )}(hCbool dma_fence_is_later(struct dma_fence *f1, struct dma_fence *f2)h](jK)}(hj^h]hbool}(hjHhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjDhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDhhhjUhMubj )}(hdma_fence_is_laterh]j )}(hdma_fence_is_laterh]hdma_fence_is_later}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjDhhhjUhMubj)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hstruct dma_fence *f1h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjjsbc.dma_fence_is_laterasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hf1h]hf1}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj|ubj)}(hstruct dma_fence *f2h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_fence_is_laterasbuh1hhjubj )}(h h]h }(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj@hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hf2h]hf2}(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj|ubeh}(h]h ]h"]h$]h&]jjuh1jhjDhhhjUhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj@hhhjUhMubah}(h]j;ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjUhMhj=hhubj@ )}(hhh]h)}(h-return if f1 is chronologically later than f2h]h-return if f1 is chronologically later than f2}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjthhubah}(h]h ]h"]h$]h&]uh1j? hj=hhhjUhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX3**Parameters** ``struct dma_fence *f1`` the first fence from the same context ``struct dma_fence *f2`` the second fence from the same context **Description** Returns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not re-used across contexts.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh](j )}(h?``struct dma_fence *f1`` the first fence from the same context h](j )}(h``struct dma_fence *f1``h]j)}(hjh]hstruct dma_fence *f1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h%the first fence from the same contexth]h%the first fence from the same context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h@``struct dma_fence *f2`` the second fence from the same context h](j )}(h``struct dma_fence *f2``h]j)}(hjh]hstruct dma_fence *f2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h&the second fence from the same contexth]h&the second fence from the same context}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj,h]h Description}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj*ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hReturns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not 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.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_is_later_or_same (C function)c.dma_fence_is_later_or_samehNtauh1j hjزhhhNhNubj )}(hhh](j )}(hLbool dma_fence_is_later_or_same (struct dma_fence *f1, struct dma_fence *f2)h]j )}(hKbool dma_fence_is_later_or_same(struct dma_fence *f1, struct dma_fence *f2)h](jK)}(hj^h]hbool}(hjqhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjmhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjmhhhj~hMubj )}(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&]jjuh1j hjmhhhj~hMubj)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hstruct dma_fence *f1h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_is_later_or_sameasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hf1h]hf1}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence *f2h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj?modnameN classnameNjj)}j]jc.dma_fence_is_later_or_sameasbuh1hhjubj )}(h h]h }(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjihhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hf2h]hf2}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjmhhhj~hMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjihhhj~hMubah}(h]jdah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj~hMhjfhhubj@ )}(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:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjfhhhj~hMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hXE**Parameters** ``struct dma_fence *f1`` the first fence from the same context ``struct dma_fence *f2`` the second fence from the same context **Description** Returns true if f1 is chronologically later than f2 or the same fence. Both fences must be from the same context, since a seqno is not re-used across contexts.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh](j )}(h?``struct dma_fence *f1`` the first fence from the same context h](j )}(h``struct dma_fence *f1``h]j)}(hjh]hstruct dma_fence *f1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h%the first fence from the same contexth]h%the first fence from the same context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h@``struct dma_fence *f2`` the second fence from the same context h](j )}(h``struct dma_fence *f2``h]j)}(hjh]hstruct dma_fence *f2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h&the second fence from the same contexth]h&the second fence from the same context}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hMhj0ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj/hMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjUh]h Description}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjSubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hReturns true if f1 is chronologically later than f2 or the same fence. Both fences must be from the same context, since a seqno is not re-used across contexts.h]hReturns true if f1 is chronologically later than f2 or the same fence. Both fences must be from the same context, since a seqno is not re-used across contexts.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_later (C function)c.dma_fence_laterhNtauh1j hjزhhhNhNubj )}(hhh](j )}(hOstruct dma_fence * dma_fence_later (struct dma_fence *f1, struct dma_fence *f2)h]j )}(hMstruct dma_fence *dma_fence_later(struct dma_fence *f1, struct dma_fence *f2)h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_fence_latersbc.dma_fence_laterasbuh1hhjhhhjhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjhhhjhMubj )}(hdma_fence_laterh]j )}(hjh]hdma_fence_later}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hstruct dma_fence *f1h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj4modnameN classnameNjj)}j]jc.dma_fence_laterasbuh1hhjubj )}(h h]h }(hjPhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj^hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hf1h]hf1}(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hstruct dma_fence *f2h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.dma_fence_laterasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hf2h]hf2}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h&return the chronologically later fenceh]h&return the chronologically later fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hXY**Parameters** ``struct dma_fence *f1`` the first fence from the same context ``struct dma_fence *f2`` the second fence from the same context **Description** Returns NULL if both fences are signaled, otherwise the fence that would be signaled last. Both fences must be from the same context, since a seqno is not re-used across contexts.h](h)}(h**Parameters**h]jq )}(hj'h]h Parameters}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj%ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj!ubj )}(hhh](j )}(h?``struct dma_fence *f1`` the first fence from the same context h](j )}(h``struct dma_fence *f1``h]j)}(hjFh]hstruct dma_fence *f1}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj@ubj )}(hhh]h)}(h%the first fence from the same contexth]h%the first fence from the same context}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj\ubah}(h]h ]h"]h$]h&]uh1j hj@ubeh}(h]h ]h"]h$]h&]uh1j hj[hMhj=ubj )}(h@``struct 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&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjyubj )}(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 hjyubeh}(h]h ]h"]h$]h&]uh1j hjhMhj=ubeh}(h]h ]h"]h$]h&]uh1j hj!ubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj!ubh)}(hReturns NULL if both fences are signaled, otherwise the fence that would be signaled last. Both fences must be from the same context, since a seqno is not re-used across contexts.h]hReturns NULL if both fences are signaled, otherwise the fence that would be signaled last. Both fences must be from the same context, since a seqno is not re-used across contexts.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j (dma_fence_get_status_locked (C function)c.dma_fence_get_status_lockedhNtauh1j hjزhhhNhNubj )}(hhh](j )}(h9int dma_fence_get_status_locked (struct dma_fence *fence)h]j )}(h8int dma_fence_get_status_locked(struct dma_fence *fence)h](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj hM ubj )}(hdma_fence_get_status_lockedh]j )}(hdma_fence_get_status_lockedh]hdma_fence_get_status_locked}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhj hM ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubj )}(h h]h }(hjIhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjWubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj\modnameN classnameNjj)}j]jN)}jFj"sbc.dma_fence_get_status_lockedasbuh1hhj8ubj )}(h h]h }(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj8ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj4ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhj hM ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhj hM ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj hM hjhhubj@ )}(hhh]h)}(h"returns the status upon completionh]h"returns the status upon completion}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj hM ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX\**Parameters** ``struct dma_fence *fence`` the dma_fence to query **Description** Drivers can supply an optional error status condition before they signal the fence (to indicate whether the fence was completed due to an error rather than success). The value of the status condition is only valid if the fence has been signaled, dma_fence_get_status_locked() first checks the signal state before reporting the error status. Returns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h3``struct dma_fence *fence`` the dma_fence to query h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM hjubj )}(hhh]h)}(hthe dma_fence to queryh]hthe dma_fence to query}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj;h]h Description}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj9ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hReturns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.h]hReturns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_set_error (C function)c.dma_fence_set_errorhNtauh1j hjزhhhNhNubj )}(hhh](j )}(h=void dma_fence_set_error (struct dma_fence *fence, int error)h]j )}(hhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj:ubj )}(h h]h }(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubj )}(herrorh]herror}(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM#ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhM#ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhM#hjhhubj@ )}(hhh]h)}(h$flag an error condition on the fenceh]h$flag an error condition on the fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM#hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhM#ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX**Parameters** ``struct dma_fence *fence`` the dma_fence ``int error`` the error to store **Description** Drivers can supply an optional error status condition before they signal the fence, to indicate that the fence was completed due to an error rather than success. This must be set before signaling (so that the value is visible before any waiters on the signal callback are woken). This helper exists to help catching erroneous setting of #dma_fence.error. Examples of error codes which drivers should use: * ``-ENODATA`` This operation produced no data, no other operation affected. * ``-ECANCELED`` All operations from the same context have been canceled. * ``-ETIME`` Operation caused a timeout and potentially device reset.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM'hjubj )}(hhh](j )}(h*``struct dma_fence *fence`` the dma_fence h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM$hjubj )}(hhh]h)}(h the dma_fenceh]h the dma_fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM$hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM$hjubj )}(h!``int error`` the error to store h](j )}(h ``int error``h]j)}(hjh]h int error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM%hjubj )}(hhh]h)}(hthe error to storeh]hthe error to store}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM%hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM%hjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj9h]h Description}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj7ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM'hjubh)}(hXbDrivers can supply an optional error status condition before they signal the fence, to indicate that the fence was completed due to an error rather than success. This must be set before signaling (so that the value is visible before any waiters on the signal callback are woken). This helper exists to help catching erroneous setting of #dma_fence.error.h]hXbDrivers can supply an optional error status condition before they signal the fence, to indicate that the fence was completed due to an error rather than success. This must be set before signaling (so that the value is visible before any waiters on the signal callback are woken). This helper exists to help catching erroneous setting of #dma_fence.error.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM'hjubh)}(h1Examples of error codes which drivers should use:h]h1Examples of error codes which drivers should use:}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM-hjubh)}(hhh](h)}(hL``-ENODATA`` This operation produced no data, no other operation affected.h]h)}(hjrh](j)}(h ``-ENODATA``h]h-ENODATA}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubh@ This operation produced no data, no other operation affected.}(hjthhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM/hjpubah}(h]h ]h"]h$]h&]uh1hhjmubh)}(hG``-ECANCELED`` All operations from the same context have been canceled.h]h)}(hjh](j)}(h``-ECANCELED``h]h -ECANCELED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh9 All operations from the same context have been canceled.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM0hjubah}(h]h ]h"]h$]h&]uh1hhjmubh)}(hG``-ETIME`` Operation caused a timeout and potentially device reset.h]h)}(hjh](j)}(h ``-ETIME``h]h-ETIME}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh= Operation caused a timeout and potentially device reset.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM1hjubah}(h]h ]h"]h$]h&]uh1hhjmubeh}(h]h ]h"]h$]h&]j>j uh1hhjhM/hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_timestamp (C function)c.dma_fence_timestamphNtauh1j hjزhhhNhNubj )}(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}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj modnameN classnameNjj)}j]jN)}jFdma_fence_timestampsbc.dma_fence_timestampasbuh1hhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM=ubj )}(h h]h }(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhj,hM=ubj )}(hdma_fence_timestamph]j )}(hj)h]hdma_fence_timestamp}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhj,hM=ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubj )}(h h]h }(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjzmodnameN classnameNjj)}j]j'c.dma_fence_timestampasbuh1hhjVubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjVubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjRubah}(h]h ]h"]h$]h&]jjuh1jhjhhhj,hM=ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhj,hM=ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj,hM=hjhhubj@ )}(hhh]h)}(h1helper to get the completion timestamp of a fenceh]h1helper to get the completion timestamp of a fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM=hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhj,hM=ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX1**Parameters** ``struct dma_fence *fence`` fence to get the timestamp from. **Description** After a fence is signaled the timestamp is updated with the signaling time, but setting the timestamp can race with tasks waiting for the signaling. This helper busy waits for the correct timestamp to appear.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMAhjubj )}(hhh]j )}(h=``struct dma_fence *fence`` fence to get the timestamp from. h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM>hjubj )}(hhh]h)}(h fence to get the timestamp from.h]h fence to get the timestamp from.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hM>hj2ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj1hM>hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjWh]h Description}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjUubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM@hjubh)}(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.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM@hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_wait (C function)c.dma_fence_waithNtauh1j hjزhhhNhNubj )}(hhh](j )}(h?signed long dma_fence_wait (struct dma_fence *fence, bool intr)h]j )}(h>signed long dma_fence_wait(struct dma_fence *fence, bool intr)h](jK)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMWubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMWubjK)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhhjhMWubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMWubj )}(hdma_fence_waith]j )}(hdma_fence_waith]hdma_fence_wait}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMWubj)}(h$(struct dma_fence *fence, bool intr)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_waitasbuh1hhjubj )}(h h]h }(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjAhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h bool intrh](jK)}(hj^h]hbool}(hjghhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjcubj )}(h h]h }(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubj )}(hintrh]hintr}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMWubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMWubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMWhjhhubj@ )}(hhh]h)}(h#sleep until the fence gets signaledh]h#sleep until the fence gets signaled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMWhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMWubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX<**Parameters** ``struct dma_fence *fence`` the fence to wait on ``bool intr`` if true, do an interruptible wait **Description** This function will return -ERESTARTSYS if interrupted by a signal, or 0 if the fence was signaled. Other error values may be returned on custom implementations. Performs a synchronous wait on this fence. It is assumed the caller directly or indirectly holds a reference to the fence, otherwise the fence might be freed before return, resulting in undefined behavior. See also dma_fence_wait_timeout() and dma_fence_wait_any_timeout().h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM[hjubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMXhjubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMXhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMXhjubj )}(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:195: ./include/linux/dma-fence.hhMYhj ubj )}(hhh]h)}(h!if true, do an interruptible waith]h!if true, do an interruptible wait}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hMYhj<ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj;hMYhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjah]h Description}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj_ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM[hjubh)}(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.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM[hjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM_hjubh)}(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().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMchjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_is_array (C function)c.dma_fence_is_arrayhNtauh1j hjزhhhNhNubj )}(hhh](j )}(h1bool dma_fence_is_array (struct dma_fence *fence)h]j )}(h0bool dma_fence_is_array(struct dma_fence *fence)h](jK)}(hj^h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM|ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhM|ubj )}(hdma_fence_is_arrayh]j )}(hdma_fence_is_arrayh]hdma_fence_is_array}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhM|ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj modnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_is_arrayasbuh1hhjubj )}(h h]h }(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjLhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM|ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhM|ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhM|hjhhubj@ )}(hhh]h)}(h+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:195: ./include/linux/dma-fence.hhM|hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhM|ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` the fence to test **Description** Return true if it is a dma_fence_array and false otherwise.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.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:195: ./include/linux/dma-fence.hhM}hjubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM}hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM}hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_is_chain (C function)c.dma_fence_is_chainhNtauh1j hjزhhhNhNubj )}(hhh](j )}(h1bool dma_fence_is_chain (struct dma_fence *fence)h]j )}(h0bool dma_fence_is_chain(struct dma_fence *fence)h](jK)}(hj^h]hbool}(hjDhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj@hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@hhhjQhMubj )}(hdma_fence_is_chainh]j )}(hdma_fence_is_chainh]hdma_fence_is_chain}(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj@hhhjQhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjfsbc.dma_fence_is_chainasbuh1hhj|ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj|ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjxubah}(h]h ]h"]h$]h&]jjuh1jhj@hhhjQhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj<hhhjQhMubah}(h]j7ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjQhMhj9hhubj@ )}(hhh]h)}(h+check if a fence is from the chain subclassh]h+check if a fence is from the chain subclass}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hj9hhhjQhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` the fence to test **Description** Return true if it is a dma_fence_chain and false otherwise.h](h)}(h**Parameters**h]jq )}(hj%h]h Parameters}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj#ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hjDh]hstruct dma_fence *fence}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj>ubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhMhjZubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hjYhMhj;ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj}ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(h;Return true if it is a dma_fence_chain and false otherwise.h]h;Return true if it is a dma_fence_chain and false otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_is_container (C function)c.dma_fence_is_containerhNtauh1j hjزhhhNhNubj )}(hhh](j )}(h5bool dma_fence_is_container (struct dma_fence *fence)h]j )}(h4bool dma_fence_is_container(struct dma_fence *fence)h](jK)}(hj^h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_is_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&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj modnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_is_containerasbuh1hhjubj )}(h h]h }(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjLhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(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:195: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjزhNhNubjg )}(hX"**Parameters** ``struct dma_fence *fence`` the fence to test **Description** Return true if this fence is a container for other fences, false otherwise. This is important since we can't build up large fence structure or otherwise we run into recursion during operation on those fences.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjزhhhNhNubeh}(h]dma-fences-functions-referenceah ]h"]dma fences functions referenceah$]h&]uh1hhjժhhhhhKubh)}(hhh](h)}(hDMA Fence Arrayh]hDMA Fence Array}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_fence_array_alloc (C function)c.dma_fence_array_allochNtauh1j hj3hhhNhNubj )}(hhh](j )}(h?struct dma_fence_array * dma_fence_array_alloc (int num_fences)h]j )}(h=struct dma_fence_array *dma_fence_array_alloc(int num_fences)h](j )}(hj h]hstruct}(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjYhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKubj )}(h h]h }(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjYhhhjjhKubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj~modnameN classnameNjj)}j]jN)}jFdma_fence_array_allocsbc.dma_fence_array_allocasbuh1hhjYhhhjjhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjYhhhjjhKubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjYhhhjjhKubj )}(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&]jjuh1j hjYhhhjjhKubj)}(h(int num_fences)h]j)}(hint num_fencesh](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h num_fencesh]h num_fences}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjYhhhjjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjUhhhjjhKubah}(h]jPah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjjhKhjRhhubj@ )}(hhh]h)}(hAllocate a custom fence arrayh]hAllocate a custom fence array}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj hhubah}(h]h ]h"]h$]h&]uh1j? hjRhhhjjhKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j5 jb j5 jc jd je uh1j hhhj3hNhNubjg )}(h**Parameters** ``int num_fences`` [in] number of fences to add in the array **Description** Return dma fence array on success, NULL on failureh](h)}(h**Parameters**h]jq )}(hj? h]h Parameters}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj= ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj9 ubj )}(hhh]j )}(h@``int num_fences`` [in] number of fences to add in the array h](j )}(h``int num_fences``h]j)}(hj^ h]hint num_fences}(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjX ubj )}(hhh]h)}(h,[in] number of fences to add in the arrayh]h,[in] number of fences to add in the array}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjs hKhjt ubah}(h]h ]h"]h$]h&]uh1j hjX ubeh}(h]h ]h"]h$]h&]uh1j hjs hKhjU ubah}(h]h ]h"]h$]h&]uh1j hj9 ubh)}(h**Description**h]jq )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj9 ubh)}(h2Return dma fence array on success, NULL on failureh]h2Return dma fence array on success, NULL on failure}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj9 ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj3hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_fence_array_init (C function)c.dma_fence_array_inithNtauh1j hj3hhhNhNubj )}(hhh](j )}(hvoid dma_fence_array_init (struct dma_fence_array *array, int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h]j )}(hvoid dma_fence_array_init(struct dma_fence_array *array, int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](jK)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhj hKubj )}(hdma_fence_array_inith]j )}(hdma_fence_array_inith]hdma_fence_array_init}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj hhhj hKubj)}(h{(struct dma_fence_array *array, int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](j)}(hstruct dma_fence_array *arrayh](j )}(hj h]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hj( hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hj9 hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6 ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj; modnameN classnameNjj)}j]jN)}jFj sbc.dma_fence_array_initasbuh1hhj ubj )}(h h]h }(hjY hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjc)}(hj h]h*}(hjg hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj ubj )}(harrayh]harray}(hjt hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hint num_fencesh](jK)}(hinth]hint}(hj hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h num_fencesh]h num_fences}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hstruct dma_fence **fencesh](j )}(hj h]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj modnameN classnameNjj)}j]jU c.dma_fence_array_initasbuh1hhj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjc)}(hj h]h*}(hj hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj ubjc)}(hj h]h*}(hj hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj ubj )}(hfencesh]hfences}(hj& hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hjB hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj? ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjD modnameN classnameNjj)}j]jU c.dma_fence_array_initasbuh1hhj; ubj )}(h h]h }(hj` hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj; ubj )}(hcontexth]hcontext}(hjn hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj; ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hunsigned seqnoh](jK)}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hseqnoh]hseqno}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hbool signal_on_anyh](jK)}(hj^h]hbool}(hj hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h signal_on_anyh]h signal_on_any}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj hhhj hKubah}(h]j ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj hKhj hhubj@ )}(hhh]h)}(hInit a custom fence arrayh]hInit a custom fence array}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj hhubah}(h]h ]h"]h$]h&]uh1j? hj hhhj hKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j jb j jc jd je uh1j hhhj3hNhNubjg )}(hX2**Parameters** ``struct dma_fence_array *array`` [in] dma fence array to arm ``int num_fences`` [in] number of fences to add in the array ``struct dma_fence **fences`` [in] array containing the fences ``u64 context`` [in] fence context to use ``unsigned seqno`` [in] sequence number to use ``bool signal_on_any`` [in] signal on any fence in the array **Description** Implementation of **dma_fence_array_create** without allocation. Useful to init a preallocated dma fence array in the path of reclaim or dma fence signaling.h](h)}(h**Parameters**h]jq )}(hj# h]h Parameters}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj! ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj ubj )}(hhh](j )}(hA``struct dma_fence_array *array`` [in] dma fence array to arm h](j )}(h!``struct dma_fence_array *array``h]j)}(hjB h]hstruct dma_fence_array *array}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj< ubj )}(hhh]h)}(h[in] dma fence array to armh]h[in] dma fence array to arm}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjW hKhjX ubah}(h]h ]h"]h$]h&]uh1j hj< ubeh}(h]h ]h"]h$]h&]uh1j hjW hKhj9 ubj )}(h@``int num_fences`` [in] number of fences to add in the array h](j )}(h``int num_fences``h]j)}(hj{ h]hint num_fences}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjy ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhju ubj )}(hhh]h)}(h,[in] number of fences to add in the arrayh]h,[in] number of fences to add in the array}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j hju ubeh}(h]h ]h"]h$]h&]uh1j hj hKhj9 ubj )}(hB``struct dma_fence **fences`` [in] array containing the fences h](j )}(h``struct dma_fence **fences``h]j)}(hj h]hstruct dma_fence **fences}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj ubj )}(hhh]h)}(h#[in] array containing the fencesh]h#[in] array containing the fences}(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 hKhj9 ubj )}(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:201: ./drivers/dma-buf/dma-fence-array.chKhj ubj )}(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 hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKhj9 ubj )}(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:201: ./drivers/dma-buf/dma-fence-array.chKhj ubj )}(hhh]h)}(h[in] sequence number to useh]h[in] sequence number to use}(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; hKhj9 ubj )}(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}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj] ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjY ubj )}(hhh]h)}(h([in] signal on any fence in the arrayh]h([in] signal on any fence in the array}(hjx hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjt hKhju ubah}(h]h ]h"]h$]h&]uh1j hjY ubeh}(h]h ]h"]h$]h&]uh1j hjt hKhj9 ubeh}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]jq )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj ubh)}(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 }(hj hhhNhNubjq )}(h**dma_fence_array_create**h]hdma_fence_array_create}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubhq without allocation. Useful to init a preallocated dma fence array in the path of reclaim or dma fence signaling.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj3hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_array_create (C function)c.dma_fence_array_createhNtauh1j hj3hhhNhNubj )}(hhh](j )}(hstruct dma_fence_array * dma_fence_array_create (int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h]j )}(hstruct dma_fence_array *dma_fence_array_create(int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](j )}(hj h]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhj hKubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_fence_array_createsbc.dma_fence_array_createasbuh1hhj hhhj hKubj )}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhj hKubjc)}(hj h]h*}(hj?hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj hhhj hKubj )}(hdma_fence_array_createh]j )}(hj.h]hdma_fence_array_create}(hjPhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjLubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj hhhj hKubj)}(h\(int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](j)}(hint num_fencesh](jK)}(hinth]hint}(hjkhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjgubj )}(h h]h }(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubj )}(h num_fencesh]h num_fences}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjcubj)}(hstruct dma_fence **fencesh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]j,c.dma_fence_array_createasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfencesh]hfences}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjcubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj"modnameN classnameNjj)}j]j,c.dma_fence_array_createasbuh1hhjubj )}(h h]h }(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hcontexth]hcontext}(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjcubj)}(hunsigned seqnoh](jK)}(hunsignedh]hunsigned}(hjehhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjaubj )}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubj )}(hseqnoh]hseqno}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjcubj)}(hbool signal_on_anyh](jK)}(hj^h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h signal_on_anyh]h signal_on_any}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjcubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj hhhj hKubah}(h]j ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj hKhj hhubj@ )}(hhh]h)}(hCreate a custom fence arrayh]hCreate a custom fence array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjhhubah}(h]h ]h"]h$]h&]uh1j? hj hhhj hKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj3hNhNubjg )}(hX0**Parameters** ``int num_fences`` [in] number of fences to add in the array ``struct dma_fence **fences`` [in] array containing the fences ``u64 context`` [in] fence context to use ``unsigned seqno`` [in] sequence number to use ``bool signal_on_any`` [in] signal on any fence in the array **Description** Allocate a dma_fence_array object and initialize the base fence with dma_fence_init(). In case of error it returns NULL. The caller should allocate the fences array with num_fences size and fill it with the fences it wants to add to the object. Ownership of this array is taken and dma_fence_put() is used on each fence on release. If **signal_on_any** is true the fence array signals if any fence in the array signals, otherwise it signals when all fences in the array signal.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh](j )}(h@``int num_fences`` [in] number of fences to add in the array h](j )}(h``int num_fences``h]j)}(hj h]hint num_fences}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h,[in] number of fences to add in the arrayh]h,[in] number of fences to add in the array}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hKhj6ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj5hKhjubj )}(hB``struct dma_fence **fences`` [in] array containing the fences h](j )}(h``struct dma_fence **fences``h]j)}(hjYh]hstruct dma_fence **fences}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjSubj )}(hhh]h)}(h#[in] array containing the fencesh]h#[in] array containing the fences}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhKhjoubah}(h]h ]h"]h$]h&]uh1j hjSubeh}(h]h ]h"]h$]h&]uh1j hjnhKhjubj )}(h-``u64 context`` [in] fence context to use h](j )}(h``u64 context``h]j)}(hjh]h u64 context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h[in] fence context to useh]h[in] fence context to use}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h2``unsigned seqno`` [in] sequence number to use h](j )}(h``unsigned seqno``h]j)}(hjh]hunsigned seqno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h[in] sequence number to useh]h[in] sequence number to use}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h@``bool signal_on_any`` [in] signal on any fence in the array h](j )}(h``bool signal_on_any``h]j)}(hjh]hbool signal_on_any}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h([in] signal on any fence in the arrayh]h([in] signal on any fence in the array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj?h]h Description}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj=ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubh)}(hxAllocate a dma_fence_array object and initialize the base fence with dma_fence_init(). In case of error it returns NULL.h]hxAllocate a dma_fence_array object and initialize the base fence with dma_fence_init(). In case of error it returns NULL.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubh)}(hThe caller should allocate the fences array with num_fences size and fill it with the fences it wants to add to the object. Ownership of this array is taken and dma_fence_put() is used on each fence on release.h]hThe caller should allocate the fences array with num_fences size and fill it with the fences it wants to add to the object. Ownership of this array is taken and dma_fence_put() is used on each fence on release.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubh)}(hIf **signal_on_any** is true the fence array signals if any fence in the array signals, otherwise it signals when all fences in the array signal.h](hIf }(hjshhhNhNubjq )}(h**signal_on_any**h]h signal_on_any}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjsubh} is true the fence array signals if any fence in the array signals, otherwise it signals when all fences in the array signal.}(hjshhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj3hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_fence_match_context (C function)c.dma_fence_match_contexthNtauh1j hj3hhhNhNubj )}(hhh](j )}(hCbool dma_fence_match_context (struct dma_fence *fence, u64 context)h]j )}(hBbool dma_fence_match_context(struct dma_fence *fence, u64 context)h](jK)}(hj^h]hbool}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdma_fence_match_contexth]j )}(hdma_fence_match_contexth]hdma_fence_match_context}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h&(struct dma_fence *fence, u64 context)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_match_contextasbuh1hhjubj )}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj<hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hjIhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjgmodnameN classnameNjj)}j]j*c.dma_fence_match_contextasbuh1hhj^ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubj )}(hcontexth]hcontext}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhMubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhMhjhhubj@ )}(hhh]h)}(h.Check if all fences are from the given contexth]h.Check if all fences are from the given context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj3hNhNubjg )}(hX=**Parameters** ``struct dma_fence *fence`` [in] fence or fence array ``u64 context`` [in] fence context to check all fences against **Description** Checks the provided fence or, for a fence array, all fences in the array against the given context. Returns false if any fence is from a different context.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMhjubj )}(hhh](j )}(h9``struct dma_fence *fence`` [in] fence or fence array h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMhjubj )}(hhh]h)}(h[in] fence or fence arrayh]h[in] fence or fence array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(hB``u64 context`` [in] fence context to check all fences against h](j )}(h``u64 context``h]j)}(hj5h]h u64 context}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMhj/ubj )}(hhh]h)}(h1[in] fence context to check all fences againsth]h1[in] fence context to check all fences against}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhMhjKubah}(h]h ]h"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]uh1j hjJhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjph]h Description}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjnubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMhjubh)}(hChecks the provided fence or, for a fence array, all fences in the array against the given context. Returns false if any fence is from a different context.h]hChecks the provided fence or, for a fence array, all fences in the array against the given context. Returns false if any fence is from a different context.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj3hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_array_cb (C struct)c.dma_fence_array_cbhNtauh1j hj3hhhNhNubj )}(hhh](j )}(hdma_fence_array_cbh]j )}(hstruct dma_fence_array_cbh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubj )}(hdma_fence_array_cbh]j )}(hjh]hdma_fence_array_cb}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjhhubj@ )}(hhh]h)}(hcallback helper for fence arrayh]hcallback helper for fence array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j` jja jjb jjc jd je uh1j hhhj3hNhNubjg )}(h**Definition**:: struct dma_fence_array_cb { struct dma_fence_cb cb; struct dma_fence_array *array; }; **Members** ``cb`` fence callback structure for signaling ``array`` reference to the parent fence array objecth](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjubj)}(h]struct dma_fence_array_cb { struct dma_fence_cb cb; struct dma_fence_array *array; };h]h]struct dma_fence_array_cb { struct dma_fence_cb cb; struct dma_fence_array *array; };}hj4sbah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjubh)}(h **Members**h]jq )}(hjEh]hMembers}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjCubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjubj )}(hhh](j )}(h.``cb`` fence callback structure for signaling h](j )}(h``cb``h]j)}(hjdh]hcb}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhj^ubj )}(hhh]h)}(h&fence callback structure for signalingh]h&fence callback structure for signaling}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhKhjzubah}(h]h ]h"]h$]h&]uh1j hj^ubeh}(h]h ]h"]h$]h&]uh1j hjyhKhj[ubj )}(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:204: ./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:204: ./include/linux/dma-fence-array.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhj[ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj3hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_array (C struct)c.dma_fence_arrayhNtauh1j hj3hhhNhNubj )}(hhh](j )}(hdma_fence_arrayh]j )}(hstruct dma_fence_arrayh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubj )}(hdma_fence_arrayh]j )}(hjh]hdma_fence_array}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjhhubj@ )}(hhh]h)}(h%fence to represent an array of fencesh]h%fence to represent an array of fences}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhj6hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j` jja jQjb jQjc jd je uh1j hhhj3hNhNubjg )}(hX2**Definition**:: struct dma_fence_array { struct dma_fence base; spinlock_t lock; unsigned num_fences; atomic_t num_pending; struct dma_fence **fences; struct irq_work work; struct dma_fence_array_cb callbacks[] ; }; **Members** ``base`` fence base class ``lock`` spinlock for fence handling ``num_fences`` number of fences in the array ``num_pending`` fences in the array still pending ``fences`` array of the fences ``work`` internal irq_work function ``callbacks`` array of callback helpersh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjYubh:}(hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK!hjUubj)}(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[] ; };}hjvsbah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK#hjUubh)}(h **Members**h]jq )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK-hjUubj )}(hhh](j )}(h``base`` fence base class h](j )}(h``base``h]j)}(hjh]hbase}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.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)}(hjh]hlock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK hjubj )}(hhh]h)}(hspinlock for fence handlingh]hspinlock for fence handling}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK hjubj )}(h-``num_fences`` number of fences in the array h](j )}(h``num_fences``h]j)}(hjh]h num_fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK!hjubj )}(hhh]h)}(hnumber of fences in the arrayh]hnumber of fences in the array}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hK!hj.ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj-hK!hjubj )}(h2``num_pending`` fences in the array still pending h](j )}(h``num_pending``h]j)}(hjQh]h num_pending}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK"hjKubj )}(hhh]h)}(h!fences in the array still pendingh]h!fences in the array still pending}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhK"hjgubah}(h]h ]h"]h$]h&]uh1j hjKubeh}(h]h ]h"]h$]h&]uh1j hjfhK"hjubj )}(h``fences`` array of the fences h](j )}(h ``fences``h]j)}(hjh]hfences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK#hjubj )}(hhh]h)}(harray of the fencesh]harray of the fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK#hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK#hjubj )}(h$``work`` internal irq_work function h](j )}(h``work``h]j)}(hjh]hwork}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK$hjubj )}(hhh]h)}(hinternal irq_work functionh]hinternal irq_work function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK$hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK$hjubj )}(h'``callbacks`` array of callback helpersh](j )}(h ``callbacks``h]j)}(hjh]h callbacks}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK$hjubj )}(hhh]h)}(harray of callback helpersh]harray of callback helpers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK%hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK$hjubeh}(h]h ]h"]h$]h&]uh1j hjUubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj3hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j to_dma_fence_array (C function)c.to_dma_fence_arrayhNtauh1j hj3hhhNhNubj )}(hhh](j )}(hEstruct dma_fence_array * to_dma_fence_array (struct dma_fence *fence)h]j )}(hCstruct dma_fence_array *to_dma_fence_array(struct dma_fence *fence)h](j )}(hj h]hstruct}(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRhhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK4ubj )}(h h]h }(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRhhhjchK4ubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjrubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjwmodnameN classnameNjj)}j]jN)}jFto_dma_fence_arraysbc.to_dma_fence_arrayasbuh1hhjRhhhjchK4ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRhhhjchK4ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjRhhhjchK4ubj )}(hto_dma_fence_arrayh]j )}(hjh]hto_dma_fence_array}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjRhhhjchK4ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jc.to_dma_fence_arrayasbuh1hhjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjRhhhjchK4ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjNhhhjchK4ubah}(h]jIah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjchK4hjKhhubj@ )}(hhh]h)}(h!cast a fence to a dma_fence_arrayh]h!cast a fence to a dma_fence_array}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK4hjNhhubah}(h]h ]h"]h$]h&]uh1j? hjKhhhjchK4ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jijb jijc jd je uh1j hhhj3hNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` fence to cast to a dma_fence_array **Description** Returns NULL if the fence is not a dma_fence_array, or the dma_fence_array otherwise.h](h)}(h**Parameters**h]jq )}(hjsh]h Parameters}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjqubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK8hjmubj )}(hhh]j )}(h?``struct dma_fence *fence`` fence to cast to a dma_fence_array h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK5hjubj )}(hhh]h)}(h"fence to cast to a dma_fence_arrayh]h"fence to cast to a dma_fence_array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK5hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK5hjubah}(h]h ]h"]h$]h&]uh1j hjmubh)}(h**Description**h]jq )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK7hjmubh)}(hUReturns NULL if the fence is not a dma_fence_array, or the dma_fence_array otherwise.h]hUReturns NULL if the fence is not a dma_fence_array, or the dma_fence_array otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK7hjmubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj3hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_fence_array_for_each (C macro)c.dma_fence_array_for_eachhNtauh1j hj3hhhNhNubj )}(hhh](j )}(hdma_fence_array_for_eachh]j )}(hdma_fence_array_for_eachh]j )}(hdma_fence_array_for_eachh]j )}(hj h]hdma_fence_array_for_each}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKDubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj hhhj)hKDubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj)hKDhjhhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hjhhhj)hKDubeh}(h]h ](jmacroeh"]h$]h&]j` jja jBjb jBjc jd je uh1j hhhj3hNhNubh)}(h1``dma_fence_array_for_each (fence, index, head)``h]j)}(hjHh]h-dma_fence_array_for_each (fence, index, head)}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKFhj3hhubh)}(h!iterate over all fences in array h]h)}(h iterate over all fences in arrayh]h iterate over all fences in array}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKDhj^ubah}(h]h ]h"]h$]h&]uh1hhjphKDhj3hhubjg )}(hX\**Parameters** ``fence`` current fence ``index`` index into the array ``head`` potential dma_fence_array object **Description** Test if **array** is a dma_fence_array object and if yes iterate over all fences in the array. If not just iterate over the fence in **array** itself. For a deep dive iterator see dma_fence_unwrap_for_each().h](h)}(h**Parameters**h]jq )}(hj}h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj{ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKHhjwubj )}(hhh](j )}(h``fence`` current fence h](j )}(h ``fence``h]j)}(hjh]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKEhjubj )}(hhh]h)}(h current fenceh]h current fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKEhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKEhjubj )}(h``index`` index into the array h](j )}(h ``index``h]j)}(hjh]hindex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKFhjubj )}(hhh]h)}(hindex into the arrayh]hindex into the array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKFhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKFhjubj )}(h*``head`` potential dma_fence_array object h](j )}(h``head``h]j)}(hjh]hhead}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKGhjubj )}(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 hjubeh}(h]h ]h"]h$]h&]uh1j hj#hKGhjubeh}(h]h ]h"]h$]h&]uh1j hjwubh)}(h**Description**h]jq )}(hjIh]h Description}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjGubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKIhjwubh)}(hTest if **array** is a dma_fence_array object and if yes iterate over all fences in the array. If not just iterate over the fence in **array** itself.h](hTest if }(hj_hhhNhNubjq )}(h **array**h]harray}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj_ubht is a dma_fence_array object and if yes iterate over all fences in the array. If not just iterate over the fence in }(hj_hhhNhNubjq )}(h **array**h]harray}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj_ubh itself.}(hj_hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKIhjwubh)}(h9For a deep dive iterator see dma_fence_unwrap_for_each().h]h9For a deep dive iterator see dma_fence_unwrap_for_each().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKLhjwubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj3hhhNhNubeh}(h]dma-fence-arrayah ]h"]dma fence arrayah$]h&]uh1hhjժhhhhhKubh)}(hhh](h)}(hDMA Fence Chainh]hDMA Fence Chain}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_fence_chain_walk (C function)c.dma_fence_chain_walkhNtauh1j hjhhhNhNubj )}(hhh](j )}(hAstruct dma_fence * dma_fence_chain_walk (struct dma_fence *fence)h]j )}(h?struct dma_fence *dma_fence_chain_walk(struct dma_fence *fence)h](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhK ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFdma_fence_chain_walksbc.dma_fence_chain_walkasbuh1hhjhhhjhK ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhK ubjc)}(hj h]h*}(hj(hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjhhhjhK ubj )}(hdma_fence_chain_walkh]j )}(hjh]hdma_fence_chain_walk}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhK ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjThhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjPubj )}(h h]h }(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjPubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjoubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjtmodnameN classnameNjj)}j]jc.dma_fence_chain_walkasbuh1hhjPubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjPubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjPubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjPubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjLubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhK ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhK ubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhK hjhhubj@ )}(hhh]h)}(hchain walking functionh]hchain walking function}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK hjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhK ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` current chain node **Description** Walk the chain to the next node. Returns the next fence or NULL if we are at the end of the chain. Garbage collects chain nodes which are already signaled.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK$hjubj )}(hhh]j )}(h/``struct dma_fence *fence`` current chain node h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK!hjubj )}(hhh]h)}(hcurrent chain nodeh]hcurrent chain node}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hK!hj,ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj+hK!hj ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hjQh]h Description}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjOubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK#hjubh)}(hWalk the chain to the next node. Returns the next fence or NULL if we are at the end of the chain. Garbage collects chain nodes which are already signaled.h]hWalk the chain to the next node. Returns the next fence or NULL if we are at the end of the chain. Garbage collects chain nodes which are already signaled.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK#hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_chain_find_seqno (C function)c.dma_fence_chain_find_seqnohNtauh1j hjhhhNhNubj )}(hhh](j )}(hJint dma_fence_chain_find_seqno (struct dma_fence **pfence, uint64_t seqno)h]j )}(hIint dma_fence_chain_find_seqno(struct dma_fence **pfence, uint64_t seqno)h](jK)}(hinth]hint}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKPubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKPubj )}(hdma_fence_chain_find_seqnoh]j )}(hdma_fence_chain_find_seqnoh]hdma_fence_chain_find_seqno}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKPubj)}(h+(struct dma_fence **pfence, uint64_t seqno)h](j)}(hstruct dma_fence **pfenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_chain_find_seqnoasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubjc)}(hj h]h*}(hj,hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hpfenceh]hpfence}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(huint64_t seqnoh](h)}(hhh]j )}(huint64_th]huint64_t}(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjWmodnameN classnameNjj)}j]j c.dma_fence_chain_find_seqnoasbuh1hhjNubj )}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNubj )}(hseqnoh]hseqno}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKPubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKPubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKPhjhhubj@ )}(hhh]h)}(hfind fence chain node by seqnoh]hfind fence chain node by seqno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKPhjhhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKPubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jjb jjc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence **pfence`` pointer to the chain node where to start ``uint64_t seqno`` the sequence number to search for **Description** Advance the fence pointer to the chain node which will signal this sequence number. If no sequence number is provided then this is a no-op. Returns EINVAL if the fence is not a chain node or the sequence number has not yet advanced far enough.h](h)}(h**Parameters**h]jq )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKThjubj )}(hhh](j )}(hG``struct dma_fence **pfence`` pointer to the chain node where to start h](j )}(h``struct dma_fence **pfence``h]j)}(hjh]hstruct dma_fence **pfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKQhjubj )}(hhh]h)}(h(pointer to the chain node where to starth]h(pointer to the chain node where to start}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKQhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKQhjubj )}(h5``uint64_t seqno`` the sequence number to search for h](j )}(h``uint64_t seqno``h]j)}(hj%h]huint64_t seqno}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKRhjubj )}(hhh]h)}(h!the sequence number to search forh]h!the sequence number to search for}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hKRhj;ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj:hKRhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jq )}(hj`h]h Description}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj^ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKThjubh)}(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.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKThjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKWhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_fence_chain_init (C function)c.dma_fence_chain_inithNtauh1j hjhhhNhNubj )}(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](jK)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhKubj )}(hdma_fence_chain_inith]j )}(hdma_fence_chain_inith]hdma_fence_chain_init}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjhhhjhKubj)}(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 )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(hdma_fence_chainh]hdma_fence_chain}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]jN)}jFjsbc.dma_fence_chain_initasbuh1hhjubj )}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj=hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hchainh]hchain}(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence *prevh](j )}(hj h]hstruct}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubj )}(h h]h }(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]j+c.dma_fence_chain_initasbuh1hhj_ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubjc)}(hj h]h*}(hjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj_ubj )}(hprevh]hprev}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjmodnameN classnameNjj)}j]j+c.dma_fence_chain_initasbuh1hhjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjc)}(hj h]h*}(hj hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjubj )}(hfenceh]hfence}(hj* hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(huint64_t seqnoh](h)}(hhh]j )}(huint64_th]huint64_t}(hjF hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjC ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjH modnameN classnameNjj)}j]j+c.dma_fence_chain_initasbuh1hhj? ubj )}(h h]h }(hjd hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj? ubj )}(hseqnoh]hseqno}(hjr hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj? ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjhhhjhKubah}(h]jah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjhKhjhhubj@ )}(hhh]h)}(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:210: ./drivers/dma-buf/dma-fence-chain.chKhj hhubah}(h]h ]h"]h$]h&]uh1j? hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j jb j jc jd je uh1j hhhjhNhNubjg )}(hX**Parameters** ``struct dma_fence_chain *chain`` the chain node to initialize ``struct dma_fence *prev`` the previous fence ``struct dma_fence *fence`` the current fence ``uint64_t seqno`` the sequence number to use for the fence chain **Description** Initialize a new chain node and either start a new chain or add the node to the existing chain of the previous fence.h](h)}(h**Parameters**h]jq )}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj ubj )}(hhh](j )}(h?``struct dma_fence_chain *chain`` the chain node to initialize h](j )}(h!``struct dma_fence_chain *chain``h]j)}(hj h]hstruct dma_fence_chain *chain}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj ubj )}(hhh]h)}(hthe chain node to initializeh]hthe chain node to initialize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKhj ubj )}(h.``struct dma_fence *prev`` the previous fence h](j )}(h``struct dma_fence *prev``h]j)}(hj!h]hstruct dma_fence *prev}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj!ubj )}(hhh]h)}(hthe previous fenceh]hthe previous fence}(hj/!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+!hKhj,!ubah}(h]h ]h"]h$]h&]uh1j hj!ubeh}(h]h ]h"]h$]h&]uh1j hj+!hKhj ubj )}(h.``struct dma_fence *fence`` the current fence h](j )}(h``struct dma_fence *fence``h]j)}(hjO!h]hstruct dma_fence *fence}(hjQ!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjM!ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhjI!ubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hjh!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjd!hKhje!ubah}(h]h ]h"]h$]h&]uh1j hjI!ubeh}(h]h ]h"]h$]h&]uh1j hjd!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:210: ./drivers/dma-buf/dma-fence-chain.chKhj!ubj )}(hhh]h)}(h.the sequence number to use for the fence chainh]h.the sequence number to use for the fence chain}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hKhj!ubah}(h]h ]h"]h$]h&]uh1j hj!ubeh}(h]h ]h"]h$]h&]uh1j hj!hKhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]jq )}(hj!h]h Description}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj!ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj ubh)}(huInitialize a new chain node and either start a new chain or add the node to the existing chain of the previous fence.h]huInitialize a new chain node and either start a new chain or add the node to the existing chain of the previous fence.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_chain (C struct)c.dma_fence_chainhNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_fence_chainh]j )}(hstruct dma_fence_chainh](j )}(hj h]hstruct}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKubj )}(h h]h }(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"hhhj"hKubj )}(hdma_fence_chainh]j )}(hj"h]hdma_fence_chain}(hj("hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$"ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj"hhhj"hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj"hhhj"hKubah}(h]j!ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj"hKhj!hhubj@ )}(hhh]h)}(h+fence to represent an node of a fence chainh]h+fence to represent an node of a fence chain}(hjJ"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhjG"hhubah}(h]h ]h"]h$]h&]uh1j? hj!hhhj"hKubeh}(h]h ](jstructeh"]h$]h&]j` jja jb"jb jb"jc jd je uh1j hhhjhNhNubjg )}(hXr**Definition**:: struct dma_fence_chain { struct dma_fence base; struct dma_fence __rcu *prev; u64 prev_seqno; struct dma_fence *fence; union { struct dma_fence_cb cb; struct irq_work work; }; spinlock_t lock; }; **Members** ``base`` fence base class ``prev`` previous fence of the chain ``prev_seqno`` original previous seqno before garbage collection ``fence`` encapsulated fence ``{unnamed_union}`` anonymous ``cb`` callback for signaling This is used to add the callback for signaling the complection of the fence chain. Never used at the same time as the irq work. ``work`` irq work item for signaling Irq work structure to allow us to add the callback without running into lock inversion. Never used at the same time as the callback. ``lock`` spinlock for fence handlingh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjn"hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjj"ubh:}(hjj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhjf"ubj)}(hstruct dma_fence_chain { struct dma_fence base; struct dma_fence __rcu *prev; u64 prev_seqno; struct dma_fence *fence; union { struct dma_fence_cb cb; struct irq_work work; }; spinlock_t lock; };h]hstruct dma_fence_chain { struct dma_fence base; struct dma_fence __rcu *prev; u64 prev_seqno; struct dma_fence *fence; union { struct dma_fence_cb cb; struct irq_work work; }; spinlock_t lock; };}hj"sbah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhjf"ubh)}(h **Members**h]jq )}(hj"h]hMembers}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj"ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK$hjf"ubj )}(hhh](j )}(h``base`` fence base class h](j )}(h``base``h]j)}(hj"h]hbase}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhj"ubj )}(hhh]h)}(hfence base classh]hfence base class}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hKhj"ubah}(h]h ]h"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]uh1j hj"hKhj"ubj )}(h%``prev`` previous fence of the chain h](j )}(h``prev``h]j)}(hj"h]hprev}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhj"ubj )}(hhh]h)}(hprevious fence of the chainh]hprevious fence of the chain}(hj #hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hKhj#ubah}(h]h ]h"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]uh1j hj#hKhj"ubj )}(hA``prev_seqno`` original previous seqno before garbage collection h](j )}(h``prev_seqno``h]j)}(hj)#h]h prev_seqno}(hj+#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'#ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhj##ubj )}(hhh]h)}(h1original previous seqno before garbage collectionh]h1original previous seqno before garbage collection}(hjB#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>#hKhj?#ubah}(h]h ]h"]h$]h&]uh1j hj##ubeh}(h]h ]h"]h$]h&]uh1j hj>#hKhj"ubj )}(h``fence`` encapsulated fence h](j )}(h ``fence``h]j)}(hjb#h]hfence}(hjd#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`#ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhj\#ubj )}(hhh]h)}(hencapsulated fenceh]hencapsulated fence}(hj{#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjw#hKhjx#ubah}(h]h ]h"]h$]h&]uh1j hj\#ubeh}(h]h ]h"]h$]h&]uh1j hjw#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:213: ./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:213: ./include/linux/dma-fence-chain.hhK%hj#ubj )}(hhh](h)}(hcallback for signalingh]hcallback for signaling}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK!hj#ubh)}(hThis is used to add the callback for signaling the complection of the fence chain. Never used at the same time as the irq work.h]hThis is used to add the callback for signaling the complection of the fence chain. Never used at the same time as the irq work.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK#hj#ubeh}(h]h ]h"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]uh1j hj#hK%hj"ubj )}(h``work`` irq work item for signaling Irq work structure to allow us to add the callback without running into lock inversion. Never used at the same time as the callback. h](j )}(h``work``h]j)}(hj$h]hwork}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK.hj$ubj )}(hhh](h)}(hirq work item for signalingh]hirq work item for signaling}(hj6$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK*hj3$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.}(hjE$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK,hj3$ubeh}(h]h ]h"]h$]h&]uh1j hj$ubeh}(h]h ]h"]h$]h&]uh1j hj2$hK.hj"ubj )}(h$``lock`` spinlock for fence handlingh](j )}(h``lock``h]j)}(hjf$h]hlock}(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:213: ./include/linux/dma-fence-chain.hhKhj`$ubj )}(hhh]h)}(hspinlock for fence handlingh]hspinlock for fence handling}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.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 hjf"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j to_dma_fence_chain (C function)c.to_dma_fence_chainhNtauh1j hjhhhNhNubj )}(hhh](j )}(hEstruct dma_fence_chain * to_dma_fence_chain (struct dma_fence *fence)h]j )}(hCstruct dma_fence_chain *to_dma_fence_chain(struct dma_fence *fence)h](j )}(hj h]hstruct}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK6ubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$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&] refdomainjreftypejF reftargetj$modnameN classnameNjj)}j]jN)}jFto_dma_fence_chainsbc.to_dma_fence_chainasbuh1hhj$hhhj$hK6ubj )}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$hhhj$hK6ubjc)}(hj h]h*}(hj%hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj$hhhj$hK6ubj )}(hto_dma_fence_chainh]j )}(hj$h]hto_dma_fence_chain}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj$hhhj$hK6ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj:%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6%ubj )}(h h]h }(hjG%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6%ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjX%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjU%ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetjZ%modnameN classnameNjj)}j]j$c.to_dma_fence_chainasbuh1hhj6%ubj )}(h h]h }(hjv%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6%ubjc)}(hj h]h*}(hj%hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj6%ubj )}(hfenceh]hfence}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj2%ubah}(h]h ]h"]h$]h&]jjuh1jhj$hhhj$hK6ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj$hhhj$hK6ubah}(h]j$ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj$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:213: ./include/linux/dma-fence-chain.hhK6hj%hhubah}(h]h ]h"]h$]h&]uh1j? hj$hhhj$hK6ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j%jb j%jc jd je uh1j hhhjhNhNubjg )}(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]jq )}(hj%h]h Parameters}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj%ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK:hj%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:213: ./include/linux/dma-fence-chain.hhK7hj%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&hK7hj&ubah}(h]h ]h"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]uh1j hj&hK7hj%ubah}(h]h ]h"]h$]h&]uh1j hj%ubh)}(h**Description**h]jq )}(hj7&h]h Description}(hj9&hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj5&ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK9hj%ubh)}(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.}(hjM&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhK9hj%ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j &dma_fence_chain_contained (C function)c.dma_fence_chain_containedhNtauh1j hjhhhNhNubj )}(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 )}(hj h]hstruct}(hj|&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjx&hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKFubj )}(h h]h }(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjx&hhhj&hKFubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj&modnameN classnameNjj)}j]jN)}jFdma_fence_chain_containedsbc.dma_fence_chain_containedasbuh1hhjx&hhhj&hKFubj )}(h h]h }(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjx&hhhj&hKFubjc)}(hj h]h*}(hj&hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhjx&hhhj&hKFubj )}(hdma_fence_chain_containedh]j )}(hj&h]hdma_fence_chain_contained}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjx&hhhj&hKFubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubj )}(h h]h }(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj'modnameN classnameNjj)}j]j&c.dma_fence_chain_containedasbuh1hhj&ubj )}(h h]h }(hj2'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubjc)}(hj h]h*}(hj@'hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj&ubj )}(hfenceh]hfence}(hjM'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj&ubah}(h]h ]h"]h$]h&]jjuh1jhjx&hhhj&hKFubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjt&hhhj&hKFubah}(h]jo&ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj&hKFhjq&hhubj@ )}(hhh]h)}(hreturn the contained fenceh]hreturn the contained fence}(hjw'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKFhjt'hhubah}(h]h ]h"]h$]h&]uh1j? hjq&hhhj&hKFubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j'jb j'jc jd je uh1j hhhjhNhNubjg )}(h**Parameters** ``struct dma_fence *fence`` the fence to test **Description** If the fence is a dma_fence_chain the function returns the fence contained inside the chain object, otherwise it returns the fence itself.h](h)}(h**Parameters**h]jq )}(hj'h]h Parameters}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj'ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKJhj'ubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hj'h]hstruct dma_fence *fence}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKGhj'ubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hKGhj'ubah}(h]h ]h"]h$]h&]uh1j hj'ubeh}(h]h ]h"]h$]h&]uh1j hj'hKGhj'ubah}(h]h ]h"]h$]h&]uh1j hj'ubh)}(h**Description**h]jq )}(hj'h]h Description}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj'ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKIhj'ubh)}(hIf the fence is a dma_fence_chain the function returns the fence contained inside the chain object, otherwise it returns the fence itself.h]hIf the fence is a dma_fence_chain the function returns the fence contained inside the chain object, otherwise it returns the fence itself.}(hj (hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKIhj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_chain_alloc (C macro)c.dma_fence_chain_allochNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_fence_chain_alloch]j )}(hdma_fence_chain_alloch]j )}(hdma_fence_chain_alloch]j )}(hj2(h]hdma_fence_chain_alloc}(hj<(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8(ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj4(hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKUubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj0(hhhjO(hKUubah}(h]j+(ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjO(hKUhj-(hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hj-(hhhjO(hKUubeh}(h]h ](jmacroeh"]h$]h&]j` jja jh(jb jh(jc jd je uh1j hhhjhNhNubh)}(h``dma_fence_chain_alloc ()``h]j)}(hjn(h]hdma_fence_chain_alloc ()}(hjp(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjl(ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKWhjhhubh)}(hX**Description** Returns a new struct dma_fence_chain object or NULL on failure. This specialized allocator has to be a macro for its allocations to be accounted separately (to have a separate alloc_tag). The typecast is intentional to enforce typesafety. h](h)}(h**Description**h]jq )}(hj(h]h Description}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj(ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKWhj(ubh)}(h?Returns a new struct dma_fence_chain object or NULL on failure.h]h?Returns a new struct dma_fence_chain object or NULL on failure.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKVhj(ubh)}(hThis specialized allocator has to be a macro for its allocations to be accounted separately (to have a separate alloc_tag). The typecast is intentional to enforce typesafety.h]hThis specialized allocator has to be a macro for its allocations to be accounted separately (to have a separate alloc_tag). The typecast is intentional to enforce typesafety.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKXhj(ubeh}(h]h ]h"]h$]h&]uh1hhj(hKWhjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_fence_chain_free (C function)c.dma_fence_chain_freehNtauh1j hjhhhNhNubj )}(hhh](j )}(h9void dma_fence_chain_free (struct dma_fence_chain *chain)h]j )}(h8void dma_fence_chain_free(struct dma_fence_chain *chain)h](jK)}(hvoidh]hvoid}(hj(hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj(hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKaubj )}(h h]h }(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(hhhj(hKaubj )}(hdma_fence_chain_freeh]j )}(hdma_fence_chain_freeh]hdma_fence_chain_free}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj(hhhj(hKaubj)}(h(struct dma_fence_chain *chain)h]j)}(hstruct dma_fence_chain *chainh](j )}(hj h]hstruct}(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubj )}(h h]h }(hj')hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubh)}(hhh]j )}(hdma_fence_chainh]hdma_fence_chain}(hj8)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5)ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj:)modnameN classnameNjj)}j]jN)}jFj)sbc.dma_fence_chain_freeasbuh1hhj)ubj )}(h h]h }(hjX)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubjc)}(hj h]h*}(hjf)hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj)ubj )}(hchainh]hchain}(hjs)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj)ubah}(h]h ]h"]h$]h&]jjuh1jhj(hhhj(hKaubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj(hhhj(hKaubah}(h]j(ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj(hKahj(hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hj(hhhj(hKaubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j)jb j)jc jd je uh1j hhhjhNhNubjg )}(hXx**Parameters** ``struct dma_fence_chain *chain`` chain node to free **Description** Frees up an allocated but not used struct dma_fence_chain object. This doesn't need an RCU grace period since the fence was never initialized nor published. After dma_fence_chain_init() has been called the fence must be released by calling dma_fence_put(), and not through this function.h](h)}(h**Parameters**h]jq )}(hj)h]h Parameters}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj)ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKehj)ubj )}(hhh]j )}(h5``struct dma_fence_chain *chain`` chain node to free h](j )}(h!``struct dma_fence_chain *chain``h]j)}(hj)h]hstruct dma_fence_chain *chain}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKbhj)ubj )}(hhh]h)}(hchain node to freeh]hchain node to free}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hKbhj)ubah}(h]h ]h"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]uh1j hj)hKbhj)ubah}(h]h ]h"]h$]h&]uh1j hj)ubh)}(h**Description**h]jq )}(hj *h]h Description}(hj *hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj*ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKdhj)ubh)}(hXFrees up an allocated but not used struct dma_fence_chain object. This doesn't need an RCU grace period since the fence was never initialized nor published. After dma_fence_chain_init() has been called the fence must be released by calling dma_fence_put(), and not through this function.h]hX!Frees up an allocated but not used struct dma_fence_chain object. This doesn’t need an RCU grace period since the fence was never initialized nor published. After dma_fence_chain_init() has been called the fence must be released by calling dma_fence_put(), and not through this function.}(hj *hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKdhj)ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_fence_chain_for_each (C macro)c.dma_fence_chain_for_eachhNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_fence_chain_for_eachh]j )}(hdma_fence_chain_for_eachh]j )}(hdma_fence_chain_for_eachh]j )}(hjI*h]hdma_fence_chain_for_each}(hjS*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjO*ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjK*hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKoubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjG*hhhjf*hKoubah}(h]jB*ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjf*hKohjD*hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hjD*hhhjf*hKoubeh}(h]h ](jmacroeh"]h$]h&]j` jja j*jb j*jc jd je uh1j hhhjhNhNubh)}(h)``dma_fence_chain_for_each (iter, head)``h]j)}(hj*h]h%dma_fence_chain_for_each (iter, 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:213: ./include/linux/dma-fence-chain.hhKqhjhhubh)}(h!iterate over all fences in chain h]h)}(h iterate over all fences in chainh]h iterate over all fences in chain}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKohj*ubah}(h]h ]h"]h$]h&]uh1hhj*hKohjhhubjg )}(hX**Parameters** ``iter`` current fence ``head`` starting point **Description** Iterate over all fences in the chain. We keep a reference to the current fence while inside the loop which must be dropped when breaking out. For a deep dive iterator see dma_fence_unwrap_for_each().h](h)}(h**Parameters**h]jq )}(hj*h]h Parameters}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj*ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKshj*ubj )}(hhh](j )}(h``iter`` current fence h](j )}(h``iter``h]j)}(hj*h]hiter}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKphj*ubj )}(hhh]h)}(h current fenceh]h current fence}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hKphj*ubah}(h]h ]h"]h$]h&]uh1j hj*ubeh}(h]h ]h"]h$]h&]uh1j hj*hKphj*ubj )}(h``head`` starting point h](j )}(h``head``h]j)}(hj+h]hhead}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKqhj +ubj )}(hhh]h)}(hstarting pointh]hstarting point}(hj++hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'+hKqhj(+ubah}(h]h ]h"]h$]h&]uh1j hj +ubeh}(h]h ]h"]h$]h&]uh1j hj'+hKqhj*ubeh}(h]h ]h"]h$]h&]uh1j hj*ubh)}(h**Description**h]jq )}(hjM+h]h Description}(hjO+hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjK+ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKshj*ubh)}(hIterate over all fences in the chain. We keep a reference to the current fence while inside the loop which must be dropped when breaking out.h]hIterate over all fences in the chain. We keep a reference to the current fence while inside the loop which must be dropped when breaking out.}(hjc+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKshj*ubh)}(h9For a deep dive iterator see dma_fence_unwrap_for_each().h]h9For a deep dive iterator see dma_fence_unwrap_for_each().}(hjr+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKvhj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjhhhNhNubeh}(h]dma-fence-chainah ]h"]dma fence chainah$]h&]uh1hhjժhhhhhKubh)}(hhh](h)}(hDMA Fence unwraph]hDMA Fence unwrap}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_unwrap (C struct)c.dma_fence_unwraphNtauh1j hj+hhhNhNubj )}(hhh](j )}(hdma_fence_unwraph]j )}(hstruct dma_fence_unwraph](j )}(hj h]hstruct}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+hhhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKubj )}(h h]h }(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+hhhj+hKubj )}(hdma_fence_unwraph]j )}(hj+h]hdma_fence_unwrap}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj+hhhj+hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj+hhhj+hKubah}(h]j+ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj+hKhj+hhubj@ )}(hhh]h)}(h#cursor into the container structureh]h#cursor into the container structure}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhj+hhubah}(h]h ]h"]h$]h&]uh1j? hj+hhhj+hKubeh}(h]h ](jstructeh"]h$]h&]j` jja j,jb j,jc jd je uh1j hhhj+hNhNubjg )}(hXo**Definition**:: struct dma_fence_unwrap { struct dma_fence *chain; struct dma_fence *array; unsigned int index; }; **Members** ``chain`` potential dma_fence_chain, but can be other fence as well ``array`` potential dma_fence_array, but can be other fence as well ``index`` last returned index if **array** is really a dma_fence_arrayh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj ,hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj,ubh:}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhj,ubj)}(hnstruct dma_fence_unwrap { struct dma_fence *chain; struct dma_fence *array; unsigned int index; };h]hnstruct dma_fence_unwrap { struct dma_fence *chain; struct dma_fence *array; unsigned int index; };}hj9,sbah}(h]h ]h"]h$]h&]jjuh1jhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhj,ubh)}(h **Members**h]jq )}(hjJ,h]hMembers}(hjL,hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjH,ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhj,ubj )}(hhh](j )}(hD``chain`` potential dma_fence_chain, but can be other fence as well h](j )}(h ``chain``h]j)}(hji,h]hchain}(hjk,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjg,ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhjc,ubj )}(hhh]h)}(h9potential dma_fence_chain, but can be other fence as wellh]h9potential dma_fence_chain, but can be other fence as well}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~,hKhj,ubah}(h]h ]h"]h$]h&]uh1j hjc,ubeh}(h]h ]h"]h$]h&]uh1j hj~,hKhj`,ubj )}(hD``array`` potential dma_fence_array, but can be other fence as well h](j )}(h ``array``h]j)}(hj,h]harray}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhj,ubj )}(hhh]h)}(h9potential dma_fence_array, but can be other fence as wellh]h9potential dma_fence_array, but can be other fence as well}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hKhj,ubah}(h]h ]h"]h$]h&]uh1j hj,ubeh}(h]h ]h"]h$]h&]uh1j hj,hKhj`,ubj )}(hF``index`` last returned index if **array** is really a dma_fence_arrayh](j )}(h ``index``h]j)}(hj,h]hindex}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhj,ubj )}(hhh]h)}(h huh1j hj-hK&hjc-hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hjc-hhhj-hK&ubeh}(h]h ](jmacroeh"]h$]h&]j` jja j-jb j-jc jd je uh1j hhhj+hNhNubh)}(h3``dma_fence_unwrap_for_each (fence, cursor, head)``h]j)}(hj-h]h/dma_fence_unwrap_for_each (fence, cursor, head)}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK(hj+hhubh)}(h&iterate over all fences in containers h]h)}(h%iterate over all fences in containersh]h%iterate over all fences in containers}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK&hj-ubah}(h]h ]h"]h$]h&]uh1hhj-hK&hj+hhubjg )}(hXA**Parameters** ``fence`` current fence ``cursor`` current position inside the containers ``head`` starting point for the iterator **Description** Unwrap dma_fence_chain and dma_fence_array containers and deep dive into all potential fences in them. If **head** is just a normal fence only that one is returned.h](h)}(h**Parameters**h]jq )}(hj-h]h Parameters}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj-ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK*hj-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 hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK'hj-ubj )}(hhh]h)}(h current fenceh]h current 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-ubj )}(h2``cursor`` current position inside the containers h](j )}(h ``cursor``h]j)}(hj1.h]hcursor}(hj3.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/.ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK(hj+.ubj )}(hhh]h)}(h¤t position inside the containersh]h¤t position inside the containers}(hjJ.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjF.hK(hjG.ubah}(h]h ]h"]h$]h&]uh1j hj+.ubeh}(h]h ]h"]h$]h&]uh1j hjF.hK(hj-ubj )}(h)``head`` starting point for the iterator h](j )}(h``head``h]j)}(hjj.h]hhead}(hjl.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh.ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK)hjd.ubj )}(hhh]h)}(hstarting point for the iteratorh]hstarting point for the iterator}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hK)hj.ubah}(h]h ]h"]h$]h&]uh1j hjd.ubeh}(h]h ]h"]h$]h&]uh1j hj.hK)hj-ubeh}(h]h ]h"]h$]h&]uh1j hj-ubh)}(h**Description**h]jq )}(hj.h]h Description}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj.ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK+hj-ubh)}(hUnwrap dma_fence_chain and dma_fence_array containers and deep dive into all potential fences in them. If **head** is just a normal fence only that one is returned.h](hjUnwrap dma_fence_chain and dma_fence_array containers and deep dive into all potential fences in them. If }(hj.hhhNhNubjq )}(h**head**h]hhead}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj.ubh2 is just a normal fence only that one is returned.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK+hj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj+hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_unwrap_merge (C macro)c.dma_fence_unwrap_mergehNtauh1j hj+hhhNhNubj )}(hhh](j )}(hdma_fence_unwrap_mergeh]j )}(hdma_fence_unwrap_mergeh]j )}(hdma_fence_unwrap_mergeh]j )}(hj.h]hdma_fence_unwrap_merge}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj.hhhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhK:ubah}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj.hhhj/hK:ubah}(h]j.ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj/hK:hj.hhubj@ )}(hhh]h}(h]h ]h"]h$]h&]uh1j? hj.hhhj/hK:ubeh}(h]h ](jmacroeh"]h$]h&]j` jja j,/jb j,/jc jd je uh1j hhhj+hNhNubh)}(h ``dma_fence_unwrap_merge (...)``h]j)}(hj2/h]hdma_fence_unwrap_merge (...)}(hj4/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0/ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhja/ubj )}(hhh]j )}(h``...`` variable arguments h](j )}(h``...``h]j)}(hj/h]h...}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhj/ubj )}(hhh]h)}(hvariable argumentsh]hvariable arguments}(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}/ubah}(h]h ]h"]h$]h&]uh1j hja/ubh)}(h**Description**h]jq )}(hj/h]h Description}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj/ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:219: ./include/linux/dma-fence-unwrap.hhKhja/ubh)}(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:219: ./include/linux/dma-fence-unwrap.hhK;hja/ubh)}(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:219: ./include/linux/dma-fence-unwrap.hhK>hja/ubh)}(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:219: ./include/linux/dma-fence-unwrap.hhKAhja/ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj+hhhNhNubeh}(h]dma-fence-unwrapah ]h"]dma fence unwrapah$]h&]uh1hhjժhhhhhKubh)}(hhh](h)}(hDMA Fence Sync Fileh]hDMA Fence Sync File}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_file_create (C function)c.sync_file_createhNtauh1j hj0hhhNhNubj )}(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 )}(hj h]hstruct}(hj=0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj90hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chK9ubj )}(h h]h }(hjK0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj90hhhjJ0hK9ubh)}(hhh]j )}(h sync_fileh]h sync_file}(hj\0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjY0ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj^0modnameN classnameNjj)}j]jN)}jFsync_file_createsbc.sync_file_createasbuh1hhj90hhhjJ0hK9ubj )}(h h]h }(hj}0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj90hhhjJ0hK9ubjc)}(hj h]h*}(hj0hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj90hhhjJ0hK9ubj )}(hsync_file_createh]j )}(hjz0h]hsync_file_create}(hj0hhhNhNubah}(h]h ]j aoh"]h$]h&]uh1j hj0ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj90hhhjJ0hK9ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubj )}(h h]h }(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ]h"]h$]h&] refdomainjreftypejF reftargetj0modnameN classnameNjj)}j]jx0c.sync_file_createasbuh1hhj0ubj )}(h h]h }(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubjc)}(hj h]h*}(hj1hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jbhj0ubj )}(hfenceh]hfence}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubah}(h]h ]h"]h$]h&]jjuh1jhj90hhhjJ0hK9ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj50hhhjJ0hK9ubah}(h]j00ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hjJ0hK9hj20hhubj@ )}(hhh]h)}(hcreates a sync fileh]hcreates a sync file}(hj81hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chK9hj51hhubah}(h]h ]h"]h$]h&]uh1j? hj20hhhjJ0hK9ubeh}(h]h ](jfunctioneh"]h$]h&]j` jja jP1jb jP1jc jd je uh1j hhhj0hNhNubjg )}(hXh**Parameters** ``struct dma_fence *fence`` fence to add to the sync_fence **Description** Creates a sync_file containg **fence**. This function acquires and additional reference of **fence** for the newly-created :c:type:`sync_file`, if it succeeds. The sync_file can be released with fput(sync_file->file). Returns the sync_file or NULL in case of error.h](h)}(h**Parameters**h]jq )}(hjZ1h]h Parameters}(hj\1hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjX1ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chK=hjT1ubj )}(hhh]j )}(h;``struct dma_fence *fence`` fence to add to the sync_fence h](j )}(h``struct dma_fence *fence``h]j)}(hjy1h]hstruct dma_fence *fence}(hj{1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw1ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chK:hjs1ubj )}(hhh]h)}(hfence to add to the sync_fenceh]hfence to add to the sync_fence}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hK:hj1ubah}(h]h ]h"]h$]h&]uh1j hjs1ubeh}(h]h ]h"]h$]h&]uh1j hj1hK:hjp1ubah}(h]h ]h"]h$]h&]uh1j hjT1ubh)}(h**Description**h]jq )}(hj1h]h Description}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj1ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKfile). Returns the sync_file or NULL in case of error.h](hCreates a sync_file containg }(hj1hhhNhNubjq )}(h **fence**h]hfence}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj1ubh5. This function acquires and additional reference of }(hj1hhhNhNubjq )}(h **fence**h]hfence}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj1ubh for the newly-created }(hj1hhhNhNubh)}(h:c:type:`sync_file`h]j)}(hj1h]h sync_file}(hj1hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj sync_fileuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKfile). Returns the sync_file or NULL in case of error.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj2hK huh1j hjM2hKahj52hhubj@ )}(hhh]h)}(h)get the fence related to the sync_file fdh]h)get the fence related to the sync_file fd}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKahj2hhubah}(h]h ]h"]h$]h&]uh1j? hj52hhhjM2hKaubeh}(h]h ](jfunctioneh"]h$]h&]j` jja j3jb j3jc jd je uh1j hhhj0hNhNubjg )}(h**Parameters** ``int fd`` sync_file fd to get the fence from **Description** Ensures **fd** references a valid sync_file and returns a fence that represents all fence in the sync_file. On error NULL is returned.h](h)}(h**Parameters**h]jq )}(hj"3h]h Parameters}(hj$3hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj 3ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKehj3ubj )}(hhh]j )}(h.``int fd`` sync_file fd to get the fence from h](j )}(h ``int fd``h]j)}(hjA3h]hint fd}(hjC3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?3ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKbhj;3ubj )}(hhh]h)}(h"sync_file fd to get the fence fromh]h"sync_file fd to get the fence from}(hjZ3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjV3hKbhjW3ubah}(h]h ]h"]h$]h&]uh1j hj;3ubeh}(h]h ]h"]h$]h&]uh1j hjV3hKbhj83ubah}(h]h ]h"]h$]h&]uh1j hj3ubh)}(h**Description**h]jq )}(hj|3h]h Description}(hj~3hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjz3ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKdhj3ubh)}(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 }(hj3hhhNhNubjq )}(h**fd**h]hfd}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj3ubhx references a valid sync_file and returns a fence that represents all fence in the sync_file. On error NULL is returned.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKdhj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj0hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_file (C struct) c.sync_filehNtauh1j hj0hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhNubj )}(hhh](j )}(h sync_fileh]j )}(hstruct sync_fileh](j )}(hj h]hstruct}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKubj )}(h h]h }(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3hhhj3hKubj )}(h sync_fileh]j )}(hj3h]h sync_file}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj3hhhj3hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj3hhhj3hKubah}(h]j3ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj3hKhj3hhubj@ )}(hhh]h)}(h$sync file to export to the userspaceh]h$sync file to export to the userspace}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj4hhubah}(h]h ]h"]h$]h&]uh1j? hj3hhhj3hKubeh}(h]h ](jstructeh"]h$]h&]j` jja j.4jb j.4jc jd je uh1j hhhj0hj3hNubjg )}(hX**Definition**:: struct sync_file { struct file *file; char user_name[32]; #ifdef CONFIG_DEBUG_FS; struct list_head sync_file_list; #endif; wait_queue_head_t wq; unsigned long flags; struct dma_fence *fence; struct dma_fence_cb cb; }; **Members** ``file`` file representing this fence ``user_name`` Name of the sync file provided by userspace, for merged fences. Otherwise generated through driver callbacks (in which case the entire array is 0). ``sync_file_list`` membership in global file list ``wq`` wait queue for fence signaling ``flags`` flags for the sync_file ``fence`` fence with the fences in the sync_file ``cb`` fence callback informationh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj:4hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj64ubh:}(hj64hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj24ubj)}(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; };}hjS4sbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj24ubh)}(h **Members**h]jq )}(hjd4h]hMembers}(hjf4hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjb4ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhK*hj24ubj )}(hhh](j )}(h&``file`` file representing this fence h](j )}(h``file``h]j)}(hj4h]hfile}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj}4ubj )}(hhh]h)}(hfile representing this fenceh]hfile representing this fence}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hKhj4ubah}(h]h ]h"]h$]h&]uh1j hj}4ubeh}(h]h ]h"]h$]h&]uh1j hj4hKhjz4ubj )}(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)}(hj4h]h user_name}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhK)hj4ubj )}(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).}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhK'hj4ubah}(h]h ]h"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]uh1j hj4hK)hjz4ubj )}(h2``sync_file_list`` membership in global file list h](j )}(h``sync_file_list``h]j)}(hj4h]hsync_file_list}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj4ubj )}(hhh]h)}(hmembership in global file listh]hmembership in global file list}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 5hKhj 5ubah}(h]h ]h"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]uh1j hj 5hKhjz4ubj )}(h&``wq`` wait queue for fence signaling h](j )}(h``wq``h]j)}(hj/5h]hwq}(hj15hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-5ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj)5ubj )}(hhh]h)}(hwait queue for fence signalingh]hwait queue for fence signaling}(hjH5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjD5hKhjE5ubah}(h]h ]h"]h$]h&]uh1j hj)5ubeh}(h]h ]h"]h$]h&]uh1j hjD5hKhjz4ubj )}(h"``flags`` flags for the sync_file h](j )}(h ``flags``h]j)}(hjh5h]hflags}(hjj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjf5ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhjb5ubj )}(hhh]h)}(hflags for the sync_fileh]hflags for the sync_file}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}5hKhj~5ubah}(h]h ]h"]h$]h&]uh1j hjb5ubeh}(h]h ]h"]h$]h&]uh1j hj}5hKhjz4ubj )}(h1``fence`` fence with the fences in the sync_file h](j )}(h ``fence``h]j)}(hj5h]hfence}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj5ubj )}(hhh]h)}(h&fence with the fences in the sync_fileh]h&fence with the fences in the sync_file}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hKhj5ubah}(h]h ]h"]h$]h&]uh1j hj5ubeh}(h]h ]h"]h$]h&]uh1j hj5hKhjz4ubj )}(h!``cb`` fence callback informationh](j )}(h``cb``h]j)}(hj5h]hcb}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj5ubj )}(hhh]h)}(hfence callback informationh]hfence callback information}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhKhj5ubah}(h]h ]h"]h$]h&]uh1j hj5ubeh}(h]h ]h"]h$]h&]uh1j hj5hKhjz4ubeh}(h]h ]h"]h$]h&]uh1j hj24ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hj0hhhj3hNubh)}(h**Description**h]jq )}(hj6h]h Description}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj6ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhK"hj0hhubh)}(hEflags: POLL_ENABLED: whether userspace is currently poll()'ing or noth]hGflags: POLL_ENABLED: whether userspace is currently poll()’ing or not}(hj36hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:228: ./include/linux/sync_file.hhK hj0hhubeh}(h]dma-fence-sync-fileah ]h"]dma fence sync fileah$]h&]uh1hhjժhhhhhKubh)}(hhh](h)}(hDMA Fence Sync File uABIh]hDMA Fence Sync File uABI}(hjM6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJ6hhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_merge_data (C struct)c.sync_merge_datahNtauh1j hjJ6hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhNubj )}(hhh](j )}(hsync_merge_datah]j )}(hstruct sync_merge_datah](j )}(hj h]hstruct}(hju6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjq6hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKubj )}(h h]h }(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjq6hhhj6hKubj )}(hsync_merge_datah]j )}(hjo6h]hsync_merge_data}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjq6hhhj6hKubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjm6hhhj6hKubah}(h]jg6ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj6hKhjj6hhubj@ )}(hhh]h)}(h SYNC_IOC_MERGE: merge two fencesh]h SYNC_IOC_MERGE: merge two fences}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj6hhubah}(h]h ]h"]h$]h&]uh1j? hjj6hhhj6hKubeh}(h]h ](jstructeh"]h$]h&]j` jja j6jb j6jc jd je uh1j hhhjJ6hji6hNubjg )}(hX{**Definition**:: struct sync_merge_data { char name[32]; __s32 fd2; __s32 fence; __u32 flags; __u32 pad; }; **Members** ``name`` name of new fence ``fd2`` file descriptor of second fence ``fence`` returns the fd of the new fence to userspace ``flags`` merge_data flags ``pad`` padding for 64-bit alignment, should always be zeroh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj6ubh:}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj6ubj)}(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; };}hj6sbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj6ubh)}(h **Members**h]jq )}(hj7h]hMembers}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj7ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK!hj6ubj )}(hhh](j )}(h``name`` name of new fence h](j )}(h``name``h]j)}(hj$7h]hname}(hj&7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"7ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj7ubj )}(hhh]h)}(hname of new fenceh]hname of new fence}(hj=7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj97hKhj:7ubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hj97hKhj7ubj )}(h(``fd2`` file descriptor of second fence h](j )}(h``fd2``h]j)}(hj]7h]hfd2}(hj_7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[7ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhjW7ubj )}(hhh]h)}(hfile descriptor of second fenceh]hfile descriptor of second fence}(hjv7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjr7hKhjs7ubah}(h]h ]h"]h$]h&]uh1j hjW7ubeh}(h]h ]h"]h$]h&]uh1j hjr7hKhj7ubj )}(h7``fence`` returns the fd of the new fence to userspace h](j )}(h ``fence``h]j)}(hj7h]hfence}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj7ubj )}(hhh]h)}(h,returns the fd of the new fence to userspaceh]h,returns the fd of the new fence to userspace}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hKhj7ubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hj7hKhj7ubj )}(h``flags`` merge_data flags h](j )}(h ``flags``h]j)}(hj7h]hflags}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj7ubj )}(hhh]h)}(hmerge_data flagsh]hmerge_data flags}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hKhj7ubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hj7hKhj7ubj )}(h;``pad`` padding for 64-bit alignment, should always be zeroh](j )}(h``pad``h]j)}(hj8h]hpad}(hj 8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj8ubj )}(hhh]h)}(h3padding for 64-bit alignment, should always be zeroh]h3padding for 64-bit alignment, should always be zero}(hj!8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj8ubah}(h]h ]h"]h$]h&]uh1j hj8ubeh}(h]h ]h"]h$]h&]uh1j hj8hKhj7ubeh}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjJ6hhhji6hNubh)}(h**Description**h]jq )}(hjK8h]h Description}(hjM8hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjI8ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhjJ6hhubh)}(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}(hja8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhjJ6hhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_fence_info (C struct)c.sync_fence_infohNtauh1j hjJ6hhhji6hNubj )}(hhh](j )}(hsync_fence_infoh]j )}(hstruct sync_fence_infoh](j )}(hj h]hstruct}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK!ubj )}(h h]h }(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8hhhj8hK!ubj )}(hsync_fence_infoh]j )}(hj8h]hsync_fence_info}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj8hhhj8hK!ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj8hhhj8hK!ubah}(h]j|8ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj8hK!hj~8hhubj@ )}(hhh]h)}(hdetailed fence informationh]hdetailed fence information}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK'hj8hhubah}(h]h ]h"]h$]h&]uh1j? hj~8hhhj8hK!ubeh}(h]h ](jstructeh"]h$]h&]j` jja j8jb j8jc jd je uh1j hhhjJ6hji6hNubjg )}(hX**Definition**:: struct sync_fence_info { char obj_name[32]; char driver_name[32]; __s32 status; __u32 flags; __u64 timestamp_ns; }; **Members** ``obj_name`` name of parent sync_timeline ``driver_name`` name of driver implementing the parent ``status`` status of the fence 0:active 1:signaled <0:error ``flags`` fence_info flags ``timestamp_ns`` timestamp of status change in nanosecondsh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj8ubh:}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK+hj8ubj)}(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; };}hj9sbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK-hj8ubh)}(h **Members**h]jq )}(hj9h]hMembers}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj9ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK5hj8ubj )}(hhh](j )}(h*``obj_name`` name of parent sync_timeline h](j )}(h ``obj_name``h]j)}(hj89h]hobj_name}(hj:9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj69ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK)hj29ubj )}(hhh]h)}(hname of parent sync_timelineh]hname of parent sync_timeline}(hjQ9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjM9hK)hjN9ubah}(h]h ]h"]h$]h&]uh1j hj29ubeh}(h]h ]h"]h$]h&]uh1j hjM9hK)hj/9ubj )}(h7``driver_name`` name of driver implementing the parent h](j )}(h``driver_name``h]j)}(hjq9h]h driver_name}(hjs9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjo9ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK*hjk9ubj )}(hhh]h)}(h&name of driver implementing the parenth]h&name of driver implementing the parent}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hK*hj9ubah}(h]h ]h"]h$]h&]uh1j hjk9ubeh}(h]h ]h"]h$]h&]uh1j hj9hK*hj/9ubj )}(h<``status`` status of the fence 0:active 1:signaled <0:error h](j )}(h ``status``h]j)}(hj9h]hstatus}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK+hj9ubj )}(hhh]h)}(h0status of the fence 0:active 1:signaled <0:errorh]h0status of the fence 0:active 1:signaled <0:error}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hK+hj9ubah}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]uh1j hj9hK+hj/9ubj )}(h``flags`` fence_info flags h](j )}(h ``flags``h]j)}(hj9h]hflags}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK,hj9ubj )}(hhh]h)}(hfence_info flagsh]hfence_info flags}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hK,hj9ubah}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]uh1j hj9hK,hj/9ubj )}(h:``timestamp_ns`` timestamp of status change in nanosecondsh](j )}(h``timestamp_ns``h]j)}(hj:h]h timestamp_ns}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK,hj:ubj )}(hhh]h)}(h)timestamp of status change in nanosecondsh]h)timestamp of status change in nanoseconds}(hj5:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK-hj2:ubah}(h]h ]h"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]uh1j hj1:hK,hj/9ubeh}(h]h ]h"]h$]h&]uh1j hj8ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjJ6hhhji6hNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_file_info (C struct)c.sync_file_infohNtauh1j hjJ6hhhji6hNubj )}(hhh](j )}(hsync_file_infoh]j )}(hstruct sync_file_infoh](j )}(hj h]hstruct}(hjv:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjr:hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK3ubj )}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjr:hhhj:hK3ubj )}(hsync_file_infoh]j )}(hjp:h]hsync_file_info}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hjr:hhhj:hK3ubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hjn:hhhj:hK3ubah}(h]ji:ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj:hK3hjk:hhubj@ )}(hhh]h)}(h;SYNC_IOC_FILE_INFO: get detailed information on a sync_fileh]h;SYNC_IOC_FILE_INFO: get detailed information on a sync_file}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK7hj:hhubah}(h]h ]h"]h$]h&]uh1j? hjk:hhhj:hK3ubeh}(h]h ](jstructeh"]h$]h&]j` jja j:jb j:jc jd je uh1j hhhjJ6hji6hNubjg )}(hX**Definition**:: struct sync_file_info { char name[32]; __s32 status; __u32 flags; __u32 num_fences; __u32 pad; __u64 sync_fence_info; }; **Members** ``name`` name of fence ``status`` status of fence. 1: signaled 0:active <0:error ``flags`` sync_file_info flags ``num_fences`` number of fences in the sync_file ``pad`` padding for 64-bit alignment, should always be zero ``sync_fence_info`` pointer to array of struct :c:type:`sync_fence_info` with all fences in the sync_fileh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj:ubh:}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK;hj:ubj)}(hstruct sync_file_info { char name[32]; __s32 status; __u32 flags; __u32 num_fences; __u32 pad; __u64 sync_fence_info; };h]hstruct sync_file_info { char name[32]; __s32 status; __u32 flags; __u32 num_fences; __u32 pad; __u64 sync_fence_info; };}hj:sbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK=hj:ubh)}(h **Members**h]jq )}(hj;h]hMembers}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj;ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKFhj:ubj )}(hhh](j )}(h``name`` name of fence h](j )}(h``name``h]j)}(hj%;h]hname}(hj';hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#;ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK9hj;ubj )}(hhh]h)}(h name of fenceh]h name of fence}(hj>;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:;hK9hj;;ubah}(h]h ]h"]h$]h&]uh1j hj;ubeh}(h]h ]h"]h$]h&]uh1j hj:;hK9hj;ubj )}(h:``status`` status of fence. 1: signaled 0:active <0:error h](j )}(h ``status``h]j)}(hj^;h]hstatus}(hj`;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\;ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK:hjX;ubj )}(hhh]h)}(h.status of fence. 1: signaled 0:active <0:errorh]h.status of fence. 1: signaled 0:active <0:error}(hjw;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjs;hK:hjt;ubah}(h]h ]h"]h$]h&]uh1j hjX;ubeh}(h]h ]h"]h$]h&]uh1j hjs;hK:hj;ubj )}(h``flags`` sync_file_info flags h](j )}(h ``flags``h]j)}(hj;h]hflags}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK;hj;ubj )}(hhh]h)}(hsync_file_info flagsh]hsync_file_info flags}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hK;hj;ubah}(h]h ]h"]h$]h&]uh1j hj;ubeh}(h]h ]h"]h$]h&]uh1j hj;hK;hj;ubj )}(h1``num_fences`` number of fences in the sync_file h](j )}(h``num_fences``h]j)}(hj;h]h num_fences}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKhj<<ubj )}(hhh]h)}(hUpointer to array of struct :c:type:`sync_fence_info` with all fences in the sync_fileh](hpointer to array of struct }(hj[<hhhNhNubh)}(h:c:type:`sync_fence_info`h]j)}(hje<h]hsync_fence_info}(hjg<hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjc<ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsync_fence_infouh1hhjW<hK>hj[<ubh! with all fences in the sync_file}(hj[<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjW<hK>hjX<ubah}(h]h ]h"]h$]h&]uh1j hj<<ubeh}(h]h ]h"]h$]h&]uh1j hjW<hK>hj;ubeh}(h]h ]h"]h$]h&]uh1j hj:ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjJ6hhhji6hNubh)}(h**Description**h]jq )}(hj<h]h Description}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj<ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKBhjJ6hhubh)}(hXTakes a struct sync_file_info. If num_fences is 0, the field is updated with the actual number of fences. If num_fences is > 0, the system will use the pointer provided on sync_fence_info to return up to num_fences of struct sync_fence_info, with detailed fence information.h]hXTakes a struct sync_file_info. If num_fences is 0, the field is updated with the actual number of fences. If num_fences is > 0, the system will use the pointer provided on sync_fence_info to return up to num_fences of struct sync_fence_info, with detailed fence information.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK@hjJ6hhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_set_deadline (C struct)c.sync_set_deadlinehNtauh1j hjJ6hhhji6hNubj )}(hhh](j )}(hsync_set_deadlineh]j )}(hstruct sync_set_deadlineh](j )}(hj h]hstruct}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<hhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKHubj )}(h h]h }(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<hhhj<hKHubj )}(hsync_set_deadlineh]j )}(hj<h]hsync_set_deadline}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubah}(h]h ](j& j' eh"]h$]h&]jjuh1j hj<hhhj<hKHubeh}(h]h ]h"]h$]h&]jjj1 uh1j j2 j3 hj<hhhj<hKHubah}(h]j<ah ](j7 j8 eh"]h$]h&]j< j= )j> huh1j hj<hKHhj<hhubj@ )}(hhh]h)}(h6SYNC_IOC_SET_DEADLINE - set a deadline hint on a fenceh]h6SYNC_IOC_SET_DEADLINE - set a deadline hint on a fence}(hj'=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKPhj$=hhubah}(h]h ]h"]h$]h&]uh1j? hj<hhhj<hKHubeh}(h]h ](jstructeh"]h$]h&]j` jja j?=jb j?=jc jd je uh1j hhhjJ6hji6hNubjg )}(h**Definition**:: struct sync_set_deadline { __u64 deadline_ns; __u64 pad; }; **Members** ``deadline_ns`` absolute time of the deadline ``pad`` must be zeroh](h)}(h**Definition**::h](jq )}(h**Definition**h]h Definition}(hjK=hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjG=ubh:}(hjG=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKThjC=ubj)}(hCstruct sync_set_deadline { __u64 deadline_ns; __u64 pad; };h]hCstruct sync_set_deadline { __u64 deadline_ns; __u64 pad; };}hjd=sbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKVhjC=ubh)}(h **Members**h]jq )}(hju=h]hMembers}(hjw=hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hjs=ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK[hjC=ubj )}(hhh](j )}(h.``deadline_ns`` absolute time of the deadline h](j )}(h``deadline_ns``h]j)}(hj=h]h deadline_ns}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKRhj=ubj )}(hhh]h)}(habsolute time of the deadlineh]habsolute time of the deadline}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hKRhj=ubah}(h]h ]h"]h$]h&]uh1j hj=ubeh}(h]h ]h"]h$]h&]uh1j hj=hKRhj=ubj )}(h``pad`` must be zeroh](j )}(h``pad``h]j)}(hj=h]hpad}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKRhj=ubj )}(hhh]h)}(h must be zeroh]h must be zero}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKShj=ubah}(h]h ]h"]h$]h&]uh1j hj=ubeh}(h]h ]h"]h$]h&]uh1j hj=hKRhj=ubeh}(h]h ]h"]h$]h&]uh1j hjC=ubeh}(h]h ] kernelindentah"]h$]h&]uh1jf hjJ6hhhji6hNubh)}(h**Description**h]jq )}(hj>h]h Description}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jp hj>ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKVhjJ6hhubh)}(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&>hhhNhNubh)}(h :c:type:`dma_fence_set_deadline`h]j)}(hj0>h]hdma_fence_set_deadline}(hj2>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj.>ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_fence_set_deadlineuh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKThj&>ubeh}(h]h ]h"]h$]h&]uh1hhjM>hKThjJ6hhubh)}(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}(hjT>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKVhjJ6hhubh)}(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, }(hjg>hhhNhNubh)}(h :c:type:`t`h]j)}(hjq>h]ht}(hjs>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjo>ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjtuh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKYhjg>ubhI); deadline_ns = (t.tv_sec * 1000000000L) + t.tv_nsec + ns_until_deadline}(hjg>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj>hKYhjc>ubah}(h]h ]h"]h$]h&]uh1hhj>hKYhjJ6hhubeh}(h]dma-fence-sync-file-uabiah ]h"]dma fence sync file uabiah$]h&]uh1hhjժhhhhhKubh)}(hhh](h)}(hIndefinite DMA Fencesh]hIndefinite DMA Fences}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhKubh)}(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:}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj>hhubh)}(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.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj>ubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhNubh)}(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.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj>ubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhNubh)}(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.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj>ubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhNubh)}(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.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj?ubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhNubeh}(h]h ]h"]h$]h&]j>j uh1hhhhKhj>hhubh)}(hXCommon to all these schemes is that userspace controls the dependencies of these fences and controls when they fire. Mixing indefinite fences with normal in-kernel DMA fences does not work, even when a fallback timeout is included to protect against malicious userspace:h]hXCommon to all these schemes is that userspace controls the dependencies of these fences and controls when they fire. Mixing indefinite fences with normal in-kernel DMA fences does not work, even when a fallback timeout is included to protect against malicious userspace:}(hj/?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>hhubh)}(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.}(hjD?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@?ubah}(h]h ]h"]h$]h&]uh1hhj=?hhhhhNubh)}(hOnly userspace knows about all dependencies in indefinite fences and when exactly they will complete, the kernel has no visibility. h]h)}(hOnly userspace knows about all dependencies in indefinite fences and when exactly they will complete, the kernel has no visibility.h]hOnly userspace knows about all dependencies in indefinite fences and when exactly they will complete, the kernel has no visibility.}(hj\?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjX?ubah}(h]h ]h"]h$]h&]uh1hhj=?hhhhhNubeh}(h]h ]h"]h$]h&]j>j uh1hhhhMhj>hhubh)}(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.}(hjv?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj>hhubhfigure)}(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 } }}hj?sbah}(h]h ]h"]h$]h&]jjuh1jhj?hhubah}(h]h ]h"]h$]h&]alt#Indefinite Fencing Dependency CyclesrclangDOTuh1j?hj?ubhcaption)}(h#Indefinite Fencing Dependency Cycleh]h#Indefinite Fencing Dependency Cycle}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j?hhhKhj?ubeh}(h]id1ah ]h"]h$]h&]altj?captionj?uh1j?hj>hhhhhNubh)}(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.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj>hhubh)}(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:}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hj>hhubh)}(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.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj?ubah}(h]h ]h"]h$]h&]uh1hhj?hhhhhNubh)}(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.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hj?ubah}(h]h ]h"]h$]h&]uh1hhj?hhhhhNubeh}(h]h ]h"]h$]h&]j>j uh1hhhhM,hj>hhubeh}(h]indefinite-dma-fencesah ]h"]indefinite dma fencesah$]h&]uh1hhjժhhhhhKubh)}(hhh](h)}(h-Recoverable Hardware Page Faults Implicationsh]h-Recoverable Hardware Page Faults Implications}(hj @hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhM5ubh)}(haModern hardware supports recoverable page faults, which has a lot of implications for DMA fences.h]haModern hardware supports recoverable page faults, which has a lot of implications for DMA fences.}(hj.@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj@hhubh)}(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.}(hj<@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hj@hhubh)}(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.}(hjJ@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhj@hhubh)}(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:}(hjX@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhj@hhubh)}(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.}(hjm@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhji@ubah}(h]h ]h"]h$]h&]uh1hhjf@hhhhhNubh)}(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.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj@ubah}(h]h ]h"]h$]h&]uh1hhjf@hhhhhNubeh}(h]h ]h"]h$]h&]j>j?uh1hhhhMNhj@hhubh)}(hUThere are a few options to prevent this problem, one of which drivers need to ensure:h]hUThere are a few options to prevent this problem, one of which drivers need to ensure:}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThj@hhubh)}(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.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhj@ubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhNubh)}(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.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhj@ubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhNubh)}(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().}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hj@ubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhNubh)}(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. j#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.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMdhj@ubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhNubh)}(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.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjAubah}(h]h ]h"]h$]h&]uh1hhj@hhhhhNubeh}(h]h ]h"]h$]h&]j>j?uh1hhhhMWhj@hhubh)}(hX+Note that workloads that run on independent hardware like copy engines or other GPUs do not have any impact. This allows us to keep using DMA fences internally in the kernel even for resolving hardware page faults, e.g. by using copy engines to clear or copy memory needed to resolve the page fault.h]hX+Note that workloads that run on independent hardware like copy engines or other GPUs do not have any impact. This allows us to keep using DMA fences internally in the kernel even for resolving hardware page faults, e.g. by using copy engines to clear or copy memory needed to resolve the page fault.}(hj.AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthj@hhubh)}(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 }(hjj>j@j@jcAj`Au nametypes}(jsAjjj_j5j|jajj jjj_jҪjkAjjjjղj0jj+j0jG6j>j@jcAuh}(jpAhjgjFj_jmj2j#jyj8jjjjej jjj j j j_ jd jrjwjjj_jjj j=jBj/j4jjjcjhj!j!j$j$j_&jd&j((j-(j)j)jd,ji,j.j.j1j1jZ4j_4j5j5j98j>8je:jj:j)=j.=jq?jv?jAjAjCjCjEjEjNjNjUjUjVjVj>YjCYj[j[j\j\jr^jw^jϪj_j2`j7`jajajbjbj5ej:ejfjfjijij9mj>mjojojpjpjrjrjtjtjvjvjMzjRzj>}jC}jRjWjjjNjSjxj}jԉjىjjjoj3j8j"j'j’jǒjCjHjjjrjwjjjjjjj jjEjJjojtj jjjjXj]jhAjժjgjjjmjҲjj-jزjjjZj_jjjjjojҸj׸jjjjjojjjajfjjjjjsjxjQjVjjjjjjjj jjjhjmjkjpjjjjj%j*jjjsjxjjjjjFjKj?jDjjjjj;j@jdjijjjjjjjjjjjjj7j<jjjj3jPjUj j j j jjjjjjjIjNjj j+jjjjjjjj!j"j$j$jo&jt&j+(j0(j(j(jB*jG*j 0j+j+j+ja-jf-j.j.jD6j0j00j50j32j82j3j3j>jJ6jg6jm6j|8j8ji:jn:j<j<j@j>j`Aj@j?j?u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jAKsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.