sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}(hhparenthuba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget&/translations/zh_CN/driver-api/dma-bufmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}(hhhh2ubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/zh_TW/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}(hhhhFubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/it_IT/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}(hhhhZubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ja_JP/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}(hhhhnubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ko_KR/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}(hhhhubah}(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)}(hhhhhhhNhNubah}(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.}(hhhhhhhNhNubah}(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.}(hhhhhhhNhNubah}(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:}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh block_quote)}(hhh]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;}(hhhhhhhNhNubah}(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 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%hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhhhNhNubh)}(hhh](h)}(h Userspace API principles and useh]h Userspace API principles and use}(hjJhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhhhhhKubh)}(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.}(hjXhjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjEhhubeh}(h] userspace-api-principles-and-useah ]h"] userspace api principles and useah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hShared DMA Buffersh]hShared DMA Buffers}(hjqhjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhhhhhK"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.}(hjhj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjlhhubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjlhhubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjlhhubh)}(h The exporterh]h The exporter}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjlhhubh)}(hhh]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 }(h%implements and manages operations in hjhhhNhNubh)}(h*:c:type:`struct dma_buf_ops `h]hliteral)}(hjh]hstruct dma_buf_ops}(hhhjhhhNhNubah}(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,}(h 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,}(hjhjhhhNhNubah}(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 }(h7manages the details of buffer allocation, wrapped in a hjhhhNhNubh)}(h":c:type:`struct dma_buf `h]j)}(hj$h]hstruct dma_buf}(hhhj&hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hhhhK2hjubh,}(h,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)}(hjTh]hGdecides about the actual backing storage where this allocation happens,}(hjThjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjRubah}(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.}(hjohjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjiubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j=j>uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1hhjlhhhNhNubh)}(hThe buffer-userh]hThe buffer-user}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjlhhubh)}(hhh]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.}(hjhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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 }(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}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_buf_attachmentuh1hhhhKuh1hhhhK:hjubah}(h]h ]h"]h$]h&]uh1hhjlhhhNhNubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhjlhhubh)}(hhh](h)}(hUserspace Interface Notesh]hUserspace Interface Notes}(hj+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:}(hj9hj7hhhNhNubah}(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.}(hjNhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjHubh)}(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.}(hj\hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhjHubeh}(h]h ]h"]h$]h&]uh1hhjEhhhhhNubh)}(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.}(hjthjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThjnubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjnubh)}(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().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjnubeh}(h]h ]h"]h$]h&]uh1hhjEhhhhhNubh)}(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 }(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}(h CPU Access to DMA Buffer ObjectshjhhhNhNubah}(h]h ]h"]h$]h&]name CPU Access to DMA Buffer Objectsrefid cpu-access-to-dma-buffer-objectsuh1jhjresolvedKubh for the full details.}(h for the full details.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKehjubah}(h]h ]h"]h$]h&]uh1hhjEhhhhhNubh)}(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 }(h(The DMA buffer FD is also pollable, see hjhhhNhNubj)}(h`Implicit Fence Poll Support`_h]hImplicit Fence Poll Support}(hImplicit Fence Poll SupporthjhhhNhNubah}(h]h ]h"]h$]h&]nameImplicit Fence Poll Supportjimplicit-fence-poll-supportuh1jhjjKubh below for details.}(h below for details.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1hhjEhhhhhNubh)}(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 }(hCThe DMA buffer FD also supports a few dma-buf-specific ioctls, see hj hhhNhNubj)}(h`DMA Buffer ioctls`_h]hDMA Buffer ioctls}(hDMA Buffer ioctlshjhhhNhNubah}(h]h ]h"]h$]h&]nameDMA Buffer ioctlsjdma-buffer-ioctlsuh1jhj jKubh below for details.}(h below for details.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKkhjubah}(h]h ]h"]h$]h&]uh1hhjEhhhhhNubeh}(h]h ]h"]h$]h&]j=j>uh1hhhhKKhj&hhubeh}(h]userspace-interface-notesah ]h"]userspace interface notesah$]h&]uh1hhjlhhhhhKEubh)}(hhh](h)}(h%Basic Operation and Device DMA Accessh]h%Basic Operation and Device DMA Access}(hjIhjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhhhhhKoubh)}(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:}(hjWhjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chMAhjDhhubhenumerated_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 }(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 hjmhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjxh]hdma_buf}(hhhjzhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjvubah}(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.chMDhjmubh. It then exports that }(h. It then exports that hjmhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjh]hdma_buf}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hhjhMDhjmubh; to userspace as a file descriptor by calling dma_buf_fd().}(h; to userspace as a file descriptor by calling dma_buf_fd().hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMDhjiubah}(h]h ]h"]h$]h&]uh1hhjfubh)}(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 }(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}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chMIhjubhW using dma_buf_get(). Then the buffer is attached to the device using dma_buf_attach().}(hW using dma_buf_get(). Then the buffer is attached to the device using dma_buf_attach().hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMIhjubh)}(hYUp to this stage the exporter is still free to migrate or reallocate the backing storage.h]hYUp to this stage the exporter is still free to migrate or reallocate the backing storage.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chMNhjubeh}(h]h ]h"]h$]h&]uh1hhjfubh)}(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().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chMQhjubah}(h]h ]h"]h$]h&]uh1hhjfubh)}(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().}(hj7hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:113: ./drivers/dma-buf/dma-buf.chMUhj1ubah}(h]h ]h"]h$]h&]uh1hhjfubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffixjuh1jdhjDhhh]/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 }(hCFor the detailed semantics exporters are expected to implement see hjUhhhNhNubh)}(h:c:type:`dma_buf_ops`h]j)}(hj`h]h dma_buf_ops}(hhhjbhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj^ubah}(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.chMYhjUubh.}(hjhjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj}hMYhjDhhubeh}(h]%basic-operation-and-device-dma-accessah ]h"]%basic operation and device dma accessah$]h&]uh1hhjlhhhhhKoubh)}(hhh](h)}(h CPU Access to DMA Buffer Objectsh]h CPU Access to DMA Buffer Objects}(hjhjhhhNhNubah}(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:}(hjhjhhhNhNubah}(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)}(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. 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:: 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.}(hjhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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:}(h Interfaces:hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh literal_block)}(hvoid \*dma_buf_vmap(struct dma_buf \*dmabuf, struct iosys_map \*map) void dma_buf_vunmap(struct dma_buf \*dmabuf, struct iosys_map \*map)h]hvoid \*dma_buf_vmap(struct dma_buf \*dmabuf, struct iosys_map \*map) void dma_buf_vunmap(struct dma_buf \*dmabuf, struct iosys_map \*map)}(hhhjubah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh)}(hXThe vmap call can fail if there is no vmap support in the exporter, or if it runs out of vmalloc space. Note that the dma-buf layer keeps a reference count for all vmap access and calls down into the exporter's vmap function only when no vmapping exists, and only unmaps it once. Protection against concurrent vmap/vunmap calls is provided by taking the :c:type:`dma_buf.lock ` mutex.h](hXdThe vmap call can fail if there is no vmap support in the exporter, or if it runs out of vmalloc space. Note that the dma-buf layer keeps a reference count for all vmap access and calls down into the exporter’s vmap function only when no vmapping exists, and only unmaps it once. Protection against concurrent vmap/vunmap calls is provided by taking the }(hXbThe 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}(hhhjhhhNhNubah}(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.}(h mutex.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hMhjubeh}(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.}(hj8hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhj2ubh)}(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.}(hjGhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM$hj2ubh)}(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:}(hjVhjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM*hj2ubh)}(hhh](h)}(hhh]h)}(hhh](h)}(hmmap dma-buf fdh]h)}(hjnh]hmmap dma-buf fd}(hjnhjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM1hjlubah}(h]h ]h"]h$]h&]uh1hhjiubh)}(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)}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM2hjubah}(h]h ]h"]h$]h&]uh1hhjiubh)}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM6hjubah}(h]h ]h"]h$]h&]uh1hhjiubeh}(h]h ]h"]h$]h&]j=j>uh1hhj}hM1hjfubah}(h]h ]h"]h$]h&]uh1hhjcubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM8hjcubeh}(h]h ]h"]h$]h&]uh1hhj2ubeh}(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:: 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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM=hjubh)}(hXSimilar to the motivation for kernel cpu access it is again important that the userspace code of a given importing subsystem can use the same interfaces with a imported dma-buf buffer object as with a native buffer object. This is especially important for drm where the userspace part of contemporary OpenGL, X, and other drivers is huge, and reworking them to use a different way to mmap a buffer rather invasive.h]hXSimilar to the motivation for kernel cpu access it is again important that the userspace code of a given importing subsystem can use the same interfaces with a imported dma-buf buffer object as with a native buffer object. This is especially important for drm where the userspace part of contemporary OpenGL, X, and other drivers is huge, and reworking them to use a different way to mmap a buffer rather invasive.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM?hjubh)}(hXThe assumption in the current dma-buf interfaces is that redirecting the initial mmap is all that's needed. A survey of some of the existing subsystems shows that no driver seems to do any nefarious thing like syncing up with outstanding asynchronous processing on the device or allocating special resources at fault time. So hopefully this is good enough, since adding interfaces to intercept pagefaults and allow pte shootdowns would increase the complexity quite a bit.h]hXThe assumption in the current dma-buf interfaces is that redirecting the initial mmap is all that’s needed. A survey of some of the existing subsystems shows that no driver seems to do any nefarious thing like syncing up with outstanding asynchronous processing on the device or allocating special resources at fault time. So hopefully this is good enough, since adding interfaces to intercept pagefaults and allow pte shootdowns would increase the complexity quite a bit.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMFhjubh)}(h Interface::h]h Interface:}(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.chMNhjubj)}(h\int dma_buf_mmap(struct dma_buf \*, struct vm_area_struct \*, unsigned long);h]h\int dma_buf_mmap(struct dma_buf \*, struct vm_area_struct \*, unsigned long);}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMPhjubh)}(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 }(h~If the importing subsystem simply provides a special-purpose mmap call to set up a mapping in userspace, calling do_mmap with hj-hhhNhNubh)}(h :c:type:`dma_buf.file `h]j)}(hj8h]h dma_buf.file}(hhhj:hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj6ubah}(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.chMShj-ubh0 will equally achieve that for a dma-buf object.}(h0 will equally achieve that for a dma-buf object.hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjUhMShjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j=j>uh1hhjhMhjhhubeh}(h]jah ]h"] cpu access to dma buffer objectsah$]h&]uh1hhjlhhhhhKu referencedKubh)}(hhh](h)}(hImplicit Fence Poll Supporth]hImplicit Fence Poll Support}(hjzhjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhhhhhK{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 }(hTo support cross-device and cross-driver synchronization of buffer access implicit fences (represented internally in the kernel with hjhhhNhNubh)}(h&:c:type:`struct dma_fence `h]j)}(hjh]hstruct dma_fence}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(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.chKhjubh) can be attached to a }(h) can be attached to a hjhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjh]hdma_buf}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hhjhKhjubhA. The glue for that and a few related things are provided in the }(hA. The glue for that and a few related things are provided in the hjhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjh]hdma_resv}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_resvuh1hhjhKhjubh structure.}(h structure.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjuhhubh)}(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:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chKhjuhhubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chKhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h|Checking for EPOLLOUT, i.e. write access, can be used to query the state of all attached fences, shared and exclusive ones. h]h)}(h{Checking for EPOLLOUT, i.e. write access, can be used to query the state of all attached fences, shared and exclusive ones.h]h{Checking for EPOLLOUT, i.e. write access, can be used to query the state of all attached fences, shared and exclusive ones.}(hj3hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chKhj-ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j=j>uh1hhj&hKhjuhhubh)}(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.}(hjNhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chKhjuhhubh)}(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 }(hRAs an alternative to poll(), the set of fences on DMA buffer can be exported as a hj[hhhNhNubh)}(h:c:type:`sync_file`h]j)}(hjfh]h sync_file}(hhhjhhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjdubah}(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.chKhj[ubh using }(h using hj[hhhNhNubh)}(h":c:type:`dma_buf_sync_file_export`h]j)}(hjh]hdma_buf_sync_file_export}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_buf_sync_file_exportuh1hhjhKhj[ubh.}(hjhj[hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjuhhubeh}(h]jah ]h"]implicit fence poll supportah$]h&]uh1hhjlhhhhhK{jtKubh)}(hhh](h)}(hDMA-BUF statisticsh]hDMA-BUF statistics}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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.}(h 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 }(hThe hjhhhNhNubj)}(h``/proc//fdinfo/``h]h/proc//fdinfo/}(hhhjhhhNhNubah}(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.}(h 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.}(hj 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.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 }(hThe interface at hj hhhNhNubj)}(h``/sys/kernel/dmabuf/buffers``h]h/sys/kernel/dmabuf/buffers}(hhhj# hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh. exposes information about every DMA-BUF when }(h. exposes information about every DMA-BUF when hj hhhNhNubj)}(h``CONFIG_DMABUF_SYSFS_STATS``h]hCONFIG_DMABUF_SYSFS_STATS}(hhhj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is enabled.}(h 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:}(hjR hjP 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)}(hjd h]j)}(hjd h]h7/sys/kernel/dmabuf/buffers//exporter_name}(hhhji hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjf 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(hjb ubah}(h]h ]h"]h$]h&]uh1hhj_ ubh)}(h3``/sys/kernel/dmabuf/buffers//size`` h]h)}(h2``/sys/kernel/dmabuf/buffers//size``h]j)}(hj h]h./sys/kernel/dmabuf/buffers//size}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj 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)hj ubah}(h]h ]h"]h$]h&]uh1hhj_ 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 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 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.chK0hjhhubeh}(h]dma-buf-statisticsah ]h"]dma-buf statisticsah$]h&]uh1hhjlhhhhhKjtKubh)}(hhh](h)}(hDMA Buffer ioctlsh]hDMA Buffer ioctls}(hj 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}(hhhj 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 }(hhhj 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}(hhhj1 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_multilineuh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj hhubh desc_content)}(hhh]h)}(hSynchronize with CPU access.h]hSynchronize with CPU access.}(hja 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\ hhubah}(h]h ]h"]h$]h&]uh1jZ hj hhhj hKubeh}(h]h ](jstructeh"]h$]h&]domainjobjtypejw desctypejw noindexuh1j 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}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh:}(h:hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj ubj)}(h)struct dma_buf_sync { __u64 flags; };h]h)struct dma_buf_sync { __u64 flags; };}(hhhj ubah}(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]j )}(hj h]hMembers}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK$hj 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}(hhhj 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 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 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 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?hj8 ubj )}(hhh]h)}(h*Indicates the end of a map access session.h]h*Indicates the end of a map access session.}(hjP hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJ hK?hjK ubah}(h]h ]h"]h$]h&]uh1j hj8 ubeh}(h]h ]h"]h$]h&]uh1j hjJ hK?hj ubj )}(hdDMA_BUF_SYNC_READ: Indicates that the mapped DMA buffer will be read by the client via the CPU map. h](j )}(hDMA_BUF_SYNC_READ:h]hDMA_BUF_SYNC_READ:}(hjn hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKChjh ubj )}(hhh]h)}(hPIndicates that the mapped DMA buffer will be read by the client via the CPU map.h]hPIndicates that the mapped DMA buffer will be read by the client via the CPU map.}(hj hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKBhj{ ubah}(h]h ]h"]h$]h&]uh1j hjh ubeh}(h]h ]h"]h$]h&]uh1j hjz hKChj ubj )}(hhDMA_BUF_SYNC_WRITE: Indicates that the mapped DMA buffer will be written by the client via the CPU map. h](j )}(hDMA_BUF_SYNC_WRITE:h]hDMA_BUF_SYNC_WRITE:}(hj 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.hhKGhj ubj )}(hhh]h)}(hSIndicates that the mapped DMA buffer will be written by the client via the CPU map.h]hSIndicates that the mapped DMA buffer will be written by the client via the CPU map.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKFhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKGhj ubj )}(hEDMA_BUF_SYNC_RW: An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.h](j )}(hDMA_BUF_SYNC_RW:h]hDMA_BUF_SYNC_RW:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKIhj ubj )}(hhh]h)}(h4An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.h]h4An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKJhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKIhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKIhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj hhhj hNubh)}(h**Description**h]j )}(hj h]h Description}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKMhj hhubh)}(hX*When a DMA buffer is accessed from the CPU via mmap, it is not always possible to guarantee coherency between the CPU-visible map and underlying memory. To manage coherency, DMA_BUF_IOCTL_SYNC must be used to bracket any CPU access to give the kernel the chance to shuffle memory around if needed.h]hX*When a DMA buffer is accessed from the CPU via mmap, it is not always possible to guarantee coherency between the CPU-visible map and underlying memory. To manage coherency, DMA_BUF_IOCTL_SYNC must be used to bracket any CPU access to give the kernel the chance to shuffle memory around if needed.}(hj3 hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj hhubh)}(hPrior to accessing the map, the client must call DMA_BUF_IOCTL_SYNC with DMA_BUF_SYNC_START and the appropriate read/write flags. Once the access is complete, the client should call DMA_BUF_IOCTL_SYNC with DMA_BUF_SYNC_END and the same read/write flags.h]hPrior to accessing the map, the client must call DMA_BUF_IOCTL_SYNC with DMA_BUF_SYNC_START and the appropriate read/write flags. Once the access is complete, the client should call DMA_BUF_IOCTL_SYNC with DMA_BUF_SYNC_END and the same read/write flags.}(hjB hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK"hj hhubh)}(hXThe synchronization provided via DMA_BUF_IOCTL_SYNC only provides cache coherency. It does not prevent other processes or devices from accessing the memory at the same time. If synchronization with a GPU or other device driver is required, it is the client's responsibility to wait for buffer to be ready for reading or writing before calling this ioctl with DMA_BUF_SYNC_START. Likewise, the client must ensure that follow-up work is not submitted to GPU or other device driver until after this ioctl has been called with DMA_BUF_SYNC_END?h]hX!The synchronization provided via DMA_BUF_IOCTL_SYNC only provides cache coherency. It does not prevent other processes or devices from accessing the memory at the same time. If synchronization with a GPU or other device driver is required, it is the client’s responsibility to wait for buffer to be ready for reading or writing before calling this ioctl with DMA_BUF_SYNC_START. Likewise, the client must ensure that follow-up work is not submitted to GPU or other device driver until after this ioctl has been called with DMA_BUF_SYNC_END?}(hjQ hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK'hj hhubh)}(hXeIf the driver or API with which the client is interacting uses implicit synchronization, waiting for prior work to complete can be done via poll() on the DMA buffer file descriptor. If the driver or API requires explicit synchronization, the client may have to wait on a sync_file or other synchronization primitive outside the scope of the DMA buffer API.h]hXeIf the driver or API with which the client is interacting uses implicit synchronization, waiting for prior work to complete can be done via poll() on the DMA buffer file descriptor. If the driver or API requires explicit synchronization, the client may have to wait on a sync_file or other synchronization primitive outside the scope of the DMA buffer API.}(hj` hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK0hj hhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_buf_export_sync_file (C struct)c.dma_buf_export_sync_filehNtauh1j hj hhhj hNubj )}(hhh](j )}(hdma_buf_export_sync_fileh]j )}(hstruct dma_buf_export_sync_fileh](j )}(hj h]hstruct}(hhhj hhhNhNubah}(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.hhKZubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj hhhj hKZubj* )}(hdma_buf_export_sync_fileh]j0 )}(hj h]hdma_buf_export_sync_file}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj hhhj hKZubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj~ hhhj hKZubah}(h]jy ah ](jS jT eh"]h$]h&]jX uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK9hj{ hhubj[ )}(hhh]h)}(hGet a sync_file from a dma-bufh]hGet a sync_file from a dma-buf}(hj 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&]uh1jZ hj{ hhhj hKZubeh}(h]h ](jstructeh"]h$]h&]j{ jj| j j} j j~ uh1j hhhj hj hNubj )}(hX**Definition**:: struct dma_buf_export_sync_file { __u32 flags; __s32 fd; }; **Members** ``flags`` Read/write flags Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both. If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, the returned sync file waits on any writers of the dma-buf to complete. Waiting on the returned sync file is equivalent to poll() with POLLIN. If DMA_BUF_SYNC_WRITE is set, the returned sync file waits on any users of the dma-buf (read or write) to complete. Waiting on the returned sync file is equivalent to poll() with POLLOUT. If both DMA_BUF_SYNC_WRITE and DMA_BUF_SYNC_READ are set, this is equivalent to just DMA_BUF_SYNC_WRITE. ``fd`` Returned sync file descriptorh](h)}(h**Definition**::h](j )}(h**Definition**h]h Definition}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh:}(hj 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; };}(hhhj ubah}(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]j )}(hj h]hMembers}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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)}(hj6 h]hflags}(hhhj8 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:136: ./include/uapi/linux/dma-buf.hhKhj0 ubj )}(hhh](h)}(hRead/write flagsh]hRead/write flags}(hjQ hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKyhjL 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.}(hj` hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK{hjL 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.}(hjo hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK}hjL 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.}(hj~ hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjL ubeh}(h]h ]h"]h$]h&]uh1j hj0 ubeh}(h]h ]h"]h$]h&]uh1j hjK hKhj- ubj )}(h$``fd`` Returned sync file descriptorh](j )}(h``fd``h]j)}(hj h]hfd}(hhhj 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 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&]uh1j hj hhhj hNubh)}(h**Description**h]j )}(hj h]h Description}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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 hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhK[hj hhubh)}(h,The intended usage pattern is the following:h]h,The intended usage pattern is the following:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKdhj hhubh)}(hhh]je)}(hhh](h)}(hjExport a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE. h]h)}(hiExport a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE.h]hiExport a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE.}(hj hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKfhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(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.}(hj9hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKihj3ubah}(h]h ]h"]h$]h&]uh1hhjubh)}(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.}(hjRhjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKmhjLubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]jPjQjRhjSjuh1jdhjubah}(h]h ]h"]h$]h&]uh1hhj hhhj hNubh)}(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.}(hjshjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKphj 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}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhKubj* )}(hdma_buf_import_sync_fileh]j0 )}(hjh]hdma_buf_import_sync_file}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhKubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKyhjhhubj[ )}(hhh]h)}(h!Insert a sync_file into a dma-bufh]h!Insert a sync_file into a dma-buf}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j{ jj| jj} jj~ uh1j hhhj hj hNubj )}(hXp**Definition**:: struct dma_buf_import_sync_file { __u32 flags; __s32 fd; }; **Members** ``flags`` Read/write flags Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both. If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, this inserts the sync_file as a read-only fence. Any subsequent implicitly synchronized writes to this dma-buf will wait on this fence but reads will not. If DMA_BUF_SYNC_WRITE is set, this inserts the sync_file as a write fence. All subsequent implicitly synchronized access to this dma-buf will wait on this fence. ``fd`` Sync file descriptorh](h)}(h**Definition**::h](j )}(h**Definition**h]h Definition}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh:}(hj 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; };}(hhhjubah}(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]j )}(hj*h]hMembers}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj(ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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)}(hjIh]hflags}(hhhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhjCubj )}(hhh](h)}(hRead/write flagsh]hRead/write flags}(hjdhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj_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.}(hjshjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj_ubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj_ubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./include/uapi/linux/dma-buf.hhKhj_ubeh}(h]h ]h"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]uh1j hj^hKhj@ubj )}(h``fd`` Sync file descriptorh](j )}(h``fd``h]j)}(hjh]hfd}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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&]uh1j hj hhhj hNubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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.}(hj 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 hhubeh}(h]j$ah ]h"]dma buffer ioctlsah$]h&]uh1hhjlhhhhhKjtKubh)}(hhh](h)}(hDMA-BUF locking conventionh]hDMA-BUF locking convention}(hj$hj"hhhNhNubah}(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.}(hj2hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM2hjhhubh)}(hConvention for importersh]hConvention for importers}(hjAhj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM5hjhhubje)}(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:}(hjWhjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM7hjQubh)}(hhh]h)}(hhh](h)}(h dma_buf_pin()h]h)}(hjlh]h dma_buf_pin()}(hjlhjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM:hjjubah}(h]h ]h"]h$]h&]uh1hhjgubh)}(hdma_buf_unpin()h]h)}(hjh]hdma_buf_unpin()}(hjhjhhhNhNubah}(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&]uh1hhjgubh)}(hdma_buf_map_attachment()h]h)}(hjh]hdma_buf_map_attachment()}(hjhjhhhNhNubah}(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&]uh1hhjgubh)}(hdma_buf_unmap_attachment()h]h)}(hjh]hdma_buf_unmap_attachment()}(hjhjhhhNhNubah}(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&]uh1hhjgubh)}(hdma_buf_vmap()h]h)}(hjh]hdma_buf_vmap()}(hjhjhhhNhNubah}(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&]uh1hhjgubh)}(hdma_buf_vunmap() h]h)}(hdma_buf_vunmap()h]hdma_buf_vunmap()}(hjhjhhhNhNubah}(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&]uh1hhjgubeh}(h]h ]h"]h$]h&]j=j>uh1hhj{hM:hjdubah}(h]h ]h"]h$]h&]uh1hhjQubeh}(h]h ]h"]h$]h&]uh1hhjNubh)}(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:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMAhj ubh)}(hhh]h)}(hhh](h)}(hdma_buf_attach()h]h)}(hj(h]hdma_buf_attach()}(hj(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMDhj&ubah}(h]h ]h"]h$]h&]uh1hhj#ubh)}(hdma_buf_dynamic_attach()h]h)}(hj@h]hdma_buf_dynamic_attach()}(hj@hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMEhj>ubah}(h]h ]h"]h$]h&]uh1hhj#ubh)}(hdma_buf_detach()h]h)}(hjXh]hdma_buf_detach()}(hjXhjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMFhjVubah}(h]h ]h"]h$]h&]uh1hhj#ubh)}(hdma_buf_export()h]h)}(hjph]hdma_buf_export()}(hjphjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMGhjnubah}(h]h ]h"]h$]h&]uh1hhj#ubh)}(h dma_buf_fd()h]h)}(hjh]h dma_buf_fd()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMHhjubah}(h]h ]h"]h$]h&]uh1hhj#ubh)}(h dma_buf_get()h]h)}(hjh]h dma_buf_get()}(hjhjhhhNhNubah}(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&]uh1hhj#ubh)}(h dma_buf_put()h]h)}(hjh]h dma_buf_put()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMJhjubah}(h]h ]h"]h$]h&]uh1hhj#ubh)}(hdma_buf_mmap()h]h)}(hjh]hdma_buf_mmap()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMKhjubah}(h]h ]h"]h$]h&]uh1hhj#ubh)}(hdma_buf_begin_cpu_access()h]h)}(hjh]hdma_buf_begin_cpu_access()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMLhjubah}(h]h ]h"]h$]h&]uh1hhj#ubh)}(hdma_buf_end_cpu_access()h]h)}(hjh]hdma_buf_end_cpu_access()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMMhjubah}(h]h ]h"]h$]h&]uh1hhj#ubh)}(h!dma_buf_map_attachment_unlocked()h]h)}(hjh]h!dma_buf_map_attachment_unlocked()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMNhjubah}(h]h ]h"]h$]h&]uh1hhj#ubh)}(h#dma_buf_unmap_attachment_unlocked()h]h)}(hj0h]h#dma_buf_unmap_attachment_unlocked()}(hj0hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMOhj.ubah}(h]h ]h"]h$]h&]uh1hhj#ubh)}(hdma_buf_vmap_unlocked()h]h)}(hjHh]hdma_buf_vmap_unlocked()}(hjHhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMPhjFubah}(h]h ]h"]h$]h&]uh1hhj#ubh)}(hdma_buf_vunmap_unlocked() h]h)}(hdma_buf_vunmap_unlocked()h]hdma_buf_vunmap_unlocked()}(hjdhjbhhhNhNubah}(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#ubeh}(h]h ]h"]h$]h&]j=j>uh1hhj7hMDhj ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhjNubeh}(h]h ]h"]h$]h&]jPjQjRhjSjuh1jdhjhhhNhNubh)}(hConvention for exportersh]hConvention for exporters}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMShjhhubje)}(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 }(hThese hjhhhNhNubh)}(h:c:type:`dma_buf_ops`h]j)}(hjh]h dma_buf_ops}(hhhjhhhNhNubah}(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.chMUhjubhX callbacks are invoked with unlocked dma-buf reservation and exporter can take the lock:}(hX callbacks are invoked with unlocked dma-buf reservation and exporter can take the lock:hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMUhjubh)}(hhh]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()}(hhhjhhhNhNubah}(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.chMXhjubah}(h]h ]h"]h$]h&]uh1hhj hMXhjubah}(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()}(hhhj%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.chMYhjubah}(h]h ]h"]h$]h&]uh1hhj@hMYhjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h/:c:type:`dma_buf_ops.release\(\) `h]h)}(hjOh]h)}(h/:c:type:`dma_buf_ops.release\(\) `h]j)}(hjVh]hdma_buf_ops.release()}(hhhjXhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjTubah}(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.chMZhjQubah}(h]h ]h"]h$]h&]uh1hhjshMZhjMubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h8:c:type:`dma_buf_ops.begin_cpu_access\(\) `h]h)}(hjh]h)}(h8:c:type:`dma_buf_ops.begin_cpu_access\(\) `h]j)}(hjh]hdma_buf_ops.begin_cpu_access()}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM[hjubah}(h]h ]h"]h$]h&]uh1hhjhM[hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(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()}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM\hjubah}(h]h ]h"]h$]h&]uh1hhjhM\hjubah}(h]h ]h"]h$]h&]uh1hhjubh)}(h-:c:type:`dma_buf_ops.mmap\(\) ` h]h)}(h,:c:type:`dma_buf_ops.mmap\(\) `h]h)}(h,:c:type:`dma_buf_ops.mmap\(\) `h]j)}(hjh]hdma_buf_ops.mmap()}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM]hjubah}(h]h ]h"]h$]h&]uh1hhj hM]hjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j=j>uh1hhj hMXhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(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 }(hThese hj0hhhNhNubh)}(h:c:type:`dma_buf_ops`h]j)}(hj;h]h dma_buf_ops}(hhhj=hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chM_hj0ubhZ callbacks are invoked with locked dma-buf reservation and exporter can’t take the lock:}(hX callbacks are invoked with locked dma-buf reservation and exporter can't take the lock:hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjXhM_hj,ubh)}(hhh]h)}(hhh](h)}(h+:c:type:`dma_buf_ops.pin\(\) `h]h)}(hjlh]h)}(h+:c:type:`dma_buf_ops.pin\(\) `h]j)}(hjsh]hdma_buf_ops.pin()}(hhhjuhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjqubah}(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.chMbhjnubah}(h]h ]h"]h$]h&]uh1hhjhMbhjjubah}(h]h ]h"]h$]h&]uh1hhjgubh)}(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()}(hhhjhhhNhNubah}(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.chMchjubah}(h]h ]h"]h$]h&]uh1hhjhMchjubah}(h]h ]h"]h$]h&]uh1hhjgubh)}(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()}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMdhjubah}(h]h ]h"]h$]h&]uh1hhjhMdhjubah}(h]h ]h"]h$]h&]uh1hhjgubh)}(h5:c:type:`dma_buf_ops.unmap_dma_buf\(\) `h]h)}(hjh]h)}(h5:c:type:`dma_buf_ops.unmap_dma_buf\(\) `h]j)}(hj h]hdma_buf_ops.unmap_dma_buf()}(hhhjhhhNhNubah}(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.chMehjubah}(h]h ]h"]h$]h&]uh1hhj)hMehjubah}(h]h ]h"]h$]h&]uh1hhjgubh)}(h,:c:type:`dma_buf_ops.vmap\(\) `h]h)}(hj8h]h)}(h,:c:type:`dma_buf_ops.vmap\(\) `h]j)}(hj?h]hdma_buf_ops.vmap()}(hhhjAhhhNhNubah}(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.chMfhj:ubah}(h]h ]h"]h$]h&]uh1hhj\hMfhj6ubah}(h]h ]h"]h$]h&]uh1hhjgubh)}(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)}(hjsh]hdma_buf_ops.vunmap()}(hhhjuhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjqubah}(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.chMghjmubah}(h]h ]h"]h$]h&]uh1hhjhMghjiubah}(h]h ]h"]h$]h&]uh1hhjgubeh}(h]h ]h"]h$]h&]j=j>uh1hhjhMbhjdubah}(h]h ]h"]h$]h&]uh1hhj,ubeh}(h]h ]h"]h$]h&]uh1hhjubh)}(hiExporters must hold the dma-buf reservation lock when calling these functions: - dma_buf_move_notify() h](h)}(hNExporters must hold the dma-buf reservation lock when calling these functions:h]hNExporters must hold the dma-buf reservation lock when calling these functions:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:141: ./drivers/dma-buf/dma-buf.chMihjubh)}(hhh]h)}(hhh]h)}(hdma_buf_move_notify() h]h)}(hdma_buf_move_notify()h]hdma_buf_move_notify()}(hjhjhhhNhNubah}(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&]uh1hhjubah}(h]h ]h"]h$]h&]j=j>uh1hhjhMlhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]jPjQjRhjSjuh1jdhjhhhNhNubeh}(h]dma-buf-locking-conventionah ]h"]dma-buf locking conventionah$]h&]uh1hhjlhhhhhKubh)}(hhh](h)}(h)Kernel Functions and Structures Referenceh]h)Kernel Functions and Structures Reference}(hjhjhhhNhNubah}(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}(hhhj+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 }(hhhj9hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj'hhhj8hM`ubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhjJhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjGubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetjLmodnameN classnameN c:parent_keyj)}j]j ASTIdentifier)}j`dma_buf_exportsbc.dma_buf_exportasbuh1hhj'hhhj8hM`ubj )}(h h]h }(hhhjohhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj'hhhj8hM`ubhdesc_sig_punctuation)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]pah"]h$]h&]uh1j}hj'hhhj8hM`ubj* )}(hdma_buf_exporth]j0 )}(hjlh]hdma_buf_export}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj'hhhj8hM`ubhdesc_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}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hdma_buf_export_infoh]hdma_buf_export_info}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jjc.dma_buf_exportasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hexp_infoh]hexp_info}(hhhj#hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj'hhhj8hM`ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj#hhhj8hM`ubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMphj hhubj[ )}(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.}(hjPhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM_hjKhhubah}(h]h ]h"]h$]h&]uh1jZ hj hhhj8hM`ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jfj} jfj~ uh1j hhhjhNhNubj )}(hXD**Parameters** ``const struct dma_buf_export_info *exp_info`` [in] holds all the export related information provided by the exporter. see :c:type:`struct dma_buf_export_info ` for further details. **Description** Returns, on success, a newly created struct dma_buf object, which wraps the supplied private data and operations for struct dma_buf_ops. On either missing ops, or error in allocating struct dma_buf, will return negative error. For most cases the easiest way to create **exp_info** is through the ``DEFINE_DMA_BUF_EXPORT_INFO`` macro.h](h)}(h**Parameters**h]j )}(hjph]h Parameters}(hhhjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjnubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMchjjubj )}(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)}(hjh]h*const struct dma_buf_export_info *exp_info}(hhhjhhhNhNubah}(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.chMfhjubj )}(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 }(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}(hhhjhhhNhNubah}(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.chMdhjubh for further details.}(h for further details.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMdhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMfhjubah}(h]h ]h"]h$]h&]uh1j hjjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhhjjubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhhjjubh)}(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 }(h)For most cases the easiest way to create hjhhhNhNubj )}(h **exp_info**h]hexp_info}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh is through the }(h is through the hjhhhNhNubj)}(h``DEFINE_DMA_BUF_EXPORT_INFO``h]hDEFINE_DMA_BUF_EXPORT_INFO}(hhhj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh macro.}(h macro.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMmhjjubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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}(hhhjmhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jkhjghhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hhhj}hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjghhhj|hMubj* )}(h dma_buf_fdh]j0 )}(h dma_buf_fdh]h dma_buf_fd}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjghhhj|hMubj)}(h#(struct dma_buf *dmabuf, int flags)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsb c.dma_buf_fdasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hdmabufh]hdmabuf}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h int flagsh](jl)}(hinth]hint}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj )}(h h]h }(hhhj+hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(hflagsh]hflags}(hhhj9hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjghhhj|hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjchhhj|hMubah}(h]j^ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj`hhubj[ )}(hhh]h)}(h6returns a file descriptor for the given struct dma_bufh]h6returns a file descriptor for the given struct dma_buf}(hjfhjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjahhubah}(h]h ]h"]h$]h&]uh1jZ hj`hhhj|hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j|j} j|j~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] pointer to dma_buf for which fd is required. ``int flags`` [in] flags to give to fd **Description** On success, returns an associated 'fd'. Else, returns error.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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 )}(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}(hhhjhhhNhNubah}(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)}(h4[in] pointer to dma_buf for which fd is required.h]h4[in] pointer to dma_buf for which fd is required.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h*``int flags`` [in] flags to give to fd h](j )}(h ``int flags``h]j)}(hjh]h int flags}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubh)}(h` vfunc in turn, and frees the memory allocated for dmabuf when exported.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]j )}(h@``struct dma_buf *dmabuf`` [in] buffer to reduce refcount of h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjh]hstruct dma_buf *dmabuf}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]h)}(h$[in] buffer to reduce refcount ofh]h$[in] buffer to reduce refcount of}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubh)}(h2Uses file's refcounting done implicitly by fput().h]h4Uses file’s refcounting done implicitly by fput().}(hj5hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubh)}(hIf, as a result of this call, the refcount becomes 0, the 'release' file operation related to this fd is called. It calls :c:type:`dma_buf_ops.release ` vfunc in turn, and frees the memory allocated for dmabuf when exported.h](h~If, as a result of this call, the refcount becomes 0, the ‘release’ file operation related to this fd is called. It calls }(hzIf, as a result of this call, the refcount becomes 0, the 'release' file operation related to this fd is called. It calls hjBhhhNhNubh)}(h+:c:type:`dma_buf_ops.release `h]j)}(hjMh]hdma_buf_ops.release}(hhhjOhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjKubah}(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.chMhjBubhH vfunc in turn, and frees the memory allocated for dmabuf when exported.}(hH vfunc in turn, and frees the memory allocated for dmabuf when exported.hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMrubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMrubh)}(hhh]j0 )}(hdma_buf_attachmenth]hdma_buf_attachment}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`dma_buf_dynamic_attachsbc.dma_buf_dynamic_attachasbuh1hhjhhhjhMrubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMrubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjhhhjhMrubj* )}(hdma_buf_dynamic_attachh]j0 )}(hjh]hdma_buf_dynamic_attach}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMrubj)}(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}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj ubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhj.hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj+ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj0modnameN classnameNjdj)}j]jc.dma_buf_dynamic_attachasbuh1hhj ubj )}(h h]h }(hhhjLhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj ubj~)}(hj h]h*}(hhhjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj ubj0 )}(hdmabufh]hdmabuf}(hhhjghhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct device *devh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj|ubh)}(hhh]j0 )}(hdeviceh]hdevice}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_buf_dynamic_attachasbuh1hhj|ubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj|ubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj|ubj0 )}(hdevh]hdev}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj|ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h-const struct dma_buf_attach_ops *importer_opsh](j )}(hjh]hconst}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj )}(hj h]hstruct}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hdma_buf_attach_opsh]hdma_buf_attach_ops}(hhhj)hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj&ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj+modnameN classnameNjdj)}j]jc.dma_buf_dynamic_attachasbuh1hhjubj )}(h h]h }(hhhjGhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(h importer_opsh]h importer_ops}(hhhjbhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hvoid *importer_privh](jl)}(hvoidh]hvoid}(hhhj{hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjwubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjwubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjwubj0 )}(h importer_privh]h importer_priv}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjwubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMrubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhMrubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjhhubj[ )}(hhh]h)}(h,Add the device to dma_buf's attachments listh]h.Add the device to dma_buf’s attachments list}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMqhjhhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhjhMrubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to attach device to. ``struct device *dev`` [in] device to be attached. ``const struct dma_buf_attach_ops *importer_ops`` [in] importer operations for the attachment ``void *importer_priv`` [in] importer private pointer for the attachment **Description** Returns struct dma_buf_attachment pointer for this attachment. Attachments must be cleaned up by calling dma_buf_detach(). Optionally this calls :c:type:`dma_buf_ops.attach ` to allow device-specific attach functionality. A pointer to newly created :c:type:`dma_buf_attachment` on success, or a negative error code wrapped into a pointer on failure. Note that this can fail if the backing storage of **dmabuf** is in a place not accessible to **dev**, and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY. **Return**h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMuhjubj )}(hhh](j )}(h?``struct dma_buf *dmabuf`` [in] buffer to attach device to. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj h]hstruct dma_buf *dmabuf}(hhhj 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.chMrhj ubj )}(hhh]h)}(h#[in] buffer to attach device to.h]h#[in] buffer to attach device to.}(hj+ hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj% hMrhj& ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj% hMrhj ubj )}(h6``struct device *dev`` [in] device to be attached. h](j )}(h``struct device *dev``h]j)}(hjI h]hstruct device *dev}(hhhjK 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.chMshjC ubj )}(hhh]h)}(h[in] device to be attached.h]h[in] device to be attached.}(hjd hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^ hMshj_ ubah}(h]h ]h"]h$]h&]uh1j hjC ubeh}(h]h ]h"]h$]h&]uh1j hj^ hMshj ubj )}(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}(hhhj 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.chMthj| ubj )}(hhh]h)}(h.[in] importer operations for the attachmenth]h.[in] importer operations for the attachment}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMthj ubah}(h]h ]h"]h$]h&]uh1j hj| ubeh}(h]h ]h"]h$]h&]uh1j hj hMthj ubj )}(hL``void *importer_priv`` [in] importer private pointer for the attachment h](j )}(h``void *importer_priv``h]j)}(hj h]hvoid *importer_priv}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMuhj ubj )}(hhh]h)}(h3[in] importer private pointer for the attachmenth]h3[in] importer private pointer for the attachment}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMuhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hMuhj ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj h]h Description}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMwhjubh)}(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!hj !hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMwhjubh)}(hoOptionally this calls :c:type:`dma_buf_ops.attach ` to allow device-specific attach functionality.h](hOptionally this calls }(hOptionally this calls hj!hhhNhNubh)}(h*:c:type:`dma_buf_ops.attach `h]j)}(hj&!h]hdma_buf_ops.attach}(hhhj(!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.chMzhj!ubh/ to allow device-specific attach functionality.}(h/ to allow device-specific attach functionality.hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjC!hMzhjubh)}(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 }(hA pointer to newly created hjO!hhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjZ!h]hdma_buf_attachment}(hhhj\!hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjX!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.chM}hjO!ubhH on success, or a negative error code wrapped into a pointer on failure.}(hH on success, or a negative error code wrapped into a pointer on failure.hjO!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjw!hM}hjubh)}(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 }(h2Note that this can fail if the backing storage of hj!hhhNhNubj )}(h **dmabuf**h]hdmabuf}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj!ubh! is in a place not accessible to }(h! is in a place not accessible to hj!hhhNhNubj )}(h**dev**h]hdev}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj!ubh], and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY.}(h], and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY.hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubh)}(h **Return**h]j )}(hj!h]hReturn}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj!ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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}(hhhj!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 }(hhhj!hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj!hhhj!hMubh)}(hhh]j0 )}(hdma_buf_attachmenth]hdma_buf_attachment}(hhhj"hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj "ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj"modnameN classnameNjdj)}j]ji)}j`dma_buf_attachsbc.dma_buf_attachasbuh1hhj!hhhj!hMubj )}(h h]h }(hhhj1"hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj!hhhj!hMubj~)}(hj h]h*}(hhhj?"hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj!hhhj!hMubj* )}(hdma_buf_attachh]j0 )}(hj."h]hdma_buf_attach}(hhhjP"hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjL"ubah}(h]h ](jB jC 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}(hhhjk"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjg"ubj )}(h h]h }(hhhjx"hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjg"ubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhj"hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj"ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj"modnameN classnameNjdj)}j]j,"c.dma_buf_attachasbuh1hhjg"ubj )}(h h]h }(hhhj"hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjg"ubj~)}(hj h]h*}(hhhj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjg"ubj0 )}(hdmabufh]hdmabuf}(hhhj"hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjg"ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjc"ubj)}(hstruct device *devh](j )}(hj h]hstruct}(hhhj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubj )}(h h]h }(hhhj"hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj"ubh)}(hhh]j0 )}(hdeviceh]hdevice}(hhhj"hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj"ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj"modnameN classnameNjdj)}j]j,"c.dma_buf_attachasbuh1hhj"ubj )}(h h]h }(hhhj#hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj"ubj~)}(hj h]h*}(hhhj%#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj"ubj0 )}(hdevh]hdev}(hhhj2#hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj"ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjc"ubeh}(h]h ]h"]h$]h&]jjuh1jhj!hhhj!hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj!hhhj!hMubah}(h]j!ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj!hhubj[ )}(hhh]h)}(h"Wrapper for dma_buf_dynamic_attachh]h"Wrapper for dma_buf_dynamic_attach}(hj_#hj]#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjZ#hhubah}(h]h ]h"]h$]h&]uh1jZ hj!hhhj!hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| ju#j} ju#j~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to attach device to. ``struct device *dev`` [in] device to be attached. **Description** Wrapper to call dma_buf_dynamic_attach() for drivers which still use a static mapping.h](h)}(h**Parameters**h]j )}(hj#h]h Parameters}(hhhj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj}#ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjy#ubj )}(hhh](j )}(h?``struct dma_buf *dmabuf`` [in] buffer to attach device to. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj#h]hstruct dma_buf *dmabuf}(hhhj#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 attach device to.h]h#[in] buffer to attach device to.}(hj#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 )}(h6``struct device *dev`` [in] device to be attached. h](j )}(h``struct device *dev``h]j)}(hj#h]hstruct device *dev}(hhhj#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#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 hjy#ubh)}(h**Description**h]j )}(hj$h]h Description}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj$ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjy#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*$hj($hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjy#ubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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](jl)}(hvoidh]hvoid}(hhhjW$hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjS$hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hhhjf$hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjS$hhhje$hMubj* )}(hdma_buf_detachh]j0 )}(hdma_buf_detachh]hdma_buf_detach}(hhhjx$hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjt$ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjS$hhhje$hMubj)}(h;(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hhhj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubj )}(h h]h }(hhhj$hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj$ubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhj$hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj$ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj$modnameN classnameNjdj)}j]ji)}j`jz$sbc.dma_buf_detachasbuh1hhj$ubj )}(h h]h }(hhhj$hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj$ubj~)}(hj h]h*}(hhhj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj$ubj0 )}(hdmabufh]hdmabuf}(hhhj$hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj$ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj$ubj)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hhhj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubj )}(h h]h }(hhhj%hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj%ubh)}(hhh]j0 )}(hdma_buf_attachmenth]hdma_buf_attachment}(hhhj$%hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj!%ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj&%modnameN classnameNjdj)}j]j$c.dma_buf_detachasbuh1hhj%ubj )}(h h]h }(hhhjB%hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj%ubj~)}(hj h]h*}(hhhjP%hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj%ubj0 )}(hattachh]hattach}(hhhj]%hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj$ubeh}(h]h ]h"]h$]h&]jjuh1jhjS$hhhje$hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjO$hhhje$hMubah}(h]jJ$ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjL$hhubj[ )}(hhh]h)}(h:Remove the given attachment from dmabuf's attachments listh]h` for device-specific detach.h](h)}(h**Parameters**h]j )}(hj%h]h Parameters}(hhhj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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}(hhhj%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%hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hMhj%ubah}(h]h ]h"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]uh1j hj%hMhj%ubj )}(hd``struct dma_buf_attachment *attach`` [in] attachment to be detached; is free'd after this call. h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj&h]h!struct dma_buf_attachment *attach}(hhhj&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&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]j )}(hj=&h]h Description}(hhhj?&hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj;&ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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().}(hjU&hjS&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 }(hOptionally this calls hjb&hhhNhNubh)}(h*:c:type:`dma_buf_ops.detach `h]j)}(hjm&h]hdma_buf_ops.detach}(hhhjo&hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjk&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.chMhjb&ubh for device-specific detach.}(h for device-specific detach.hjb&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj&hMhj%ubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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](jl)}(hinth]hint}(hhhj&hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj&hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hhhj&hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj&hhhj&hMubj* )}(h dma_buf_pinh]j0 )}(h dma_buf_pinh]h dma_buf_pin}(hhhj&hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj&ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj&hhhj&hMubj)}(h#(struct dma_buf_attachment *attach)h]j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hhhj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubj )}(h h]h }(hhhj'hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj&ubh)}(hhh]j0 )}(hdma_buf_attachmenth]hdma_buf_attachment}(hhhj'hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj'ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj'modnameN classnameNjdj)}j]ji)}j`j&sb c.dma_buf_pinasbuh1hhj&ubj )}(h h]h }(hhhj1'hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj&ubj~)}(hj h]h*}(hhhj?'hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj&ubj0 )}(hattachh]hattach}(hhhjL'hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj&ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj&ubah}(h]h ]h"]h$]h&]jjuh1jhj&hhhj&hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj&hhhj&hMubah}(h]j&ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj&hhubj[ )}(hhh]h)}(hLock down the DMA-bufh]hLock down the DMA-buf}(hjy'hjw'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjt'hhubah}(h]h ]h"]h$]h&]uh1jZ hj&hhhj&hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j'j} j'j~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment which should be pinned **Description** Only dynamic importers (who set up **attach** with dma_buf_dynamic_attach()) may call this, and only for limited use cases like scanout and not for temporary pin operations. It is not permitted to allow userspace to pin arbitrary amounts of buffers through this interface. Buffers must be unpinned by calling dma_buf_unpin(). **Return** 0 on success, negative error code on failure.h](h)}(h**Parameters**h]j )}(hj'h]h Parameters}(hhhj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj'ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj'ubj )}(hhh]j )}(hP``struct dma_buf_attachment *attach`` [in] attachment which should be pinned h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj'h]h!struct dma_buf_attachment *attach}(hhhj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj'ubj )}(hhh]h)}(h)[in] attachment which should be pinnedh]h)[in] attachment which should be pinned}(hj'hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hMhj'ubah}(h]h ]h"]h$]h&]uh1j hj'ubeh}(h]h ]h"]h$]h&]uh1j hj'hMhj'ubah}(h]h ]h"]h$]h&]uh1j hj'ubh)}(h**Description**h]j )}(hj'h]h Description}(hhhj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj'ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj'ubh)}(hXOnly dynamic importers (who set up **attach** with dma_buf_dynamic_attach()) may call this, and only for limited use cases like scanout and not for temporary pin operations. It is not permitted to allow userspace to pin arbitrary amounts of buffers through this interface.h](h#Only dynamic importers (who set up }(h#Only dynamic importers (who set up hj (hhhNhNubj )}(h **attach**h]hattach}(hhhj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj (ubh with dma_buf_dynamic_attach()) may call this, and only for limited use cases like scanout and not for temporary pin operations. It is not permitted to allow userspace to pin arbitrary amounts of buffers through this interface.}(h with dma_buf_dynamic_attach()) may call this, and only for limited use cases like scanout and not for temporary pin operations. It is not permitted to allow userspace to pin arbitrary amounts of buffers through this interface.hj (hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj'ubh)}(h4Buffers must be unpinned by calling dma_buf_unpin().h]h4Buffers must be unpinned by calling dma_buf_unpin().}(hj.(hj,(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj'ubh)}(h **Return**h]j )}(hj=(h]hReturn}(hhhj?(hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj;(ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj'ubh)}(h-0 on success, negative error code on failure.h]h-0 on success, negative error code on failure.}(hjU(hjS(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&]uh1j 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](jl)}(hvoidh]hvoid}(hhhj(hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj~(hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM0ubj )}(h h]h }(hhhj(hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj~(hhhj(hM0ubj* )}(h dma_buf_unpinh]j0 )}(h dma_buf_unpinh]h dma_buf_unpin}(hhhj(hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj(ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj~(hhhj(hM0ubj)}(h#(struct dma_buf_attachment *attach)h]j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hhhj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubj )}(h h]h }(hhhj(hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj(ubh)}(hhh]j0 )}(hdma_buf_attachmenth]hdma_buf_attachment}(hhhj(hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj(ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj(modnameN classnameNjdj)}j]ji)}j`j(sbc.dma_buf_unpinasbuh1hhj(ubj )}(h h]h }(hhhj(hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj(ubj~)}(hj h]h*}(hhhj )hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj(ubj0 )}(hattachh]hattach}(hhhj)hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj(ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj(ubah}(h]h ]h"]h$]h&]jjuh1jhj~(hhhj(hM0ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjz(hhhj(hM0ubah}(h]ju(ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM6hjw(hhubj[ )}(hhh]h)}(hUnpin a DMA-bufh]hUnpin a DMA-buf}(hjE)hjC)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&]uh1jZ hjw(hhhj(hM0ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j[)j} j[)j~ uh1j hhhjhNhNubj )}(hXA**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment which should be unpinned **Description** This unpins a buffer pinned by dma_buf_pin() and allows the exporter to move any mapping of **attach** again and inform the importer through :c:type:`dma_buf_attach_ops.move_notify `.h](h)}(h**Parameters**h]j )}(hje)h]h Parameters}(hhhjg)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjc)ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM3hj_)ubj )}(hhh]j )}(hR``struct dma_buf_attachment *attach`` [in] attachment which should be unpinned h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj)h]h!struct dma_buf_attachment *attach}(hhhj)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.chM0hj~)ubj )}(hhh]h)}(h+[in] attachment which should be unpinnedh]h+[in] attachment which should be unpinned}(hj)hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hM0hj)ubah}(h]h ]h"]h$]h&]uh1j hj~)ubeh}(h]h ]h"]h$]h&]uh1j hj)hM0hj{)ubah}(h]h ]h"]h$]h&]uh1j hj_)ubh)}(h**Description**h]j )}(hj)h]h Description}(hhhj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj)ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM2hj_)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 }(h\This unpins a buffer pinned by dma_buf_pin() and allows the exporter to move any mapping of hj)hhhNhNubj )}(h **attach**h]hattach}(hhhj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj)ubh' again and inform the importer through }(h' 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}(hhhj)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.chM2hj)ubh.}(hjhj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj*hM2hj_)ubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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}(hhhj;*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7*hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMEubj )}(h h]h }(hhhjI*hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj7*hhhjH*hMEubh)}(hhh]j0 )}(hsg_tableh]hsg_table}(hhhjZ*hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjW*ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj\*modnameN classnameNjdj)}j]ji)}j`dma_buf_map_attachmentsbc.dma_buf_map_attachmentasbuh1hhj7*hhhjH*hMEubj )}(h h]h }(hhhj{*hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj7*hhhjH*hMEubj~)}(hj h]h*}(hhhj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj7*hhhjH*hMEubj* )}(hdma_buf_map_attachmenth]j0 )}(hjx*h]hdma_buf_map_attachment}(hhhj*hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj*ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj7*hhhjH*hMEubj)}(hF(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hhhj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubj )}(h h]h }(hhhj*hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj*ubh)}(hhh]j0 )}(hdma_buf_attachmenth]hdma_buf_attachment}(hhhj*hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj*ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj*modnameN classnameNjdj)}j]jv*c.dma_buf_map_attachmentasbuh1hhj*ubj )}(h h]h }(hhhj*hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj*ubj~)}(hj h]h*}(hhhj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj*ubj0 )}(hattachh]hattach}(hhhj +hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj*ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj*ubj)}(h!enum dma_data_direction directionh](j )}(henumh]henum}(hhhj%+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!+ubj )}(h h]h }(hhhj3+hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj!+ubh)}(hhh]j0 )}(hdma_data_directionh]hdma_data_direction}(hhhjD+hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjA+ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjF+modnameN classnameNjdj)}j]jv*c.dma_buf_map_attachmentasbuh1hhj!+ubj )}(h h]h }(hhhjb+hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj!+ubj0 )}(h directionh]h direction}(hhhjp+hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj!+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj*ubeh}(h]h ]h"]h$]h&]jjuh1jhj7*hhhjH*hMEubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj3*hhhjH*hMEubah}(h]j.*ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMXhj0*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+hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMDhj+hhubah}(h]h ]h"]h$]h&]uh1jZ hj0*hhhjH*hMEubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j+j} j+j~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment whose scatterlist is to be returned ``enum dma_data_direction direction`` [in] direction of DMA transfer **Description** Returns sg_table containing the scatterlist to be returned; returns ERR_PTR on error. May return -EINTR if it is interrupted by a signal. On success, the DMA addresses and lengths in the returned scatterlist are PAGE_SIZE aligned. A mapping must be unmapped by using dma_buf_unmap_attachment(). Note that the underlying backing storage is pinned for as long as a mapping exists, therefore users/importers should not hold onto a mapping for undue amounts of time. Important: Dynamic importers must wait for the exclusive fence of the struct dma_resv attached to the DMA-BUF first.h](h)}(h**Parameters**h]j )}(hj+h]h Parameters}(hhhj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj+ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMHhj+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}(hhhj+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.chMGhj+ubj )}(hhh]h)}(h6[in] attachment whose scatterlist is to be returnedh]h6[in] attachment whose scatterlist is to be returned}(hj+hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMGhj+ubah}(h]h ]h"]h$]h&]uh1j hj+ubeh}(h]h ]h"]h$]h&]uh1j hj+hMGhj+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}(hhhj,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.chMHhj,ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hj0,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*,hMHhj+ubeh}(h]h ]h"]h$]h&]uh1j hj+ubh)}(h**Description**h]j )}(hjP,h]h Description}(hhhjR,hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjN,ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMJhj+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.}(hjh,hjf,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMJhj+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.}(hjw,hju,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMMhj+ubh)}(hA mapping must be unmapped by using dma_buf_unmap_attachment(). Note that the underlying backing storage is pinned for as long as a mapping exists, therefore users/importers should not hold onto a mapping for undue amounts of time.h]hA mapping must be unmapped by using dma_buf_unmap_attachment(). Note that the underlying backing storage is pinned for as long as a mapping exists, therefore users/importers should not hold onto a mapping for undue amounts of time.}(hj,hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMPhj+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.}(hj,hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMUhj+ubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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}(hhhj,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 }(hhhj,hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj,hhhj,hMubh)}(hhh]j0 )}(hsg_tableh]hsg_table}(hhhj,hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj,ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj,modnameN classnameNjdj)}j]ji)}j`dma_buf_map_attachment_unlockedsb!c.dma_buf_map_attachment_unlockedasbuh1hhj,hhhj,hMubj )}(h h]h }(hhhj-hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj,hhhj,hMubj~)}(hj h]h*}(hhhj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj,hhhj,hMubj* )}(hdma_buf_map_attachment_unlockedh]j0 )}(hj,h]hdma_buf_map_attachment_unlocked}(hhhj!-hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj-ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj,hhhj,hMubj)}(hF(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hhhj<-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8-ubj )}(h h]h }(hhhjI-hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj8-ubh)}(hhh]j0 )}(hdma_buf_attachmenth]hdma_buf_attachment}(hhhjZ-hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjW-ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj\-modnameN classnameNjdj)}j]j,!c.dma_buf_map_attachment_unlockedasbuh1hhj8-ubj )}(h h]h }(hhhjx-hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj8-ubj~)}(hj h]h*}(hhhj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj8-ubj0 )}(hattachh]hattach}(hhhj-hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj8-ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj4-ubj)}(h!enum dma_data_direction directionh](j )}(hj'+h]henum}(hhhj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubj )}(h h]h }(hhhj-hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj-ubh)}(hhh]j0 )}(hdma_data_directionh]hdma_data_direction}(hhhj-hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj-ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj-modnameN classnameNjdj)}j]j,!c.dma_buf_map_attachment_unlockedasbuh1hhj-ubj )}(h h]h }(hhhj-hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj-ubj0 )}(h directionh]h direction}(hhhj-hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj-ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj4-ubeh}(h]h ]h"]h$]h&]jjuh1jhj,hhhj,hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj,hhhj,hMubah}(h]j,ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj,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#.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&]uh1jZ hj,hhhj,hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j9.j} j9.j~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment whose scatterlist is to be returned ``enum dma_data_direction direction`` [in] direction of DMA transfer **Description** Unlocked variant of dma_buf_map_attachment().h](h)}(h**Parameters**h]j )}(hjC.h]h Parameters}(hhhjE.hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjA.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)}(hjb.h]h!struct dma_buf_attachment *attach}(hhhjd.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}.hj{.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjw.hMhjx.ubah}(h]h ]h"]h$]h&]uh1j hj\.ubeh}(h]h ]h"]h$]h&]uh1j hjw.hMhjY.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}(hhhj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj.ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hj.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.hMhjY.ubeh}(h]h ]h"]h$]h&]uh1j hj=.ubh)}(h**Description**h]j )}(hj.h]h Description}(hhhj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj.ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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.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&]uh1j 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](jl)}(hvoidh]hvoid}(hhhj/hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj/hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hhhj*/hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj/hhhj)/hMubj* )}(hdma_buf_unmap_attachmenth]j0 )}(hdma_buf_unmap_attachmenth]hdma_buf_unmap_attachment}(hhhj/sbc.dma_buf_unmap_attachmentasbuh1hhjT/ubj )}(h h]h }(hhhj/hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjT/ubj~)}(hj h]h*}(hhhj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjT/ubj0 )}(hattachh]hattach}(hhhj/hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjT/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjP/ubj)}(hstruct sg_table *sg_tableh](j )}(hj h]hstruct}(hhhj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubj )}(h h]h }(hhhj/hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj/ubh)}(hhh]j0 )}(hsg_tableh]hsg_table}(hhhj/hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj/ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj/modnameN classnameNjdj)}j]j/c.dma_buf_unmap_attachmentasbuh1hhj/ubj )}(h h]h }(hhhj0hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj/ubj~)}(hj h]h*}(hhhj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj/ubj0 )}(hsg_tableh]hsg_table}(hhhj!0hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjP/ubj)}(h!enum dma_data_direction directionh](j )}(hj'+h]henum}(hhhj:0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj60ubj )}(h h]h }(hhhjG0hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj60ubh)}(hhh]j0 )}(hdma_data_directionh]hdma_data_direction}(hhhjX0hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjU0ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjZ0modnameN classnameNjdj)}j]j/c.dma_buf_unmap_attachmentasbuh1hhj60ubj )}(h h]h }(hhhjv0hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj60ubj0 )}(h directionh]h direction}(hhhj0hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj60ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjP/ubeh}(h]h ]h"]h$]h&]jjuh1jhj/hhhj)/hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj/hhhj)/hMubah}(h]j/ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj/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.}(hj0hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj0hhubah}(h]h ]h"]h$]h&]uh1jZ hj/hhhj)/hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j0j} j0j~ uh1j hhhjhNhNubj )}(hX^**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from ``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap ``enum dma_data_direction direction`` [in] direction of DMA transfer **Description** This unmaps a DMA mapping for **attached** obtained by dma_buf_map_attachment().h](h)}(h**Parameters**h]j )}(hj0h]h Parameters}(hhhj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj0ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj0ubj )}(hhh](j )}(hN``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj0h]h!struct dma_buf_attachment *attach}(hhhj0hhhNhNubah}(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}(hj 1hj 1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMhj1ubah}(h]h ]h"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]uh1j hj1hMhj0ubj )}(hN``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap h](j )}(h``struct sg_table *sg_table``h]j)}(hj)1h]hstruct sg_table *sg_table}(hhhj+1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'1ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj#1ubj )}(hhh]h)}(h/[in] scatterlist info of the buffer to unmaph]h/[in] scatterlist info of the buffer to unmap}(hjD1hjB1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>1hMhj?1ubah}(h]h ]h"]h$]h&]uh1j hj#1ubeh}(h]h ]h"]h$]h&]uh1j hj>1hMhj0ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hjb1h]h!enum dma_data_direction direction}(hhhjd1hhhNhNubah}(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}1hj{1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjw1hMhjx1ubah}(h]h ]h"]h$]h&]uh1j hj\1ubeh}(h]h ]h"]h$]h&]uh1j hjw1hMhj0ubeh}(h]h ]h"]h$]h&]uh1j hj0ubh)}(h**Description**h]j )}(hj1h]h Description}(hhhj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj1ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj0ubh)}(hPThis unmaps a DMA mapping for **attached** obtained by dma_buf_map_attachment().h](hThis unmaps a DMA mapping for }(hThis unmaps a DMA mapping for hj1hhhNhNubj )}(h **attached**h]hattached}(hhhj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj1ubh& obtained by dma_buf_map_attachment().}(h& obtained by dma_buf_map_attachment().hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj0ubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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](jl)}(hvoidh]hvoid}(hhhj1hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj1hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hhhj2hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj1hhhj2hMubj* )}(h!dma_buf_unmap_attachment_unlockedh]j0 )}(h!dma_buf_unmap_attachment_unlockedh]h!dma_buf_unmap_attachment_unlocked}(hhhj2hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj2ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj1hhhj2hMubj)}(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}(hhhj32hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/2ubj )}(h h]h }(hhhj@2hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj/2ubh)}(hhh]j0 )}(hdma_buf_attachmenth]hdma_buf_attachment}(hhhjQ2hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjN2ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjS2modnameN classnameNjdj)}j]ji)}j`j2sb#c.dma_buf_unmap_attachment_unlockedasbuh1hhj/2ubj )}(h h]h }(hhhjq2hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj/2ubj~)}(hj h]h*}(hhhj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj/2ubj0 )}(hattachh]hattach}(hhhj2hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj/2ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+2ubj)}(hstruct sg_table *sg_tableh](j )}(hj h]hstruct}(hhhj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubj )}(h h]h }(hhhj2hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj2ubh)}(hhh]j0 )}(hsg_tableh]hsg_table}(hhhj2hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj2ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj2modnameN classnameNjdj)}j]jm2#c.dma_buf_unmap_attachment_unlockedasbuh1hhj2ubj )}(h h]h }(hhhj2hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj2ubj~)}(hj h]h*}(hhhj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj2ubj0 )}(hsg_tableh]hsg_table}(hhhj2hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj2ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+2ubj)}(h!enum dma_data_direction directionh](j )}(hj'+h]henum}(hhhj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubj )}(h h]h }(hhhj"3hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj3ubh)}(hhh]j0 )}(hdma_data_directionh]hdma_data_direction}(hhhj33hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj03ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj53modnameN classnameNjdj)}j]jm2#c.dma_buf_unmap_attachment_unlockedasbuh1hhj3ubj )}(h h]h }(hhhjQ3hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj3ubj0 )}(h directionh]h direction}(hhhj_3hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj3ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+2ubeh}(h]h ]h"]h$]h&]jjuh1jhj1hhhj2hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj1hhhj2hMubah}(h]j1ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj1hhubj[ )}(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.}(hj3hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj3hhubah}(h]h ]h"]h$]h&]uh1jZ hj1hhhj2hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j3j} j3j~ uh1j hhhjhNhNubj )}(hX=**Parameters** ``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from ``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap ``enum dma_data_direction direction`` [in] direction of DMA transfer **Description** Unlocked variant of dma_buf_unmap_attachment().h](h)}(h**Parameters**h]j )}(hj3h]h Parameters}(hhhj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj3ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj3ubj )}(hhh](j )}(hN``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj3h]h!struct dma_buf_attachment *attach}(hhhj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj3ubj )}(hhh]h)}(h'[in] attachment to unmap buffer fromh]h'[in] attachment to unmap buffer from}(hj3hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMhj3ubah}(h]h ]h"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]uh1j hj3hMhj3ubj )}(hN``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap h](j )}(h``struct sg_table *sg_table``h]j)}(hj4h]hstruct sg_table *sg_table}(hhhj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(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}(hj4hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hMhj4ubah}(h]h ]h"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]uh1j hj4hMhj3ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hj=4h]h!enum dma_data_direction direction}(hhhj?4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;4ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj74ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hjX4hjV4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjR4hMhjS4ubah}(h]h ]h"]h$]h&]uh1j hj74ubeh}(h]h ]h"]h$]h&]uh1j hjR4hMhj3ubeh}(h]h ]h"]h$]h&]uh1j hj3ubh)}(h**Description**h]j )}(hjx4h]h Description}(hhhjz4hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjv4ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj3ubh)}(h/Unlocked variant of dma_buf_unmap_attachment().h]h/Unlocked variant of dma_buf_unmap_attachment().}(hj4hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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](jl)}(hvoidh]hvoid}(hhhj4hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj4hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hhhj4hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj4hhhj4hMubj* )}(hdma_buf_move_notifyh]j0 )}(hdma_buf_move_notifyh]hdma_buf_move_notify}(hhhj4hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj4ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj4hhhj4hMubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hhhj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubj )}(h h]h }(hhhj5hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj4ubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhj5hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj5ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj5modnameN classnameNjdj)}j]ji)}j`j4sbc.dma_buf_move_notifyasbuh1hhj4ubj )}(h h]h }(hhhj85hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj4ubj~)}(hj h]h*}(hhhjF5hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj4ubj0 )}(hdmabufh]hdmabuf}(hhhjS5hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj4ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj4ubah}(h]h ]h"]h$]h&]jjuh1jhj4hhhj4hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj4hhhj4hMubah}(h]j4ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj4hhubj[ )}(hhh]h)}(h)notify attachments that DMA-buf is movingh]h)notify attachments that DMA-buf is moving}(hj5hj~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&]uh1jZ hj4hhhj4hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j5j} j5j~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer which is moving **Description** Informs all attachments that they need to destroy and recreate all their mappings.h](h)}(h**Parameters**h]j )}(hj5h]h Parameters}(hhhj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj5ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj5ubj )}(hhh]j )}(h:``struct dma_buf *dmabuf`` [in] buffer which is moving h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj5h]hstruct dma_buf *dmabuf}(hhhj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj5ubj )}(hhh]h)}(h[in] buffer which is movingh]h[in] buffer which is moving}(hj5hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hMhj5ubah}(h]h ]h"]h$]h&]uh1j hj5ubeh}(h]h ]h"]h$]h&]uh1j hj5hMhj5ubah}(h]h ]h"]h$]h&]uh1j hj5ubh)}(h**Description**h]j )}(hj5h]h Description}(hhhj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj5ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj5ubh)}(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.}(hj6hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj5ubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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](jl)}(hinth]hint}(hhhj?6hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj;6hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMlubj )}(h h]h }(hhhjN6hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj;6hhhjM6hMlubj* )}(hdma_buf_begin_cpu_accessh]j0 )}(hdma_buf_begin_cpu_accessh]hdma_buf_begin_cpu_access}(hhhj`6hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj\6ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj;6hhhjM6hMlubj)}(h;(struct dma_buf *dmabuf, enum dma_data_direction direction)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hhhj|6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjx6ubj )}(h h]h }(hhhj6hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjx6ubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhj6hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj6ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj6modnameN classnameNjdj)}j]ji)}j`jb6sbc.dma_buf_begin_cpu_accessasbuh1hhjx6ubj )}(h h]h }(hhhj6hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjx6ubj~)}(hj h]h*}(hhhj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjx6ubj0 )}(hdmabufh]hdmabuf}(hhhj6hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjx6ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjt6ubj)}(h!enum dma_data_direction directionh](j )}(hj'+h]henum}(hhhj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubj )}(h h]h }(hhhj6hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj6ubh)}(hhh]j0 )}(hdma_data_directionh]hdma_data_direction}(hhhj 7hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj 7ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj7modnameN classnameNjdj)}j]j6c.dma_buf_begin_cpu_accessasbuh1hhj6ubj )}(h h]h }(hhhj*7hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj6ubj0 )}(h directionh]h direction}(hhhj87hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj6ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjt6ubeh}(h]h ]h"]h$]h&]jjuh1jhj;6hhhjM6hMlubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj76hhhjM6hMlubah}(h]j26ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM}hj46hhubj[ )}(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.}(hje7hjc7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMkhj`7hhubah}(h]h ]h"]h$]h&]uh1jZ hj46hhhjM6hMlubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j{7j} j{7j~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to prepare cpu access for. ``enum dma_data_direction direction`` [in] direction of access. **Description** After the cpu access is complete the caller should call dma_buf_end_cpu_access(). Only when cpu access is bracketed by both calls is it guaranteed to be coherent with other DMA access. This function will also wait for any DMA transactions tracked through implicit synchronization in :c:type:`dma_buf.resv `. For DMA transactions with explicit synchronization this function will only ensure cache coherency, callers must ensure synchronization with such DMA transactions on their own. Can return negative error values, returns 0 on success.h](h)}(h**Parameters**h]j )}(hj7h]h Parameters}(hhhj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj7ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMohj7ubj )}(hhh](j )}(hE``struct dma_buf *dmabuf`` [in] buffer to prepare cpu access for. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj7h]hstruct dma_buf *dmabuf}(hhhj7hhhNhNubah}(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.chMohj7ubj )}(hhh]h)}(h)[in] buffer to prepare cpu access for.h]h)[in] buffer to prepare cpu access for.}(hj7hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMohj7ubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hj7hMohj7ubj )}(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}(hhhj7hhhNhNubah}(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.chMphj7ubj )}(hhh]h)}(h[in] direction of access.h]h[in] direction of access.}(hj7hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMphj7ubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hj7hMphj7ubeh}(h]h ]h"]h$]h&]uh1j hj7ubh)}(h**Description**h]j )}(hj8h]h Description}(hhhj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj8ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMrhj7ubh)}(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.}(hj08hj.8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMrhj7ubh)}(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 }(hbThis function will also wait for any DMA transactions tracked through implicit synchronization in hj=8hhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hjH8h]h dma_buf.resv}(hhhjJ8hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjF8ubah}(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.chMvhj=8ubh. 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. For DMA transactions with explicit synchronization this function will only ensure cache coherency, callers must ensure synchronization with such DMA transactions on their own.hj=8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhje8hMvhj7ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hjs8hjq8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM{hj7ubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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](jl)}(hinth]hint}(hhhj8hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj8hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hhhj8hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj8hhhj8hMubj* )}(hdma_buf_end_cpu_accessh]j0 )}(hdma_buf_end_cpu_accessh]hdma_buf_end_cpu_access}(hhhj8hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj8ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj8hhhj8hMubj)}(h;(struct dma_buf *dmabuf, enum dma_data_direction direction)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hhhj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubj )}(h h]h }(hhhj8hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj8ubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhj8hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj8ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj8modnameN classnameNjdj)}j]ji)}j`j8sbc.dma_buf_end_cpu_accessasbuh1hhj8ubj )}(h h]h }(hhhj9hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj8ubj~)}(hj h]h*}(hhhj)9hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj8ubj0 )}(hdmabufh]hdmabuf}(hhhj69hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj8ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj8ubj)}(h!enum dma_data_direction directionh](j )}(hj'+h]henum}(hhhjO9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjK9ubj )}(h h]h }(hhhj\9hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjK9ubh)}(hhh]j0 )}(hdma_data_directionh]hdma_data_direction}(hhhjm9hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjj9ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjo9modnameN classnameNjdj)}j]j9c.dma_buf_end_cpu_accessasbuh1hhjK9ubj )}(h h]h }(hhhj9hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjK9ubj0 )}(h directionh]h direction}(hhhj9hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjK9ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj8ubeh}(h]h ]h"]h$]h&]jjuh1jhj8hhhj8hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj8hhhj8hMubah}(h]j8ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj8hhubj[ )}(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.}(hj9hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9hhubah}(h]h ]h"]h$]h&]uh1jZ hj8hhhj8hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j9j} j9j~ uh1j hhhjhNhNubj )}(hX,**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to complete cpu access for. ``enum dma_data_direction direction`` [in] direction of access. **Description** This terminates CPU access started with dma_buf_begin_cpu_access(). Can return negative error values, returns 0 on success.h](h)}(h**Parameters**h]j )}(hj9h]h Parameters}(hhhj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j 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)}(hj:h]hstruct dma_buf *dmabuf}(hhhj: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.chMhj9ubj )}(hhh]h)}(h*[in] buffer to complete cpu access for.h]h*[in] buffer to complete cpu access for.}(hj :hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hMhj:ubah}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]uh1j hj:hMhj9ubj )}(hC``enum dma_data_direction direction`` [in] direction of access. h](j )}(h%``enum dma_data_direction direction``h]j)}(hj>:h]h!enum dma_data_direction direction}(hhhj@: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.chMhj8:ubj )}(hhh]h)}(h[in] direction of access.h]h[in] direction of access.}(hjY:hjW:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjS:hMhjT:ubah}(h]h ]h"]h$]h&]uh1j hj8:ubeh}(h]h ]h"]h$]h&]uh1j hjS:hMhj9ubeh}(h]h ]h"]h$]h&]uh1j hj9ubh)}(h**Description**h]j )}(hjy:h]h Description}(hhhj{:hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjw: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().}(hj:hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hj:hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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](jl)}(hinth]hint}(hhhj:hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj:hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hhhj:hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj:hhhj:hMubj* )}(h dma_buf_mmaph]j0 )}(h dma_buf_mmaph]h dma_buf_mmap}(hhhj:hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj:ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj:hhhj:hMubj)}(hI(struct dma_buf *dmabuf, struct vm_area_struct *vma, unsigned long pgoff)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hhhj ;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubj )}(h h]h }(hhhj;hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj;ubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhj(;hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj%;ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj*;modnameN classnameNjdj)}j]ji)}j`j:sbc.dma_buf_mmapasbuh1hhj;ubj )}(h h]h }(hhhjH;hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj;ubj~)}(hj h]h*}(hhhjV;hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj;ubj0 )}(hdmabufh]hdmabuf}(hhhjc;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}(hhhj|;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjx;ubj )}(h h]h }(hhhj;hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjx;ubh)}(hhh]j0 )}(hvm_area_structh]hvm_area_struct}(hhhj;hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj;ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj;modnameN classnameNjdj)}j]jD;c.dma_buf_mmapasbuh1hhjx;ubj )}(h h]h }(hhhj;hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjx;ubj~)}(hj h]h*}(hhhj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjx;ubj0 )}(hvmah]hvma}(hhhj;hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjx;ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj;ubj)}(hunsigned long pgoffh](jl)}(hunsignedh]hunsigned}(hhhj;hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj;ubj )}(h h]h }(hhhj;hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj;ubjl)}(hlongh]hlong}(hhhj<hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj;ubj )}(h h]h }(hhhj<hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj;ubj0 )}(hpgoffh]hpgoff}(hhhj$<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&]jjjM uh1j jN jO hj:hhhj:hMubah}(h]j:ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj:hhubj[ )}(hhh]h)}(h,Setup up a userspace mmap with the given vmah]h,Setup up a userspace mmap with the given vma}(hjQ<hjO<hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjL<hhubah}(h]h ]h"]h$]h&]uh1jZ hj:hhhj:hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jg<j} jg<j~ uh1j hhhjhNhNubj )}(hX<**Parameters** ``struct dma_buf *dmabuf`` [in] buffer that should back the vma ``struct vm_area_struct *vma`` [in] vma for the mmap ``unsigned long pgoff`` [in] offset in pages where this mmap should start within the dma-buf buffer. **Description** This function adjusts the passed in vma so that it points at the file of the dma_buf operation. It also adjusts the starting pgoff and does bounds checking on the size of the vma. Then it calls the exporters mmap function to set up the mapping. Can return negative error values, returns 0 on success.h](h)}(h**Parameters**h]j )}(hjq<h]h Parameters}(hhhjs<hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjo<ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjk<ubj )}(hhh](j )}(hC``struct dma_buf *dmabuf`` [in] buffer that should back the vma h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj<h]hstruct dma_buf *dmabuf}(hhhj<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 that should back the vmah]h'[in] buffer that should back the vma}(hj<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 )}(h8``struct vm_area_struct *vma`` [in] vma for the mmap h](j )}(h``struct vm_area_struct *vma``h]j)}(hj<h]hstruct vm_area_struct *vma}(hhhj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj<ubj )}(hhh]h)}(h[in] vma for the mmaph]h[in] vma for the mmap}(hj<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``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}(hhhj=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=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 hjk<ubh)}(h**Description**h]j )}(hj>=h]h Description}(hhhj@=hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj<=ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjk<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.}(hjV=hjT=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjk<ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hje=hjc=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjk<ubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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](jl)}(hinth]hint}(hhhj=hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj=hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hhhj=hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj=hhhj=hMubj* )}(h dma_buf_vmaph]j0 )}(h dma_buf_vmaph]h dma_buf_vmap}(hhhj=hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj=ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj=hhhj=hMubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hhhj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubj )}(h h]h }(hhhj=hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj=ubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhj=hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj=ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj=modnameN classnameNjdj)}j]ji)}j`j=sbc.dma_buf_vmapasbuh1hhj=ubj )}(h h]h }(hhhj >hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj=ubj~)}(hj h]h*}(hhhj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj=ubj0 )}(hdmabufh]hdmabuf}(hhhj(>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}(hhhjA>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=>ubj )}(h h]h }(hhhjN>hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj=>ubh)}(hhh]j0 )}(h iosys_maph]h iosys_map}(hhhj_>hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj\>ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetja>modnameN classnameNjdj)}j]j >c.dma_buf_vmapasbuh1hhj=>ubj )}(h h]h }(hhhj}>hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj=>ubj~)}(hj h]h*}(hhhj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj=>ubj0 )}(hmaph]hmap}(hhhj>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&]jjjM uh1j jN jO hj=hhhj=hMubah}(h]j=ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj=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>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&]uh1jZ hj=hhhj=hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j>j} j>j~ uh1j hhhjhNhNubj )}(hX%**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vmap ``struct iosys_map *map`` [out] returns the vmap pointer **Description** This call may fail due to lack of virtual mapping address space. These calls are optional in drivers. The intended use for them is for mapping objects linear in kernel space for high use objects. To ensure coherency users must call dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() around any cpu access performed through this mapping. Returns 0 on success, or a negative errno code otherwise.h](h)}(h**Parameters**h]j )}(hj>h]h Parameters}(hhhj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj>ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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}(hhhj?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?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}(hhhj??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.chMhj7?ubj )}(hhh]h)}(h [out] returns the vmap pointerh]h [out] returns the vmap pointer}(hjX?hjV?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjR?hMhjS?ubah}(h]h ]h"]h$]h&]uh1j hj7?ubeh}(h]h ]h"]h$]h&]uh1j hjR?hMhj>ubeh}(h]h ]h"]h$]h&]uh1j hj>ubh)}(h**Description**h]j )}(hjx?h]h Description}(hhhjz?hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjv?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.}(hj?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)}(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?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.}(hj?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&]uh1j 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](jl)}(hinth]hint}(hhhj?hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj?hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMubj )}(h h]h }(hhhj?hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj?hhhj?hMubj* )}(hdma_buf_vmap_unlockedh]j0 )}(hdma_buf_vmap_unlockedh]hdma_buf_vmap_unlocked}(hhhj?hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj?ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj?hhhj?hMubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hhhj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubj )}(h h]h }(hhhj%@hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj@ubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhj6@hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj3@ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj8@modnameN classnameNjdj)}j]ji)}j`j?sbc.dma_buf_vmap_unlockedasbuh1hhj@ubj )}(h h]h }(hhhjV@hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj@ubj~)}(hj h]h*}(hhhjd@hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj@ubj0 )}(hdmabufh]hdmabuf}(hhhjq@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}(hhhj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubj )}(h h]h }(hhhj@hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj@ubh)}(hhh]j0 )}(h iosys_maph]h iosys_map}(hhhj@hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj@ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj@modnameN classnameNjdj)}j]jR@c.dma_buf_vmap_unlockedasbuh1hhj@ubj )}(h h]h }(hhhj@hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj@ubj~)}(hj h]h*}(hhhj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj@ubj0 )}(hmaph]hmap}(hhhj@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&]jjjM uh1j jN jO hj?hhhj?hMubah}(h]j?ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj?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.}(hjAhj AhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj Ahhubah}(h]h ]h"]h$]h&]uh1jZ hj?hhhj?hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j$Aj} j$Aj~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vmap ``struct iosys_map *map`` [out] returns the vmap pointer **Description** Unlocked version of dma_buf_vmap() Returns 0 on success, or a negative errno code otherwise.h](h)}(h**Parameters**h]j )}(hj.Ah]h Parameters}(hhhj0AhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj,Aubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj(Aubj )}(hhh](j )}(h2``struct dma_buf *dmabuf`` [in] buffer to vmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjMAh]hstruct dma_buf *dmabuf}(hhhjOAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKAubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjGAubj )}(hhh]h)}(h[in] buffer to vmaph]h[in] buffer to vmap}(hjhAhjfAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbAhMhjcAubah}(h]h ]h"]h$]h&]uh1j hjGAubeh}(h]h ]h"]h$]h&]uh1j hjbAhMhjDAubj )}(h;``struct iosys_map *map`` [out] returns the vmap pointer h](j )}(h``struct iosys_map *map``h]j)}(hjAh]hstruct iosys_map *map}(hhhjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhjAubj )}(hhh]h)}(h [out] returns the vmap pointerh]h [out] returns the vmap pointer}(hjAhjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMhjAubah}(h]h ]h"]h$]h&]uh1j hjAubeh}(h]h ]h"]h$]h&]uh1j hjAhMhjDAubeh}(h]h ]h"]h$]h&]uh1j hj(Aubh)}(h**Description**h]j )}(hjAh]h Description}(hhhjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjAubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj(Aubh)}(h"Unlocked version of dma_buf_vmap()h]h"Unlocked version of dma_buf_vmap()}(hjAhjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj(Aubh)}(h9Returns 0 on success, or a negative errno code otherwise.h]h9Returns 0 on success, or a negative errno code otherwise.}(hjAhjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMhj(Aubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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](jl)}(hvoidh]hvoid}(hhhjBhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjBhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM-ubj )}(h h]h }(hhhj$BhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjBhhhj#BhM-ubj* )}(hdma_buf_vunmaph]j0 )}(hdma_buf_vunmaph]hdma_buf_vunmap}(hhhj6BhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj2Bubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjBhhhj#BhM-ubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hhhjRBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNBubj )}(h h]h }(hhhj_BhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjNBubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhjpBhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjmBubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjrBmodnameN classnameNjdj)}j]ji)}j`j8Bsbc.dma_buf_vunmapasbuh1hhjNBubj )}(h h]h }(hhhjBhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjNBubj~)}(hj h]h*}(hhhjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjNBubj0 )}(hdmabufh]hdmabuf}(hhhjBhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjNBubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjJBubj)}(hstruct iosys_map *maph](j )}(hj h]hstruct}(hhhjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubj )}(h h]h }(hhhjBhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjBubh)}(hhh]j0 )}(h iosys_maph]h iosys_map}(hhhjBhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjBubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjBmodnameN classnameNjdj)}j]jBc.dma_buf_vunmapasbuh1hhjBubj )}(h h]h }(hhhjChhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjBubj~)}(hj h]h*}(hhhjChhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjBubj0 )}(hmaph]hmap}(hhhjChhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjBubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjJBubeh}(h]h ]h"]h$]h&]jjuh1jhjBhhhj#BhM-ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj Bhhhj#BhM-ubah}(h]jBah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM0hj Bhhubj[ )}(hhh]h)}(h&Unmap a vmap obtained by dma_buf_vmap.h]h&Unmap a vmap obtained by dma_buf_vmap.}(hjHChjFChhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM,hjCChhubah}(h]h ]h"]h$]h&]uh1jZ hj Bhhhj#BhM-ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j^Cj} j^Cj~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vunmap ``struct iosys_map *map`` [in] vmap pointer to vunmaph](h)}(h**Parameters**h]j )}(hjhCh]h Parameters}(hhhjjChhhNhNubah}(h]h ]h"]h$]h&]uh1j hjfCubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM0hjbCubj )}(hhh](j )}(h4``struct dma_buf *dmabuf`` [in] buffer to vunmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjCh]hstruct dma_buf *dmabuf}(hhhjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM-hjCubj )}(hhh]h)}(h[in] buffer to vunmaph]h[in] buffer to vunmap}(hjChjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChM-hjCubah}(h]h ]h"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]uh1j hjChM-hj~Cubj )}(h8``struct iosys_map *map`` [in] vmap pointer to vunmaph](j )}(h``struct iosys_map *map``h]j)}(hjCh]hstruct iosys_map *map}(hhhjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM/hjCubj )}(hhh]h)}(h[in] vmap pointer to vunmaph]h[in] vmap pointer to vunmap}(hjChjChhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chM.hjCubah}(h]h ]h"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]uh1j hjChM/hj~Cubeh}(h]h ]h"]h$]h&]uh1j hjbCubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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](jl)}(hvoidh]hvoid}(hhhjDhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjDhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMEubj )}(h h]h }(hhhj)DhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjDhhhj(DhMEubj* )}(hdma_buf_vunmap_unlockedh]j0 )}(hdma_buf_vunmap_unlockedh]hdma_buf_vunmap_unlocked}(hhhj;DhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj7Dubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjDhhhj(DhMEubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hhhjWDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSDubj )}(h h]h }(hhhjdDhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjSDubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhjuDhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjrDubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjwDmodnameN classnameNjdj)}j]ji)}j`j=Dsbc.dma_buf_vunmap_unlockedasbuh1hhjSDubj )}(h h]h }(hhhjDhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjSDubj~)}(hj h]h*}(hhhjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjSDubj0 )}(hdmabufh]hdmabuf}(hhhjDhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjSDubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjODubj)}(hstruct iosys_map *maph](j )}(hj h]hstruct}(hhhjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDubj )}(h h]h }(hhhjDhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjDubh)}(hhh]j0 )}(h iosys_maph]h iosys_map}(hhhjDhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjDubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjDmodnameN classnameNjdj)}j]jDc.dma_buf_vunmap_unlockedasbuh1hhjDubj )}(h h]h }(hhhjEhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjDubj~)}(hj h]h*}(hhhjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjDubj0 )}(hmaph]hmap}(hhhj EhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjDubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjODubeh}(h]h ]h"]h$]h&]jjuh1jhjDhhhj(DhMEubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjDhhhj(DhMEubah}(h]j Dah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMHhjDhhubj[ )}(hhh]h)}(h&Unmap a vmap obtained by dma_buf_vmap.h]h&Unmap a vmap obtained by dma_buf_vmap.}(hjMEhjKEhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMDhjHEhhubah}(h]h ]h"]h$]h&]uh1jZ hjDhhhj(DhMEubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jcEj} jcEj~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vunmap ``struct iosys_map *map`` [in] vmap pointer to vunmaph](h)}(h**Parameters**h]j )}(hjmEh]h Parameters}(hhhjoEhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjkEubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMHhjgEubj )}(hhh](j )}(h4``struct dma_buf *dmabuf`` [in] buffer to vunmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjEh]hstruct dma_buf *dmabuf}(hhhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMEhjEubj )}(hhh]h)}(h[in] buffer to vunmaph]h[in] buffer to vunmap}(hjEhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhMEhjEubah}(h]h ]h"]h$]h&]uh1j hjEubeh}(h]h ]h"]h$]h&]uh1j hjEhMEhjEubj )}(h8``struct iosys_map *map`` [in] vmap pointer to vunmaph](j )}(h``struct iosys_map *map``h]j)}(hjEh]hstruct iosys_map *map}(hhhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMGhjEubj )}(hhh]h)}(h[in] vmap pointer to vunmaph]h[in] vmap pointer to vunmap}(hjEhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:147: ./drivers/dma-buf/dma-buf.chMFhjEubah}(h]h ]h"]h$]h&]uh1j hjEubeh}(h]h ]h"]h$]h&]uh1j hjEhMGhjEubeh}(h]h ]h"]h$]h&]uh1j hjgEubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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}(hhhjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjFhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK ubj )}(h h]h }(hhhj-FhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjFhhhj,FhK ubj* )}(h dma_buf_opsh]j0 )}(hjFh]h dma_buf_ops}(hhhj?FhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj;Fubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjFhhhj,FhK ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjFhhhj,FhK ubah}(h]jFah ](jS jT eh"]h$]h&]jX uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjFhhubj[ )}(hhh]h)}(h%operations possible on struct dma_bufh]h%operations possible on struct dma_buf}(hjdFhjbFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj_Fhhubah}(h]h ]h"]h$]h&]uh1jZ hjFhhhj,FhK ubeh}(h]h ](jstructeh"]h$]h&]j{ jj| jzFj} jzFj~ uh1j hhhjhNhNubj )}(hX,$**Definition**:: struct dma_buf_ops { bool cache_sgt_mapping; int (*attach)(struct dma_buf *, struct dma_buf_attachment *); void (*detach)(struct dma_buf *, struct dma_buf_attachment *); int (*pin)(struct dma_buf_attachment *attach); void (*unpin)(struct dma_buf_attachment *attach); struct sg_table * (*map_dma_buf)(struct dma_buf_attachment *, enum dma_data_direction); void (*unmap_dma_buf)(struct dma_buf_attachment *,struct sg_table *, enum dma_data_direction); void (*release)(struct dma_buf *); int (*begin_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*mmap)(struct dma_buf *, struct vm_area_struct *vma); int (*vmap)(struct dma_buf *dmabuf, struct iosys_map *map); void (*vunmap)(struct dma_buf *dmabuf, struct iosys_map *map); }; **Members** ``cache_sgt_mapping`` If true the framework will cache the first mapping made for each attachment. This avoids creating mappings for attachments multiple times. ``attach`` This is called from dma_buf_attach() to make sure that a given :c:type:`dma_buf_attachment.dev ` can access the provided :c:type:`dma_buf`. Exporters which support buffer objects in special locations like VRAM or device-specific carveout areas should check whether the buffer could be move to system memory (or directly accessed by the provided device), and otherwise need to fail the attach operation. The exporter should also in general check whether the current allocation fulfills the DMA constraints of the new device. If this is not the case, and the allocation cannot be moved, it should also fail the attach operation. Any exporter-private housekeeping data can be stored in the :c:type:`dma_buf_attachment.priv ` pointer. This callback is optional. Returns: 0 on success, negative error code on failure. It might return -EBUSY to signal that backing storage is already allocated and incompatible with the requirements of requesting device. ``detach`` This is called by dma_buf_detach() to release a :c:type:`dma_buf_attachment`. Provided so that exporters can clean up any housekeeping for an :c:type:`dma_buf_attachment`. This callback is optional. ``pin`` This is called by dma_buf_pin() and lets the exporter know that the DMA-buf can't be moved any more. Ideally, the exporter should pin the buffer so that it is generally accessible by all devices. This is called with the :c:type:`dmabuf.resv ` object locked and is mutual exclusive with **cache_sgt_mapping**. This is called automatically for non-dynamic importers from dma_buf_attach(). Note that similar to non-dynamic exporters in their **map_dma_buf** callback the driver must guarantee that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete. Returns: 0 on success, negative error code on failure. ``unpin`` This is called by dma_buf_unpin() and lets the exporter know that the DMA-buf can be moved again. This is called with the dmabuf->resv object locked and is mutual exclusive with **cache_sgt_mapping**. This callback is optional. ``map_dma_buf`` This is called by dma_buf_map_attachment() and is used to map a shared :c:type:`dma_buf` into device address space, and it is mandatory. It can only be called if **attach** has been called successfully. This call may sleep, e.g. when the backing storage first needs to be allocated, or moved to a location suitable for all currently attached devices. Note that any specific buffer attributes required for this function should get added to device_dma_parameters accessible via :c:type:`device.dma_params ` from the :c:type:`dma_buf_attachment`. The **attach** callback should also check these constraints. If this is being called for the first time, the exporter can now choose to scan through the list of attachments for this buffer, collate the requirements of the attached devices, and choose an appropriate backing storage for the buffer. Based on enum dma_data_direction, it might be possible to have multiple users accessing at the same time (for reading, maybe), or any other kind of sharing that the exporter might wish to make available to buffer-users. This is always called with the dmabuf->resv object locked when the dynamic_mapping flag is true. Note that for non-dynamic exporters the driver must guarantee that that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete. Dynamic exporters do not need to follow this rule: For non-dynamic importers the buffer is already pinned through **pin**, which has the same requirements. Dynamic importers otoh are required to obey the dma_resv fences. Returns: A :c:type:`sg_table` scatter list of the backing storage of the DMA buffer, already mapped into the device address space of the :c:type:`device` attached with the provided :c:type:`dma_buf_attachment`. The addresses and lengths in the scatter list are PAGE_SIZE aligned. On failure, returns a negative error value wrapped into a pointer. May also return -EINTR when a signal was received while being blocked. Note that exporters should not try to cache the scatter list, or return the same one for multiple calls. Caching is done either by the DMA-BUF code (for non-dynamic importers) or the importer. Ownership of the scatter list is transferred to the caller, and returned by **unmap_dma_buf**. ``unmap_dma_buf`` This is called by dma_buf_unmap_attachment() and should unmap and release the :c:type:`sg_table` allocated in **map_dma_buf**, and it is mandatory. For static dma_buf handling this might also unpin the backing storage if this is the last mapping of the DMA buffer. ``release`` Called after the last dma_buf_put to release the :c:type:`dma_buf`, and mandatory. ``begin_cpu_access`` This is called from dma_buf_begin_cpu_access() and allows the exporter to ensure that the memory is actually coherent for cpu access. The exporter also needs to ensure that cpu access is coherent for the access direction. The direction can be used by the exporter to optimize the cache flushing, i.e. access with a different direction (read instead of write) might return stale or even bogus data (e.g. when the exporter needs to copy the data to temporary storage). Note that this is both called through the DMA_BUF_IOCTL_SYNC IOCTL command for userspace mappings established through **mmap**, and also for kernel mappings established with **vmap**. This callback is optional. Returns: 0 on success or a negative error code on failure. This can for example fail when the backing storage can't be allocated. Can also return -ERESTARTSYS or -EINTR when the call has been interrupted and needs to be restarted. ``end_cpu_access`` This is called from dma_buf_end_cpu_access() when the importer is done accessing the CPU. The exporter can use this to flush caches and undo anything else done in **begin_cpu_access**. This callback is optional. Returns: 0 on success or a negative error code on failure. Can return -ERESTARTSYS or -EINTR when the call has been interrupted and needs to be restarted. ``mmap`` This callback is used by the dma_buf_mmap() function Note that the mapping needs to be incoherent, userspace is expected to bracket CPU access using the DMA_BUF_IOCTL_SYNC interface. Because dma-buf buffers have invariant size over their lifetime, the dma-buf core checks whether a vma is too large and rejects such mappings. The exporter hence does not need to duplicate this check. Drivers do not need to check this themselves. If an exporter needs to manually flush caches and hence needs to fake coherency for mmap support, it needs to be able to zap all the ptes pointing at the backing storage. Now linux mm needs a struct address_space associated with the struct file stored in vma->vm_file to do that with the function unmap_mapping_range. But the dma_buf framework only backs every dma_buf fd with the anon_file struct file, i.e. all dma_bufs share the same file. Hence exporters need to setup their own file (and address_space) association by setting vma->vm_file and adjusting vma->vm_pgoff in the dma_buf mmap callback. In the specific case of a gem driver the exporter could use the shmem file already provided by gem (and set vm_pgoff = 0). Exporters can then zap ptes by unmapping the corresponding range of the struct address_space associated with their own file. This callback is optional. Returns: 0 on success or a negative error code on failure. ``vmap`` [optional] creates a virtual mapping for the buffer into kernel address space. Same restrictions as for vmap and friends apply. ``vunmap`` [optional] unmaps a vmap from the bufferh](h)}(h**Definition**::h](j )}(h**Definition**h]h Definition}(hhhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjFubh:}(hj hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK#hj~Fubj)}(hXWstruct dma_buf_ops { bool cache_sgt_mapping; int (*attach)(struct dma_buf *, struct dma_buf_attachment *); void (*detach)(struct dma_buf *, struct dma_buf_attachment *); int (*pin)(struct dma_buf_attachment *attach); void (*unpin)(struct dma_buf_attachment *attach); struct sg_table * (*map_dma_buf)(struct dma_buf_attachment *, enum dma_data_direction); void (*unmap_dma_buf)(struct dma_buf_attachment *,struct sg_table *, enum dma_data_direction); void (*release)(struct dma_buf *); int (*begin_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*mmap)(struct dma_buf *, struct vm_area_struct *vma); int (*vmap)(struct dma_buf *dmabuf, struct iosys_map *map); void (*vunmap)(struct dma_buf *dmabuf, struct iosys_map *map); };h]hXWstruct dma_buf_ops { bool cache_sgt_mapping; int (*attach)(struct dma_buf *, struct dma_buf_attachment *); void (*detach)(struct dma_buf *, struct dma_buf_attachment *); int (*pin)(struct dma_buf_attachment *attach); void (*unpin)(struct dma_buf_attachment *attach); struct sg_table * (*map_dma_buf)(struct dma_buf_attachment *, enum dma_data_direction); void (*unmap_dma_buf)(struct dma_buf_attachment *,struct sg_table *, enum dma_data_direction); void (*release)(struct dma_buf *); int (*begin_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*mmap)(struct dma_buf *, struct vm_area_struct *vma); int (*vmap)(struct dma_buf *dmabuf, struct iosys_map *map); void (*vunmap)(struct dma_buf *dmabuf, struct iosys_map *map); };}(hhhjFubah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK%hj~Fubh)}(h **Members**h]j )}(hjFh]hMembers}(hhhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjFubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK5hj~Fubj )}(hhh](j )}(h``cache_sgt_mapping`` If true the framework will cache the first mapping made for each attachment. This avoids creating mappings for attachments multiple times. h](j )}(h``cache_sgt_mapping``h]j)}(hjFh]hcache_sgt_mapping}(hhhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK)hjFubj )}(hhh]h)}(hIf true the framework will cache the first mapping made for each attachment. This avoids creating mappings for attachments multiple times.h]hIf true the framework will cache the first mapping made for each attachment. This avoids creating mappings for attachments multiple times.}(hjFhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK'hjFubah}(h]h ]h"]h$]h&]uh1j hjFubeh}(h]h ]h"]h$]h&]uh1j hjFhK)hjFubj )}(hX``attach`` This is called from dma_buf_attach() to make sure that a given :c:type:`dma_buf_attachment.dev ` can access the provided :c:type:`dma_buf`. Exporters which support buffer objects in special locations like VRAM or device-specific carveout areas should check whether the buffer could be move to system memory (or directly accessed by the provided device), and otherwise need to fail the attach operation. The exporter should also in general check whether the current allocation fulfills the DMA constraints of the new device. If this is not the case, and the allocation cannot be moved, it should also fail the attach operation. Any exporter-private housekeeping data can be stored in the :c:type:`dma_buf_attachment.priv ` pointer. This callback is optional. Returns: 0 on success, negative error code on failure. It might return -EBUSY to signal that backing storage is already allocated and incompatible with the requirements of requesting device. h](j )}(h ``attach``h]j)}(hj Gh]hattach}(hhhj GhhhNhNubah}(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.hhKEhjGubj )}(hhh](h)}(hXThis is called from dma_buf_attach() to make sure that a given :c:type:`dma_buf_attachment.dev ` can access the provided :c:type:`dma_buf`. Exporters which support buffer objects in special locations like VRAM or device-specific carveout areas should check whether the buffer could be move to system memory (or directly accessed by the provided device), and otherwise need to fail the attach operation.h](h?This is called from dma_buf_attach() to make sure that a given }(h?This is called from dma_buf_attach() to make sure that a given hj"GhhhNhNubh)}(h5:c:type:`dma_buf_attachment.dev `h]j)}(hj-Gh]hdma_buf_attachment.dev}(hhhj/GhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj+Gubah}(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.hhK0hj"Gubh can access the provided }(h can access the provided hj"GhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjRGh]hdma_buf}(hhhjTGhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjPGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hhjJGhK0hj"GubhX. 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.}(hX. 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.hj"GhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjJGhK0hjGubh)}(hThe exporter should also in general check whether the current allocation fulfills the DMA constraints of the new device. If this is not the case, and the allocation cannot be moved, it should also fail the attach operation.h]hThe exporter should also in general check whether the current allocation fulfills the DMA constraints of the new device. If this is not the case, and the allocation cannot be moved, it should also fail the attach operation.}(hj|GhjzGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK7hjGubh)}(h{Any exporter-private housekeeping data can be stored in the :c:type:`dma_buf_attachment.priv ` pointer.h](h`h]j)}(hjGh]hdma_buf_attachment.priv}(hhhjGhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK` object locked and is mutual exclusive with **cache_sgt_mapping**. This is called automatically for non-dynamic importers from dma_buf_attach(). Note that similar to non-dynamic exporters in their **map_dma_buf** callback the driver must guarantee that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete. Returns: 0 on success, negative error code on failure. h](j )}(h``pin``h]j)}(hjHh]hpin}(hhhjHhhhNhNubah}(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.hhKjhjHubj )}(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.}(hjHhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKWhjHubh)}(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 }(hThis is called with the hjHhhhNhNubh)}(h:c:type:`dmabuf.resv `h]j)}(hjHh]h dmabuf.resv}(hhhjHhhhNhNubah}(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.hhK\hjHubh, object locked and is mutual exclusive with }(h, object locked and is mutual exclusive with hjHhhhNhNubj )}(h**cache_sgt_mapping**h]hcache_sgt_mapping}(hhhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjHubh.}(hjhjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjHhK\hjHubh)}(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().}(hjHhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK_hjHubh)}(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 }(h4Note that similar to non-dynamic exporters in their hj IhhhNhNubj )}(h**map_dma_buf**h]h map_dma_buf}(hhhjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj Iubh 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 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.hj IhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKbhjHubh)}(hReturns:h]hReturns:}(hj.Ihj,IhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhhjHubh)}(h-0 on success, negative error code on failure.h]h-0 on success, negative error code on failure.}(hj=Ihj;IhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhKjhjHubeh}(h]h ]h"]h$]h&]uh1j hjHubeh}(h]h ]h"]h$]h&]uh1j hjHhKjhjFubj )}(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)}(hj[Ih]hunpin}(hhhj]IhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYIubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKwhjUIubj )}(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.}(hjvIhjtIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKqhjqIubh)}(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 }(hPThis is called with the dmabuf->resv object locked and is mutual exclusive with hjIhhhNhNubj )}(h**cache_sgt_mapping**h]hcache_sgt_mapping}(hhhjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjIubh.}(hjhjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKthjqIubh)}(hThis callback is optional.h]hThis callback is optional.}(hjIhjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjpIhKwhjqIubeh}(h]h ]h"]h$]h&]uh1j hjUIubeh}(h]h ]h"]h$]h&]uh1j hjpIhKwhjFubj )}(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}(hhhjIhhhNhNubah}(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 }(hGThis is called by dma_buf_map_attachment() and is used to map a shared hjIhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjIh]hdma_buf}(hhhjIhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK~hjIubhJ into device address space, and it is mandatory. It can only be called if }(hJ into device address space, and it is mandatory. It can only be called if hjIhhhNhNubj )}(h **attach**h]hattach}(hhhj JhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjIubh has been called successfully.}(h has been called successfully.hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjJhK~hjIubh)}(hThis call may sleep, e.g. when the backing storage first needs to be allocated, or moved to a location suitable for all currently attached devices.h]hThis call may sleep, e.g. when the backing storage first needs to be allocated, or moved to a location suitable for all currently attached devices.}(hj'Jhj%JhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(hXNote that any specific buffer attributes required for this function should get added to device_dma_parameters accessible via :c:type:`device.dma_params ` from the :c:type:`dma_buf_attachment`. The **attach** callback should also check these constraints.h](h}Note that any specific buffer attributes required for this function should get added to device_dma_parameters accessible via }(h}Note that any specific buffer attributes required for this function should get added to device_dma_parameters accessible via hj4JhhhNhNubh)}(h$:c:type:`device.dma_params `h]j)}(hj?Jh]hdevice.dma_params}(hhhjAJhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj=Jubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdeviceuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj4Jubh from the }(h from the hj4JhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjdJh]hdma_buf_attachment}(hhhjfJhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjbJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hhj\JhKhj4Jubh. The }(h. The hj4JhhhNhNubj )}(h **attach**h]hattach}(hhhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj4Jubh. callback should also check these constraints.}(h. callback should also check these constraints.hj4JhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj\JhKhjIubh)}(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.}(hjJhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(hBased on enum dma_data_direction, it might be possible to have multiple users accessing at the same time (for reading, maybe), or any other kind of sharing that the exporter might wish to make available to buffer-users.h]hBased on enum dma_data_direction, it might be possible to have multiple users accessing at the same time (for reading, maybe), or any other kind of sharing that the exporter might wish to make available to buffer-users.}(hjJhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(h`This is always called with the dmabuf->resv object locked when the dynamic_mapping flag is true.h]h`This is always called with the dmabuf->resv object locked when the dynamic_mapping flag is true.}(hjJhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(hXNote that for non-dynamic exporters the driver must guarantee that that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete. Dynamic exporters do not need to follow this rule: For non-dynamic importers the buffer is already pinned through **pin**, which has the same requirements. Dynamic importers otoh are required to obey the dma_resv fences.h](hXNote that for non-dynamic exporters the driver must guarantee that that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete. Dynamic exporters do not need to follow this rule: For non-dynamic importers the buffer is already pinned through }(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 hjJhhhNhNubj )}(h**pin**h]hpin}(hhhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjJubhc, which has the same requirements. Dynamic importers otoh are required to obey the dma_resv fences.}(hc, 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.hhKhjIubh)}(hReturns:h]hReturns:}(hjJhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(hXA :c:type:`sg_table` scatter list of the backing storage of the DMA buffer, already mapped into the device address space of the :c:type:`device` attached with the provided :c:type:`dma_buf_attachment`. The addresses and lengths in the scatter list are PAGE_SIZE aligned.h](hA }(hA hjJhhhNhNubh)}(h:c:type:`sg_table`h]j)}(hj Kh]hsg_table}(hhhj KhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsg_tableuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjJubhl scatter list of the backing storage of the DMA buffer, already mapped into the device address space of the }(hl scatter list of the backing storage of the DMA buffer, already mapped into the device address space of the hjJhhhNhNubh)}(h:c:type:`device`h]j)}(hj.Kh]hdevice}(hhhj0KhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj,Kubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdeviceuh1hhj&KhKhjJubh attached with the provided }(h attached with the provided hjJhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjRKh]hdma_buf_attachment}(hhhjTKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjPKubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hhj&KhKhjJubhF. The addresses and lengths in the scatter list are PAGE_SIZE aligned.}(hF. The addresses and lengths in the scatter list are PAGE_SIZE aligned.hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj&KhKhjIubh)}(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.}(hj|KhjzKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubh)}(hXNote that exporters should not try to cache the scatter list, or return the same one for multiple calls. Caching is done either by the DMA-BUF code (for non-dynamic importers) or the importer. Ownership of the scatter list is transferred to the caller, and returned by **unmap_dma_buf**.h](hX Note that exporters should not try to cache the scatter list, or return the same one for multiple calls. Caching is done either by the DMA-BUF code (for non-dynamic importers) or the importer. Ownership of the scatter list is transferred to the caller, and returned by }(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 hjKhhhNhNubj )}(h**unmap_dma_buf**h]h unmap_dma_buf}(hhhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjKubh.}(hjhjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjIubeh}(h]h ]h"]h$]h&]uh1j hjIubeh}(h]h ]h"]h$]h&]uh1j hjIhKhjFubj )}(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}(hhhjKhhhNhNubah}(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 }(hNThis is called by dma_buf_unmap_attachment() and should unmap and release the hjKhhhNhNubh)}(h:c:type:`sg_table`h]j)}(hjKh]hsg_table}(hhhjKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsg_tableuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjKubh allocated in }(h allocated in hjKhhhNhNubj )}(h**map_dma_buf**h]h map_dma_buf}(hhhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjKubh, 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, 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.hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjKhKhjKubah}(h]h ]h"]h$]h&]uh1j hjKubeh}(h]h ]h"]h$]h&]uh1j hjKhKhjFubj )}(h_``release`` Called after the last dma_buf_put to release the :c:type:`dma_buf`, and mandatory. h](j )}(h ``release``h]j)}(hj/Lh]hrelease}(hhhj1LhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-Lubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj)Lubj )}(hhh]h)}(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 }(h1Called after the last dma_buf_put to release the hjHLhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjSLh]hdma_buf}(hhhjULhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjQLubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjHLubh, and mandatory.}(h, and mandatory.hjHLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjpLhKhjELubah}(h]h ]h"]h$]h&]uh1j hj)Lubeh}(h]h ]h"]h$]h&]uh1j hjDLhKhjFubj )}(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)}(hjLh]hbegin_cpu_access}(hhhjLhhhNhNubah}(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.hhKhjLubj )}(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).}(hjLhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjLubh)}(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 }(hvNote that this is both called through the DMA_BUF_IOCTL_SYNC IOCTL command for userspace mappings established through hjLhhhNhNubj )}(h**mmap**h]hmmap}(hhhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjLubh0, and also for kernel mappings established with }(h0, and also for kernel mappings established with hjLhhhNhNubj )}(h**vmap**h]hvmap}(hhhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjLubh.}(hjhjLhhhNhNubeh}(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.}(hjLhjLhhhNhNubah}(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:}(hjLhjLhhhNhNubah}(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. 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.}(hj Mhj MhhhNhNubah}(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 hjLubeh}(h]h ]h"]h$]h&]uh1j hjLhKhjFubj )}(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)}(hj*Mh]hend_cpu_access}(hhhj,MhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(Mubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj$Mubj )}(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 }(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 hjCMhhhNhNubj )}(h**begin_cpu_access**h]hbegin_cpu_access}(hhhjLMhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjCMubh.}(hjhjCMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj@Mubh)}(hThis callback is optional.h]hThis callback is optional.}(hjgMhjeMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj@Mubh)}(hReturns:h]hReturns:}(hjvMhjtMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj@Mubh)}(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.}(hjMhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhj@Mubeh}(h]h ]h"]h$]h&]uh1j hj$Mubeh}(h]h ]h"]h$]h&]uh1j hj?MhKhjFubj )}(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)}(hjMh]hmmap}(hhhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjMubj )}(hhh](h)}(h4This callback is used by the dma_buf_mmap() functionh]h4This callback is used by the dma_buf_mmap() function}(hjMhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjMubh)}(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.}(hjMhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjMubh)}(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.}(hjMhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjMubh)}(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.}(hjMhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjMubh)}(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.}(hjMhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM hjMubh)}(hThis callback is optional.h]hThis callback is optional.}(hj NhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjMubh)}(hReturns:h]hReturns:}(hjNhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjMubh)}(h10 on success or a negative error code on failure.h]h10 on success or a negative error code on failure.}(hj(Nhj&NhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhMhjMubeh}(h]h ]h"]h$]h&]uh1j hjMubeh}(h]h ]h"]h$]h&]uh1j hjMhMhjFubj )}(h``vmap`` [optional] creates a virtual mapping for the buffer into kernel address space. Same restrictions as for vmap and friends apply. h](j )}(h``vmap``h]j)}(hjFNh]hvmap}(hhhjHNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDNubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK"hj@Nubj )}(hhh]h)}(h[optional] creates a virtual mapping for the buffer into kernel address space. Same restrictions as for vmap and friends apply.h]h[optional] creates a virtual mapping for the buffer into kernel address space. Same restrictions as for vmap and friends apply.}(hjaNhj_NhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK!hj\Nubah}(h]h ]h"]h$]h&]uh1j hj@Nubeh}(h]h ]h"]h$]h&]uh1j hj[NhK"hjFubj )}(h3``vunmap`` [optional] unmaps a vmap from the bufferh](j )}(h ``vunmap``h]j)}(hjNh]hvunmap}(hhhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~Nubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK"hjzNubj )}(hhh]h)}(h([optional] unmaps a vmap from the bufferh]h([optional] unmaps a vmap from the buffer}(hjNhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK#hjNubah}(h]h ]h"]h$]h&]uh1j hjzNubeh}(h]h ]h"]h$]h&]uh1j hjNhK"hjFubeh}(h]h ]h"]h$]h&]uh1j hj~Fubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_buf (C struct) c.dma_bufhNtauh1j hjhhhNhNubj )}(hhh](j )}(hdma_bufh]j )}(hstruct dma_bufh](j )}(hj h]hstruct}(hhhjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM$ubj )}(h h]h }(hhhjNhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjNhhhjNhM$ubj* )}(hdma_bufh]j0 )}(hjNh]hdma_buf}(hhhjNhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjNubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjNhhhjNhM$ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjNhhhjNhM$ubah}(h]jNah ](jS jT eh"]h$]h&]jX uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhK)hjNhhubj[ )}(hhh]h)}(hshared buffer objecth]hshared buffer object}(hjOhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM#hjOhhubah}(h]h ]h"]h$]h&]uh1jZ hjNhhhjNhM$ubeh}(h]h ](jstructeh"]h$]h&]j{ jj| j5Oj} j5Oj~ uh1j hhhjhNhNubj )}(hX**Definition**:: struct dma_buf { size_t size; struct file *file; struct list_head attachments; const struct dma_buf_ops *ops; unsigned vmapping_counter; struct iosys_map vmap_ptr; const char *exp_name; const char *name; spinlock_t name_lock; struct module *owner; #if IS_ENABLED(CONFIG_DEBUG_FS); struct list_head list_node; #endif; void *priv; struct dma_resv *resv; wait_queue_head_t poll; struct dma_buf_poll_cb_t { struct dma_fence_cb cb; wait_queue_head_t *poll; __poll_t active; } cb_in, cb_out; #ifdef CONFIG_DMABUF_SYSFS_STATS; struct dma_buf_sysfs_entry { struct kobject kobj; struct dma_buf *dmabuf; } *sysfs_entry; #endif; }; **Members** ``size`` Size of the buffer; invariant over the lifetime of the buffer. ``file`` File pointer used for sharing buffers across, and for refcounting. See dma_buf_get() and dma_buf_put(). ``attachments`` List of dma_buf_attachment that denotes all devices attached, protected by :c:type:`dma_resv` lock **resv**. ``ops`` dma_buf_ops associated with this buffer object. ``vmapping_counter`` Used internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by **lock**. ``vmap_ptr`` The current vmap ptr if **vmapping_counter** > 0. Protected by **lock**. ``exp_name`` Name of the exporter; useful for debugging. Must not be NULL ``name`` Userspace-provided name. Default value is NULL. If not NULL, length cannot be longer than DMA_BUF_NAME_LEN, including NIL char. Useful for accounting and debugging. Read/Write accesses are protected by **name_lock** See the IOCTLs DMA_BUF_SET_NAME or DMA_BUF_SET_NAME_A/B ``name_lock`` Spinlock to protect name access for read access. ``owner`` Pointer to exporter module; used for refcounting when exporter is a kernel module. ``list_node`` node for dma_buf accounting and debugging. ``priv`` exporter specific private data for this buffer object. ``resv`` Reservation object linked to this dma-buf. IMPLICIT SYNCHRONIZATION RULES: Drivers which support implicit synchronization of buffer access as e.g. exposed in `Implicit Fence Poll Support`_ must follow the below rules. - Drivers must add a read fence through dma_resv_add_fence() with the DMA_RESV_USAGE_READ flag for anything the userspace API considers a read access. This highly depends upon the API and window system. - Similarly drivers must add a write fence through dma_resv_add_fence() with the DMA_RESV_USAGE_WRITE flag for anything the userspace API considers write access. - Drivers may just always add a write fence, since that only causes unnecessary synchronization, but no correctness issues. - Some drivers only expose a synchronous userspace API with no pipelining across drivers. These do not set any fences for their access. An example here is v4l. - Driver should use dma_resv_usage_rw() when retrieving fences as dependency for implicit synchronization. DYNAMIC IMPORTER RULES: Dynamic importers, see dma_buf_attachment_is_dynamic(), have additional constraints on how they set up fences: - Dynamic importers must obey the write fences and wait for them to signal before allowing access to the buffer's underlying storage through the device. - Dynamic importers should set fences for any access that they can't disable immediately from their :c:type:`dma_buf_attach_ops.move_notify ` callback. IMPORTANT: All drivers and memory management related functions must obey the struct dma_resv rules, specifically the rules for updating and obeying fences. See enum dma_resv_usage for further descriptions. ``poll`` for userspace poll support ``cb_in`` for userspace poll support ``cb_out`` for userspace poll support ``sysfs_entry`` For exposing information about this buffer in sysfs. See also `DMA-BUF statistics`_ for the uapi this enables.h](h)}(h**Definition**::h](j )}(h**Definition**h]h Definition}(hhhjAOhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj=Oubh:}(hj hj=OhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM'hj9Oubj)}(hXstruct dma_buf { size_t size; struct file *file; struct list_head attachments; const struct dma_buf_ops *ops; unsigned vmapping_counter; struct iosys_map vmap_ptr; const char *exp_name; const char *name; spinlock_t name_lock; struct module *owner; #if IS_ENABLED(CONFIG_DEBUG_FS); struct list_head list_node; #endif; void *priv; struct dma_resv *resv; wait_queue_head_t poll; struct dma_buf_poll_cb_t { struct dma_fence_cb cb; wait_queue_head_t *poll; __poll_t active; } cb_in, cb_out; #ifdef CONFIG_DMABUF_SYSFS_STATS; struct dma_buf_sysfs_entry { struct kobject kobj; struct dma_buf *dmabuf; } *sysfs_entry; #endif; };h]hXstruct dma_buf { size_t size; struct file *file; struct list_head attachments; const struct dma_buf_ops *ops; unsigned vmapping_counter; struct iosys_map vmap_ptr; const char *exp_name; const char *name; spinlock_t name_lock; struct module *owner; #if IS_ENABLED(CONFIG_DEBUG_FS); struct list_head list_node; #endif; void *priv; struct dma_resv *resv; wait_queue_head_t poll; struct dma_buf_poll_cb_t { struct dma_fence_cb cb; wait_queue_head_t *poll; __poll_t active; } cb_in, cb_out; #ifdef CONFIG_DMABUF_SYSFS_STATS; struct dma_buf_sysfs_entry { struct kobject kobj; struct dma_buf *dmabuf; } *sysfs_entry; #endif; };}(hhhjZOubah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM)hj9Oubh)}(h **Members**h]j )}(hjkOh]hMembers}(hhhjmOhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjiOubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMGhj9Oubj )}(hhh](j )}(hH``size`` Size of the buffer; invariant over the lifetime of the buffer. h](j )}(h``size``h]j)}(hjOh]hsize}(hhhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM1hjOubj )}(hhh]h)}(h>Size of the buffer; invariant over the lifetime of the buffer.h]h>Size of the buffer; invariant over the lifetime of the buffer.}(hjOhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhM1hjOubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1j hjOhM1hjOubj )}(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}(hhhjOhhhNhNubah}(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.hhM9hjOubj )}(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().}(hjOhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM8hjOubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1j hjOhM9hjOubj )}(h}``attachments`` List of dma_buf_attachment that denotes all devices attached, protected by :c:type:`dma_resv` lock **resv**. h](j )}(h``attachments``h]j)}(hjOh]h attachments}(hhhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMAhjOubj )}(hhh]h)}(hlList of dma_buf_attachment that denotes all devices attached, protected by :c:type:`dma_resv` lock **resv**.h](hKList of dma_buf_attachment that denotes all devices attached, protected by }(hKList of dma_buf_attachment that denotes all devices attached, protected by hjPhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hj!Ph]hdma_resv}(hhhj#PhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM@hjPubh lock }(h lock hjPhhhNhNubj )}(h**resv**h]hresv}(hhhjDPhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjPubh.}(hjhjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj>PhM@hjPubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1j hjPhMAhjOubj )}(h8``ops`` dma_buf_ops associated with this buffer object. h](j )}(h``ops``h]j)}(hjnPh]hops}(hhhjpPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlPubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjhPubj )}(hhh]h)}(h/dma_buf_ops associated with this buffer object.h]h/dma_buf_ops associated with this buffer object.}(hjPhjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhKhjPubah}(h]h ]h"]h$]h&]uh1j hjhPubeh}(h]h ]h"]h$]h&]uh1j hjPhKhjOubj )}(hl``vmapping_counter`` Used internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by **lock**. h](j )}(h``vmapping_counter``h]j)}(hjPh]hvmapping_counter}(hhhjPhhhNhNubah}(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.hhMLhjPubj )}(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 }(hMUsed internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by hjPhhhNhNubj )}(h**lock**h]hlock}(hhhjPhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjPubh.}(hjhjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMKhjPubah}(h]h ]h"]h$]h&]uh1j hjPubeh}(h]h ]h"]h$]h&]uh1j hjPhMLhjOubj )}(hV``vmap_ptr`` The current vmap ptr if **vmapping_counter** > 0. Protected by **lock**. h](j )}(h ``vmap_ptr``h]j)}(hjPh]hvmap_ptr}(hhhjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMShjPubj )}(hhh]h)}(hHThe current vmap ptr if **vmapping_counter** > 0. Protected by **lock**.h](hThe current vmap ptr if }(hThe current vmap ptr if hj QhhhNhNubj )}(h**vmapping_counter**h]hvmapping_counter}(hhhjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj Qubh > 0. Protected by }(h > 0. Protected by hj QhhhNhNubj )}(h**lock**h]hlock}(hhhj)QhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj Qubh.}(hjhj QhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj QhMShj Qubah}(h]h ]h"]h$]h&]uh1j hjPubeh}(h]h ]h"]h$]h&]uh1j hj QhMShjOubj )}(hJ``exp_name`` Name of the exporter; useful for debugging. Must not be NULL h](j )}(h ``exp_name``h]j)}(hjSQh]hexp_name}(hhhjUQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQQubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMYhjMQubj )}(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}(hhhjRhhhNhNubah}(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.hhMhjRubj )}(hhh](h)}(h*Reservation object linked to this dma-buf.h]h*Reservation object linked to this dma-buf.}(hjRhjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubh)}(hIMPLICIT SYNCHRONIZATION RULES:h]hIMPLICIT SYNCHRONIZATION RULES:}(hjRhjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubh)}(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 }(hSDrivers which support implicit synchronization of buffer access as e.g. exposed in hjRhhhNhNubj)}(h`Implicit Fence Poll Support`_h]hImplicit Fence Poll Support}(hImplicit Fence Poll SupporthjShhhNhNubah}(h]h ]h"]h$]h&]nameImplicit Fence Poll Supportjjuh1jhjRjKubh must follow the below rules.}(h must follow the below rules.hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjRubh)}(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.}(hj.Shj,ShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj(Subah}(h]h ]h"]h$]h&]uh1hhj%Subh)}(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.}(hjGShjEShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjASubah}(h]h ]h"]h$]h&]uh1hhj%Subh)}(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.}(hj`Shj^ShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjZSubah}(h]h ]h"]h$]h&]uh1hhj%Subh)}(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.}(hjyShjwShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjsSubah}(h]h ]h"]h$]h&]uh1hhj%Subh)}(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.}(hjShjShhhNhNubah}(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&]uh1hhj%Subeh}(h]h ]h"]h$]h&]j=j>uh1hhj:ShMhjRubh)}(hDYNAMIC IMPORTER RULES:h]hDYNAMIC IMPORTER RULES:}(hjShjShhhNhNubah}(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:}(hjShjShhhNhNubah}(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.}(hjShjShhhNhNubah}(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 }(hbDynamic importers should set fences for any access that they can't disable immediately from their hjShhhNhNubh)}(h=:c:type:`dma_buf_attach_ops.move_notify `h]j)}(hjSh]hdma_buf_attach_ops.move_notify}(hhhjShhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjSubah}(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.hhMhjSubh callback.}(h callback.hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjThMhjSubah}(h]h ]h"]h$]h&]uh1hhjSubeh}(h]h ]h"]h$]h&]j=j>uh1hhjShMhjRubh)}(h IMPORTANT:h]h IMPORTANT:}(hj+Thj)ThhhNhNubah}(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.}(hj:Thj8ThhhNhNubah}(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 hjRubeh}(h]h ]h"]h$]h&]uh1j hjRhMhjOubj )}(h$``poll`` for userspace poll support h](j )}(h``poll``h]j)}(hjYTh]hpoll}(hhhj[ThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWTubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjSTubj )}(hhh]h)}(hfor userspace poll supporth]hfor userspace poll support}(hjtThjrThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnThKhjoTubah}(h]h ]h"]h$]h&]uh1j hjSTubeh}(h]h ]h"]h$]h&]uh1j hjnThKhjOubj )}(h%``cb_in`` for userspace poll support h](j )}(h ``cb_in``h]j)}(hjTh]hcb_in}(hhhjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjTubj )}(hhh]h)}(hfor userspace poll supporth]hfor userspace poll support}(hjThjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThKhjTubah}(h]h ]h"]h$]h&]uh1j hjTubeh}(h]h ]h"]h$]h&]uh1j hjThKhjOubj )}(h&``cb_out`` for userspace poll support h](j )}(h ``cb_out``h]j)}(hjTh]hcb_out}(hhhjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhKhjTubj )}(hhh]h)}(hfor userspace poll supporth]hfor userspace poll support}(hjThjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThKhjTubah}(h]h ]h"]h$]h&]uh1j hjTubeh}(h]h ]h"]h$]h&]uh1j hjThKhjOubj )}(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)}(hjUh]h sysfs_entry}(hhhjUhhhNhNubah}(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.hhMhjTubj )}(hhh]h)}(hnFor exposing information about this buffer in sysfs. See also `DMA-BUF statistics`_ for the uapi this enables.h](h>For exposing information about this buffer in sysfs. See also }(h>For exposing information about this buffer in sysfs. See also hjUhhhNhNubj)}(h`DMA-BUF statistics`_h]hDMA-BUF statistics}(hDMA-BUF statisticshj&UhhhNhNubah}(h]h ]h"]h$]h&]nameDMA-BUF statisticsjj uh1jhjUjKubh for the uapi this enables.}(h for the uapi this enables.hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjUhMhjUubah}(h]h ]h"]h$]h&]uh1j hjTubeh}(h]h ]h"]h$]h&]uh1j hjUhMhjOubeh}(h]h ]h"]h$]h&]uh1j hj9Oubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubh)}(h**Description**h]j )}(hj]Uh]h Description}(hhhj_UhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj[Uubah}(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().}(hjuUhjsUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM%hjhhubh)}(hOShared dma buffers are reference counted using dma_buf_put() and get_dma_buf().h]hOShared dma buffers are reference counted using dma_buf_put() and get_dma_buf().}(hjUhjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM)hjhhubh)}(hfDevice DMA access is handled by the separate :c:type:`struct dma_buf_attachment `.h](h-Device DMA access is handled by the separate }(h-Device DMA access is handled by the separate hjUhhhNhNubh)}(h8:c:type:`struct dma_buf_attachment `h]j)}(hjUh]hstruct dma_buf_attachment}(hhhjUhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM,hjUubh.}(hjhjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjUhM,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}(hhhjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjUhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMubj )}(h h]h }(hhhjUhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjUhhhjUhMubj* )}(hdma_buf_attach_opsh]j0 )}(hjUh]hdma_buf_attach_ops}(hhhjUhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjUubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjUhhhjUhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjUhhhjUhMubah}(h]jUah ](jS jT eh"]h$]h&]jX uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM1hjUhhubj[ )}(hhh]h)}(h%importer operations for an attachmenth]h%importer operations for an attachment}(hj"Vhj VhhhNhNubah}(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&]uh1jZ hjUhhhjUhMubeh}(h]h ](jstructeh"]h$]h&]j{ jj| j8Vj} j8Vj~ uh1j hhhjhNhNubj )}(hX **Definition**:: struct dma_buf_attach_ops { bool allow_peer2peer; void (*move_notify)(struct dma_buf_attachment *attach); }; **Members** ``allow_peer2peer`` If this is set to true the importer must be able to handle peer resources without struct pages. ``move_notify`` [optional] notification that the DMA-buf is moving If this callback is provided the framework can avoid pinning the backing store while mappings exists. This callback is called with the lock of the reservation object associated with the dma_buf held and the mapping function must be called with this lock held as well. This makes sure that no mapping is created concurrently with an ongoing move operation. Mappings stay valid and are not directly affected by this callback. But the DMA-buf can now be in a different physical location, so all mappings should be destroyed and re-created as soon as possible. New mappings can be created after this callback returns, and will point to the new location of the DMA-buf.h](h)}(h**Definition**::h](j )}(h**Definition**h]h Definition}(hhhjDVhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj@Vubh:}(hj hj@VhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj[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.hhMhj6[ubj )}(hhh]h)}(h,name of the exporter - useful for debugging.h]h,name of the exporter - useful for debugging.}(hjW[hjU[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQ[hMhjR[ubah}(h]h ]h"]h$]h&]uh1j hj6[ubeh}(h]h ]h"]h$]h&]uh1j hjQ[hMhj3[ubj )}(hJ``owner`` pointer to exporter module - used for refcounting kernel module h](j )}(h ``owner``h]j)}(hju[h]howner}(hhhjw[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjs[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjo[ubj )}(hhh]h)}(h?pointer to exporter module - used for refcounting kernel moduleh]h?pointer to exporter module - used for refcounting kernel module}(hj[hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj[ubah}(h]h ]h"]h$]h&]uh1j hjo[ubeh}(h]h ]h"]h$]h&]uh1j hj[hMhj3[ubj )}(h?``ops`` Attach allocator-defined dma buf ops to the new buffer h](j )}(h``ops``h]j)}(hj[h]hops}(hhhj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj[ubj )}(hhh]h)}(h6Attach allocator-defined dma buf ops to the new bufferh]h6Attach allocator-defined dma buf ops to the new buffer}(hj[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[hMhj3[ubj )}(hH``size`` Size of the buffer - invariant over the lifetime of the buffer h](j )}(h``size``h]j)}(hj[h]hsize}(hhhj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj[ubj )}(hhh]h)}(h>Size of the buffer - invariant over the lifetime of the bufferh]h>Size of the buffer - invariant over the lifetime of the buffer}(hj\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[hMhj3[ubj )}(h"``flags`` mode flags for the file h](j )}(h ``flags``h]j)}(hj \h]hflags}(hhhj"\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj\ubj )}(hhh]h)}(hmode flags for the fileh]hmode flags for the file}(hj;\hj9\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5\hMhj6\ubah}(h]h ]h"]h$]h&]uh1j hj\ubeh}(h]h ]h"]h$]h&]uh1j hj5\hMhj3[ubj )}(h:``resv`` reservation-object, NULL to allocate default one h](j )}(h``resv``h]j)}(hjY\h]hresv}(hhhj[\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjW\ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjS\ubj )}(hhh]h)}(h0reservation-object, NULL to allocate default oneh]h0reservation-object, NULL to allocate default one}(hjt\hjr\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjn\hMhjo\ubah}(h]h ]h"]h$]h&]uh1j hjS\ubeh}(h]h ]h"]h$]h&]uh1j hjn\hMhj3[ubj )}(h8``priv`` Attach private data of allocator to this bufferh](j )}(h``priv``h]j)}(hj\h]hpriv}(hhhj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj\ubj )}(hhh]h)}(h/Attach private data of allocator to this bufferh]h/Attach private data of allocator to this buffer}(hj\hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhj\ubah}(h]h ]h"]h$]h&]uh1j hj\ubeh}(h]h ]h"]h$]h&]uh1j hj\hMhj3[ubeh}(h]h ]h"]h$]h&]uh1j hjZubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubh)}(h**Description**h]j )}(hj\h]h Description}(hhhj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj\ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMhjhhubh)}(hdThis structure holds the information required to export the buffer. Used with dma_buf_export() only.h]hdThis structure holds the information required to export the buffer. Used with dma_buf_export() only.}(hj\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]j0 )}(hj ]h]hDEFINE_DMA_BUF_EXPORT_INFO}(hhhj]hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj]ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj]hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM,ubah}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj ]hhhj*]hM,ubah}(h]j]ah ](jS jT eh"]h$]h&]jX uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM+hj]hhubj[ )}(hhh]h}(h]h ]h"]h$]h&]uh1jZ hj]hhhj*]hM,ubeh}(h]h ](jmacroeh"]h$]h&]j{ jj| jD]j} jD]j~ uh1j hhhjhNhNubh)}(h%``DEFINE_DMA_BUF_EXPORT_INFO (name)``h]j)}(hjJ]h]h!DEFINE_DMA_BUF_EXPORT_INFO (name)}(hhhjL]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjH]ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM-hjhhubh)}(hhh]h)}(hhelper macro for exportersh]hhelper macro for exporters}(hje]hjc]hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM%hj`]ubah}(h]h ]h"]h$]h&]uh1hhjhhhNhNubj )}(h**Parameters** ``name`` export-info name **Description** DEFINE_DMA_BUF_EXPORT_INFO macro defines the :c:type:`struct dma_buf_export_info `, zeroes it out and pre-populates exp_name in it.h](h)}(h**Parameters**h]j )}(hj~]h]h Parameters}(hhhj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj|]ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM)hjx]ubj )}(hhh]j )}(h``name`` export-info name h](j )}(h``name``h]j)}(hj]h]hname}(hhhj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM&hj]ubj )}(hhh]h)}(hexport-info nameh]hexport-info name}(hj]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 hjx]ubh)}(h**Description**h]j )}(hj]h]h Description}(hhhj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj]ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM(hjx]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 }(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}(hhhj]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.hhM(hj]ubh1, zeroes it out and pre-populates exp_name in it.}(h1, zeroes it out and pre-populates exp_name in it.hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj^hM(hjx]ubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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](jl)}(hvoidh]hvoid}(hhhjB^hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj>^hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM1ubj )}(h h]h }(hhhjQ^hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj>^hhhjP^hM1ubj* )}(h get_dma_bufh]j0 )}(h get_dma_bufh]h get_dma_buf}(hhhjc^hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj_^ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj>^hhhjP^hM1ubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hhhj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{^ubj )}(h h]h }(hhhj^hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj{^ubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhj^hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj^ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj^modnameN classnameNjdj)}j]ji)}j`je^sb c.get_dma_bufasbuh1hhj{^ubj )}(h h]h }(hhhj^hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj{^ubj~)}(hj h]h*}(hhhj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj{^ubj0 )}(hdmabufh]hdmabuf}(hhhj^hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj{^ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjw^ubah}(h]h ]h"]h$]h&]jjuh1jhj>^hhhjP^hM1ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj:^hhhjP^hM1ubah}(h]j5^ah ](jS jT eh"]h$]h&]jX uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM8hj7^hhubj[ )}(hhh]h)}(h!convenience wrapper for get_file.h]h!convenience wrapper for get_file.}(hj_hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM0hj_hhubah}(h]h ]h"]h$]h&]uh1jZ hj7^hhhjP^hM1ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j_j} j_j~ uh1j hhhjhNhNubj )}(hXe**Parameters** ``struct dma_buf *dmabuf`` [in] pointer to dma_buf **Description** Increments the reference count on the dma-buf, needed in case of drivers that either need to create additional references to the dmabuf on the kernel side. For example, an exporter that needs to keep a dmabuf ptr so that subsequent exports don't create a new dmabuf.h](h)}(h**Parameters**h]j )}(hj%_h]h Parameters}(hhhj'_hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#_ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM4hj_ubj )}(hhh]j )}(h6``struct dma_buf *dmabuf`` [in] pointer to dma_buf h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjD_h]hstruct dma_buf *dmabuf}(hhhjF_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB_ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM1hj>_ubj )}(hhh]h)}(h[in] pointer to dma_bufh]h[in] pointer to dma_buf}(hj__hj]_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjY_hM1hjZ_ubah}(h]h ]h"]h$]h&]uh1j hj>_ubeh}(h]h ]h"]h$]h&]uh1j hjY_hM1hj;_ubah}(h]h ]h"]h$]h&]uh1j hj_ubh)}(h**Description**h]j )}(hj_h]h Description}(hhhj_hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj}_ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM3hj_ubh)}(hX Increments the reference count on the dma-buf, needed in case of drivers that either need to create additional references to the dmabuf on the kernel side. For example, an exporter that needs to keep a dmabuf ptr so that subsequent exports don't create a new dmabuf.h]hX Increments the reference count on the dma-buf, needed in case of drivers that either need to create additional references to the dmabuf on the kernel side. For example, an exporter that needs to keep a dmabuf ptr so that subsequent exports don’t create a new dmabuf.}(hj_hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM3hj_ubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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](jl)}(hboolh]hbool}(hhhj_hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj_hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhM?ubj )}(h h]h }(hhhj_hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj_hhhj_hM?ubj* )}(hdma_buf_is_dynamich]j0 )}(hdma_buf_is_dynamich]hdma_buf_is_dynamic}(hhhj_hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj_ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj_hhhj_hM?ubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j )}(hj h]hstruct}(hhhj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubj )}(h h]h }(hhhj`hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj_ubh)}(hhh]j0 )}(hdma_bufh]hdma_buf}(hhhj`hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj`ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj!`modnameN classnameNjdj)}j]ji)}j`j_sbc.dma_buf_is_dynamicasbuh1hhj_ubj )}(h h]h }(hhhj?`hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj_ubj~)}(hj h]h*}(hhhjM`hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj_ubj0 )}(hdmabufh]hdmabuf}(hhhjZ`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&]jjjM uh1j jN jO hj_hhhj_hM?ubah}(h]j_ah ](jS jT eh"]h$]h&]jX uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMEhj_hhubj[ )}(hhh]h)}(h)check if a DMA-buf uses dynamic mappings.h]h)check if a DMA-buf uses dynamic mappings.}(hj`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&]uh1jZ hj_hhhj_hM?ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j`j} j`j~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_buf *dmabuf`` the DMA-buf to check **Description** Returns true if a DMA-buf exporter wants to be called with the dma_resv locked for the map/unmap callbacks, false if it doesn't wants to be called with the lock held.h](h)}(h**Parameters**h]j )}(hj`h]h Parameters}(hhhj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj`ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMBhj`ubj )}(hhh]j )}(h0``struct dma_buf *dmabuf`` the DMA-buf to check h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj`h]hstruct dma_buf *dmabuf}(hhhj`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)}(hthe DMA-buf to checkh]hthe DMA-buf to check}(hj`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]j )}(hjah]h Description}(hhhjahhhNhNubah}(h]h ]h"]h$]h&]uh1j hj`ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMAhj`ubh)}(hReturns true if a DMA-buf exporter wants to be called with the dma_resv locked for the map/unmap callbacks, false if it doesn't wants to be called with the lock held.h]hReturns true if a DMA-buf exporter wants to be called with the dma_resv locked for the map/unmap callbacks, false if it doesn’t wants to be called with the lock held.}(hjahjahhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMAhj`ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j *dma_buf_attachment_is_dynamic (C function)c.dma_buf_attachment_is_dynamichNtauh1j hjhhhNhNubj )}(hhh](j )}(hFbool dma_buf_attachment_is_dynamic (struct dma_buf_attachment *attach)h]j )}(hEbool dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach)h](jl)}(hj_h]hbool}(hhhjFahhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjBahhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMLubj )}(h h]h }(hhhjTahhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjBahhhjSahMLubj* )}(hdma_buf_attachment_is_dynamich]j0 )}(hdma_buf_attachment_is_dynamich]hdma_buf_attachment_is_dynamic}(hhhjfahhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjbaubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjBahhhjSahMLubj)}(h#(struct dma_buf_attachment *attach)h]j)}(h!struct dma_buf_attachment *attachh](j )}(hj h]hstruct}(hhhjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~aubj )}(h h]h }(hhhjahhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj~aubh)}(hhh]j0 )}(hdma_buf_attachmenth]hdma_buf_attachment}(hhhjahhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjaubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjamodnameN classnameNjdj)}j]ji)}j`jhasbc.dma_buf_attachment_is_dynamicasbuh1hhj~aubj )}(h h]h }(hhhjahhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj~aubj~)}(hj h]h*}(hhhjahhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj~aubj0 )}(hattachh]hattach}(hhhjahhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj~aubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjzaubah}(h]h ]h"]h$]h&]jjuh1jhjBahhhjSahMLubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj>ahhhjSahMLubah}(h]j9aah ](jS jT eh"]h$]h&]jX uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMRhj;ahhubj[ )}(hhh]h)}(h3check if a DMA-buf attachment uses dynamic mappingsh]h3check if a DMA-buf attachment uses dynamic mappings}(hjbhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMKhjbhhubah}(h]h ]h"]h$]h&]uh1jZ hj;ahhhjSahMLubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jbj} jbj~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_buf_attachment *attach`` the DMA-buf attachment to check **Description** Returns true if a DMA-buf importer wants to call the map/unmap functions with the dma_resv lock held.h](h)}(h**Parameters**h]j )}(hj(bh]h Parameters}(hhhj*bhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj&bubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMOhj"bubj )}(hhh]j )}(hF``struct dma_buf_attachment *attach`` the DMA-buf attachment to check h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hjGbh]h!struct dma_buf_attachment *attach}(hhhjIbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEbubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMMhjAbubj )}(hhh]h)}(hthe DMA-buf attachment to checkh]hthe DMA-buf attachment to check}(hjbbhj`bhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\bhMMhj]bubah}(h]h ]h"]h$]h&]uh1j hjAbubeh}(h]h ]h"]h$]h&]uh1j hj\bhMMhj>bubah}(h]h ]h"]h$]h&]uh1j hj"bubh)}(h**Description**h]j )}(hjbh]h Description}(hhhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjbubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMOhj"bubh)}(heReturns true if a DMA-buf importer wants to call the map/unmap functions with the dma_resv lock held.h]heReturns true if a DMA-buf importer wants to call the map/unmap functions with the dma_resv lock held.}(hjbhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:150: ./include/linux/dma-buf.hhMOhj"bubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubeh}(h])kernel-functions-and-structures-referenceah ]h"])kernel functions and structures referenceah$]h&]uh1hhjlhhhhhKubeh}(h]shared-dma-buffersah ]h"]shared dma buffersah$]h&]uh1hhhhhhhhK"ubh)}(hhh](h)}(hReservation Objectsh]hReservation Objects}(hjbhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhhhhhKubh)}(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.}(hjbhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:156: ./drivers/dma-buf/dma-resv.chK.hjbhhubh)}(h%See struct dma_resv for more details.h]h%See struct dma_resv for more details.}(hjbhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:156: ./drivers/dma-buf/dma-resv.chK5hjbhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_init (C function)c.dma_resv_inithNtauh1j hjbhhhNhNubj )}(hhh](j )}(h)void dma_resv_init (struct dma_resv *obj)h]j )}(h(void dma_resv_init(struct dma_resv *obj)h](jl)}(hvoidh]hvoid}(hhhjchhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjchhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKubj )}(h h]h }(hhhjchhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjchhhjchKubj* )}(h dma_resv_inith]j0 )}(h dma_resv_inith]h dma_resv_init}(hhhj'chhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj#cubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjchhhjchKubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhjCchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?cubj )}(h h]h }(hhhjPchhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj?cubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjachhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj^cubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjccmodnameN classnameNjdj)}j]ji)}j`j)csbc.dma_resv_initasbuh1hhj?cubj )}(h h]h }(hhhjchhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj?cubj~)}(hj h]h*}(hhhjchhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj?cubj0 )}(hobjh]hobj}(hhhjchhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj?cubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj;cubah}(h]h ]h"]h$]h&]jjuh1jhjchhhjchKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjbhhhjchKubah}(h]jbah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjbhhubj[ )}(hhh]h)}(hinitialize a reservation objecth]hinitialize a reservation object}(hjchjchhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjchhubah}(h]h ]h"]h$]h&]uh1jZ hjbhhhjchKubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jcj} jcj~ uh1j hhhjbhNhNubj )}(hA**Parameters** ``struct dma_resv *obj`` the reservation objecth](h)}(h**Parameters**h]j )}(hjch]h Parameters}(hhhjchhhNhNubah}(h]h ]h"]h$]h&]uh1j hjcubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjcubj )}(hhh]j )}(h/``struct dma_resv *obj`` the reservation objecth](j )}(h``struct dma_resv *obj``h]j)}(hjdh]hstruct dma_resv *obj}(hhhj dhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjdubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj#dhj!dhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjdubah}(h]h ]h"]h$]h&]uh1j hjdubeh}(h]h ]h"]h$]h&]uh1j hjdhKhjcubah}(h]h ]h"]h$]h&]uh1j hjcubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_fini (C function)c.dma_resv_finihNtauh1j hjbhhhNhNubj )}(hhh](j )}(h)void dma_resv_fini (struct dma_resv *obj)h]j )}(h(void dma_resv_fini(struct dma_resv *obj)h](jl)}(hvoidh]hvoid}(hhhjbdhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj^dhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKubj )}(h h]h }(hhhjqdhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj^dhhhjpdhKubj* )}(h dma_resv_finih]j0 )}(h dma_resv_finih]h dma_resv_fini}(hhhjdhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjdubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj^dhhhjpdhKubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubj )}(h h]h }(hhhjdhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjdubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjdhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjdubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjdmodnameN classnameNjdj)}j]ji)}j`jdsbc.dma_resv_finiasbuh1hhjdubj )}(h h]h }(hhhjdhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjdubj~)}(hj h]h*}(hhhjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjdubj0 )}(hobjh]hobj}(hhhjdhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjdubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubah}(h]h ]h"]h$]h&]jjuh1jhj^dhhhjpdhKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjZdhhhjpdhKubah}(h]jUdah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjWdhhubj[ )}(hhh]h)}(hdestroys a reservation objecth]hdestroys a reservation object}(hj%ehj#ehhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj ehhubah}(h]h ]h"]h$]h&]uh1jZ hjWdhhhjpdhKubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j;ej} j;ej~ uh1j hhhjbhNhNubj )}(hA**Parameters** ``struct dma_resv *obj`` the reservation objecth](h)}(h**Parameters**h]j )}(hjEeh]h Parameters}(hhhjGehhhNhNubah}(h]h ]h"]h$]h&]uh1j hjCeubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj?eubj )}(hhh]j )}(h/``struct dma_resv *obj`` the reservation objecth](j )}(h``struct dma_resv *obj``h]j)}(hjdeh]hstruct dma_resv *obj}(hhhjfehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbeubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj^eubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjehj}ehhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjzeubah}(h]h ]h"]h$]h&]uh1j hj^eubeh}(h]h ]h"]h$]h&]uh1j hjyehKhj[eubah}(h]h ]h"]h$]h&]uh1j hj?eubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_resv_reserve_fences (C function)c.dma_resv_reserve_fenceshNtauh1j hjbhhhNhNubj )}(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](jl)}(hinth]hint}(hhhjehhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjehhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKubj )}(h h]h }(hhhjehhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjehhhjehKubj* )}(hdma_resv_reserve_fencesh]j0 )}(hdma_resv_reserve_fencesh]hdma_resv_reserve_fences}(hhhjehhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjeubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjehhhjehKubj)}(h/(struct dma_resv *obj, unsigned int num_fences)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubj )}(h h]h }(hhhjfhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjeubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjfhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjfubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjfmodnameN classnameNjdj)}j]ji)}j`jesbc.dma_resv_reserve_fencesasbuh1hhjeubj )}(h h]h }(hhhj9fhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjeubj~)}(hj h]h*}(hhhjGfhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjeubj0 )}(hobjh]hobj}(hhhjTfhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjeubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjeubj)}(hunsigned int num_fencesh](jl)}(hunsignedh]hunsigned}(hhhjmfhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjifubj )}(h h]h }(hhhj{fhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjifubjl)}(hinth]hint}(hhhjfhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjifubj )}(h h]h }(hhhjfhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjifubj0 )}(h num_fencesh]h num_fences}(hhhjfhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjifubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjeubeh}(h]h ]h"]h$]h&]jjuh1jhjehhhjehKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjehhhjehKubah}(h]jeah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjehhubj[ )}(hhh]h)}(h1Reserve space to add fences to a dma_resv object.h]h1Reserve space to add fences to a dma_resv object.}(hjfhjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjfhhubah}(h]h ]h"]h$]h&]uh1jZ hjehhhjehKubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jfj} jfj~ uh1j hhhjbhNhNubj )}(hX**Parameters** ``struct dma_resv *obj`` reservation object ``unsigned int num_fences`` number of fences we want to add **Description** Should be called before dma_resv_add_fence(). Must be called with **obj** locked through dma_resv_lock(). Note that the preallocated slots need to be re-reserved if **obj** is unlocked at any time before calling dma_resv_add_fence(). This is validated when CONFIG_DEBUG_MUTEXES is enabled. RETURNS Zero for success, or -errnoh](h)}(h**Parameters**h]j )}(hjfh]h Parameters}(hhhjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjfubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjfubj )}(hhh](j )}(h,``struct dma_resv *obj`` reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjgh]hstruct dma_resv *obj}(hhhjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj gubj )}(hhh]h)}(hreservation objecth]hreservation object}(hj,ghj*ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&ghKhj'gubah}(h]h ]h"]h$]h&]uh1j hj gubeh}(h]h ]h"]h$]h&]uh1j hj&ghKhjgubj )}(h<``unsigned int num_fences`` number of fences we want to add h](j )}(h``unsigned int num_fences``h]j)}(hjJgh]hunsigned int num_fences}(hhhjLghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHgubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjDgubj )}(hhh]h)}(hnumber of fences we want to addh]hnumber of fences we want to add}(hjeghjcghhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_ghKhj`gubah}(h]h ]h"]h$]h&]uh1j hjDgubeh}(h]h ]h"]h$]h&]uh1j hj_ghKhjgubeh}(h]h ]h"]h$]h&]uh1j hjfubh)}(h**Description**h]j )}(hjgh]h Description}(hhhjghhhNhNubah}(h]h ]h"]h$]h&]uh1j hjgubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjfubh)}(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 }(hCShould be called before dma_resv_add_fence(). Must be called with hjghhhNhNubj )}(h**obj**h]hobj}(hhhjghhhNhNubah}(h]h ]h"]h$]h&]uh1j hjgubh locked through dma_resv_lock().}(h locked through dma_resv_lock().hjghhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjfubh)}(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 }(h;Note that the preallocated slots need to be re-reserved if hjghhhNhNubj )}(h**obj**h]hobj}(hhhjghhhNhNubah}(h]h ]h"]h$]h&]uh1j hjgubhu is unlocked at any time before calling dma_resv_add_fence(). This is validated when CONFIG_DEBUG_MUTEXES is enabled.}(hu is unlocked at any time before calling dma_resv_add_fence(). This is validated when CONFIG_DEBUG_MUTEXES is enabled.hjghhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjfubh)}(h#RETURNS Zero for success, or -errnoh]h#RETURNS Zero for success, or -errno}(hjghjghhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjfubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j &dma_resv_reset_max_fences (C function)c.dma_resv_reset_max_fenceshNtauh1j hjbhhhNhNubj )}(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](jl)}(hvoidh]hvoid}(hhhjhhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj hhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKubj )}(h h]h }(hhhjhhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj hhhhjhhKubj* )}(hdma_resv_reset_max_fencesh]j0 )}(hdma_resv_reset_max_fencesh]hdma_resv_reset_max_fences}(hhhj1hhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj-hubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj hhhhjhhKubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhjMhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjIhubj )}(h h]h }(hhhjZhhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjIhubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjkhhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjhhubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmhmodnameN classnameNjdj)}j]ji)}j`j3hsbc.dma_resv_reset_max_fencesasbuh1hhjIhubj )}(h h]h }(hhhjhhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjIhubj~)}(hj h]h*}(hhhjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjIhubj0 )}(hobjh]hobj}(hhhjhhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjIhubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjEhubah}(h]h ]h"]h$]h&]jjuh1jhj hhhhjhhKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhhjhhKubah}(h]jhah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjhhhubj[ )}(hhh]h)}(hreset fences for debuggingh]hreset fences for debugging}(hjhhjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjhhhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhhjhhKubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jhj} jhj~ uh1j hhhjbhNhNubj )}(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]j )}(hjhh]h Parameters}(hhhjhhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjhubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjhubj )}(hhh]j )}(h6``struct dma_resv *obj`` the dma_resv object to reset h](j )}(h``struct dma_resv *obj``h]j)}(hjih]hstruct dma_resv *obj}(hhhjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhj iubj )}(hhh]h)}(hthe dma_resv object to reseth]hthe dma_resv object to reset}(hj-ihj+ihhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'ihKhj(iubah}(h]h ]h"]h$]h&]uh1j hj iubeh}(h]h ]h"]h$]h&]uh1j hj'ihKhj iubah}(h]h ]h"]h$]h&]uh1j hjhubh)}(h**Description**h]j )}(hjMih]h Description}(hhhjOihhhNhNubah}(h]h ]h"]h$]h&]uh1j hjKiubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chKhjhubh)}(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 }(hReset the number of pre-reserved fence slots to test that drivers do correct slot allocation using dma_resv_reserve_fences(). See also hjcihhhNhNubh)}(h2:c:type:`dma_resv_list.max_fences `h]j)}(hjnih]hdma_resv_list.max_fences}(hhhjpihhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjliubah}(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.chKhjciubh.}(hjhjcihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjihKhjhubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_add_fence (C function)c.dma_resv_add_fencehNtauh1j hjbhhhNhNubj )}(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](jl)}(hvoidh]hvoid}(hhhjihhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjihhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hhhjihhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjihhhjihMubj* )}(hdma_resv_add_fenceh]j0 )}(hdma_resv_add_fenceh]hdma_resv_add_fence}(hhhjihhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjiubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjihhhjihMubj)}(hJ(struct dma_resv *obj, struct dma_fence *fence, enum dma_resv_usage usage)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjiubj )}(h h]h }(hhhjjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjiubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjjmodnameN classnameNjdj)}j]ji)}j`jisbc.dma_resv_add_fenceasbuh1hhjiubj )}(h h]h }(hhhj1jhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjiubj~)}(hj h]h*}(hhhj?jhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjiubj0 )}(hobjh]hobj}(hhhjLjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjiubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjiubj)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjejhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjajubj )}(h h]h }(hhhjrjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjajubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjjmodnameN classnameNjdj)}j]j-jc.dma_resv_add_fenceasbuh1hhjajubj )}(h h]h }(hhhjjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjajubj~)}(hj h]h*}(hhhjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjajubj0 )}(hfenceh]hfence}(hhhjjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjajubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjiubj)}(henum dma_resv_usage usageh](j )}(hj'+h]henum}(hhhjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubj )}(h h]h }(hhhjjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjjubh)}(hhh]j0 )}(hdma_resv_usageh]hdma_resv_usage}(hhhjjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjjmodnameN classnameNjdj)}j]j-jc.dma_resv_add_fenceasbuh1hhjjubj )}(h h]h }(hhhjkhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjjubj0 )}(husageh]husage}(hhhjkhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjiubeh}(h]h ]h"]h$]h&]jjuh1jhjihhhjihMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjihhhjihMubah}(h]jiah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjihhubj[ )}(hhh]h)}(hAdd a fence to the dma_resv objh]hAdd a fence to the dma_resv obj}(hjLkhjJkhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjGkhhubah}(h]h ]h"]h$]h&]uh1jZ hjihhhjihMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jbkj} jbkj~ uh1j hhhjbhNhNubj )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``struct dma_fence *fence`` the fence to add ``enum dma_resv_usage usage`` how the fence is used, see enum dma_resv_usage **Description** Add a fence to a slot, **obj** must be locked with dma_resv_lock(), and dma_resv_reserve_fences() has been called. See also :c:type:`dma_resv.fence ` for a discussion of the semantics.h](h)}(h**Parameters**h]j )}(hjlkh]h Parameters}(hhhjnkhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjjkubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjfkubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjkh]hstruct dma_resv *obj}(hhhjkhhhNhNubah}(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.chMhjkubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjkhjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhMhjkubah}(h]h ]h"]h$]h&]uh1j hjkubeh}(h]h ]h"]h$]h&]uh1j hjkhMhjkubj )}(h-``struct dma_fence *fence`` the fence to add h](j )}(h``struct dma_fence *fence``h]j)}(hjkh]hstruct dma_fence *fence}(hhhjkhhhNhNubah}(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.chMhjkubj )}(hhh]h)}(hthe fence to addh]hthe fence to add}(hjkhjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhMhjkubah}(h]h ]h"]h$]h&]uh1j hjkubeh}(h]h ]h"]h$]h&]uh1j hjkhMhjkubj )}(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)}(hjkh]henum dma_resv_usage usage}(hhhjkhhhNhNubah}(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.chMhjkubj )}(hhh]h)}(h.how the fence is used, see enum dma_resv_usageh]h.how the fence is used, see enum dma_resv_usage}(hjlhjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhMhjlubah}(h]h ]h"]h$]h&]uh1j hjkubeh}(h]h ]h"]h$]h&]uh1j hjlhMhjkubeh}(h]h ]h"]h$]h&]uh1j hjfkubh)}(h**Description**h]j )}(hj8lh]h Description}(hhhj:lhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj6lubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjfkubh)}(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, }(hAdd a fence to a slot, hjNlhhhNhNubj )}(h**obj**h]hobj}(hhhjWlhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjNlubhT must be locked with dma_resv_lock(), and dma_resv_reserve_fences() has been called.}(hT must be locked with dma_resv_lock(), and dma_resv_reserve_fences() has been called.hjNlhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjfkubh)}(hOSee also :c:type:`dma_resv.fence ` for a discussion of the semantics.h](h See also }(h See also hjqlhhhNhNubh)}(h#:c:type:`dma_resv.fence `h]j)}(hj|lh]hdma_resv.fence}(hhhj~lhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjzlubah}(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.chMhjqlubh# for a discussion of the semantics.}(h# for a discussion of the semantics.hjqlhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjlhMhjfkubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_resv_replace_fences (C function)c.dma_resv_replace_fenceshNtauh1j hjbhhhNhNubj )}(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](jl)}(hvoidh]hvoid}(hhhjlhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjlhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMCubj )}(h h]h }(hhhjlhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjlhhhjlhMCubj* )}(hdma_resv_replace_fencesh]j0 )}(hdma_resv_replace_fencesh]hdma_resv_replace_fences}(hhhjlhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjlubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjlhhhjlhMCubj)}(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}(hhhjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlubj )}(h h]h }(hhhjmhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjlubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhj mhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjmubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj"mmodnameN classnameNjdj)}j]ji)}j`jlsbc.dma_resv_replace_fencesasbuh1hhjlubj )}(h h]h }(hhhj@mhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjlubj~)}(hj h]h*}(hhhjNmhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjlubj0 )}(hobjh]hobj}(hhhj[mhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjlubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjlubj)}(huint64_t contexth](h)}(hhh]j0 )}(huint64_th]huint64_t}(hhhjwmhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjtmubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjymmodnameN classnameNjdj)}j]j`.h](h)}(h**Parameters**h]j )}(hjth]h Parameters}(hhhjthhhNhNubah}(h]h ]h"]h$]h&]uh1j hjtubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjtubj )}(hhh]j )}(hG``struct dma_resv_iter *cursor`` cursor to record the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjuh]hstruct dma_resv_iter *cursor}(hhhjuhhhNhNubah}(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}(hjuhjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhMhjuubah}(h]h ]h"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]uh1j hjuhMhjtubah}(h]h ]h"]h$]h&]uh1j hjtubh)}(h**Description**h]j )}(hj;uh]h Description}(hhhj=uhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj9uubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjtubh)}(hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().h]hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().}(hjSuhjQuhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjtubh)}(hcReturn the first fence in the dma_resv object while holding the :c:type:`dma_resv.lock `.h](h@Return the first fence in the dma_resv object while holding the }(h@Return the first fence in the dma_resv object while holding the hj`uhhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjkuh]h dma_resv.lock}(hhhjmuhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjiuubah}(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.chMhj`uubh.}(hjhj`uhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjuhMhjtubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_next (C function)c.dma_resv_iter_nexthNtauh1j hjbhhhNhNubj )}(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}(hhhjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hhhjuhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjuhhhjuhMubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjuhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjuubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjumodnameN classnameNjdj)}j]ji)}j`dma_resv_iter_nextsbc.dma_resv_iter_nextasbuh1hhjuhhhjuhMubj )}(h h]h }(hhhjuhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjuhhhjuhMubj~)}(hj h]h*}(hhhjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjuhhhjuhMubj* )}(hdma_resv_iter_nexth]j0 )}(hjuh]hdma_resv_iter_next}(hhhjvhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjvubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjuhhhjuhMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hhhj-vhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)vubj )}(h h]h }(hhhj:vhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj)vubh)}(hhh]j0 )}(h dma_resv_iterh]h dma_resv_iter}(hhhjKvhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjHvubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjMvmodnameN classnameNjdj)}j]juc.dma_resv_iter_nextasbuh1hhj)vubj )}(h h]h }(hhhjivhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj)vubj~)}(hj h]h*}(hhhjwvhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj)vubj0 )}(hcursorh]hcursor}(hhhjvhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj)vubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%vubah}(h]h ]h"]h$]h&]jjuh1jhjuhhhjuhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjuhhhjuhMubah}(h]juah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjuhhubj[ )}(hhh]h)}(h(next fence from a locked dma_resv objecth]h(next fence from a locked dma_resv object}(hjvhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjvhhubah}(h]h ]h"]h$]h&]uh1jZ hjuhhhjuhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jvj} jvj~ uh1j hhhjbhNhNubj )}(h**Parameters** ``struct dma_resv_iter *cursor`` cursor to record the current position **Description** Return the next fences from the dma_resv object while holding the :c:type:`dma_resv.lock `.h](h)}(h**Parameters**h]j )}(hjvh]h Parameters}(hhhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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 )}(hG``struct dma_resv_iter *cursor`` cursor to record the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjvh]hstruct dma_resv_iter *cursor}(hhhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjvubj )}(hhh]h)}(h%cursor to record the current positionh]h%cursor to record the current position}(hj whj whhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhMhjwubah}(h]h ]h"]h$]h&]uh1j hjvubeh}(h]h ]h"]h$]h&]uh1j hjwhMhjvubah}(h]h ]h"]h$]h&]uh1j hjvubh)}(h**Description**h]j )}(hj+wh]h Description}(hhhj-whhhNhNubah}(h]h ]h"]h$]h&]uh1j hj)wubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjvubh)}(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 }(hBReturn the next fences from the dma_resv object while holding the hjAwhhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjLwh]h dma_resv.lock}(hhhjNwhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjJwubah}(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.chMhjAwubh.}(hjhjAwhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjiwhMhjvubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_resv_copy_fences (C function)c.dma_resv_copy_fenceshNtauh1j hjbhhhNhNubj )}(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](jl)}(hinth]hint}(hhhjwhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjwhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hhhjwhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjwhhhjwhMubj* )}(hdma_resv_copy_fencesh]j0 )}(hdma_resv_copy_fencesh]hdma_resv_copy_fences}(hhhjwhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjwubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjwhhhjwhMubj)}(h,(struct dma_resv *dst, struct dma_resv *src)h](j)}(hstruct dma_resv *dsth](j )}(hj h]hstruct}(hhhjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubj )}(h h]h }(hhhjwhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjwubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjwhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjwubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjwmodnameN classnameNjdj)}j]ji)}j`jwsbc.dma_resv_copy_fencesasbuh1hhjwubj )}(h h]h }(hhhjxhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjwubj~)}(hj h]h*}(hhhjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjwubj0 )}(hdsth]hdst}(hhhj*xhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjwubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjwubj)}(hstruct dma_resv *srch](j )}(hj h]hstruct}(hhhjCxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?xubj )}(h h]h }(hhhjPxhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj?xubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjaxhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj^xubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjcxmodnameN classnameNjdj)}j]j xc.dma_resv_copy_fencesasbuh1hhj?xubj )}(h h]h }(hhhjxhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj?xubj~)}(hj h]h*}(hhhjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj?xubj0 )}(hsrch]hsrc}(hhhjxhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj?xubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjwubeh}(h]h ]h"]h$]h&]jjuh1jhjwhhhjwhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjwhhhjwhMubah}(h]jwah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjwhhubj[ )}(hhh]h)}(h Copy all fences from src to dst.h]h Copy all fences from src to dst.}(hjxhjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjxhhubah}(h]h ]h"]h$]h&]uh1jZ hjwhhhjwhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jxj} jxj~ uh1j hhhjbhNhNubj )}(h**Parameters** ``struct dma_resv *dst`` the destination reservation object ``struct dma_resv *src`` the source reservation object **Description** Copy all fences from src to dst. dst-lock must be held.h](h)}(h**Parameters**h]j )}(hjxh]h Parameters}(hhhjxhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjxubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjxubj )}(hhh](j )}(h<``struct dma_resv *dst`` the destination reservation object h](j )}(h``struct dma_resv *dst``h]j)}(hjyh]hstruct dma_resv *dst}(hhhjyhhhNhNubah}(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.chMhjyubj )}(hhh]h)}(h"the destination reservation objecth]h"the destination reservation object}(hj!yhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhMhjyubah}(h]h ]h"]h$]h&]uh1j hjyubeh}(h]h ]h"]h$]h&]uh1j hjyhMhjxubj )}(h7``struct dma_resv *src`` the source reservation object h](j )}(h``struct dma_resv *src``h]j)}(hj?yh]hstruct dma_resv *src}(hhhjAyhhhNhNubah}(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.chMhj9yubj )}(hhh]h)}(hthe source reservation objecth]hthe source reservation object}(hjZyhjXyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjTyhMhjUyubah}(h]h ]h"]h$]h&]uh1j hj9yubeh}(h]h ]h"]h$]h&]uh1j hjTyhMhjxubeh}(h]h ]h"]h$]h&]uh1j hjxubh)}(h**Description**h]j )}(hjzyh]h Description}(hhhj|yhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjxyubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjxubh)}(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.}(hjyhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjxubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_get_fences (C function)c.dma_resv_get_fenceshNtauh1j hjbhhhNhNubj )}(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](jl)}(hinth]hint}(hhhjyhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjyhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM'ubj )}(h h]h }(hhhjyhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjyhhhjyhM'ubj* )}(hdma_resv_get_fencesh]j0 )}(hdma_resv_get_fencesh]hdma_resv_get_fences}(hhhjyhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjyubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjyhhhjyhM'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}(hhhjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubj )}(h h]h }(hhhj zhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjyubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjzhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjzubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjzmodnameN classnameNjdj)}j]ji)}j`jysbc.dma_resv_get_fencesasbuh1hhjyubj )}(h h]h }(hhhj:zhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjyubj~)}(hj h]h*}(hhhjHzhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjyubj0 )}(hobjh]hobj}(hhhjUzhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjyubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjyubj)}(henum dma_resv_usage usageh](j )}(hj'+h]henum}(hhhjnzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjzubj )}(h h]h }(hhhj{zhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjjzubh)}(hhh]j0 )}(hdma_resv_usageh]hdma_resv_usage}(hhhjzhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjzubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjzmodnameN classnameNjdj)}j]j6zc.dma_resv_get_fencesasbuh1hhjjzubj )}(h h]h }(hhhjzhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjjzubj0 )}(husageh]husage}(hhhjzhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjjzubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjyubj)}(hunsigned int *num_fencesh](jl)}(hunsignedh]hunsigned}(hhhjzhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjzubj )}(h h]h }(hhhjzhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjzubjl)}(hinth]hint}(hhhjzhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjzubj )}(h h]h }(hhhjzhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjzubj~)}(hj h]h*}(hhhj {hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjzubj0 )}(h num_fencesh]h num_fences}(hhhj{hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjzubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjyubj)}(hstruct dma_fence ***fencesh](j )}(hj h]hstruct}(hhhj/{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+{ubj )}(h h]h }(hhhj<{hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj+{ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjM{hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjJ{ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjO{modnameN classnameNjdj)}j]j6zc.dma_resv_get_fencesasbuh1hhj+{ubj )}(h h]h }(hhhjk{hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj+{ubj~)}(hj h]h*}(hhhjy{hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj+{ubj~)}(hj h]h*}(hhhj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj+{ubj~)}(hj h]h*}(hhhj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj+{ubj0 )}(hfencesh]hfences}(hhhj{hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj+{ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjyubeh}(h]h ]h"]h$]h&]jjuh1jhjyhhhjyhM'ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjyhhhjyhM'ubah}(h]jyah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM1hjyhhubj[ )}(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}(hj{hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM&hj{hhubah}(h]h ]h"]h$]h&]uh1jZ hjyhhhjyhM'ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j{j} j{j~ uh1j hhhjbhNhNubj )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. ``unsigned int *num_fences`` the number of fences returned ``struct dma_fence ***fences`` the array of fence ptrs returned (array is krealloc'd to the required size, and must be freed by caller) **Description** Retrieve all fences from the reservation object. Returns either zero or -ENOMEM.h](h)}(h**Parameters**h]j )}(hj{h]h Parameters}(hhhj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj{ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM*hj{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}(hhhj|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.chM(hj|ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj'|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 )}(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)}(hjE|h]henum dma_resv_usage usage}(hhhjG|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC|ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM)hj?|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`|hj^|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZ|hM)hj[|ubah}(h]h ]h"]h$]h&]uh1j hj?|ubeh}(h]h ]h"]h$]h&]uh1j hjZ|hM)hj|ubj )}(h;``unsigned int *num_fences`` the number of fences returned h](j )}(h``unsigned int *num_fences``h]j)}(hj~|h]hunsigned int *num_fences}(hhhj|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.chM*hjx|ubj )}(hhh]h)}(hthe number of fences returnedh]hthe number of fences returned}(hj|hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hM*hj|ubah}(h]h ]h"]h$]h&]uh1j hjx|ubeh}(h]h ]h"]h$]h&]uh1j hj|hM*hj|ubj )}(h``struct dma_fence ***fences`` the array of fence ptrs returned (array is krealloc'd to the required size, and must be freed by caller) h](j )}(h``struct dma_fence ***fences``h]j)}(hj|h]hstruct dma_fence ***fences}(hhhj|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.chM,hj|ubj )}(hhh]h)}(hhthe array of fence ptrs returned (array is krealloc'd to the required size, and must be freed by caller)h]hjthe array of fence ptrs returned (array is krealloc’d to the required size, and must be freed by caller)}(hj|hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM+hj|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 hj{ubh)}(h**Description**h]j )}(hj|h]h Description}(hhhj|hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj|ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM.hj{ubh)}(hPRetrieve all fences from the reservation object. Returns either zero or -ENOMEM.h]hPRetrieve all fences from the reservation object. Returns either zero or -ENOMEM.}(hj }hj }hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM.hj{ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_resv_get_singleton (C function)c.dma_resv_get_singletonhNtauh1j hjbhhhNhNubj )}(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](jl)}(hinth]hint}(hhhj8}hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj4}hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM^ubj )}(h h]h }(hhhjG}hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj4}hhhjF}hM^ubj* )}(hdma_resv_get_singletonh]j0 )}(hdma_resv_get_singletonh]hdma_resv_get_singleton}(hhhjY}hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjU}ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj4}hhhjF}hM^ubj)}(hK(struct dma_resv *obj, enum dma_resv_usage usage, struct dma_fence **fence)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhju}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjq}ubj )}(h h]h }(hhhj}hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjq}ubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhj}hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj}ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj}modnameN classnameNjdj)}j]ji)}j`j[}sbc.dma_resv_get_singletonasbuh1hhjq}ubj )}(h h]h }(hhhj}hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjq}ubj~)}(hj h]h*}(hhhj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjq}ubj0 )}(hobjh]hobj}(hhhj}hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjq}ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjm}ubj)}(henum dma_resv_usage usageh](j )}(hj'+h]henum}(hhhj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubj )}(h h]h }(hhhj}hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj}ubh)}(hhh]j0 )}(hdma_resv_usageh]hdma_resv_usage}(hhhj~hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj~ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj~modnameN classnameNjdj)}j]j}c.dma_resv_get_singletonasbuh1hhj}ubj )}(h h]h }(hhhj#~hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj}ubj0 )}(husageh]husage}(hhhj1~hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj}ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjm}ubj)}(hstruct dma_fence **fenceh](j )}(hj h]hstruct}(hhhjJ~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjF~ubj )}(h h]h }(hhhjW~hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjF~ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjh~hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hje~ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjj~modnameN classnameNjdj)}j]j}c.dma_resv_get_singletonasbuh1hhjF~ubj )}(h h]h }(hhhj~hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjF~ubj~)}(hj h]h*}(hhhj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjF~ubj~)}(hj h]h*}(hhhj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjF~ubj0 )}(hfenceh]hfence}(hhhj~hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjF~ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjm}ubeh}(h]h ]h"]h$]h&]jjuh1jhj4}hhhjF}hM^ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj0}hhhjF}hM^ubah}(h]j+}ah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMkhj-}hhubj[ )}(hhh]h)}(h%Get a single fence for all the fencesh]h%Get a single fence for all the fences}(hj~hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM]hj~hhubah}(h]h ]h"]h$]h&]uh1jZ hj-}hhhjF}hM^ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j~j} j~j~ uh1j hhhjbhNhNubj )}(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]j )}(hj~h]h Parameters}(hhhj~hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj~ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMahj~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}(hhhjhhhNhNubah}(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.chM^hjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj5hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hM^hj0ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj/hM^hjubj )}(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)}(hjSh]henum dma_resv_usage usage}(hhhjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chM_hjMubj )}(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.}(hjnhjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhM_hjiubah}(h]h ]h"]h$]h&]uh1j hjMubeh}(h]h ]h"]h$]h&]uh1j hjhhM_hjubj )}(h1``struct dma_fence **fence`` the resulting fence h](j )}(h``struct dma_fence **fence``h]j)}(hjh]hstruct dma_fence **fence}(hhhjhhhNhNubah}(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.chM`hjubj )}(hhh]h)}(hthe resulting fenceh]hthe resulting fence}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM`hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM`hjubeh}(h]h ]h"]h$]h&]uh1j hj~ubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMbhj~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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMbhj~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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMehj~ubh)}(h:Returns 0 on success and negative error values on failure.h]h:Returns 0 on success and negative error values on failure.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMihj~ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_resv_wait_timeout (C function)c.dma_resv_wait_timeouthNtauh1j hjbhhhNhNubj )}(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](jl)}(hlongh]hlong}(hhhj*hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj&hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hhhj9hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj&hhhj8hMubj* )}(hdma_resv_wait_timeouth]j0 )}(hdma_resv_wait_timeouth]hdma_resv_wait_timeout}(hhhjKhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjGubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj&hhhj8hMubj)}(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}(hhhjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubj )}(h h]h }(hhhjthhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjcubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jMsbc.dma_resv_wait_timeoutasbuh1hhjcubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjcubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjcubj0 )}(hobjh]hobj}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjcubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj_ubj)}(henum dma_resv_usage usageh](j )}(hj'+h]henum}(hhhjـhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjՀubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjՀubh)}(hhh]j0 )}(hdma_resv_usageh]hdma_resv_usage}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_resv_wait_timeoutasbuh1hhjՀubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjՀubj0 )}(husageh]husage}(hhhj#hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjՀubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj_ubj)}(h bool intrh](jl)}(hj_h]hbool}(hhhj<hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj8ubj )}(h h]h }(hhhjIhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj8ubj0 )}(hintrh]hintr}(hhhjWhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj8ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj_ubj)}(hunsigned long timeouth](jl)}(hunsignedh]hunsigned}(hhhjphhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjlubj )}(h h]h }(hhhj~hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjlubjl)}(hlongh]hlong}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjlubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjlubj0 )}(htimeouth]htimeout}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjlubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj_ubeh}(h]h ]h"]h$]h&]jjuh1jhj&hhhj8hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj"hhhj8hMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjhhubj[ )}(hhh]h)}(h$Wait on reservation's objects fencesh]h&Wait on reservation’s objects fences}(hjՁ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&]uh1jZ hjhhhj8hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjbhNhNubj )}(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]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hhhjhhhNhNubah}(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)}(hthe reservation objecth]hthe reservation object}(hj/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 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}(hhhjOhhhNhNubah}(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.}(hjhhjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhMhjcubah}(h]h ]h"]h$]h&]uh1j hjGubeh}(h]h ]h"]h$]h&]uh1j hjbhMhj ubj )}(h-``bool intr`` if true, do interruptible wait h](j )}(h ``bool intr``h]j)}(hjh]h bool intr}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hjڂ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 hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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.}(hjhjhhhNhNubah}(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&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_resv_set_deadline (C function)c.dma_resv_set_deadlinehNtauh1j hjbhhhNhNubj )}(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](jl)}(hvoidh]hvoid}(hhhj?hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj;hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hhhjNhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj;hhhjMhMubj* )}(hdma_resv_set_deadlineh]j0 )}(hdma_resv_set_deadlineh]hdma_resv_set_deadline}(hhhj`hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj\ubah}(h]h ](jB jC 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}(hhhj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjxubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjxubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jbsbc.dma_resv_set_deadlineasbuh1hhjxubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjxubj~)}(hj h]h*}(hhhjȃhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjxubj0 )}(hobjh]hobj}(hhhjՃhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjxubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjtubj)}(henum dma_resv_usage usageh](j )}(hj'+h]henum}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hdma_resv_usageh]hdma_resv_usage}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_resv_set_deadlineasbuh1hhjubj )}(h h]h }(hhhj*hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(husageh]husage}(hhhj8hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjtubj)}(hktime_t deadlineh](h)}(hhh]j0 )}(hktime_th]hktime_t}(hhhjThhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjQubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjVmodnameN classnameNjdj)}j]jc.dma_resv_set_deadlineasbuh1hhjMubj )}(h h]h }(hhhjrhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjMubj0 )}(hdeadlineh]hdeadline}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjMubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjtubeh}(h]h ]h"]h$]h&]jjuh1jhj;hhhjMhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj7hhhjMhMubah}(h]j2ah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj4hhubj[ )}(hhh]h)}(h.Set a deadline on reservation's objects fencesh]h0Set a deadline on reservation’s objects fences}(hjhjhhhNhNubah}(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&]uh1jZ hj4hhhjMhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jÄj} jÄj~ uh1j hhhjbhNhNubj )}(hXS**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. ``ktime_t deadline`` the requested deadline (MONOTONIC) **Description** May be called without holding the dma_resv lock. Sets **deadline** on all fences filtered by **usage**.h](h)}(h**Parameters**h]j )}(hj̈́h]h Parameters}(hhhjτhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj˄ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjDŽ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}(hhhjhhhNhNubah}(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)}(hthe reservation objecth]hthe reservation object}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(hY``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. h](j )}(h``enum dma_resv_usage usage``h]j)}(hj%h]henum dma_resv_usage usage}(hhhj'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)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(hj@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 )}(h8``ktime_t deadline`` the requested deadline (MONOTONIC) h](j )}(h``ktime_t deadline``h]j)}(hj^h]hktime_t deadline}(hhhj`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.chMhjXubj )}(hhh]h)}(h"the requested deadline (MONOTONIC)h]h"the requested deadline (MONOTONIC)}(hjyhjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshMhjtubah}(h]h ]h"]h$]h&]uh1j hjXubeh}(h]h ]h"]h$]h&]uh1j hjshMhjubeh}(h]h ]h"]h$]h&]uh1j hjDŽubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjDŽubh)}(hhMay be called without holding the dma_resv lock. Sets **deadline** on all fences filtered by **usage**.h](h7May be called without holding the dma_resv lock. Sets }(h7May be called without holding the dma_resv lock. Sets hjhhhNhNubj )}(h **deadline**h]hdeadline}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh on all fences filtered by }(h on all fences filtered by hjhhhNhNubj )}(h **usage**h]husage}(hhhj˅hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh.}(hjhjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjDŽubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_resv_test_signaled (C function)c.dma_resv_test_signaledhNtauh1j hjbhhhNhNubj )}(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](jl)}(hj_h]hbool}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubj* )}(hdma_resv_test_signaledh]j0 )}(hdma_resv_test_signaledh]hdma_resv_test_signaled}(hhhj$hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMubj)}(h1(struct dma_resv *obj, enum dma_resv_usage usage)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<ubj )}(h h]h }(hhhjMhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj<ubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhj^hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj[ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj`modnameN classnameNjdj)}j]ji)}j`j&sbc.dma_resv_test_signaledasbuh1hhj<ubj )}(h h]h }(hhhj~hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj<ubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj<ubj0 )}(hobjh]hobj}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj<ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj8ubj)}(henum dma_resv_usage usageh](j )}(hj'+h]henum}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hdma_resv_usageh]hdma_resv_usage}(hhhjІhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj͆ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj҆modnameN classnameNjdj)}j]jzc.dma_resv_test_signaledasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(husageh]husage}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj8ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjhhubj[ )}(hhh]h)}(h9Test if a reservation object's fences have been signaled.h]h;Test if a reservation object’s fences have been signaled.}(hj)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&]uh1jZ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j?j} j?j~ uh1j hhhjbhNhNubj )}(hX;**Parameters** ``struct dma_resv *obj`` the reservation object ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. **Description** Callers are not required to hold specific locks, but maybe hold dma_resv_lock() already. RETURNS True if all fences signaled, else false.h](h)}(h**Parameters**h]j )}(hjIh]h Parameters}(hhhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjGubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjCubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjhh]hstruct dma_resv *obj}(hhhjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjbubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hMhj~ubah}(h]h ]h"]h$]h&]uh1j hjbubeh}(h]h ]h"]h$]h&]uh1j hj}hMhj_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}(hhhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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 hjCubh)}(h**Description**h]j )}(hj܇h]h Description}(hhhjއhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjڇubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjCubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjCubh)}(hRETURNSh]hRETURNS}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjCubh)}(h(True if all fences signaled, else false.h]h(True if all fences signaled, else false.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjCubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_describe (C function)c.dma_resv_describehNtauh1j hjbhhhNhNubj )}(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](jl)}(hvoidh]hvoid}(hhhj?hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj;hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMubj )}(h h]h }(hhhjNhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj;hhhjMhMubj* )}(hdma_resv_describeh]j0 )}(hdma_resv_describeh]hdma_resv_describe}(hhhj`hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj\ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj;hhhjMhMubj)}(h,(struct dma_resv *obj, struct seq_file *seq)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjxubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjxubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jbsbc.dma_resv_describeasbuh1hhjxubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjxubj~)}(hj h]h*}(hhhjȈhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjxubj0 )}(hobjh]hobj}(hhhjՈhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjxubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjtubj)}(hstruct seq_file *seqh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hseq_fileh]hseq_file}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_resv_describeasbuh1hhjubj )}(h h]h }(hhhj*hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hseqh]hseq}(hhhjEhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjtubeh}(h]h ]h"]h$]h&]jjuh1jhj;hhhjMhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj7hhhjMhMubah}(h]j2ah ](jS jT eh"]h$]h&]jX uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhj4hhubj[ )}(hhh]h)}(h1Dump description of the resv object into seq_fileh]h1Dump description of the resv object into seq_file}(hjrhjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjmhhubah}(h]h ]h"]h$]h&]uh1jZ hj4hhhjMhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjbhNhNubj )}(h**Parameters** ``struct dma_resv *obj`` the reservation object ``struct seq_file *seq`` the seq_file to dump the description into **Description** Dump a textual description of the fences inside an dma_resv object into the seq_file.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:159: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hhhjhhhNhNubah}(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)}(hthe reservation objecth]hthe reservation object}(hj̉hjʉhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjƉhMhjljubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjƉhMhjubj )}(hC``struct seq_file *seq`` the seq_file to dump the description into h](j )}(h``struct seq_file *seq``h]j)}(hjh]hstruct seq_file *seq}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj%h]h Description}(hhhj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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.}(hj=hj;hhhNhNubah}(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&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_usage (C enum)c.dma_resv_usagehNtauh1j hjbhhhNhNubj )}(hhh](j )}(hdma_resv_usageh]j )}(henum dma_resv_usageh](j )}(hj'+h]henum}(hhhjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjfhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK6ubj )}(h h]h }(hhhjxhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjfhhhjwhK6ubj* )}(hdma_resv_usageh]j0 )}(hjdh]hdma_resv_usage}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjfhhhjwhK6ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjbhhhjwhK6ubah}(h]j]ah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj_hhubj[ )}(hhh]h)}(h+how the fences from a dma_resv obj are usedh]h+how the fences from a dma_resv obj are used}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK5hjhhubah}(h]h ]h"]h$]h&]uh1jZ hj_hhhjwhK6ubeh}(h]h ](jenumeh"]h$]h&]j{ jj| jŊj} jŊj~ uh1j hhhjbhNhNubj )}(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 case are preemption fences, page table updates, TLB flushes as well as explicit synced user submissions. Explicit synced user user submissions can be promoted to DMA_RESV_USAGE_READ or DMA_RESV_USAGE_WRITE as needed using dma_buf_import_sync_file() when implicit synchronization should become necessary after initial adding of the fence.h](h)}(h **Constants**h]j )}(hjϊh]h Constants}(hhhjъhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj͊ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK9hjɊubj )}(hhh](j )}(hX``DMA_RESV_USAGE_KERNEL`` For in kernel memory management only. This should only be used for things like copying or clearing memory with a DMA hardware engine for the purpose of kernel memory management. Drivers *always* must wait for those fences before accessing the resource protected by the dma_resv object. The only exception for that is when the resource is known to be locked down in place by pinning it previously. h](j )}(h``DMA_RESV_USAGE_KERNEL``h]j)}(hjh]hDMA_RESV_USAGE_KERNEL}(hhhjhhhNhNubah}(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 hjhhhNhNubah}(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 }(hDrivers hj%hhhNhNubhemphasis)}(h*always*h]halways}(hhhj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj%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.}(h 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)}(hj\h]hDMA_RESV_USAGE_WRITE}(hhhj^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.hhKKhjVubj )}(hhh](h)}(hImplicit write synchronization.h]hImplicit write synchronization.}(hjwhjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKHhjrubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKJhjrubeh}(h]h ]h"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]uh1j hjqhKKhjubj )}(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}(hhhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKNhjubh)}(haThis should only be used for userspace command submissions which add an implicit read dependency.h]haThis should only be used for userspace command submissions which add an implicit read dependency.}(hjϋhj͋hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKPhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKQhjubj )}(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 case are preemption fences, page table updates, TLB flushes as well as explicit synced user submissions. Explicit synced user 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}(hhhjhhhNhNubah}(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.}(hj 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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKVhjubh)}(hxThe most common case are preemption fences, page table updates, TLB flushes as well as explicit synced user submissions.h]hxThe most common case are preemption fences, page table updates, TLB flushes as well as explicit synced user submissions.}(hj'hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKYhjubh)}(hExplicit synced user 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]hExplicit synced user 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.}(hj6hj4hhhNhNubah}(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 hjɊubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubh)}(h**Description**h]j )}(hj^h]h Description}(hhhj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj\ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKbhjbhhubh)}(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.}(hjvhjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK7hjbhhubh)}(hAn important fact is that there is the order KERNELhjbhhubh)}(hXAlready used fences can be promoted in the sense that a fence with DMA_RESV_USAGE_BOOKKEEP could become DMA_RESV_USAGE_READ by adding it again with this usage. But fences can never be degraded in the sense that a fence with DMA_RESV_USAGE_WRITE could become DMA_RESV_USAGE_READ.h]hXAlready used fences can be promoted in the sense that a fence with DMA_RESV_USAGE_BOOKKEEP could become DMA_RESV_USAGE_READ by adding it again with this usage. But fences can never be degraded in the sense that a fence with DMA_RESV_USAGE_WRITE could become DMA_RESV_USAGE_READ.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKBhjbhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_usage_rw (C function)c.dma_resv_usage_rwhNtauh1j hjbhhhNhNubj )}(hhh](j )}(h2enum dma_resv_usage dma_resv_usage_rw (bool write)h]j )}(h1enum dma_resv_usage dma_resv_usage_rw(bool write)h](j )}(hj'+h]henum}(hhhjɌ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.hhKyubj )}(h h]h }(hhhj׌hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjŌhhhj֌hKyubh)}(hhh]j0 )}(hdma_resv_usageh]hdma_resv_usage}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`dma_resv_usage_rwsbc.dma_resv_usage_rwasbuh1hhjŌhhhj֌hKyubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjŌhhhj֌hKyubj* )}(hdma_resv_usage_rwh]j0 )}(hjh]hdma_resv_usage_rw}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjŌhhhj֌hKyubj)}(h (bool write)h]j)}(h bool writeh](jl)}(hj_h]hbool}(hhhj6hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj2ubj )}(h h]h }(hhhjChhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj2ubj0 )}(hwriteh]hwrite}(hhhjQhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj2ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj.ubah}(h]h ]h"]h$]h&]jjuh1jhjŌhhhj֌hKyubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhj֌hKyubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK~hjhhubj[ )}(hhh]h)}(hhelper for implicit synch]hhelper for implicit sync}(hj~hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKxhjyhhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhj֌hKyubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjbhNhNubj )}(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]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhK|hjubj )}(hhh]j )}(h;``bool write`` true if we create a new implicit sync write h](j )}(h``bool write``h]j)}(hjh]h bool write}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKyhjubj )}(hhh]h)}(h+true if we create a new implicit sync writeh]h+true if we create a new implicit sync write}(hj؍hj֍hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjҍhKyhjӍubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjҍhKyhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(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 }(hhThis returns the implicit synchronization usage for write or read accesses, see enum dma_resv_usage and hjhhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hjh]h dma_buf.resv}(hhhjhhhNhNubah}(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.hhK{hjubh.}(hjhjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj6hK{hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv (C struct) c.dma_resvhNtauh1j hjbhhhNhNubj )}(hhh](j )}(hdma_resvh]j )}(hstruct dma_resvh](j )}(hj h]hstruct}(hhhjahhhNhNubah}(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 }(hhhjohhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj]hhhjnhKubj* )}(hdma_resvh]j0 )}(hj[h]hdma_resv}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj}ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj]hhhjnhKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjYhhhjnhKubah}(h]jTah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjVhhubj[ )}(hhh]h)}(h0a reservation object manages fences for a bufferh]h0a reservation object manages fences for a buffer}(hjhjhhhNhNubah}(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&]uh1jZ hjVhhhjnhKubeh}(h]h ](jstructeh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjbhNhNubj )}(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](j )}(h**Definition**h]h Definition}(hhhjȎhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjĎubh:}(hj hjĎhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj)}(hVstruct dma_resv { struct ww_mutex lock; struct dma_resv_list __rcu *fences; };h]hVstruct dma_resv { struct ww_mutex lock; struct dma_resv_list __rcu *fences; };}(hhhjubah}(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]j )}(hjh]hMembers}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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 )}(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)}(hjh]hlock}(hhhjhhhNhNubah}(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.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,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.}(hj;hj9hhhNhNubah}(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)}(hjZh]hfences}(hhhj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjTubj )}(hhh](h)}(h8Array of fences which where added to the dma_resv objecth]h8Array of fences which where added to the dma_resv object}(hjuhjshhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjpubh)}(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().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjpubeh}(h]h ]h"]h$]h&]uh1j hjTubeh}(h]h ]h"]h$]h&]uh1j hjohKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjbhhubh)}(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ďhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjbhhubh)}(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 }(hOne use is to synchronize cross-driver access to a struct dma_buf, either for dynamic buffer management or just to handle implicit synchronization between different users of the buffer in userspace. See hjяhhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hj܏h]h dma_buf.resv}(hhhjޏhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjڏubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjяubh for a more in-depth discussion.}(h for a more in-depth discussion.hjяhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjbhhubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjbhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter (C struct)c.dma_resv_iterhNtauh1j hjbhhhNhNubj )}(hhh](j )}(h dma_resv_iterh]j )}(hstruct dma_resv_iterh](j )}(hj h]hstruct}(hhhj-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 }(hhhj;hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj)hhhj:hKubj* )}(h dma_resv_iterh]j0 )}(hj'h]h dma_resv_iter}(hhhjMhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjIubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj)hhhj:hKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj%hhhj:hKubah}(h]j ah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj"hhubj[ )}(hhh]h)}(h)current position into the dma_resv fencesh]h)current position into the dma_resv fences}(hjrhjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjmhhubah}(h]h ]h"]h$]h&]uh1jZ hj"hhhj:hKubeh}(h]h ](jstructeh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjbhNhNubj )}(hX**Definition**:: struct dma_resv_iter { struct dma_resv *obj; enum dma_resv_usage usage; struct dma_fence *fence; enum dma_resv_usage fence_usage; unsigned int index; struct dma_resv_list *fences; unsigned int num_fences; bool is_restarted; }; **Members** ``obj`` The dma_resv object we iterate over ``usage`` Return fences with this usage or lower. ``fence`` the currently handled fence ``fence_usage`` the usage of the current fence ``index`` index into the shared fences ``fences`` the shared fences; private, *MUST* not dereference ``num_fences`` number of fences ``is_restarted`` true if this is the first returned fenceh](h)}(h**Definition**::h](j )}(h**Definition**h]h Definition}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh:}(hj 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; };}(hhhjubah}(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]j )}(hjh]hMembers}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh](j )}(h,``obj`` The dma_resv object we iterate over h](j )}(h``obj``h]j)}(hjݐh]hobj}(hhhjߐ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#The dma_resv object we iterate overh]h#The dma_resv object we iterate over}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjאubeh}(h]h ]h"]h$]h&]uh1j hjhKhjԐubj )}(h2``usage`` Return fences with this usage or lower. h](j )}(h ``usage``h]j)}(hjh]husage}(hhhjhhhNhNubah}(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'Return fences with this usage or lower.h]h'Return fences with this usage or lower.}(hj1hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hKhj,ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj+hKhjԐubj )}(h&``fence`` the currently handled fence h](j )}(h ``fence``h]j)}(hjOh]hfence}(hhhjQhhhNhNubah}(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)}(hthe currently handled fenceh]hthe currently handled fence}(hjjhjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhKhjeubah}(h]h ]h"]h$]h&]uh1j hjIubeh}(h]h ]h"]h$]h&]uh1j hjdhKhjԐubj )}(h/``fence_usage`` the usage of the current fence h](j )}(h``fence_usage``h]j)}(hjh]h fence_usage}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjԐubj )}(h'``index`` index into the shared fences h](j )}(h ``index``h]j)}(hjh]hindex}(hhhjÑhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(hindex into the shared fencesh]hindex into the shared fences}(hjܑhjڑhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj֑hKhjבubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj֑hKhjԐubj )}(h>``fences`` the shared fences; private, *MUST* not dereference h](j )}(h ``fences``h]j)}(hjh]hfences}(hhhjhhhNhNubah}(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)}(h2the shared fences; private, *MUST* not dereferenceh](hthe shared fences; private, }(hthe shared fences; private, hjhhhNhNubj/)}(h*MUST*h]hMUST}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubh not dereference}(h not dereferencehjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjԐubj )}(h ``num_fences`` number of fences h](j )}(h``num_fences``h]j)}(hjGh]h num_fences}(hhhjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjAubj )}(hhh]h)}(hnumber of fencesh]hnumber of fences}(hjbhj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hKhj]ubah}(h]h ]h"]h$]h&]uh1j hjAubeh}(h]h ]h"]h$]h&]uh1j hj\hKhjԐubj )}(h9``is_restarted`` true if this is the first returned fenceh](j )}(h``is_restarted``h]j)}(hjh]h is_restarted}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjzubj )}(hhh]h)}(h(true if this is the first returned fenceh]h(true if this is the first returned fence}(hjhjhhhNhNubah}(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 hjzubeh}(h]h ]h"]h$]h&]uh1j hjhKhjԐubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubh)}(h**Description**h]j )}(hjÒh]h Description}(hhhjŒhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjbhhubh)}(hKDon't touch this directly in the driver, use the accessor function instead.h]hMDon’t touch this directly in the driver, use the accessor function instead.}(hjےhjْhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjbhhubh)}(h IMPORTANTh]h IMPORTANT}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjbhhubh)}(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().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjbhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_begin (C function)c.dma_resv_iter_beginhNtauh1j hjbhhhNhNubj )}(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](jl)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hhhj.hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhj-hKubj* )}(hdma_resv_iter_beginh]j0 )}(hdma_resv_iter_beginh]hdma_resv_iter_begin}(hhhj@hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj<ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhj-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}(hhhj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjXubj )}(h h]h }(hhhjihhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjXubh)}(hhh]j0 )}(h dma_resv_iterh]h dma_resv_iter}(hhhjzhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjwubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj|modnameN classnameNjdj)}j]ji)}j`jBsbc.dma_resv_iter_beginasbuh1hhjXubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjXubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjXubj0 )}(hcursorh]hcursor}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjXubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjTubj)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhjΓhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjʓubj )}(h h]h }(hhhjۓhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjʓubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_resv_iter_beginasbuh1hhjʓubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjʓubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjʓubj0 )}(hobjh]hobj}(hhhj%hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjʓubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjTubj)}(henum dma_resv_usage usageh](j )}(hj'+h]henum}(hhhj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubj )}(h h]h }(hhhjKhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj:ubh)}(hhh]j0 )}(hdma_resv_usageh]hdma_resv_usage}(hhhj\hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjYubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj^modnameN classnameNjdj)}j]jc.dma_resv_iter_beginasbuh1hhj:ubj )}(h h]h }(hhhjzhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj:ubj0 )}(husageh]husage}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj:ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjTubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj-hKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhj-hKubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjhhubj[ )}(hhh]h)}(h!initialize a dma_resv_iter objecth]h!initialize a dma_resv_iter object}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhj-hKubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j˔j} j˔j~ uh1j hhhjbhNhNubj )}(hX**Parameters** ``struct dma_resv_iter *cursor`` The dma_resv_iter object to initialize ``struct dma_resv *obj`` The dma_resv object which we want to iterate over ``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage.h](h)}(h**Parameters**h]j )}(hjՔh]h Parameters}(hhhjהhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjӔubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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}(hhhjhhhNhNubah}(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}(hjhj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj hKhjubj )}(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}(hhhj/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)}(h1The dma_resv object which we want to iterate overh]h1The dma_resv object which we want to iterate over}(hjHhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhKhjCubah}(h]h ]h"]h$]h&]uh1j hj'ubeh}(h]h ]h"]h$]h&]uh1j hjBhKhjubj )}(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)}(hjfh]henum dma_resv_usage usage}(hhhjhhhhNhNubah}(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.hhKhj`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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhj|ubah}(h]h ]h"]h$]h&]uh1j hj`ubeh}(h]h ]h"]h$]h&]uh1j hj{hKhjubeh}(h]h ]h"]h$]h&]uh1j hjϔubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_end (C function)c.dma_resv_iter_endhNtauh1j hjbhhhNhNubj )}(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](jl)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKubj )}(h h]h }(hhhjϕhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjΕhKubj* )}(hdma_resv_iter_endh]j0 )}(hdma_resv_iter_endh]hdma_resv_iter_end}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjݕubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjΕhKubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_resv_iterh]h dma_resv_iter}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_resv_iter_endasbuh1hhjubj )}(h h]h }(hhhj;hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hcursorh]hcursor}(hhhjVhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjΕhKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjΕhKubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjhhubj[ )}(hhh]h)}(hcleanup a dma_resv_iter objecth]hcleanup a dma_resv_iter object}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjΕhKubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjbhNhNubj )}(h**Parameters** ``struct dma_resv_iter *cursor`` the dma_resv_iter object which should be cleaned up **Description** Make sure that the reference to the fence in the cursor is properly dropped.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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}(hhhjĖhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(h3the dma_resv_iter object which should be cleaned uph]h3the dma_resv_iter object which should be cleaned up}(hjݖhjۖhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjזhKhjؖubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjזhKhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(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.}(hjhjhhhNhNubah}(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&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_usage (C function)c.dma_resv_iter_usagehNtauh1j hjbhhhNhNubj )}(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}(hhhjBhhhNhNubah}(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 }(hhhjPhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj>hhhjOhKubh)}(hhh]j0 )}(hdma_resv_usageh]hdma_resv_usage}(hhhjahhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj^ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjcmodnameN classnameNjdj)}j]ji)}j`dma_resv_iter_usagesbc.dma_resv_iter_usageasbuh1hhj>hhhjOhKubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj>hhhjOhKubj* )}(hdma_resv_iter_usageh]j0 )}(hjh]hdma_resv_iter_usage}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj>hhhjOhKubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_resv_iterh]h dma_resv_iter}(hhhj͗hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjʗubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjϗmodnameN classnameNjdj)}j]j}c.dma_resv_iter_usageasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hcursorh]hcursor}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj>hhhjOhKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj:hhhjOhKubah}(h]j5ah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj7hhubj[ )}(hhh]h)}(h%Return the usage of the current fenceh]h%Return the usage of the current fence}(hj3hj1hhhNhNubah}(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&]uh1jZ hj7hhhjOhKubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jIj} jIj~ uh1j hhhjbhNhNubj )}(h**Parameters** ``struct dma_resv_iter *cursor`` the cursor of the current position **Description** Returns the usage of the currently processed fence.h](h)}(h**Parameters**h]j )}(hjSh]h Parameters}(hhhjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjQubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjMubj )}(hhh]j )}(hD``struct dma_resv_iter *cursor`` the cursor of the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjrh]hstruct dma_resv_iter *cursor}(hhhjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjlubj )}(hhh]h)}(h"the cursor of the current positionh]h"the cursor of the current position}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjlubeh}(h]h ]h"]h$]h&]uh1j hjhKhjiubah}(h]h ]h"]h$]h&]uh1j hjMubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjMubh)}(h3Returns the usage of the currently processed fence.h]h3Returns the usage of the currently processed fence.}(hjŘhjØhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhKhjMubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_resv_iter_is_restarted (C function)c.dma_resv_iter_is_restartedhNtauh1j hjbhhhNhNubj )}(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](jl)}(hj_h]hbool}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM ubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhM ubj* )}(hdma_resv_iter_is_restartedh]j0 )}(hdma_resv_iter_is_restartedh]hdma_resv_iter_is_restarted}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhM ubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j )}(hj h]hstruct}(hhhj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubj )}(h h]h }(hhhj;hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj*ubh)}(hhh]j0 )}(h dma_resv_iterh]h dma_resv_iter}(hhhjLhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjIubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjNmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_resv_iter_is_restartedasbuh1hhj*ubj )}(h h]h }(hhhjlhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj*ubj~)}(hj h]h*}(hhhjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj*ubj0 )}(hcursorh]hcursor}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj*ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj&ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhM ubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM hjhhubj[ )}(hhh]h)}(h/test if this is the first fence after a restarth]h/test if this is the first fence after a restart}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhM ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jʙj} jʙj~ uh1j hhhjbhNhNubj )}(h**Parameters** ``struct dma_resv_iter *cursor`` the cursor with the current position **Description** Return true if this is the first fence in an iteration after a restart.h](h)}(h**Parameters**h]j )}(hjԙh]h Parameters}(hhhj֙hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjҙubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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}(hhhjhhhNhNubah}(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}(hjhj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM hjubah}(h]h ]h"]h$]h&]uh1j hjΙubh)}(h**Description**h]j )}(hj.h]h Description}(hhhj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j 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Ι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.}(hjFhjDhhhNhNubah}(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&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j *dma_resv_for_each_fence_unlocked (C macro)"c.dma_resv_for_each_fence_unlockedhNtauh1j hjbhhhNhNubj )}(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]j0 )}(hjmh]h dma_resv_for_each_fence_unlocked}(hhhjwhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjsubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjohhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM"ubah}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjkhhhjhM"ubah}(h]jfah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM!hjhhhubj[ )}(hhh]h}(h]h ]h"]h$]h&]uh1jZ hjhhhhjhM"ubeh}(h]h ](jmacroeh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjbhNhNubh)}(h4``dma_resv_for_each_fence_unlocked (cursor, fence)``h]j)}(hjh]h0dma_resv_for_each_fence_unlocked (cursor, fence)}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM#hjbhhubh)}(hhh]h)}(hunlocked fence iteratorh]hunlocked fence iterator}(hjŚhjÚhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubah}(h]h ]h"]h$]h&]uh1hhjbhhhNhNubj )}(hX**Parameters** ``cursor`` a struct dma_resv_iter pointer ``fence`` the current fence **Description** Iterate over the fences in a struct dma_resv object without holding the :c:type:`dma_resv.lock ` and using RCU instead. The cursor needs to be initialized with dma_resv_iter_begin() and cleaned up with dma_resv_iter_end(). Inside the iterator a reference to the dma_fence is held and the RCU lock dropped. Beware that the iterator can be restarted when the struct dma_resv for **cursor** is modified. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the lock iterator dma_resv_for_each_fence() whenever possible.h](h)}(h**Parameters**h]j )}(hjޚh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjܚubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjؚubj )}(hhh](j )}(h*``cursor`` a struct dma_resv_iter pointer h](j )}(h ``cursor``h]j)}(hjh]hcursor}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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)}(hj6h]hfence}(hhhj8hhhNhNubah}(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.hhMhj0ubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hjQhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhMhjLubah}(h]h ]h"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]uh1j hjKhMhjubeh}(h]h ]h"]h$]h&]uh1j hjؚubh)}(h**Description**h]j )}(hjqh]h Description}(hhhjshhhNhNubah}(h]h ]h"]h$]h&]uh1j hjoubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjؚubh)}(hX;Iterate over the fences in a struct dma_resv object without holding the :c:type:`dma_resv.lock ` and using RCU instead. The cursor needs to be initialized with dma_resv_iter_begin() and cleaned up with dma_resv_iter_end(). Inside the iterator a reference to the dma_fence is held and the RCU lock dropped.h](hHIterate over the fences in a struct dma_resv object without holding the }(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}(hhhjhhhNhNubah}(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.}(h 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&]uh1hhjhMhjؚubh)}(hXBeware that the iterator can be restarted when the struct dma_resv for **cursor** is modified. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the lock iterator dma_resv_for_each_fence() whenever possible.h](hGBeware that the iterator can be restarted when the struct dma_resv for }(hGBeware that the iterator can be restarted when the struct dma_resv for hjhhhNhNubj )}(h **cursor**h]hcursor}(hhhjěhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh 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 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.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjؚubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_resv_for_each_fence (C macro)c.dma_resv_for_each_fencehNtauh1j hjbhhhNhNubj )}(hhh](j )}(hdma_resv_for_each_fenceh]j )}(hdma_resv_for_each_fenceh]j* )}(hdma_resv_for_each_fenceh]j0 )}(hjh]hdma_resv_for_each_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM3ubah}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhM3ubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM2hjhhubj[ )}(hhh]h}(h]h ]h"]h$]h&]uh1jZ hjhhhjhM3ubeh}(h]h ](jmacroeh"]h$]h&]j{ jj| j/j} j/j~ uh1j hhhjbhNhNubh)}(h7``dma_resv_for_each_fence (cursor, obj, usage, fence)``h]j)}(hj5h]h3dma_resv_for_each_fence (cursor, obj, usage, fence)}(hhhj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM4hjbhhubh)}(hhh]h)}(hfence iteratorh]hfence iterator}(hjPhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM&hjKubah}(h]h ]h"]h$]h&]uh1hhjbhhhNhNubj )}(hX**Parameters** ``cursor`` a struct dma_resv_iter pointer ``obj`` a dma_resv object pointer ``usage`` controls which fences to return ``fence`` the current fence **Description** Iterate over the fences in a struct dma_resv object while holding the :c:type:`dma_resv.lock `. **all_fences** controls if the shared fences are returned as well. The cursor initialisation is part of the iterator and the fence stays valid as long as the lock is held and so no extra reference to the fence is taken.h](h)}(h**Parameters**h]j )}(hjih]h Parameters}(hhhjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjgubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM*hjcubj )}(hhh](j )}(h*``cursor`` a struct dma_resv_iter pointer h](j )}(h ``cursor``h]j)}(hjh]hcursor}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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)}(hjh]hobj}(hhhjÜ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.hhM(hjubj )}(hhh]h)}(ha dma_resv object pointerh]ha dma_resv object pointer}(hjܜhjڜhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj֜hM(hjלubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj֜hM(hjubj )}(h*``usage`` controls which fences to return h](j )}(h ``usage``h]j)}(hjh]husage}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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)}(hj3h]hfence}(hhhj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM*hj-ubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hjNhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhM*hjIubah}(h]h ]h"]h$]h&]uh1j hj-ubeh}(h]h ]h"]h$]h&]uh1j hjHhM*hjubeh}(h]h ]h"]h$]h&]uh1j hjcubh)}(h**Description**h]j )}(hjnh]h Description}(hhhjphhhNhNubah}(h]h ]h"]h$]h&]uh1j hjlubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM,hjcubh)}(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 }(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}(hhhjhhhNhNubah}(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. }(h. hjhhhNhNubj )}(h**all_fences**h]h all_fences}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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.}(h 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,hjcubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_lock (C function)c.dma_resv_lockhNtauh1j hjbhhhNhNubj )}(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](jl)}(hinth]hint}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMBubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMBubj* )}(h dma_resv_lockh]j0 )}(h dma_resv_lockh]h dma_resv_lock}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMBubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubj )}(h h]h }(hhhj5hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj$ubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjFhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjCubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjHmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_resv_lockasbuh1hhj$ubj )}(h h]h }(hhhjfhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj$ubj~)}(hj h]h*}(hhhjthhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj$ubj0 )}(hobjh]hobj}(hhhjhhhNhNubah}(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}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hww_acquire_ctxh]hww_acquire_ctx}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jbc.dma_resv_lockasbuh1hhjubj )}(h h]h }(hhhj֞hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hctxh]hctx}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMBubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhMBubah}(h]jޝah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMVhjhhubj[ )}(hhh]h)}(hlock the reservation objecth]hlock the reservation object}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhMBubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j4j} j4j~ uh1j hhhjbhNhNubj )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``struct ww_acquire_ctx *ctx`` the locking context **Description** Locks the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer. As the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as **ctx**. When a die situation is indicated by returning -EDEADLK all locks held by **ctx** must be unlocked and then dma_resv_lock_slow() called on **obj**. Unlocked by calling dma_resv_unlock(). See also dma_resv_lock_interruptible() for the interruptible variant.h](h)}(h**Parameters**h]j )}(hj>h]h Parameters}(hhhj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj<ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMEhj8ubj )}(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}(hhhj_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.hhMBhjWubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjxhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhMBhjsubah}(h]h ]h"]h$]h&]uh1j hjWubeh}(h]h ]h"]h$]h&]uh1j hjrhMBhjTubj )}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMChjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMChjTubeh}(h]h ]h"]h$]h&]uh1j hj8ubh)}(h**Description**h]j )}(hjџh]h Description}(hhhjӟhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjϟubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMEhj8ubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMEhj8ubh)}(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 }(hAs the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as hjhhhNhNubj )}(h**ctx**h]hctx}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh.}(hjhjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMJhj8ubh)}(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 }(hJWhen a die situation is indicated by returning -EDEADLK all locks held by hjhhhNhNubj )}(h**ctx**h]hctx}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh: must be unlocked and then dma_resv_lock_slow() called on }(h: must be unlocked and then dma_resv_lock_slow() called on hjhhhNhNubj )}(h**obj**h]hobj}(hhhj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh.}(hjhjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMOhj8ubh)}(h&Unlocked by calling dma_resv_unlock().h]h&Unlocked by calling dma_resv_unlock().}(hjOhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMRhj8ubh)}(hESee also dma_resv_lock_interruptible() for the interruptible variant.h]hESee also dma_resv_lock_interruptible() for the interruptible variant.}(hj^hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMThj8ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j (dma_resv_lock_interruptible (C function)c.dma_resv_lock_interruptiblehNtauh1j hjbhhhNhNubj )}(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](jl)}(hinth]hint}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM^ubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhM^ubj* )}(hdma_resv_lock_interruptibleh]j0 )}(hdma_resv_lock_interruptibleh]hdma_resv_lock_interruptible}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC 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}(hhhjȠhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjĠubj )}(h h]h }(hhhjՠhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjĠubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_resv_lock_interruptibleasbuh1hhjĠubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjĠubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjĠubj0 )}(hobjh]hobj}(hhhj!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}(hhhj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubj )}(h h]h }(hhhjGhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj6ubh)}(hhh]j0 )}(hww_acquire_ctxh]hww_acquire_ctx}(hhhjXhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjUubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjZmodnameN classnameNjdj)}j]jc.dma_resv_lock_interruptibleasbuh1hhj6ubj )}(h h]h }(hhhjvhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj6ubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj6ubj0 )}(hctxh]hctx}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj6ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM^ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhM^ubah}(h]j~ah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMqhjhhubj[ )}(hhh]h)}(hlock the reservation objecth]hlock the reservation object}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhM^ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jԡj} jԡj~ uh1j hhhjbhNhNubj )}(hX[**Parameters** ``struct dma_resv *obj`` the reservation object ``struct ww_acquire_ctx *ctx`` the locking context **Description** Locks the reservation object interruptible for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer. As the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as **ctx**. When a die situation is indicated by returning -EDEADLK all locks held by **ctx** must be unlocked and then dma_resv_lock_slow_interruptible() called on **obj**. Unlocked by calling dma_resv_unlock().h](h)}(h**Parameters**h]j )}(hjޡh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhj8hhhNhNubah}(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}(hjQhjOhhhNhNubah}(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]j )}(hjqh]h Description}(hhhjshhhNhNubah}(h]h ]h"]h$]h&]uh1j 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.}(hjhjhhhNhNubah}(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 }(hAs the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as hjhhhNhNubj )}(h**ctx**h]hctx}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh.}(hjhjhhhNhNubeh}(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 }(hJWhen a die situation is indicated by returning -EDEADLK all locks held by hjhhhNhNubj )}(h**ctx**h]hctx}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhH must be unlocked and then dma_resv_lock_slow_interruptible() called on }(hH must be unlocked and then dma_resv_lock_slow_interruptible() called on hjhhhNhNubj )}(h**obj**h]hobj}(hhhjԢhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh.}(hjhjhhhNhNubeh}(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().}(hjhjhhhNhNubah}(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&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_lock_slow (C function)c.dma_resv_lock_slowhNtauh1j hjbhhhNhNubj )}(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](jl)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMyubj )}(h h]h }(hhhj+hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhj*hMyubj* )}(hdma_resv_lock_slowh]j0 )}(hdma_resv_lock_slowh]hdma_resv_lock_slow}(hhhj=hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj9ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhj*hMyubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhjYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjUubj )}(h h]h }(hhhjfhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjUubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjwhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjtubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjymodnameN classnameNjdj)}j]ji)}j`j?sbc.dma_resv_lock_slowasbuh1hhjUubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjUubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjUubj0 )}(hobjh]hobj}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjUubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjQubj)}(hstruct ww_acquire_ctx *ctxh](j )}(hj h]hstruct}(hhhjˣhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjǣubj )}(h h]h }(hhhjأhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjǣubh)}(hhh]j0 )}(hww_acquire_ctxh]hww_acquire_ctx}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_resv_lock_slowasbuh1hhjǣubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjǣubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjǣubj0 )}(hctxh]hctx}(hhhj"hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjǣubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjQubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj*hMyubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhj*hMyubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjhhubj[ )}(hhh]h)}(h$slowpath lock the reservation objecth]h$slowpath lock the reservation object}(hjOhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMxhjJhhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhj*hMyubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jej} jej~ uh1j hhhjbhNhNubj )}(hX_**Parameters** ``struct dma_resv *obj`` the reservation object ``struct ww_acquire_ctx *ctx`` the locking context **Description** Acquires the reservation object after a die case. This function will sleep until the lock becomes available. See dma_resv_lock() as well. See also dma_resv_lock_slow_interruptible() for the interruptible variant.h](h)}(h**Parameters**h]j )}(hjoh]h Parameters}(hhhjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjmubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM|hjiubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjɤ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.hhMzhjubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjhjhhhNhNubah}(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 hjiubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM|hjiubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhM|hjiubh)}(hJSee also dma_resv_lock_slow_interruptible() for the interruptible variant.h]hJSee also dma_resv_lock_slow_interruptible() for the interruptible variant.}(hj)hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjiubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j -dma_resv_lock_slow_interruptible (C function)"c.dma_resv_lock_slow_interruptiblehNtauh1j hjbhhhNhNubj )}(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](jl)}(hinth]hint}(hhhjVhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjRhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hhhjehhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjRhhhjdhMubj* )}(h dma_resv_lock_slow_interruptibleh]j0 )}(h dma_resv_lock_slow_interruptibleh]h dma_resv_lock_slow_interruptible}(hhhjwhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjsubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjRhhhjdhMubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jysb"c.dma_resv_lock_slow_interruptibleasbuh1hhjubj )}(h h]h }(hhhjѥhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjߥhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hobjh]hobj}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct ww_acquire_ctx *ctxh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hww_acquire_ctxh]hww_acquire_ctx}(hhhj#hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj%modnameN classnameNjdj)}j]jͥ"c.dma_resv_lock_slow_interruptibleasbuh1hhjubj )}(h h]h }(hhhjAhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hctxh]hctx}(hhhj\hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjRhhhjdhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjNhhhjdhMubah}(h]jIah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjKhhubj[ )}(hhh]h)}(h3slowpath lock the reservation object, interruptibleh]h3slowpath lock the reservation object, interruptible}(hjhjhhhNhNubah}(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&]uh1jZ hjKhhhjdhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjbhNhNubj )}(hX/**Parameters** ``struct dma_resv *obj`` the reservation object ``struct ww_acquire_ctx *ctx`` the locking context **Description** Acquires the reservation object interruptible after a die case. This function will sleep until the lock becomes available. See dma_resv_lock_interruptible() as well.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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}(hhhjʦ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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjݦhMhjަubah}(h]h ]h"]h$]h&]uh1j hj¦ubeh}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj<h]h Description}(hhhj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj:ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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.}(hjThjRhhhNhNubah}(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&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_trylock (C function)c.dma_resv_trylockhNtauh1j hjbhhhNhNubj )}(hhh](j )}(h,bool dma_resv_trylock (struct dma_resv *obj)h]j )}(h+bool dma_resv_trylock(struct dma_resv *obj)h](jl)}(hj_h]hbool}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj}hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj}hhhjhMubj* )}(hdma_resv_trylockh]j0 )}(hdma_resv_trylockh]hdma_resv_trylock}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj}hhhjhMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjʧhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjۧhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjاubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjݧmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_resv_trylockasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hobjh]hobj}(hhhjhhhNhNubah}(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&]jjjM uh1j jN jO hjyhhhjhMubah}(h]jtah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjvhhubj[ )}(hhh]h)}(htrylock the reservation objecth]htrylock the reservation object}(hjChjAhhhNhNubah}(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&]uh1jZ hjvhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jYj} jYj~ uh1j hhhjbhNhNubj )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Tries to lock the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer. Also note that since no context is provided, no deadlock protection is possible, which is also not needed for a trylock. Returns true if the lock was acquired, false otherwise.h](h)}(h**Parameters**h]j )}(hjch]h Parameters}(hhhjehhhNhNubah}(h]h ]h"]h$]h&]uh1j hjaubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj]ubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hhhjhhhNhNubah}(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.hhMhj|ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]uh1j hjhMhjyubah}(h]h ]h"]h$]h&]uh1j hj]ubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj]ubh)}(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ըhjӨhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj]ubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj]ubh)}(h7Returns true if the lock was acquired, false otherwise.h]h7Returns true if the lock was acquired, false otherwise.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhj]ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_is_locked (C function)c.dma_resv_is_lockedhNtauh1j hjbhhhNhNubj )}(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](jl)}(hj_h]hbool}(hhhj hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hhhj.hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhj-hMubj* )}(hdma_resv_is_lockedh]j0 )}(hdma_resv_is_lockedh]hdma_resv_is_locked}(hhhj@hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj<ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhj-hMubj)}(h(struct dma_resv *obj)h]>j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjXubj )}(h h]h }(hhhjihhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjXubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjzhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjwubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj|modnameN classnameNjdj)}j]ji)}j`jBsbc.dma_resv_is_lockedasbuh1hhjXubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjXubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjXubj0 )}(hobjh]hobj}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjXubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjTubah}(h]h ]h"]h$]h&]jjuh1jhjhhhj-hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhj-hMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjhhubj[ )}(hhh]h)}(h is the reservation object lockedh]h is the reservation object locked}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhj-hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjbhNhNubj )}(h**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Returns true if the mutex is locked, false if unlocked.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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}(hhhj#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<hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hMhj7ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj6hMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj\h]h Description}(hhhj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjZubah}(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.}(hjthjrhhhNhNubah}(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&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_resv_locking_ctx (C function)c.dma_resv_locking_ctxhNtauh1j hjbhhhNhNubj )}(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}(hhhjhhhNhNubah}(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 }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubh)}(hhh]j0 )}(hww_acquire_ctxh]hww_acquire_ctx}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjªmodnameN classnameNjdj)}j]ji)}j`dma_resv_locking_ctxsbc.dma_resv_locking_ctxasbuh1hhjhhhjhMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjhhhjhMubj* )}(hdma_resv_locking_ctxh]j0 )}(hjުh]hdma_resv_locking_ctx}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhj(hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhj9hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj6ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj;modnameN classnameNjdj)}j]jܪc.dma_resv_locking_ctxasbuh1hhjubj )}(h h]h }(hhhjWhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjehhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hobjh]hobj}(hhhjrhhhNhNubah}(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&]jjjM uh1j jN jO hjhhhjhMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjhhubj[ )}(hhh]h)}(h+returns the context used to lock the objecth]h+returns the context used to lock the object}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjbhNhNubj )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Returns the context used to lock a reservation object or NULL if no context was used or the object is not locked at all. WARNING: This interface is pretty horrible, but TTM needs it because it doesn't pass the struct ww_acquire_ctx around in some very long callchains. Everyone else just uses it to check whether they're holding a reservation or not.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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.}(hj1hj/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.}(hj@hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_unlock (C function)c.dma_resv_unlockhNtauh1j hjbhhhNhNubj )}(hhh](j )}(h+void dma_resv_unlock (struct dma_resv *obj)h]j )}(h*void dma_resv_unlock(struct dma_resv *obj)h](jl)}(hvoidh]hvoid}(hhhjmhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjihhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMubj )}(h h]h }(hhhj|hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjihhhj{hMubj* )}(hdma_resv_unlockh]j0 )}(hdma_resv_unlockh]hdma_resv_unlock}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjihhhj{hMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hdma_resvh]hdma_resv}(hhhjȬhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjŬubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjʬmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_resv_unlockasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hobjh]hobj}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjihhhj{hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjehhhj{hMubah}(h]j`ah ](jS jT eh"]h$]h&]jX uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjbhhubj[ )}(hhh]h)}(hunlock the reservation objecth]hunlock the reservation object}(hj0hj.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&]uh1jZ hjbhhhj{hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jFj} jFj~ uh1j hhhjbhNhNubj )}(h**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Unlocks the reservation object following exclusive access.h](h)}(h**Parameters**h]j )}(hjPh]h Parameters}(hhhjRhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjJubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjoh]hstruct dma_resv *obj}(hhhjqhhhNhNubah}(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.hhMhjiubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhjhhhNhNubah}(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]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjJubh)}(h:Unlocks the reservation object following exclusive access.h]h:Unlocks the reservation object following exclusive access.}(hj­hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:162: ./include/linux/dma-resv.hhMhjJubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjbhhhNhNubeh}(h]reservation-objectsah ]h"]reservation objectsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h DMA Fencesh]h DMA Fences}(hjhjhhhNhNubah}(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 }(hDMA fences, represented by hjhhhNhNubh)}(h&:c:type:`struct dma_fence `h]j)}(hjh]hstruct dma_fence}(hhhjhhhNhNubah}(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.}(h, are the kernel internal synchronization primitive for DMA operations like GPU rendering, video encoding/decoding, or displaying buffers on a screen.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK(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.}(hj%hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:168: ./drivers/dma-buf/dma-fence.chK,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:}(hj4hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:168: ./drivers/dma-buf/dma-fence.chK1hjޭ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 }(h&Individual fences can be exposed as a hjHhhhNhNubh)}(h:c:type:`sync_file`h]j)}(hjSh]h sync_file}(hhhjUhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjQubah}(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.chK4hjHubh, 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, 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.hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjphK4hjDubah}(h]h ]h"]h$]h&]uh1hhjAubh)}(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 }(hFSome subsystems also have their own explicit fencing primitives, like hjhhhNhNubh)}(h:c:type:`drm_syncobj`h]j)}(hjh]h drm_syncobj}(hhhjhhhNhNubah}(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.chK9hjubh. Compared to }(h. Compared to hjhhhNhNubh)}(h:c:type:`sync_file`h]j)}(hjh]h sync_file}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj sync_fileuh1hhjhK9hjubh, a }(h, a hjhhhNhNubh)}(h:c:type:`drm_syncobj`h]j)}(hjڮh]h drm_syncobj}(hhhjܮhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjخubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj drm_syncobjuh1hhjhK9hjubh+ allows the underlying fence to be updated.}(h+ allows the underlying fence to be updated.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK9hjubah}(h]h ]h"]h$]h&]uh1hhjAubh)}(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 }(htThen there's also implicit fencing, where the synchronization points are implicitly passed around as part of shared hj hhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjh]hdma_buf}(hhhjhhhNhNubah}(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=hj ubh/ instances. Such implicit fences are stored in }(h/ instances. Such implicit fences are stored in hj hhhNhNubh)}(h$:c:type:`struct dma_resv `h]j)}(hj<h]hstruct dma_resv}(hhhj>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hhj4hK=hj ubh through the }(h through the hj hhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hj`h]h dma_buf.resv}(hhhjbhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hhj4hK=hj ubh pointer.}(h pointer.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj4hK=hjubah}(h]h ]h"]h$]h&]uh1hhjAubeh}(h]h ]h"]h$]h&]j=j>uh1hhjphK4hjޭhhubh)}(hhh](h)}(hDMA Fence Cross-Driver Contracth]hDMA Fence Cross-Driver Contract}(hjhjhhhNhNubah}(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 }(hSince hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hhhjhhhNhNubah}(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.chKFhjubhI provide a cross driver contract, all drivers must follow the same rules:}(hI provide a cross driver contract, all drivers must follow the same rules:hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjͯhKFhjhhubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKIhjܯ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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKRhjubah}(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().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKXhjubah}(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 }(hDrivers are allowed to call dma_fence_wait() while holding dma_resv_lock(). This means any code required for fence completion cannot acquire a hj+hhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hj6h]hdma_resv}(hhhj8hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj4ubah}(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]hj+ubhz lock. Note that this also pulls in the entire established locking hierarchy around dma_resv_lock() and dma_resv_unlock().}(hz lock. Note that this also pulls in the entire established locking hierarchy around dma_resv_lock() and dma_resv_unlock().hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjShK]hj'ubah}(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 }(h8Drivers are allowed to call dma_fence_wait() from their hjihhhNhNubh)}(h:c:type:`shrinker`h]j)}(hjth]hshrinker}(hhhjvhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:174: ./drivers/dma-buf/dma-fence.chKbhjiubhe callbacks. This means any code required for fence completion cannot allocate memory with GFP_KERNEL.}(he callbacks. This means any code required for fence completion cannot allocate memory with GFP_KERNEL.hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKbhjeubah}(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 }(h8Drivers are allowed to call dma_fence_wait() from their hjhhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hjh]h mmu_notifier}(hhhjhhhNhNubah}(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.chKfhjubh respectively }(h respectively hjhhhNhNubh)}(h:c:type:`mmu_interval_notifier`h]j)}(hjװh]hmmu_interval_notifier}(hhhjٰhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjհubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmmu_interval_notifieruh1hhjϰhKfhjubh 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 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&]uh1hhjϰhKfhjubah}(h]h ]h"]h$]h&]uh1hhjٯubeh}(h]h ]h"]h$]h&]j=j uh1hhjhKIhjhhubh)}(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 }(hGNote that only GPU drivers have a reasonable excuse for both requiring hj hhhNhNubh)}(h:c:type:`mmu_interval_notifier`h]j)}(hjh]hmmu_interval_notifier}(hhhjhhhNhNubah}(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.chKkhj ubh and }(h and hj hhhNhNubh)}(h:c:type:`shrinker`h]j)}(hj;h]hshrinker}(hhhj=hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hhj3hKkhj ubhO callbacks at the same time as having to track asynchronous compute work using }(hO callbacks at the same time as having to track asynchronous compute work using hj hhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hj_h]h dma_fence}(hhhjahhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhj3hKkhj ubhV. No driver outside of drivers/gpu should ever call dma_fence_wait() in such contexts.}(hV. No driver outside of drivers/gpu should ever call dma_fence_wait() in such contexts.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj3hKkhjhhubeh}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hProving correctness of all the kernel code around :c:type:`dma_fence` through code review and testing is tricky for a few reasons:h](h2Proving correctness of all the kernel code around }(h2Proving correctness of all the kernel code around hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hhhjhhhNhNubah}(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= through code review and testing is tricky for a few reasons:}(h= through code review and testing is tricky for a few reasons:hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjȱhKhjhhubh)}(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.}(hjݱhj۱hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjױubah}(h]h ]h"]h$]h&]uh1hhjԱubh)}(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 }(hX,There is an enormous amount of driver code involved. For render drivers there's the tail of command submission, after fences are published, scheduler code, interrupt and workers to process job completion, and timeout, gpu reset and gpu hang recovery code. Plus for integration with core mm with have hjhhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hjh]h mmu_notifier}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjubh, respectively }(h, respectively hjhhhNhNubh)}(h:c:type:`mmu_interval_notifier`h]j)}(hj$h]hmmu_interval_notifier}(hhhj&hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmmu_interval_notifieruh1hhjhKhjubh, and }(h, and hjhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hjHh]hshrinker}(hhhjJhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hhjhKhjubhX. 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.}(hX. For modesetting drivers there's the commit tail functions between when fences for an atomic modeset are published, and when the corresponding vblank completes, including any interrupt processing and related workers. Auditing all that code, across all drivers, is not feasible.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1hhjԱubh)}(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. }(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. hjzhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hhhjhhhNhNubah}(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.chKhjzubhW interacts with almost all of the core memory handling through page fault handlers via }(hW interacts with almost all of the core memory handling through page fault handlers via hjzhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjh]hdma_resv}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hhjhKhjzubhr, dma_resv_lock() and dma_resv_unlock(). On the other side it also interacts through all allocation sites through }(hr, dma_resv_lock() and dma_resv_unlock(). On the other side it also interacts through all allocation sites through hjzhhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hjβh]h mmu_notifier}(hhhjвhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj̲ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hhjhKhjzubh and }(h and hjzhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hjh]hshrinker}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hhjhKhjzubh.}(hjhjzhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjvubah}(h]h ]h"]h$]h&]uh1hhjԱubeh}(h]h ]h"]h$]h&]j=j uh1hhjhKhjhhubh)}(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 }(hFurthermore lockdep does not handle cross-release dependencies, which means any deadlocks between dma_fence_wait() and dma_fence_signal() can't be caught at runtime with some quick testing. The simplest example is one thread waiting on a hj%hhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hj0h]h dma_fence}(hhhj2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhj%ubh while holding a lock:}(h while holding a lock:hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjMhKhjhhubj)}(h&lock(A); dma_fence_wait(B); unlock(A);h]h&lock(A); dma_fence_wait(B); unlock(A);}(hhhjYubah}(h]h ]h"]h$]h&]jjuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjhhubh)}(hwhile the other thread is stuck trying to acquire the same lock, which prevents it from signalling the fence the previous thread is stuck waiting on::h]hwhile the other thread is stuck trying to acquire the same lock, which prevents it from signalling the fence the previous thread is stuck waiting on:}(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:hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjhhubj)}(h(lock(A); unlock(A); dma_fence_signal(B);h]h(lock(A); unlock(A); dma_fence_signal(B);}(hhhjxubah}(h]h ]h"]h$]h&]jjuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjhhubh)}(hBy manually annotating all code relevant to signalling a :c:type:`dma_fence` we can teach lockdep about these dependencies, which also helps with the validation headache since now lockdep can check all the rules for us::h](h9By manually annotating all code relevant to signalling a }(h9By manually annotating all code relevant to signalling a hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjubh we can teach lockdep about these dependencies, which also helps with the validation headache since now lockdep can check all the rules for us:}(h we can teach lockdep about these dependencies, which also helps with the validation headache since now lockdep can check all the rules for us:hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjhhubj)}(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);}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjhhubh)}(hFor using dma_fence_begin_signalling() and dma_fence_end_signalling() to annotate critical sections the following rules need to be observed:h]hFor using dma_fence_begin_signalling() and dma_fence_end_signalling() to annotate critical sections the following rules need to be observed:}(hj̳hjʳhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chKhjhhubh)}(hhh](h)}(hXgAll code necessary to complete a :c:type:`dma_fence` must be annotated, from the point where a fence is accessible to other threads, to the point where dma_fence_signal() is called. Un-annotated code can contain deadlock issues, and due to the very strict rules and many corner cases it is infeasible to catch these just with review or normal stress testing. h]h)}(hXfAll code necessary to complete a :c:type:`dma_fence` must be annotated, from the point where a fence is accessible to other threads, to the point where dma_fence_signal() is called. Un-annotated code can contain deadlock issues, and due to the very strict rules and many corner cases it is infeasible to catch these just with review or normal stress testing.h](h!All code necessary to complete a }(h!All code necessary to complete a hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hhhjhhhNhNubah}(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.}(hX2 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&]uh1hhjhKhjܳubah}(h]h ]h"]h$]h&]uh1hhjٳubh)}(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)}(hj$h]hstruct dma_resv}(hhhj&hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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.}(h 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&]uh1hhjAhMhjubah}(h]h ]h"]h$]h&]uh1hhjٳubh)}(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 }(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 hjWhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjbh]h dma_fence}(hhhjdhhhNhNubah}(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.chMhjWubh. 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. 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.hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjSubah}(h]h ]h"]h$]h&]uh1hhjٳubh)}(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().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chMhjubah}(h]h ]h"]h$]h&]uh1hhjٳubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:180: ./drivers/dma-buf/dma-fence.chMhjubah}(h]h ]h"]h$]h&]uh1hhjٳubeh}(h]h ]h"]h$]h&]j=j uh1hhjhKhjhhubeh}(h] dma-fence-signalling-annotationsah ]h"] dma fence signalling annotationsah$]h&]uh1hhjޭhhhhhKubh)}(hhh](h)}(hDMA Fence Deadline Hintsh]hDMA Fence Deadline Hints}(hjִhjԴhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjѴhhhhhKubh)}(hX`In an ideal world, it would be possible to pipeline a workload sufficiently that a utilization based device frequency governor could arrive at a minimum frequency that meets the requirements of the use-case, in order to minimize power consumption. But in the real world there are many workloads which defy this ideal. For example, but not limited to:h]hX`In an ideal world, it would be possible to pipeline a workload sufficiently that a utilization based device frequency governor could arrive at a minimum frequency that meets the requirements of the use-case, in order to minimize power consumption. But in the real world there are many workloads which defy this ideal. For example, but not limited to:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhjѴhhubh)}(hhh](h)}(hWorkloads that ping-pong between device and CPU, with alternating periods of CPU waiting for device, and device waiting on CPU. This can result in devfreq and cpufreq seeing idle time in their respective domains and in result reduce frequency. h]h)}(hWorkloads that ping-pong between device and CPU, with alternating periods of CPU waiting for device, and device waiting on CPU. This can result in devfreq and cpufreq seeing idle time in their respective domains and in result reduce frequency.h]hWorkloads that ping-pong between device and CPU, with alternating periods of CPU waiting for device, and device waiting on CPU. This can result in devfreq and cpufreq seeing idle time in their respective domains and in result reduce frequency.}(hjhjhhhNhNubah}(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 }(hWorkloads that interact with a periodic time based deadline, such as double buffered GPU rendering vs vblank sync'd page flipping. In this scenario, missing a vblank deadline results in an hjhhhNhNubj/)}(h *increase*h]hincrease}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j.hjubh 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 in idle time on the GPU (since it has to wait an additional vblank period), sending a signal to the GPU's devfreq to reduce frequency, when in fact the opposite is what is needed.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhj ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]j=j uh1hhjhMhjѴhhubh)}(hX>To this end, deadline hint(s) can be set on a :c:type:`dma_fence` via :c:type:`dma_fence_set_deadline` (or indirectly via userspace facing ioctls like :c:type:`sync_set_deadline`). The deadline hint provides a way for the waiting driver, or userspace, to convey an appropriate sense of urgency to the signaling driver.h](h.To this end, deadline hint(s) can be set on a }(h.To this end, deadline hint(s) can be set on a hj@hhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjKh]h dma_fence}(hhhjMhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjIubah}(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.chMhj@ubh via }(h via hj@hhhNhNubh)}(h :c:type:`dma_fence_set_deadline`h]j)}(hjph]hdma_fence_set_deadline}(hhhjrhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_fence_set_deadlineuh1hhjhhMhj@ubh1 (or indirectly via userspace facing ioctls like }(h1 (or indirectly via userspace facing ioctls like hj@hhhNhNubh)}(h:c:type:`sync_set_deadline`h]j)}(hjh]hsync_set_deadline}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsync_set_deadlineuh1hhjhhMhj@ubh). The deadline hint provides a way for the waiting driver, or userspace, to convey an appropriate sense of urgency to the signaling driver.}(h). The deadline hint provides a way for the waiting driver, or userspace, to convey an appropriate sense of urgency to the signaling driver.hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhhMhjѴhhubh)}(hXrA deadline hint is given in absolute ktime (CLOCK_MONOTONIC for userspace facing APIs). The time could either be some point in the future (such as the vblank based deadline for page-flipping, or the start of a compositor's composition cycle), or the current time to indicate an immediate deadline hint (Ie. forward progress cannot be made until this fence is signaled).h]hXtA deadline hint is given in absolute ktime (CLOCK_MONOTONIC for userspace facing APIs). The time could either be some point in the future (such as the vblank based deadline for page-flipping, or the start of a compositor’s composition cycle), or the current time to indicate an immediate deadline hint (Ie. forward progress cannot be made until this fence is signaled).}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhjѴhhubh)}(hMultiple deadlines may be set on a given fence, even in parallel. See the documentation for :c:type:`dma_fence_ops.set_deadline `.h](h]Multiple deadlines may be set on a given fence, even in parallel. See the documentation for }(h]Multiple deadlines may be set on a given fence, even in parallel. See the documentation for hj˵hhhNhNubh)}(h4:c:type:`dma_fence_ops.set_deadline `h]j)}(hjֵh]hdma_fence_ops.set_deadline}(hhhjصhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjԵubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhj˵ubh.}(hjhj˵hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjѴhhubh)}(hThe deadline hint is just that, a hint. The driver that created the fence may react by increasing frequency, making different scheduling choices, etc. Or doing nothing at all.h]hThe deadline hint is just that, a hint. The driver that created the fence may react by increasing frequency, making different scheduling choices, etc. Or doing nothing at all.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:186: ./drivers/dma-buf/dma-fence.chMhjѴhhubeh}(h]dma-fence-deadline-hintsah ]h"]dma fence deadline hintsah$]h&]uh1hhjޭhhhhhKubh)}(hhh](h)}(hDMA Fences Functions Referenceh]hDMA Fences Functions Reference}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_get_stub (C function)c.dma_fence_get_stubhNtauh1j hjhhhNhNubj )}(hhh](j )}(h,struct dma_fence * dma_fence_get_stub (void)h]j )}(h*struct dma_fence *dma_fence_get_stub(void)h](j )}(hj h]hstruct}(hhhj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chK~ubj )}(h h]h }(hhhjMhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj;hhhjLhK~ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj^hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj[ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj`modnameN classnameNjdj)}j]ji)}j`dma_fence_get_stubsbc.dma_fence_get_stubasbuh1hhj;hhhjLhK~ubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj;hhhjLhK~ubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj;hhhjLhK~ubj* )}(hdma_fence_get_stubh]j0 )}(hj|h]hdma_fence_get_stub}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj;hhhjLhK~ubj)}(h(void)h]j)}(hvoidh]jl)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubah}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj;hhhjLhK~ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj7hhhjLhK~ubah}(h]j2ah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhj4hhubj[ )}(hhh]h)}(hreturn a signaled fenceh]hreturn a signaled fence}(hjhjhhhNhNubah}(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&]uh1jZ hj4hhhjLhK~ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(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]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]j )}(h``void`` no arguments h](j )}(h``void``h]j)}(hj%h]hvoid}(hhhj'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.chKhjubj )}(hhh]h)}(h no argumentsh]h no arguments}(hj@hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hKhj;ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj:hKhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj`h]h Description}(hhhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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)}(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.}(hjxhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j ,dma_fence_allocate_private_stub (C function)!c.dma_fence_allocate_private_stubhNtauh1j hjhhhNhNubj )}(hhh](j )}(hFstruct dma_fence * dma_fence_allocate_private_stub (ktime_t timestamp)h]j )}(hDstruct dma_fence *dma_fence_allocate_private_stub(ktime_t timestamp)h](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhKubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjķhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjƷmodnameN classnameNjdj)}j]ji)}j`dma_fence_allocate_private_stubsb!c.dma_fence_allocate_private_stubasbuh1hhjhhhjhKubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhKubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjhhhjhKubj* )}(hdma_fence_allocate_private_stubh]j0 )}(hjh]hdma_fence_allocate_private_stub}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhKubj)}(h(ktime_t timestamp)h]j)}(hktime_t timestamph](h)}(hhh]j0 )}(hktime_th]hktime_t}(hhhj"hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj$modnameN classnameNjdj)}j]j!c.dma_fence_allocate_private_stubasbuh1hhjubj )}(h h]h }(hhhj@hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(h timestamph]h timestamp}(hhhjNhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhKubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjhhubj[ )}(hhh]h)}(h return a private, signaled fenceh]h return a private, signaled fence}(hj{hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjvhhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(h**Parameters** ``ktime_t timestamp`` timestamp when the fence was signaled **Description** Return a newly allocated and signaled stub fence.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]j )}(h<``ktime_t timestamp`` timestamp when the fence was signaled h](j )}(h``ktime_t timestamp``h]j)}(hjh]hktime_t timestamp}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]h)}(h%timestamp when the fence was signaledh]h%timestamp when the fence was signaled}(hjոhjӸhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjϸhKhjиubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjϸhKhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubh)}(h1Return a newly allocated and signaled stub fence.h]h1Return a newly allocated and signaled stub fence.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_fence_context_alloc (C function)c.dma_fence_context_allochNtauh1j hjhhhNhNubj )}(hhh](j )}(h*u64 dma_fence_context_alloc (unsigned num)h]j )}(h)u64 dma_fence_context_alloc(unsigned num)h](h)}(hhh]j0 )}(hu64h]hu64}(hhhj=hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj:ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj?modnameN classnameNjdj)}j]ji)}j`dma_fence_context_allocsbc.dma_fence_context_allocasbuh1hhj6hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKubj )}(h h]h }(hhhj_hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj6hhhj^hKubj* )}(hdma_fence_context_alloch]j0 )}(hj[h]hdma_fence_context_alloc}(hhhjqhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjmubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj6hhhj^hKubj)}(h(unsigned num)h]j)}(h unsigned numh](jl)}(hunsignedh]hunsigned}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(hnumh]hnum}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj6hhhj^hKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj2hhhj^hKubah}(h]j-ah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhj/hhubj[ )}(hhh]h)}(h#allocate an array of fence contextsh]h#allocate an array of fence contexts}(hjչhjӹhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjйhhubah}(h]h ]h"]h$]h&]uh1jZ hj/hhhj^hKubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hX6**Parameters** ``unsigned num`` amount of contexts to allocate **Description** This function will return the first index of the number of fence contexts allocated. The fence context is used for setting :c:type:`dma_fence.context ` to a unique number by passing the context to dma_fence_init().h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]j )}(h0``unsigned num`` amount of contexts to allocate h](j )}(h``unsigned num``h]j)}(hjh]h unsigned num}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]h)}(hamount of contexts to allocateh]hamount of contexts to allocate}(hj/hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hKhj*ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj)hKhj ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjOh]h Description}(hhhjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjMubah}(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 }(h|This function will return the first index of the number of fence contexts allocated. The fence context is used for setting hjehhhNhNubh)}(h':c:type:`dma_fence.context `h]j)}(hjph]hdma_fence.context}(hhhjrhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjnubah}(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.chKhjeubh? to a unique number by passing the context to dma_fence_init().}(h? to a unique number by passing the context to dma_fence_init().hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_begin_signalling (C function)c.dma_fence_begin_signallinghNtauh1j hjhhhNhNubj )}(hhh](j )}(h&bool dma_fence_begin_signalling (void)h]j )}(h%bool dma_fence_begin_signalling(void)h](jl)}(hj_h]hbool}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM"ubj )}(h h]h }(hhhjǺhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjƺhM"ubj* )}(hdma_fence_begin_signallingh]j0 )}(hdma_fence_begin_signallingh]hdma_fence_begin_signalling}(hhhjٺhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjպubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjƺhM"ubj)}(h(void)h]j)}(hvoidh]jl)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubah}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjƺhM"ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjƺhM"ubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM.hjhhubj[ )}(hhh]h)}(h-begin a critical DMA fence signalling sectionh]h-begin a critical DMA fence signalling section}(hj"hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM!hjhhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhjƺhM"ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j8j} j8j~ uh1j hhhjhNhNubj )}(hX**Parameters** ``void`` no arguments **Description** Drivers should use this to annotate the beginning of any code section required to eventually complete :c:type:`dma_fence` by calling dma_fence_signal(). The end of these critical sections are annotated with dma_fence_end_signalling(). Opaque cookie needed by the implementation, which needs to be passed to dma_fence_end_signalling(). **Return**h](h)}(h**Parameters**h]j )}(hjBh]h Parameters}(hhhjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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 )}(h``void`` no arguments h](j )}(h``void``h]j)}(hjah]hvoid}(hhhjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM(hj[ubj )}(hhh]h)}(h no argumentsh]h no arguments}(hj|hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhM(hjwubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hjvhM(hjXubah}(h]h ]h"]h$]h&]uh1j hj<ubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM*hj<ubh)}(hDrivers should use this to annotate the beginning of any code section required to eventually complete :c:type:`dma_fence` by calling dma_fence_signal().h](hfDrivers should use this to annotate the beginning of any code section required to eventually complete }(hfDrivers should use this to annotate the beginning of any code section required to eventually complete hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM#hjubh by calling dma_fence_signal().}(h by calling dma_fence_signal().hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjڻhM#hj<ubh)}(hQThe end of these critical sections are annotated with dma_fence_end_signalling().h]hQThe end of these critical sections are annotated with dma_fence_end_signalling().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM&hj<ubh)}(hcOpaque cookie needed by the implementation, which needs to be passed to dma_fence_end_signalling().h]hcOpaque cookie needed by the implementation, which needs to be passed to dma_fence_end_signalling().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM)hj<ubh)}(h **Return**h]j )}(hjh]hReturn}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM,hj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j %dma_fence_end_signalling (C function)c.dma_fence_end_signallinghNtauh1j hjhhhNhNubj )}(hhh](j )}(h+void dma_fence_end_signalling (bool cookie)h]j )}(h*void dma_fence_end_signalling(bool cookie)h](jl)}(hvoidh]hvoid}(hhhj<hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj8hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMAubj )}(h h]h }(hhhjKhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj8hhhjJhMAubj* )}(hdma_fence_end_signallingh]j0 )}(hdma_fence_end_signallingh]hdma_fence_end_signalling}(hhhj]hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjYubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj8hhhjJhMAubj)}(h (bool cookie)h]j)}(h bool cookieh](jl)}(hj_h]hbool}(hhhjyhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjuubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjuubj0 )}(hcookieh]hcookie}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjuubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjqubah}(h]h ]h"]h$]h&]jjuh1jhj8hhhjJhMAubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj4hhhjJhMAubah}(h]j/ah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMEhj1hhubj[ )}(hhh]h)}(h+end a critical DMA fence signalling sectionh]h+end a critical DMA fence signalling section}(hjhjhhhNhNubah}(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&]uh1jZ hj1hhhjJhMAubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j׼j} j׼j~ uh1j hhhjhNhNubj )}(h**Parameters** ``bool cookie`` opaque cookie from dma_fence_begin_signalling() **Description** Closes a critical section annotation opened by dma_fence_begin_signalling().h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj߼ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMDhjۼubj )}(hhh]j )}(h@``bool cookie`` opaque cookie from dma_fence_begin_signalling() h](j )}(h``bool cookie``h]j)}(hjh]h bool cookie}(hhhjhhhNhNubah}(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()}(hjhjhhhNhNubah}(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]j )}(hj;h]h Description}(hhhj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj9ubah}(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().}(hjShjQhhhNhNubah}(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&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j .dma_fence_signal_timestamp_locked (C function)#c.dma_fence_signal_timestamp_lockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(hRint dma_fence_signal_timestamp_locked (struct dma_fence *fence, ktime_t timestamp)h]j )}(hQint dma_fence_signal_timestamp_locked(struct dma_fence *fence, ktime_t timestamp)h](jl)}(hinth]hint}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj|hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM_ubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj|hhhjhM_ubj* )}(h!dma_fence_signal_timestamp_lockedh]j0 )}(h!dma_fence_signal_timestamp_lockedh]h!dma_fence_signal_timestamp_locked}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj|hhhjhM_ubj)}(h,(struct dma_fence *fence, ktime_t timestamp)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjʽhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj۽hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjؽubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjݽmodnameN classnameNjdj)}j]ji)}j`jsb#c.dma_fence_signal_timestamp_lockedasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hktime_t timestamph](h)}(hhh]j0 )}(hktime_th]hktime_t}(hhhj2hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj/ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj4modnameN classnameNjdj)}j]j#c.dma_fence_signal_timestamp_lockedasbuh1hhj+ubj )}(h h]h }(hhhjPhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj+ubj0 )}(h timestamph]h timestamp}(hhhj^hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhj|hhhjhM_ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjxhhhjhM_ubah}(h]jsah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMohjuhhubj[ )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hjhjhhhNhNubah}(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&]uh1jZ hjuhhhjhM_ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(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]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMbhjubj )}(hhh](j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hjʾh]hstruct dma_fence *fence}(hhhj̾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)}(hthe fence to signalh]hthe fence to signal}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj߾hM_hjubah}(h]h ]h"]h$]h&]uh1j hjľubeh}(h]h ]h"]h$]h&]uh1j hj߾hM_hjubj )}(hU``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain h](j )}(h``ktime_t timestamp``h]j)}(hjh]hktime_t timestamp}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM`hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM`hjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj>h]h Description}(hhhj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj<ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMbhjubh)}(hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.h]hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.}(hjVhjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMbhjubh)}(hqUnlike dma_fence_signal_timestamp(), this function must be called with :c:type:`dma_fence.lock ` held.h](hGUnlike dma_fence_signal_timestamp(), this function must be called with }(hGUnlike dma_fence_signal_timestamp(), this function must be called with hjchhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjnh]hdma_fence.lock}(hhhjphhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjlubah}(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.chMihjcubh held.}(h held.hjchhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMihjubh)}(hZReturns 0 on success and a negative error value when **fence** has been signalled already.h](h5Returns 0 on success and a negative error value when }(h5Returns 0 on success and a negative error value when hjhhhNhNubj )}(h **fence**h]hfence}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh has been signalled already.}(h has been signalled already.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMlhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_signal_timestamp (C function)c.dma_fence_signal_timestamphNtauh1j hjhhhNhNubj )}(hhh](j )}(hKint dma_fence_signal_timestamp (struct dma_fence *fence, ktime_t timestamp)h]j )}(hJint dma_fence_signal_timestamp(struct dma_fence *fence, ktime_t timestamp)h](jl)}(hinth]hint}(hhhjڿhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjֿhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjֿhhhjhMubj* )}(hdma_fence_signal_timestamph]j0 )}(hdma_fence_signal_timestamph]hdma_fence_signal_timestamp}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjֿhhhjhMubj)}(h,(struct dma_fence *fence, ktime_t timestamp)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhj$hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj5hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj2ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj7modnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_signal_timestampasbuh1hhjubj )}(h h]h }(hhhjUhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjchhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjphhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hktime_t timestamph](h)}(hhh]j0 )}(hktime_th]hktime_t}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jQc.dma_fence_signal_timestampasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(h timestamph]h timestamp}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjֿhhhjhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjҿhhhjhMubah}(h]jͿah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjϿhhubj[ )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hjhjhhhNhNubah}(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&]uh1jZ hjϿhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(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]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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)}(hj$h]hstruct dma_fence *fence}(hhhj&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)}(hthe fence to signalh]hthe fence to signal}(hj?hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj:ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj9hMhjubj )}(hU``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain h](j )}(h``ktime_t timestamp``h]j)}(hj]h]hktime_t timestamp}(hhhj_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.chMhjWubj )}(hhh]h)}(h>fence signal timestamp in kernel's CLOCK_MONOTONIC time domainh]h@fence signal timestamp in kernel’s CLOCK_MONOTONIC time domain}(hjxhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhMhjsubah}(h]h ]h"]h$]h&]uh1j hjWubeh}(h]h ]h"]h$]h&]uh1j hjrhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.h]hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.}(hjhjhhhNhNubah}(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 }(h5Returns 0 on success and a negative error value when hjhhhNhNubj )}(h **fence**h]hfence}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh has been signalled already.}(h has been signalled already.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_fence_signal_locked (C function)c.dma_fence_signal_lockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(h5int dma_fence_signal_locked (struct dma_fence *fence)h]j )}(h4int dma_fence_signal_locked(struct dma_fence *fence)h](jl)}(hinth]hint}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubj* )}(hdma_fence_signal_lockedh]j0 )}(hdma_fence_signal_lockedh]hdma_fence_signal_locked}(hhhj!hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9ubj )}(h h]h }(hhhjJhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj9ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj[hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjXubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj]modnameN classnameNjdj)}j]ji)}j`j#sbc.dma_fence_signal_lockedasbuh1hhj9ubj )}(h h]h }(hhhj{hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj9ubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj9ubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj9ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj5ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubj[ )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(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]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj=h]h Description}(hhhj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj;ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.h]hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.}(hjUhjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hgUnlike dma_fence_signal(), this function must be called with :c:type:`dma_fence.lock ` held.h](h=Unlike dma_fence_signal(), this function must be called with }(h=Unlike dma_fence_signal(), this function must be called with hjbhhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjmh]hdma_fence.lock}(hhhjohhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjkubah}(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.chMhjbubh held.}(h held.hjbhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubh)}(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 }(h5Returns 0 on success and a negative error value when hjhhhNhNubj )}(h **fence**h]hfence}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh has been signalled already.}(h has been signalled already.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_signal (C function)c.dma_fence_signalhNtauh1j hjhhhNhNubj )}(hhh](j )}(h.int dma_fence_signal (struct dma_fence *fence)h]j )}(h-int dma_fence_signal(struct dma_fence *fence)h](jl)}(hinth]hint}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubj* )}(hdma_fence_signalh]j0 )}(hdma_fence_signalh]hdma_fence_signal}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhj#hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj4hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj1ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj6modnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_signalasbuh1hhjubj )}(h h]h }(hhhjThhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjohhhNhNubah}(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&]jjjM uh1j jN jO hjhhhjhMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubj[ )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(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]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.h]hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.}(hj.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)}(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 }(h5Returns 0 on success and a negative error value when hj;hhhNhNubj )}(h **fence**h]hfence}(hhhjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj;ubh has been signalled already.}(h has been signalled already.hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_wait_timeout (C function)c.dma_fence_wait_timeouthNtauh1j hjhhhNhNubj )}(hhh](j )}(h\signed long dma_fence_wait_timeout (struct dma_fence *fence, bool intr, signed long timeout)h]j )}(h[signed long dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout)h](jl)}(hsignedh]hsigned}(hhhj~hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjzhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjzhhhjhMubjl)}(hlongh]hlong}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjzhhhjhMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjzhhhjhMubj* )}(hdma_fence_wait_timeouth]j0 )}(hdma_fence_wait_timeouth]hdma_fence_wait_timeout}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjzhhhjhMubj)}(h9(struct dma_fence *fence, bool intr, signed long timeout)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_wait_timeoutasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhj0hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h bool intrh](jl)}(hj_h]hbool}(hhhjIhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjEubj )}(h h]h }(hhhjVhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjEubj0 )}(hintrh]hintr}(hhhjdhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjEubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hsigned long timeouth](jl)}(hsignedh]hsigned}(hhhj}hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjyubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjyubjl)}(hlongh]hlong}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjyubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjyubj0 )}(htimeouth]htimeout}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjyubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjzhhhjhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjvhhhjhMubah}(h]jqah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjshhubj[ )}(hhh]h)}(h` **Description** This is the default release functions for :c:type:`dma_fence`. Drivers shouldn't call this directly, but instead call dma_fence_put().h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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)}(hj3h]hstruct kref *kref}(hhhj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(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)}(h(:c:type:`dma_fence.recfount `h]h)}(hjNh]j)}(hjNh]hdma_fence.recfount}(hhhjShhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhjHhMhjLubah}(h]h ]h"]h$]h&]uh1hhjHhMhjIubah}(h]h ]h"]h$]h&]uh1j hj-ubeh}(h]h ]h"]h$]h&]uh1j hjHhMhj*ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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 }(h*This is the default release functions for hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubhK. Drivers shouldn’t call this directly, but instead call dma_fence_put().}(hI. Drivers shouldn't call this directly, but instead call dma_fence_put().hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_free (C function)c.dma_fence_freehNtauh1j hjhhhNhNubj )}(hhh](j )}(h-void dma_fence_free (struct dma_fence *fence)h]j )}(h,void dma_fence_free(struct dma_fence *fence)h](jl)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM8ubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhM8ubj* )}(hdma_fence_freeh]j0 )}(hdma_fence_freeh]hdma_fence_free}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhM8ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubj )}(h h]h }(hhhj<hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj+ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjMhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjJubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjOmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_freeasbuh1hhj+ubj )}(h h]h }(hhhjmhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj+ubj~)}(hj h]h*}(hhhj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj+ubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj'ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM8ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhM8ubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM=hjhhubj[ )}(hhh]h)}(h1default release function for :c:type:`dma_fence`.h](hdefault release function for }(hdefault release function for hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjj)}j]jic.dma_fence_freeasbj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM7hjubh.}(hjhjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM7hjhhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhjhM8ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_fence *fence`` fence to release **Description** This is the default implementation for :c:type:`dma_fence_ops.release `. It calls kfree_rcu() on **fence**.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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}(hhhjhhhNhNubah}(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}(hj8hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hM8hj3ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj2hM8hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjXh]h Description}(hhhjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjVubah}(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 }(h'This is the default implementation for hjnhhhNhNubh)}(h/:c:type:`dma_fence_ops.release `h]j)}(hjyh]hdma_fence_ops.release}(hhhj{hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjwubah}(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:hjnubh. It calls kfree_rcu() on }(h. It calls kfree_rcu() on hjnhhhNhNubj )}(h **fence**h]hfence}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjnubh.}(hjhjnhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM:hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j *dma_fence_enable_sw_signaling (C function)c.dma_fence_enable_sw_signalinghNtauh1j hjhhhNhNubj )}(hhh](j )}(h` internally.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM`hjubj )}(hhh]j )}(h0``struct dma_fence *fence`` the fence to enable h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM]hjubj )}(hhh]h)}(hthe fence to enableh]hthe fence to enable}(hjhjhhhNhNubah}(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]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM_hjubh)}(hThis will request for sw signaling to be enabled, to make the fence complete as soon as possible. This calls :c:type:`dma_fence_ops.enable_signaling ` internally.h](hmThis will request for sw signaling to be enabled, to make the fence complete as soon as possible. This calls }(hmThis will request for sw signaling to be enabled, to make the fence complete as soon as possible. This calls hj'hhhNhNubh)}(h8:c:type:`dma_fence_ops.enable_signaling `h]j)}(hj2h]hdma_fence_ops.enable_signaling}(hhhj4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM_hj'ubh internally.}(h internally.hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjOhM_hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_add_callback (C function)c.dma_fence_add_callbackhNtauh1j hjhhhNhNubj )}(hhh](j )}(hdint dma_fence_add_callback (struct dma_fence *fence, struct dma_fence_cb *cb, dma_fence_func_t func)h]j )}(hcint dma_fence_add_callback(struct dma_fence *fence, struct dma_fence_cb *cb, dma_fence_func_t func)h](jl)}(hinth]hint}(hhhj{hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjwhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMoubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjwhhhjhMoubj* )}(hdma_fence_add_callbackh]j0 )}(hdma_fence_add_callbackh]hdma_fence_add_callback}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjwhhhjhMoubj)}(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}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_add_callbackasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence_cb *cbh](j )}(hj h]hstruct}(hhhj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubj )}(h h]h }(hhhj7hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj&ubh)}(hhh]j0 )}(h dma_fence_cbh]h dma_fence_cb}(hhhjHhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjEubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjJmodnameN classnameNjdj)}j]jc.dma_fence_add_callbackasbuh1hhj&ubj )}(h h]h }(hhhjfhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj&ubj~)}(hj h]h*}(hhhjthhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj&ubj0 )}(hcbh]hcb}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj&ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hdma_fence_func_t funch](h)}(hhh]j0 )}(hdma_fence_func_th]hdma_fence_func_t}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_fence_add_callbackasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(hfunch]hfunc}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjwhhhjhMoubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjshhhjhMoubah}(h]jnah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjphhubj[ )}(hhh]h)}(h6add a callback to be called when the fence is signaledh]h6add a callback to be called when the fence is signaled}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMnhjhhubah}(h]h ]h"]h$]h&]uh1jZ hjphhhjhMoubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j j} j j~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_fence *fence`` the fence to wait on ``struct dma_fence_cb *cb`` the callback to register ``dma_fence_func_t func`` the function to call **Description** Add a software callback to the fence. The caller should keep a reference to the fence. **cb** will be initialized by dma_fence_add_callback(), no initialization by the caller is required. Any number of callbacks can be registered to a fence, but a callback can only be registered to one fence at a time. If fence is already signaled, this function will return -ENOENT (and *not* call the callback). Note that the callback can be called from an atomic context or irq context. Returns 0 in case of success, -ENOENT if the fence is already signaled and -EINVAL in case of error.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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)}(hj5h]hstruct dma_fence *fence}(hhhj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMphj/ubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjPhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhMphjKubah}(h]h ]h"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]uh1j hjJhMphj,ubj )}(h5``struct dma_fence_cb *cb`` the callback to register h](j )}(h``struct dma_fence_cb *cb``h]j)}(hjnh]hstruct dma_fence_cb *cb}(hhhjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMqhjhubj )}(hhh]h)}(hthe callback to registerh]hthe callback to register}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMqhjubah}(h]h ]h"]h$]h&]uh1j hjhubeh}(h]h ]h"]h$]h&]uh1j hjhMqhj,ubj )}(h/``dma_fence_func_t func`` the function to call h](j )}(h``dma_fence_func_t func``h]j)}(hjh]hdma_fence_func_t func}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMrhjubj )}(hhh]h)}(hthe function to callh]hthe function to call}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMrhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMrhj,ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMthjubh)}(hVAdd a software callback to the fence. The caller should keep a reference to the fence.h]hVAdd a software callback to the fence. The caller should keep a reference to the fence.}(hjhjhhhNhNubah}(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](j )}(h**cb**h]hcb}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j 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.}(h 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 }(hEIf fence is already signaled, this function will return -ENOENT (and hj%hhhNhNubj/)}(h*not*h]hnot}(hhhj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj%ubh call the callback).}(h call the callback).hj%hhhNhNubeh}(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.}(hjJhjHhhhNhNubah}(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.}(hjYhjWhhhNhNubah}(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&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !dma_fence_get_status (C function)c.dma_fence_get_statushNtauh1j hjhhhNhNubj )}(hhh](j )}(h2int dma_fence_get_status (struct dma_fence *fence)h]j )}(h1int dma_fence_get_status(struct dma_fence *fence)h](jl)}(hinth]hint}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubj* )}(hdma_fence_get_statush]j0 )}(hdma_fence_get_statush]hdma_fence_get_status}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_get_statusasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(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&]jjjM uh1j jN jO hj~hhhjhMubah}(h]jyah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj{hhubj[ )}(hhh]h)}(h"returns the status upon completionh]h"returns the status upon completion}(hjIhjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjDhhubah}(h]h ]h"]h$]h&]uh1jZ hj{hhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j_j} j_j~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_fence *fence`` the dma_fence to query **Description** This wraps dma_fence_get_status_locked() to return the error status condition on a signaled fence. See dma_fence_get_status_locked() for more details. Returns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.h](h)}(h**Parameters**h]j )}(hjih]h Parameters}(hhhjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjgubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjcubj )}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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 hjcubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjcubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjcubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjcubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j &dma_fence_remove_callback (C function)c.dma_fence_remove_callbackhNtauh1j hjhhhNhNubj )}(hhh](j )}(hQbool dma_fence_remove_callback (struct dma_fence *fence, struct dma_fence_cb *cb)h]j )}(hPbool dma_fence_remove_callback(struct dma_fence *fence, struct dma_fence_cb *cb)h](jl)}(hj_h]hbool}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hhhj%hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhj$hMubj* )}(hdma_fence_remove_callbackh]j0 )}(hdma_fence_remove_callbackh]hdma_fence_remove_callback}(hhhj7hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj3ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhj$hMubj)}(h2(struct dma_fence *fence, struct dma_fence_cb *cb)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjOubj )}(h h]h }(hhhj`hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjOubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjqhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjnubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjsmodnameN classnameNjdj)}j]ji)}j`j9sbc.dma_fence_remove_callbackasbuh1hhjOubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjOubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjOubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjOubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjKubj)}(hstruct dma_fence_cb *cbh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fence_cbh]h dma_fence_cb}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_fence_remove_callbackasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hcbh]hcb}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjKubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj$hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhj$hMubah}(h]j ah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj hhubj[ )}(hhh]h)}(h)remove a callback from the signaling listh]h)remove a callback from the signaling list}(hjIhjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjDhhubah}(h]h ]h"]h$]h&]uh1jZ hj hhhj$hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j_j} j_j~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_fence *fence`` the fence to wait on ``struct dma_fence_cb *cb`` the callback to remove **Description** Remove a previously queued callback from the fence. This function returns true if the callback is successfully removed, or false if the fence has already been signaled. *WARNING*: Cancelling a callback should only be done if you really know what you're doing, since deadlocks and race conditions could occur all too easily. For this reason, it should only ever be done on hardware lockup recovery, with a reference held to the fence. Behaviour is undefined if **cb** has not been added to **fence** using dma_fence_add_callback() beforehand.h](h)}(h**Parameters**h]j )}(hjih]h Parameters}(hhhjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjgubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjcubj )}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h3``struct dma_fence_cb *cb`` the callback to remove h](j )}(h``struct dma_fence_cb *cb``h]j)}(hjh]hstruct dma_fence_cb *cb}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe callback to removeh]hthe callback to remove}(hjhjhhhNhNubah}(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 hjcubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjcubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjcubh)}(hX*WARNING*: Cancelling a callback should only be done if you really know what you're doing, since deadlocks and race conditions could occur all too easily. For this reason, it should only ever be done on hardware lockup recovery, with a reference held to the fence.h](j/)}(h *WARNING*h]hWARNING}(hhhj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j.hj!ubhX: Cancelling a callback should only be done if you really know what you’re doing, since deadlocks and race conditions could occur all too easily. For this reason, it should only ever be done on hardware lockup recovery, with a reference held to the fence.}(h: Cancelling a callback should only be done if you really know what you're doing, since deadlocks and race conditions could occur all too easily. For this reason, it should only ever be done on hardware lockup recovery, with a reference held to the fence.hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjcubh)}(hkBehaviour is undefined if **cb** has not been added to **fence** using dma_fence_add_callback() beforehand.h](hBehaviour is undefined if }(hBehaviour is undefined if hj?hhhNhNubj )}(h**cb**h]hcb}(hhhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj?ubh has not been added to }(h has not been added to hj?hhhNhNubj )}(h **fence**h]hfence}(hhhj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj?ubh+ using dma_fence_add_callback() beforehand.}(h+ using dma_fence_add_callback() beforehand.hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjcubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_default_wait (C function)c.dma_fence_default_waithNtauh1j hjhhhNhNubj )}(hhh](j )}(h\signed long dma_fence_default_wait (struct dma_fence *fence, bool intr, signed long timeout)h]j )}(h[signed long dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)h](jl)}(hsignedh]hsigned}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubjl)}(hlongh]hlong}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhhjhMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubj* )}(hdma_fence_default_waith]j0 )}(hdma_fence_default_waith]hdma_fence_default_wait}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMubj)}(h9(struct dma_fence *fence, bool intr, signed long timeout)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_default_waitasbuh1hhjubj )}(h h]h }(hhhj,hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjGhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h bool intrh](jl)}(hj_h]hbool}(hhhj`hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj\ubj )}(h h]h }(hhhjmhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj\ubj0 )}(hintrh]hintr}(hhhj{hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj\ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hsigned long timeouth](jl)}(hsignedh]hsigned}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubjl)}(hlongh]hlong}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(htimeouth]htimeout}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubj[ )}(hhh]h)}(hDdefault sleep until the fence gets signaled or until timeout elapsesh]hDdefault sleep until the fence gets signaled or until timeout elapses}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_fence *fence`` the fence to wait on ``bool intr`` if true, do an interruptible wait ``signed long timeout`` timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT **Description** Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success. If timeout is zero the value one is returned if the fence is already signaled for consistency with other functions taking a jiffies timeout.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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)}(hj8h]hstruct dma_fence *fence}(hhhj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj2ubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjShjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhMhjNubah}(h]h ]h"]h$]h&]uh1j hj2ubeh}(h]h ]h"]h$]h&]uh1j hjMhMhj/ubj )}(h0``bool intr`` if true, do an interruptible wait h](j )}(h ``bool intr``h]j)}(hjqh]h bool intr}(hhhjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjkubj )}(hhh]h)}(h!if true, do an interruptible waith]h!if true, do an interruptible wait}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjkubeh}(h]h ]h"]h$]h&]uh1j hjhMhj/ubj )}(hJ``signed long timeout`` timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT h](j )}(h``signed long timeout``h]j)}(hjh]hsigned long timeout}(hhhjhhhNhNubah}(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)}(h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUTh]h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT}(hjhjhhhNhNubah}(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]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hReturns -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success. If timeout is zero the value one is returned if the fence is already signaled for consistency with other functions taking a jiffies timeout.h]hReturns -ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success. If timeout is zero the value one is returned if the fence is already signaled for consistency with other functions taking a jiffies timeout.}(hjhjhhhNhNubah}(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&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_wait_any_timeout (C function)c.dma_fence_wait_any_timeouthNtauh1j hjhhhNhNubj )}(hhh](j )}(hsigned long dma_fence_wait_any_timeout (struct dma_fence **fences, uint32_t count, bool intr, signed long timeout, uint32_t *idx)h]j )}(hsigned long dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count, bool intr, signed long timeout, uint32_t *idx)h](jl)}(hsignedh]hsigned}(hhhj*hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj&hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM=ubj )}(h h]h }(hhhj9hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj&hhhj8hM=ubjl)}(hlongh]hlong}(hhhjGhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj&hhhj8hM=ubj )}(h h]h }(hhhjUhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj&hhhj8hM=ubj* )}(hdma_fence_wait_any_timeouth]j0 )}(hdma_fence_wait_any_timeouth]hdma_fence_wait_any_timeout}(hhhjghhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjcubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj&hhhj8hM=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}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jisbc.dma_fence_wait_any_timeoutasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfencesh]hfences}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj{ubj)}(huint32_t counth](h)}(hhh]j0 )}(huint32_th]huint32_t}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_fence_wait_any_timeoutasbuh1hhjubj )}(h h]h }(hhhj#hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(hcounth]hcount}(hhhj1hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj{ubj)}(h bool intrh](jl)}(hj_h]hbool}(hhhjJhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjFubj )}(h h]h }(hhhjWhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjFubj0 )}(hintrh]hintr}(hhhjehhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjFubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj{ubj)}(hsigned long timeouth](jl)}(hsignedh]hsigned}(hhhj~hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjzubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjzubjl)}(hlongh]hlong}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjzubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjzubj0 )}(htimeouth]htimeout}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjzubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj{ubj)}(h uint32_t *idxh](h)}(hhh]j0 )}(huint32_th]huint32_t}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_fence_wait_any_timeoutasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hidxh]hidx}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj{ubeh}(h]h ]h"]h$]h&]jjuh1jhj&hhhj8hM=ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj"hhhj8hM=ubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMOhjhhubj[ )}(hhh]h)}(hhjqubj )}(hhh]h)}(harray of fences to wait onh]harray of fences to wait on}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM>hjubah}(h]h ]h"]h$]h&]uh1j hjqubeh}(h]h ]h"]h$]h&]uh1j hjhM>hjnubj )}(h/``uint32_t count`` number of fences to wait on h](j )}(h``uint32_t count``h]j)}(hjh]huint32_t count}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM?hjubj )}(hhh]h)}(hnumber of fences to wait onh]hnumber of fences to wait on}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM?hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM?hjnubj )}(h0``bool intr`` if true, do an interruptible wait h](j )}(h ``bool intr``h]j)}(hjh]h bool intr}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chM@hjubj )}(hhh]h)}(h!if true, do an interruptible waith]h!if true, do an interruptible wait}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM@hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM@hjnubj )}(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}(hhhj$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.chMAhjubj )}(hhh]h)}(h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUTh]h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT}(hj=hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMAhj8ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj7hMAhjnubj )}(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)}(hj[h]h uint32_t *idx}(hhhj]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.chMChjUubj )}(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}(hjvhjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMBhjqubah}(h]h ]h"]h$]h&]uh1j hjUubeh}(h]h ]h"]h$]h&]uh1j hjphMChjnubeh}(h]h ]h"]h$]h&]uh1j hjRubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMEhjRubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMEhjRubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMIhjRubh)}(h7See also dma_fence_wait() and dma_fence_wait_timeout().h]h7See also dma_fence_wait() and dma_fence_wait_timeout().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMMhjRubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_set_deadline (C function)c.dma_fence_set_deadlinehNtauh1j hjhhhNhNubj )}(hhh](j )}(hGvoid dma_fence_set_deadline (struct dma_fence *fence, ktime_t deadline)h]j )}(hFvoid dma_fence_set_deadline(struct dma_fence *fence, ktime_t deadline)h](jl)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubj* )}(hdma_fence_set_deadlineh]j0 )}(hdma_fence_set_deadlineh]hdma_fence_set_deadline}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMubj)}(h+(struct dma_fence *fence, ktime_t deadline)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubj )}(h h]h }(hhhjDhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj3ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjUhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjRubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjWmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_set_deadlineasbuh1hhj3ubj )}(h h]h }(hhhjuhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj3ubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj3ubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj3ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj/ubj)}(hktime_t deadlineh](h)}(hhh]j0 )}(hktime_th]hktime_t}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jqc.dma_fence_set_deadlineasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(hdeadlineh]hdeadline}(hhhjhhhNhNubah}(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&]jjjM uh1j jN jO hjhhhjhMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubj[ )}(hhh]h)}(h$set desired fence-wait deadline hinth]h$set desired fence-wait deadline hint}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(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]j )}(hj%h]h Parameters}(hhhj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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)}(hjDh]hstruct dma_fence *fence}(hhhjFhhhNhNubah}(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.chMhj>ubj )}(hhh]h)}(h!the fence that is to be waited onh]h!the fence that is to be waited on}(hj_hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhMhjZubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hjYhMhj;ubj )}(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)}(hj}h]hktime_t deadline}(hhhjhhhNhNubah}(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.chMhjwubj )}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubah}(h]h ]h"]h$]h&]uh1j hjwubeh}(h]h ]h"]h$]h&]uh1j hjhMhj;ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh)}(hX]Give the fence signaler a hint about an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency if a periodic vblank deadline is approaching but the fence is not yet signaled..h]hX]Give the fence signaler a hint about an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency if a periodic vblank deadline is approaching but the fence is not yet signaled..}(hjhjhhhNhNubah}(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&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_describe (C function)c.dma_fence_describehNtauh1j hjhhhNhNubj )}(hhh](j )}(hGvoid dma_fence_describe (struct dma_fence *fence, struct seq_file *seq)h]j )}(hFvoid dma_fence_describe(struct dma_fence *fence, struct seq_file *seq)h](jl)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhj hMubj* )}(hdma_fence_describeh]j0 )}(hdma_fence_describeh]hdma_fence_describe}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhj hMubj)}(h/(struct dma_fence *fence, struct seq_file *seq)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubj )}(h h]h }(hhhjHhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj7ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjYhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjVubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj[modnameN classnameNjdj)}j]ji)}j`j!sbc.dma_fence_describeasbuh1hhj7ubj )}(h h]h }(hhhjyhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj7ubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj7ubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj7ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj3ubj)}(hstruct seq_file *seqh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hseq_fileh]hseq_file}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]juc.dma_fence_describeasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hseqh]hseq}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj3ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhj hMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubj[ )}(hhh]h)}(h$Dump fence description into seq_fileh]h$Dump fence description into seq_file}(hj1hj/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&]uh1jZ hjhhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jGj} jGj~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_fence *fence`` the fence to describe ``struct seq_file *seq`` the seq_file to put the textual description into **Description** Dump a textual description of the fence and it's state into the seq_file.h](h)}(h**Parameters**h]j )}(hjQh]h Parameters}(hhhjShhhNhNubah}(h]h ]h"]h$]h&]uh1j hjOubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjKubj )}(hhh](j )}(h2``struct dma_fence *fence`` the fence to describe h](j )}(h``struct dma_fence *fence``h]j)}(hjph]hstruct dma_fence *fence}(hhhjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjjubj )}(hhh]h)}(hthe fence to describeh]hthe fence to describe}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjgubj )}(hJ``struct seq_file *seq`` the seq_file to put the textual description into h](j )}(h``struct seq_file *seq``h]j)}(hjh]hstruct seq_file *seq}(hhhjhhhNhNubah}(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)}(h0the seq_file to put the textual description intoh]h0the seq_file to put the textual description into}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjgubeh}(h]h ]h"]h$]h&]uh1j hjKubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjKubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjKubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_init (C function)c.dma_fence_inithNtauh1j hjhhhNhNubj )}(hhh](j )}(hxvoid dma_fence_init (struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h]j )}(hwvoid dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h](jl)}(hvoidh]hvoid}(hhhj)hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj%hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMubj )}(h h]h }(hhhj8hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj%hhhj7hMubj* )}(hdma_fence_inith]j0 )}(hdma_fence_inith]hdma_fence_init}(hhhjJhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjFubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj%hhhj7hMubj)}(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}(hhhjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubj )}(h h]h }(hhhjshhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjbubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jLsbc.dma_fence_initasbuh1hhjbubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjbubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjbubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjbubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj^ubj)}(hconst struct dma_fence_ops *opsh](j )}(hjh]hconst}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fence_opsh]h dma_fence_ops}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_fence_initasbuh1hhjubj )}(h h]h }(hhhj/hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hopsh]hops}(hhhjJhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj^ubj)}(hspinlock_t *lockh](h)}(hhh]j0 )}(h spinlock_th]h spinlock_t}(hhhjfhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjcubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjhmodnameN classnameNjdj)}j]jc.dma_fence_initasbuh1hhj_ubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj_ubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj_ubj0 )}(hlockh]hlock}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj_ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj^ubj)}(h u64 contexth](h)}(hhh]j0 )}(hu64h]hu64}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_fence_initasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(hcontexth]hcontext}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj^ubj)}(h u64 seqnoh](h)}(hhh]j0 )}(hu64h]hu64}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_fence_initasbuh1hhjubj )}(h h]h }(hhhj!hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(hseqnoh]hseqno}(hhhj/hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj^ubeh}(h]h ]h"]h$]h&]jjuh1jhj%hhhj7hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj!hhhj7hMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjhhubj[ )}(hhh]h)}(hInitialize a custom fence.h]hInitialize a custom fence.}(hj\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&]uh1jZ hjhhhj7hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jrj} jrj~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_fence *fence`` the fence to initialize ``const struct dma_fence_ops *ops`` the dma_fence_ops for operations on this fence ``spinlock_t *lock`` the irqsafe spinlock to use for locking this fence ``u64 context`` the execution context this fence is run on ``u64 seqno`` a linear increasing sequence number for this context **Description** Initializes an allocated fence, the caller doesn't have to keep its refcount after committing with this fence, but it will need to hold a refcount again if :c:type:`dma_fence_ops.enable_signaling ` gets called. context and seqno are used for easy comparison between fences, allowing to check which fence is later by simply using dma_fence_later().h](h)}(h**Parameters**h]j )}(hj|h]h Parameters}(hhhj~hhhNhNubah}(h]h ]h"]h$]h&]uh1j 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 )}(h4``struct dma_fence *fence`` the fence to initialize h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hhhjhhhNhNubah}(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 initializeh]hthe fence to initialize}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(hS``const struct dma_fence_ops *ops`` the dma_fence_ops for operations on this fence h](j )}(h#``const struct dma_fence_ops *ops``h]j)}(hjh]hconst struct dma_fence_ops *ops}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h.the dma_fence_ops for operations on this fenceh]h.the dma_fence_ops for operations on this fence}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(hH``spinlock_t *lock`` the irqsafe spinlock to use for locking this fence h](j )}(h``spinlock_t *lock``h]j)}(hj h]hspinlock_t *lock}(hhhjhhhNhNubah}(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)}(h2the irqsafe spinlock to use for locking this fenceh]h2the irqsafe spinlock to use for locking this fence}(hj(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 )}(h;``u64 context`` the execution context this fence is run on h](j )}(h``u64 context``h]j)}(hjFh]h u64 context}(hhhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhj@ubj )}(hhh]h)}(h*the execution context this fence is run onh]h*the execution context this fence is run on}(hjahj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj\ubah}(h]h ]h"]h$]h&]uh1j hj@ubeh}(h]h ]h"]h$]h&]uh1j hj[hMhjubj )}(hC``u64 seqno`` a linear increasing sequence number for this context h](j )}(h ``u64 seqno``h]j)}(hjh]h u64 seqno}(hhhjhhhNhNubah}(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.chMhjyubj )}(hhh]h)}(h4a linear increasing sequence number for this contexth]h4a linear increasing sequence number for this context}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjyubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjvubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjvubh)}(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 }(hInitializes an allocated fence, the caller doesn't have to keep its refcount after committing with this fence, but it will need to hold a refcount again if hjhhhNhNubh)}(h8:c:type:`dma_fence_ops.enable_signaling `h]j)}(hjh]hdma_fence_ops.enable_signaling}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:192: ./drivers/dma-buf/dma-fence.chMhjubh gets called.}(h gets called.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjvubh)}(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().}(hjhjhhhNhNubah}(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&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence (C struct) c.dma_fencehNtauh1j hjhhhNhNubj )}(hhh](j )}(h dma_fenceh]j )}(hstruct dma_fenceh](j )}(hj h]hstruct}(hhhj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK ubj )}(h h]h }(hhhjAhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj/hhhj@hK ubj* )}(h dma_fenceh]j0 )}(hj-h]h dma_fence}(hhhjShhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjOubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj/hhhj@hK ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj+hhhj@hK ubah}(h]j&ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhj(hhubj[ )}(hhh]h)}(h"software synchronization primitiveh]h"software synchronization primitive}(hjxhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjshhubah}(h]h ]h"]h$]h&]uh1jZ hj(hhhj@hK ubeh}(h]h ](jstructeh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hXQ**Definition**:: struct dma_fence { spinlock_t *lock; const struct dma_fence_ops *ops; union { struct list_head cb_list; ktime_t timestamp; struct rcu_head rcu; }; u64 context; u64 seqno; unsigned long flags; struct kref refcount; int error; }; **Members** ``lock`` spin_lock_irqsave used for locking ``ops`` dma_fence_ops associated with this fence ``{unnamed_union}`` anonymous ``cb_list`` list of all callbacks to call ``timestamp`` Timestamp when the fence was signaled. ``rcu`` used for releasing fence with kfree_rcu ``context`` execution context this fence belongs to, returned by dma_fence_context_alloc() ``seqno`` the sequence number of this fence inside the execution context, can be compared to decide which fence would be signaled later. ``flags`` A mask of DMA_FENCE_FLAG_* defined below ``refcount`` refcount for this fence ``error`` Optional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.h](h)}(h**Definition**::h](j )}(h**Definition**h]h Definition}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh:}(hj hjhhhNhNubeh}(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; };}(hhhjubah}(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]j )}(hjh]hMembers}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(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)}(hjh]hlock}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK%hjubj )}(hhh]h)}(h"spin_lock_irqsave used for lockingh]h"spin_lock_irqsave used for locking}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK%hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK%hjubj )}(h1``ops`` dma_fence_ops associated with this fence h](j )}(h``ops``h]j)}(hjh]hops}(hhhjhhhNhNubah}(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}(hj7hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hK"hj2ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj1hK"hjubj )}(h``{unnamed_union}`` anonymous h](j )}(h``{unnamed_union}``h]j)}(hjUh]h{unnamed_union}}(hhhjWhhhNhNubah}(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 anonymoush]h anonymous}(hjphjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhK%hjkubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1j hjjhK%hjubj )}(h*``cb_list`` list of all callbacks to call h](j )}(h ``cb_list``h]j)}(hjh]hcb_list}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK$hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK$hjubj )}(h5``timestamp`` Timestamp when the fence was signaled. h](j )}(h ``timestamp``h]j)}(hjh]h timestamp}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK+hjubj )}(hhh]h)}(h&Timestamp when the fence was signaled.h]h&Timestamp when the fence was signaled.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK+hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK+hjubj )}(h0``rcu`` used for releasing fence with kfree_rcu h](j )}(h``rcu``h]j)}(hjh]hrcu}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK#hjubj )}(hhh]h)}(h'used for releasing fence with kfree_rcuh]h'used for releasing fence with kfree_rcu}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK#hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK#hjubj )}(h[``context`` execution context this fence belongs to, returned by dma_fence_context_alloc() h](j )}(h ``context``h]j)}(hj9h]hcontext}(hhhj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK'hj3ubj )}(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()}(hjThjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK&hjOubah}(h]h ]h"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]uh1j hjNhK'hjubj )}(h``seqno`` the sequence number of this fence inside the execution context, can be compared to decide which fence would be signaled later. h](j )}(h ``seqno``h]j)}(hjsh]hseqno}(hhhjuhhhNhNubah}(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.hhK)hjmubj )}(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.}(hjhjhhhNhNubah}(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 hjmubeh}(h]h ]h"]h$]h&]uh1j hjhK)hjubj )}(h3``flags`` A mask of DMA_FENCE_FLAG_* defined below h](j )}(h ``flags``h]j)}(hjh]hflags}(hhhjhhhNhNubah}(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(A mask of DMA_FENCE_FLAG_* defined belowh]h(A mask of DMA_FENCE_FLAG_* defined below}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK*hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK*hjubj )}(h%``refcount`` refcount for this fence h](j )}(h ``refcount``h]j)}(hjh]hrefcount}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK!hjubj )}(hhh]h)}(hrefcount for this fenceh]hrefcount for this fence}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK!hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK!hjubj )}(h``error`` Optional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.h](j )}(h ``error``h]j)}(hjh]herror}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK,hjubj )}(hhh]h)}(hOptional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.h]hOptional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.}(hj:hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hK,hj5ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj4hK,hjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubh)}(h**Description**h]j )}(hjah]h Description}(hhhjchhhNhNubah}(h]h ]h"]h$]h&]uh1j hj_ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK0hjhhubh)}(hthe flags member must be manipulated and read using the appropriate atomic ops (bit_*), so taking the spinlock will not be needed most of the time.h]hthe flags member must be manipulated and read using the appropriate atomic ops (bit_*), so taking the spinlock will not be needed most of the time.}(hjyhjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK.hjhhubh)}(hXDMA_FENCE_FLAG_SIGNALED_BIT - fence is already signaled DMA_FENCE_FLAG_TIMESTAMP_BIT - timestamp recorded for fence signaling DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT - enable_signaling might have been called DMA_FENCE_FLAG_USER_BITS - start of the unused bits, can be used by the implementer of the fence for its own purposes. Can be used in different ways by different fence implementers, so do not rely on this.h]hXDMA_FENCE_FLAG_SIGNALED_BIT - fence is already signaled DMA_FENCE_FLAG_TIMESTAMP_BIT - timestamp recorded for fence signaling DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT - enable_signaling might have been called DMA_FENCE_FLAG_USER_BITS - start of the unused bits, can be used by the implementer of the fence for its own purposes. Can be used in different ways by different fence implementers, so do not rely on this.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK2hjhhubh)}(hXSince atomic bitops are used, this is not guaranteed to be the case. Particularly, if the bit was set, but dma_fence_signal was called right before this bit was set, it would have been able to set the DMA_FENCE_FLAG_SIGNALED_BIT, before enable_signaling was called. Adding a check for DMA_FENCE_FLAG_SIGNALED_BIT after setting DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT closes this race, and makes sure that after dma_fence_signal was called, any enable_signaling call will have either been completed, or never called at all.h]hXSince atomic bitops are used, this is not guaranteed to be the case. Particularly, if the bit was set, but dma_fence_signal was called right before this bit was set, it would have been able to set the DMA_FENCE_FLAG_SIGNALED_BIT, before enable_signaling was called. Adding a check for DMA_FENCE_FLAG_SIGNALED_BIT after setting DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT closes this race, and makes sure that after dma_fence_signal was called, any enable_signaling call will have either been completed, or never called at all.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK9hjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_cb (C struct)c.dma_fence_cbhNtauh1j hjhhhNhNubj )}(hhh](j )}(h dma_fence_cbh]j )}(hstruct dma_fence_cbh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKoubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhKoubj* )}(h dma_fence_cbh]j0 )}(hjh]h dma_fence_cb}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhKoubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhKoubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKEhjhhubj[ )}(hhh]h)}(h%callback for dma_fence_add_callback()h]h%callback for dma_fence_add_callback()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKnhjhhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhjhKoubeh}(h]h ](jstructeh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(h**Definition**:: struct dma_fence_cb { struct list_head node; dma_fence_func_t func; }; **Members** ``node`` used by dma_fence_add_callback() to append this struct to fence::cb_list ``func`` dma_fence_func_t to callh](h)}(h**Definition**::h](j )}(h**Definition**h]h Definition}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubh:}(hj hj hhhNhNubeh}(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; };}(hhhj=ubah}(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]j )}(hjNh]hMembers}(hhhjPhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjLubah}(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)}(hjmh]hnode}(hhhjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKphjgubj )}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKphjubah}(h]h ]h"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]uh1j hjhKphjdubj )}(h!``func`` dma_fence_func_t to callh](j )}(h``func``h]j)}(hjh]hfunc}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKqhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKphjdubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKthjhhubh)}(hThis struct will be initialized by dma_fence_add_callback(), additional data can be passed along by embedding dma_fence_cb in another struct.h]hThis struct will be initialized by dma_fence_add_callback(), additional data can be passed along by embedding dma_fence_cb in another struct.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKrhjhhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_ops (C struct)c.dma_fence_opshNtauh1j hjhhhNhNubj )}(hhh](j )}(h dma_fence_opsh]j )}(hstruct dma_fence_opsh](j )}(hj h]hstruct}(hhhj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK|ubj )}(h h]h }(hhhj5hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj#hhhj4hK|ubj* )}(h dma_fence_opsh]j0 )}(hj!h]h dma_fence_ops}(hhhjGhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjCubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj#hhhj4hK|ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhj4hK|ubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKxhjhhubj[ )}(hhh]h)}(h operations implemented for fenceh]h operations implemented for fence}(hjlhjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhK{hjghhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhj4hK|ubeh}(h]h ](jstructeh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hX**Definition**:: struct dma_fence_ops { bool use_64bit_seqno; const char * (*get_driver_name)(struct dma_fence *fence); const char * (*get_timeline_name)(struct dma_fence *fence); bool (*enable_signaling)(struct dma_fence *fence); bool (*signaled)(struct dma_fence *fence); signed long (*wait)(struct dma_fence *fence, bool intr, signed long timeout); void (*release)(struct dma_fence *fence); void (*fence_value_str)(struct dma_fence *fence, char *str, int size); void (*timeline_value_str)(struct dma_fence *fence, char *str, int size); void (*set_deadline)(struct dma_fence *fence, ktime_t deadline); }; **Members** ``use_64bit_seqno`` True if this dma_fence implementation uses 64bit seqno, false otherwise. ``get_driver_name`` Returns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. ``get_timeline_name`` Return the name of the context this fence belongs to. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. ``enable_signaling`` Enable software signaling of fence. For fence implementations that have the capability for hw->hw signaling, they can implement this op to enable the necessary interrupts, or insert commands into cmdstream, etc, to avoid these costly operations for the common case where only hw->hw synchronization is required. This is called in the first dma_fence_wait() or dma_fence_add_callback() path to let the fence implementation know that there is another driver waiting on the signal (ie. hw->sw case). This function can be called from atomic context, but not from irq context, so normal spinlocks can be used. A return value of false indicates the fence already passed, or some failure occurred that made it impossible to enable signaling. True indicates successful enabling. :c:type:`dma_fence.error ` may be set in enable_signaling, but only when false is returned. Since many implementations can call dma_fence_signal() even when before **enable_signaling** has been called there's a race window, where the dma_fence_signal() might result in the final fence reference being released and its memory freed. To avoid this, implementations of this callback should grab their own reference using dma_fence_get(), to be released when the fence is signalled (through e.g. the interrupt handler). This callback is optional. If this callback is not present, then the driver must always have signaling enabled. ``signaled`` Peek whether the fence is signaled, as a fastpath optimization for e.g. dma_fence_wait() or dma_fence_add_callback(). Note that this callback does not need to make any guarantees beyond that a fence once indicates as signalled must always return true from this callback. This callback may return false even if the fence has completed already, in this case information hasn't propogated throug the system yet. See also dma_fence_is_signaled(). May set :c:type:`dma_fence.error ` if returning true. This callback is optional. ``wait`` Custom wait implementation, defaults to dma_fence_default_wait() if not set. Deprecated and should not be used by new implementations. Only used by existing implementations which need special handling for their hardware reset procedure. Must return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that. ``release`` Called on destruction of fence to release additional resources. Can be called from irq context. This callback is optional. If it is NULL, then dma_fence_free() is instead called as the default implementation. ``fence_value_str`` Callback to fill in free-form debug info specific to this fence, like the sequence number. This callback is optional. ``timeline_value_str`` Fills in the current value of the timeline as a string, like the sequence number. Note that the specific fence passed to this function should not matter, drivers should only use it to look up the corresponding timeline structures. ``set_deadline`` Callback to allow a fence waiter to inform the fence signaler of an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency. This is called without :c:type:`dma_fence.lock ` held, it can be called multiple times and from any context. Locking is up to the callee if it has some state to manage. If multiple deadlines are set, the expectation is to track the soonest one. If the deadline is before the current time, it should be interpreted as an immediate deadline. This callback is optional.h](h)}(h**Definition**::h](j )}(h**Definition**h]h Definition}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh:}(hj hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj)}(hXustruct dma_fence_ops { bool use_64bit_seqno; const char * (*get_driver_name)(struct dma_fence *fence); const char * (*get_timeline_name)(struct dma_fence *fence); bool (*enable_signaling)(struct dma_fence *fence); bool (*signaled)(struct dma_fence *fence); signed long (*wait)(struct dma_fence *fence, bool intr, signed long timeout); void (*release)(struct dma_fence *fence); void (*fence_value_str)(struct dma_fence *fence, char *str, int size); void (*timeline_value_str)(struct dma_fence *fence, char *str, int size); void (*set_deadline)(struct dma_fence *fence, ktime_t deadline); };h]hXustruct dma_fence_ops { bool use_64bit_seqno; const char * (*get_driver_name)(struct dma_fence *fence); const char * (*get_timeline_name)(struct dma_fence *fence); bool (*enable_signaling)(struct dma_fence *fence); bool (*signaled)(struct dma_fence *fence); signed long (*wait)(struct dma_fence *fence, bool intr, signed long timeout); void (*release)(struct dma_fence *fence); void (*fence_value_str)(struct dma_fence *fence, char *str, int size); void (*timeline_value_str)(struct dma_fence *fence, char *str, int size); void (*set_deadline)(struct dma_fence *fence, ktime_t deadline); };}(hhhjubah}(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]j )}(hjh]hMembers}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(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)}(hjh]huse_64bit_seqno}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj )}(hhh]h)}(hHTrue if this dma_fence implementation uses 64bit seqno, false otherwise.h]hHTrue if this dma_fence implementation uses 64bit seqno, false otherwise.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h``get_driver_name`` Returns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. h](j )}(h``get_driver_name``h]j)}(hjh]hget_driver_name}(hhhjhhhNhNubah}(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.}(hj,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)}(hThis callback is mandatory.h]hThis callback is mandatory.}(hj;hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hKhj'ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj&hKhjubj )}(hX``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)}(hjYh]hget_timeline_name}(hhhj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjSubj )}(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.}(hjthjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjoubh)}(hThis callback is mandatory.h]hThis callback is mandatory.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhKhjoubeh}(h]h ]h"]h$]h&]uh1j hjSubeh}(h]h ]h"]h$]h&]uh1j hjnhKhjubj )}(hX``enable_signaling`` Enable software signaling of fence. For fence implementations that have the capability for hw->hw signaling, they can implement this op to enable the necessary interrupts, or insert commands into cmdstream, etc, to avoid these costly operations for the common case where only hw->hw synchronization is required. This is called in the first dma_fence_wait() or dma_fence_add_callback() path to let the fence implementation know that there is another driver waiting on the signal (ie. hw->sw case). This function can be called from atomic context, but not from irq context, so normal spinlocks can be used. A return value of false indicates the fence already passed, or some failure occurred that made it impossible to enable signaling. True indicates successful enabling. :c:type:`dma_fence.error ` may be set in enable_signaling, but only when false is returned. Since many implementations can call dma_fence_signal() even when before **enable_signaling** has been called there's a race window, where the dma_fence_signal() might result in the final fence reference being released and its memory freed. To avoid this, implementations of this callback should grab their own reference using dma_fence_get(), to be released when the fence is signalled (through e.g. the interrupt handler). This callback is optional. If this callback is not present, then the driver must always have signaling enabled. h](j )}(h``enable_signaling``h]j)}(hjh]henable_signaling}(hhhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hXFor fence implementations that have the capability for hw->hw signaling, they can implement this op to enable the necessary interrupts, or insert commands into cmdstream, etc, to avoid these costly operations for the common case where only hw->hw synchronization is required. This is called in the first dma_fence_wait() or dma_fence_add_callback() path to let the fence implementation know that there is another driver waiting on the signal (ie. hw->sw case).h]hXFor fence implementations that have the capability for hw->hw signaling, they can implement this op to enable the necessary interrupts, or insert commands into cmdstream, etc, to avoid these costly operations for the common case where only hw->hw synchronization is required. This is called in the first dma_fence_wait() or dma_fence_add_callback() path to let the fence implementation know that there is another driver waiting on the signal (ie. hw->sw case).}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hkThis function can be called from atomic context, but not from irq context, so normal spinlocks can be used.h]hkThis function can be called from atomic context, but not from irq context, so normal spinlocks can be used.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hA return value of false indicates the fence already passed, or some failure occurred that made it impossible to enable signaling. True indicates successful enabling.h]hA return value of false indicates the fence already passed, or some failure occurred that made it impossible to enable signaling. True indicates successful enabling.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hf:c:type:`dma_fence.error ` may be set in enable_signaling, but only when false is returned.h](h)}(h%:c:type:`dma_fence.error `h]j)}(hjh]hdma_fence.error}(hhhjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubhA may be set in enable_signaling, but only when false is returned.}(hA may be set in enable_signaling, but only when false is returned.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubh)}(hXSince many implementations can call dma_fence_signal() even when before **enable_signaling** has been called there's a race window, where the dma_fence_signal() might result in the final fence reference being released and its memory freed. To avoid this, implementations of this callback should grab their own reference using dma_fence_get(), to be released when the fence is signalled (through e.g. the interrupt handler).h](hHSince many implementations can call dma_fence_signal() even when before }(hHSince many implementations can call dma_fence_signal() even when before hj%hhhNhNubj )}(h**enable_signaling**h]henable_signaling}(hhhj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj%ubhXM 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).}(hXK 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).hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hoThis callback is optional. If this callback is not present, then the driver must always have signaling enabled.h]hoThis callback is optional. If this callback is not present, then the driver must always have signaling enabled.}(hjJhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(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)}(hjih]hsignaled}(hhhjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjcubj )}(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().}(hjhjhhhNhNubah}(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 }(hMay set hjhhhNhNubh)}(h%:c:type:`dma_fence.error `h]j)}(hjh]hdma_fence.error}(hhhjhhhNhNubah}(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.hhKhjubh if returning true.}(h if returning true.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubh)}(hThis callback is optional.h]hThis callback is optional.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hKhjubeh}(h]h ]h"]h$]h&]uh1j hjcubeh}(h]h ]h"]h$]h&]uh1j hj~hKhjubj )}(hX=``wait`` Custom wait implementation, defaults to dma_fence_default_wait() if not set. Deprecated and should not be used by new implementations. Only used by existing implementations which need special handling for their hardware reset procedure. Must return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that. h](j )}(h``wait``h]j)}(hjh]hwait}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubj )}(hhh](h)}(hLCustom wait implementation, defaults to dma_fence_default_wait() if not set.h]hLCustom wait implementation, defaults to dma_fence_default_wait() if not set.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hDeprecated and should not be used by new implementations. Only used by existing implementations which need special handling for their hardware reset procedure.h]hDeprecated and should not be used by new implementations. Only used by existing implementations which need special handling for their hardware reset procedure.}(hjhj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubh)}(hXDMust return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that.h]hXDMust return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h``release`` Called on destruction of fence to release additional resources. Can be called from irq context. This callback is optional. If it is NULL, then dma_fence_free() is instead called as the default implementation. h](j )}(h ``release``h]j)}(hj=h]hrelease}(hhhj?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.hhKhj7ubj )}(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.}(hjXhjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjSubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hjRhKhjubj )}(h``fence_value_str`` Callback to fill in free-form debug info specific to this fence, like the sequence number. This callback is optional. h](j )}(h``fence_value_str``h]j)}(hjwh]hfence_value_str}(hhhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjqubj )}(hhh](h)}(hZCallback to fill in free-form debug info specific to this fence, like the sequence number.h]hZCallback to fill in free-form debug info specific to this fence, like the sequence number.}(hjhjhhhNhNubah}(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 optional.h]hThis callback is optional.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjqubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h``timeline_value_str`` Fills in the current value of the timeline as a string, like the sequence number. Note that the specific fence passed to this function should not matter, drivers should only use it to look up the corresponding timeline structures. h](j )}(h``timeline_value_str``h]j)}(hjh]htimeline_value_str}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hFills in the current value of the timeline as a string, like the sequence number. Note that the specific fence passed to this function should not matter, drivers should only use it to look up the corresponding timeline structures.h]hFills in the current value of the timeline as a string, like the sequence number. Note that the specific fence passed to this function should not matter, drivers should only use it to look up the corresponding timeline structures.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(hX``set_deadline`` Callback to allow a fence waiter to inform the fence signaler of an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency. This is called without :c:type:`dma_fence.lock ` held, it can be called multiple times and from any context. Locking is up to the callee if it has some state to manage. If multiple deadlines are set, the expectation is to track the soonest one. If the deadline is before the current time, it should be interpreted as an immediate deadline. This callback is optional.h](j )}(h``set_deadline``h]j)}(hjh]h set_deadline}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh](h)}(hX)Callback to allow a fence waiter to inform the fence signaler of an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency.h]hX)Callback to allow a fence waiter to inform the fence signaler of an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubh)}(hXaThis is called without :c:type:`dma_fence.lock ` held, it can be called multiple times and from any context. Locking is up to the callee if it has some state to manage. If multiple deadlines are set, the expectation is to track the soonest one. If the deadline is before the current time, it should be interpreted as an immediate deadline.h](hThis is called without }(hThis is called without hj!hhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hj,h]hdma_fence.lock}(hhhj.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.hhMhj!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.}(hX& 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&]uh1hhjIhMhjubh)}(hThis callback is optional.h]hThis callback is optional.}(hjWhjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_put (C function)c.dma_fence_puthNtauh1j hjhhhNhNubj )}(hhh](j )}(h,void dma_fence_put (struct dma_fence *fence)h]j )}(h+void dma_fence_put(struct dma_fence *fence)h](jl)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM$ubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhM$ubj* )}(h dma_fence_puth]j0 )}(h dma_fence_puth]h dma_fence_put}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhM$ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_putasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhj,hhhNhNubah}(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&]jjjM uh1j jN jO hjhhhjhM$ubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM&hjhhubj[ )}(hhh]h)}(hdecreases refcount of the fenceh]hdecreases refcount of the fence}(hjYhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM#hjThhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhjhM$ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| joj} joj~ uh1j hhhjhNhNubj )}(hI**Parameters** ``struct dma_fence *fence`` fence to reduce refcount ofh](h)}(h**Parameters**h]j )}(hjyh]h Parameters}(hhhj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjwubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM'hjsubj )}(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}(hhhjhhhNhNubah}(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 reduce refcount ofh]hfence to reduce refcount of}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM$hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM)hjubah}(h]h ]h"]h$]h&]uh1j hjsubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_get (C function)c.dma_fence_gethNtauh1j hjhhhNhNubj )}(hhh](j )}(h:struct dma_fence * dma_fence_get (struct dma_fence *fence)h]j )}(h8struct dma_fence *dma_fence_get(struct dma_fence *fence)h](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM.ubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhM.ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j` dma_fence_getsbc.dma_fence_getasbuh1hhjhhhjhM.ubj )}(h h]h }(hhhj2hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhM.ubj~)}(hj h]h*}(hhhj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjhhhjhM.ubj* )}(h dma_fence_geth]j0 )}(hj/h]h dma_fence_get}(hhhjQhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjMubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhM.ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubj )}(h h]h }(hhhjyhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]j-c.dma_fence_getasbuh1hhjhubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjhubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjhubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM.ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhM.ubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM2hjhhubj[ )}(hhh]h)}(hincreases refcount of the fenceh]hincreases refcount of the fence}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhM.ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_fence *fence`` fence to increase refcount of **Description** Returns the same fence, with refcount increased by 1.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM1hj ubj )}(hhh]j )}(h:``struct dma_fence *fence`` fence to increase refcount of h](j )}(h``struct dma_fence *fence``h]j)}(hj/h]hstruct dma_fence *fence}(hhhj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM.hj)ubj )}(hhh]h)}(hfence to increase refcount ofh]hfence to increase refcount of}(hjJhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhM.hjEubah}(h]h ]h"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]uh1j hjDhM.hj&ubah}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]j )}(hjjh]h Description}(hhhjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjhubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM0hj ubh)}(h5Returns the same fence, with refcount increased by 1.h]h5Returns the same fence, with refcount increased by 1.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM0hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_get_rcu (C function)c.dma_fence_get_rcuhNtauh1j hjhhhNhNubj )}(hhh](j )}(h>struct dma_fence * dma_fence_get_rcu (struct dma_fence *fence)h]j )}(hhjubj )}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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]j )}(hj'h]h Description}(hhhj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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?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&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_get_rcu_safe (C function)c.dma_fence_get_rcu_safehNtauh1j hjhhhNhNubj )}(hhh](j )}(hKstruct dma_fence * dma_fence_get_rcu_safe (struct dma_fence __rcu **fencep)h]j )}(hIstruct dma_fence *dma_fence_get_rcu_safe(struct dma_fence __rcu **fencep)h](j )}(hj h]hstruct}(hhhjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMJubj )}(h h]h }(hhhjzhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhhjyhMJubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`dma_fence_get_rcu_safesbc.dma_fence_get_rcu_safeasbuh1hhjhhhhjyhMJubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhhjyhMJubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjhhhhjyhMJubj* )}(hdma_fence_get_rcu_safeh]j0 )}(hjh]hdma_fence_get_rcu_safe}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhhjyhMJubj)}(h!(struct dma_fence __rcu **fencep)h]j)}(hstruct dma_fence __rcu **fenceph](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_fence_get_rcu_safeasbuh1hhjubj )}(h h]h }(hhhj"hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh__rcu}(hhhjhhhNhNubj )}(h h]h }(hhhj4hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj~)}(hj h]h*}(hhhjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceph]hfencep}(hhhj\hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhhjyhMJubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjdhhhjyhMJubah}(h]j_ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMXhjahhubj[ )}(hhh]h)}(h+acquire a reference to an RCU tracked fenceh]h+acquire a reference to an RCU tracked fence}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMIhjhhubah}(h]h ]h"]h$]h&]uh1jZ hjahhhjyhMJubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_fence __rcu **fencep`` pointer to fence to increase refcount of **Description** Function returns NULL if no refcount could be obtained, or the fence. This function handles acquiring a reference to a fence that may be reallocated within the RCU grace period (such as with SLAB_TYPESAFE_BY_RCU), so long as the caller is using RCU on the pointer to the fence. An alternative mechanism is to employ a seqlock to protect a bunch of fences, such as used by struct dma_resv. When using a seqlock, the seqlock must be taken before and checked after a reference to the fence is acquired (as shown here). The caller is required to hold the RCU read lock.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMMhjubj )}(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}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMJhjubj )}(hhh]h)}(h(pointer to fence to increase refcount ofh]h(pointer to fence to increase refcount of}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMJhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMJhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMLhjubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMLhjubh)}(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).}(hj*hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMQhjubh)}(h1The caller is required to hold the RCU read lock.h]h1The caller is required to hold the RCU read lock.}(hj9hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMVhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j )dma_fence_is_signaled_locked (C function)c.dma_fence_is_signaled_lockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(h;bool dma_fence_is_signaled_locked (struct dma_fence *fence)h]j )}(h:bool dma_fence_is_signaled_locked(struct dma_fence *fence)h](jl)}(hj_h]hbool}(hhhjfhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjbhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hhhjthhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjbhhhjshMubj* )}(hdma_fence_is_signaled_lockedh]j0 )}(hdma_fence_is_signaled_lockedh]hdma_fence_is_signaled_locked}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjbhhhjshMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_is_signaled_lockedasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjbhhhjshMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj^hhhjshMubah}(h]jYah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj[hhubj[ )}(hhh]h)}(h2Return an indication if the fence is signaled yet.h]h2Return an indication if the fence is signaled yet.}(hj(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&]uh1jZ hj[hhhjshMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j>j} j>j~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_fence *fence`` the fence to check **Description** Returns true if the fence was already signaled, false if not. Since this function doesn't enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven't been called before. This function requires :c:type:`dma_fence.lock ` to be held. See also dma_fence_is_signaled().h](h)}(h**Parameters**h]j )}(hjHh]h Parameters}(hhhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjFubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjBubj )}(hhh]j )}(h/``struct dma_fence *fence`` the fence to check h](j )}(h``struct dma_fence *fence``h]j)}(hjgh]hstruct dma_fence *fence}(hhhjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjaubj )}(hhh]h)}(hthe fence to checkh]hthe fence to check}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hMhj}ubah}(h]h ]h"]h$]h&]uh1j hjaubeh}(h]h ]h"]h$]h&]uh1j hj|hMhj^ubah}(h]h ]h"]h$]h&]uh1j hjBubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjBubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjBubh)}(hGThis function requires :c:type:`dma_fence.lock ` to be held.h](hThis function requires }(hThis function requires hjhhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjh]hdma_fence.lock}(hhhjhhhNhNubah}(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.}(h to be held.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjBubh)}(h!See also dma_fence_is_signaled().h]h!See also dma_fence_is_signaled().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjBubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_fence_is_signaled (C function)c.dma_fence_is_signaledhNtauh1j hjhhhNhNubj )}(hhh](j )}(h4bool dma_fence_is_signaled (struct dma_fence *fence)h]j )}(h3bool dma_fence_is_signaled(struct dma_fence *fence)h](jl)}(hj_h]hbool}(hhhj*hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj&hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hhhj8hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj&hhhj7hMubj* )}(hdma_fence_is_signaledh]j0 )}(hdma_fence_is_signaledh]hdma_fence_is_signaled}(hhhjJhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjFubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj&hhhj7hMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubj )}(h h]h }(hhhjshhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjbubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jLsbc.dma_fence_is_signaledasbuh1hhjbubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjbubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjbubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjbubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj^ubah}(h]h ]h"]h$]h&]jjuh1jhj&hhhj7hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj"hhhj7hMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubj[ )}(hhh]h)}(h2Return an indication if the fence is signaled yet.h]h2Return an indication if the fence is signaled yet.}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhj7hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_fence *fence`` the fence to check **Description** Returns true if the fence was already signaled, false if not. Since this function doesn't enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven't been called before. It's recommended for seqno fences to call dma_fence_signal when the operation is complete, it makes it possible to prevent issues from wraparound between time of issue and time of use by checking the return value of this function before calling hardware-specific wait instructions. See also dma_fence_is_signaled_locked().h](h)}(h**Parameters**h]j )}(hj h]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h/``struct dma_fence *fence`` the fence to check h](j )}(h``struct dma_fence *fence``h]j)}(hj+h]hstruct dma_fence *fence}(hhhj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj%ubj )}(hhh]h)}(hthe fence to checkh]hthe fence to check}(hjFhjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhjAubah}(h]h ]h"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]uh1j hj@hMhj"ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjfh]h Description}(hhhjhhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjdubah}(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~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.}(hjhjhhhNhNubah}(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().}(hjhjhhhNhNubah}(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&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j !__dma_fence_is_later (C function)c.__dma_fence_is_laterhNtauh1j hjhhhNhNubj )}(hhh](j )}(hKbool __dma_fence_is_later (u64 f1, u64 f2, const struct dma_fence_ops *ops)h]j )}(hJbool __dma_fence_is_later(u64 f1, u64 f2, const struct dma_fence_ops *ops)h](jl)}(hj_h]hbool}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubj* )}(h__dma_fence_is_laterh]j0 )}(h__dma_fence_is_laterh]h__dma_fence_is_later}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMubj)}(h1(u64 f1, u64 f2, const struct dma_fence_ops *ops)h](j)}(hu64 f1h](h)}(hhh]j0 )}(hu64h]hu64}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj modnameN classnameNjdj)}j]ji)}j`jsbc.__dma_fence_is_laterasbuh1hhjubj )}(h h]h }(hhhj(hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(hf1h]hf1}(hhhj6hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hu64 f2h](h)}(hhh]j0 )}(hu64h]hu64}(hhhjRhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjOubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjTmodnameN classnameNjdj)}j]j$c.__dma_fence_is_laterasbuh1hhjKubj )}(h h]h }(hhhjphhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjKubj0 )}(hf2h]hf2}(hhhj~hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjKubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hconst struct dma_fence_ops *opsh](j )}(hjh]hconst}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fence_opsh]h dma_fence_ops}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]j$c.__dma_fence_is_laterasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hopsh]hops}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubj[ )}(hhh]h)}(h-return if f1 is chronologically later than f2h]h-return if f1 is chronologically later than f2}(hj6hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj1hhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jLj} jLj~ uh1j hhhjhNhNubj )}(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]j )}(hjVh]h Parameters}(hhhjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjTubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjPubj )}(hhh](j )}(h#``u64 f1`` the first fence's seqno h](j )}(h ``u64 f1``h]j)}(hjuh]hu64 f1}(hhhjwhhhNhNubah}(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.hhMhjoubj )}(hhh]h)}(hthe first fence's seqnoh]hthe first fence’s seqno}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjoubeh}(h]h ]h"]h$]h&]uh1j hjhMhjlubj )}(h:``u64 f2`` the second fence's seqno from the same context h](j )}(h ``u64 f2``h]j)}(hjh]hu64 f2}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjlubj )}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjlubeh}(h]h ]h"]h$]h&]uh1j hjPubh)}(h**Description**h]j )}(hj"h]h Description}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjPubh)}(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.}(hj:hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjPubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_is_later (C function)c.dma_fence_is_laterhNtauh1j hjhhhNhNubj )}(hhh](j )}(hDbool dma_fence_is_later (struct dma_fence *f1, struct dma_fence *f2)h]j )}(hCbool dma_fence_is_later(struct dma_fence *f1, struct dma_fence *f2)h](jl)}(hj_h]hbool}(hhhjghhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjchhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hhhjuhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjchhhjthMubj* )}(hdma_fence_is_laterh]j0 )}(hdma_fence_is_laterh]hdma_fence_is_later}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjchhhjthMubj)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hstruct dma_fence *f1h](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_is_laterasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hf1h]hf1}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence *f2h](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhj"hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj3hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj0ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj5modnameN classnameNjdj)}j]jc.dma_fence_is_laterasbuh1hhjubj )}(h h]h }(hhhjQhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hf2h]hf2}(hhhjlhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjchhhjthMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj_hhhjthMubah}(h]jZah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj\hhubj[ )}(hhh]h)}(h-return if f1 is chronologically later than f2h]h-return if f1 is chronologically later than f2}(hjhjhhhNhNubah}(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&]uh1jZ hj\hhhjthMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hX3**Parameters** ``struct dma_fence *f1`` the first fence from the same context ``struct dma_fence *f2`` the second fence from the same context **Description** Returns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not re-used across contexts.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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)}(h&the second fence from the same contexth]h&the second fence from the same context}(hj,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]j )}(hjLh]h Description}(hhhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjJubah}(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.}(hjdhjbhhhNhNubah}(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&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j 'dma_fence_is_later_or_same (C function)c.dma_fence_is_later_or_samehNtauh1j hjhhhNhNubj )}(hhh](j )}(hLbool dma_fence_is_later_or_same (struct dma_fence *f1, struct dma_fence *f2)h]j )}(hKbool dma_fence_is_later_or_same(struct dma_fence *f1, struct dma_fence *f2)h](jl)}(hj_h]hbool}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubj* )}(hdma_fence_is_later_or_sameh]j0 )}(hdma_fence_is_later_or_sameh]hdma_fence_is_later_or_same}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMubj)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hstruct dma_fence *f1h](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_is_later_or_sameasbuh1hhjubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hf1h]hf1}(hhhj&hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence *f2h](j )}(hj h]hstruct}(hhhj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubj )}(h h]h }(hhhjLhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj;ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj]hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjZubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj_modnameN classnameNjdj)}j]jc.dma_fence_is_later_or_sameasbuh1hhj;ubj )}(h h]h }(hhhj{hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj;ubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj;ubj0 )}(hf2h]hf2}(hhhjhhhNhNubah}(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&]jjjM uh1j jN jO hjhhhjhMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubj[ )}(hhh]h)}(h(return true if f1 is later or same as f2h]h(return true if f1 is later or same as f2}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hXE**Parameters** ``struct dma_fence *f1`` the first fence from the same context ``struct dma_fence *f2`` the second fence from the same context **Description** Returns true if f1 is chronologically later than f2 or the same fence. Both fences must be from the same context, since a seqno is not re-used across contexts.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h@``struct dma_fence *f2`` the second fence from the same context h](j )}(h``struct dma_fence *f2``h]j)}(hj;h]hstruct dma_fence *f2}(hhhj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj5ubj )}(hhh]h)}(h&the second fence from the same contexth]h&the second fence from the same context}(hjVhjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhMhjQubah}(h]h ]h"]h$]h&]uh1j hj5ubeh}(h]h ]h"]h$]h&]uh1j hjPhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjvh]h Description}(hhhjxhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjtubah}(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.}(hjhjhhhNhNubah}(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&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_later (C function)c.dma_fence_laterhNtauh1j hjhhhNhNubj )}(hhh](j )}(hOstruct dma_fence * dma_fence_later (struct dma_fence *f1, struct dma_fence *f2)h]j )}(hMstruct dma_fence *dma_fence_later(struct dma_fence *f1, struct dma_fence *f2)h](j )}(hj h]hstruct}(hhhjhhhNhNubah}(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 }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`dma_fence_latersbc.dma_fence_laterasbuh1hhjhhhjhMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubj~)}(hj h]h*}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjhhhjhMubj* )}(hdma_fence_laterh]j0 )}(hjh]hdma_fence_later}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMubj)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hstruct dma_fence *f1h](j )}(hj h]hstruct}(hhhj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubj )}(h h]h }(hhhjBhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj1ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjShhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjPubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjUmodnameN classnameNjdj)}j]jc.dma_fence_laterasbuh1hhj1ubj )}(h h]h }(hhhjqhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj1ubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj1ubj0 )}(hf1h]hf1}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj1ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj-ubj)}(hstruct dma_fence *f2h](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jc.dma_fence_laterasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hf2h]hf2}(hhhjhhhNhNubah}(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&]jjjM uh1j jN jO hjhhhjhMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubj[ )}(hhh]h)}(h&return the chronologically later fenceh]h&return the chronologically later fence}(hj)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&]uh1jZ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j?j} j?j~ uh1j hhhjhNhNubj )}(hXY**Parameters** ``struct dma_fence *f1`` the first fence from the same context ``struct dma_fence *f2`` the second fence from the same context **Description** Returns NULL if both fences are signaled, otherwise the fence that would be signaled last. Both fences must be from the same context, since a seqno is not re-used across contexts.h](h)}(h**Parameters**h]j )}(hjIh]h Parameters}(hhhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjGubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM hjCubj )}(hhh](j )}(h?``struct dma_fence *f1`` the first fence from the same context h](j )}(h``struct dma_fence *f1``h]j)}(hjhh]hstruct dma_fence *f1}(hhhjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjbubj )}(hhh]h)}(h%the first fence from the same contexth]h%the first fence from the same context}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hMhj~ubah}(h]h ]h"]h$]h&]uh1j hjbubeh}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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 hjCubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM hjCubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM hjCubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j (dma_fence_get_status_locked (C function)c.dma_fence_get_status_lockedhNtauh1j hjhhhNhNubj )}(hhh](j )}(h9int dma_fence_get_status_locked (struct dma_fence *fence)h]j )}(h8int dma_fence_get_status_locked(struct dma_fence *fence)h](jl)}(hinth]hint}(hhhj!hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM!ubj )}(h h]h }(hhhj0hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhj/hM!ubj* )}(hdma_fence_get_status_lockedh]j0 )}(hdma_fence_get_status_lockedh]hdma_fence_get_status_locked}(hhhjBhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj>ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhj/hM!ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZubj )}(h h]h }(hhhjkhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjZubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj|hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjyubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj~modnameN classnameNjdj)}j]ji)}j`jDsbc.dma_fence_get_status_lockedasbuh1hhjZubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjZubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjZubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjZubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjVubah}(h]h ]h"]h$]h&]jjuh1jhjhhhj/hM!ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhj/hM!ubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM-hjhhubj[ )}(hhh]h)}(h"returns the status upon completionh]h"returns the status upon completion}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhj/hM!ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hX\**Parameters** ``struct dma_fence *fence`` the dma_fence to query **Description** Drivers can supply an optional error status condition before they signal the fence (to indicate whether the fence was completed due to an error rather than success). The value of the status condition is only valid if the fence has been signaled, dma_fence_get_status_locked() first checks the signal state before reporting the error status. Returns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM$hjubj )}(hhh]j )}(h3``struct dma_fence *fence`` the dma_fence to query h](j )}(h``struct dma_fence *fence``h]j)}(hj#h]hstruct dma_fence *fence}(hhhj%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.hhM!hjubj )}(hhh]h)}(hthe dma_fence to queryh]hthe dma_fence to query}(hj>hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hM!hj9ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj8hM!hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj^h]h Description}(hhhj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj\ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM#hjubh)}(hXTDrivers can supply an optional error status condition before they signal the fence (to indicate whether the fence was completed due to an error rather than success). The value of the status condition is only valid if the fence has been signaled, dma_fence_get_status_locked() first checks the signal state before reporting the error status.h]hXTDrivers can supply an optional error status condition before they signal the fence (to indicate whether the fence was completed due to an error rather than success). The value of the status condition is only valid if the fence has been signaled, dma_fence_get_status_locked() first checks the signal state before reporting the error status.}(hjvhjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhM#hjubh)}(hReturns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.h]hReturns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.}(hjhjhhhNhNubah}(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&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_set_error (C function)c.dma_fence_set_errorhNtauh1j hjhhhNhNubj )}(hhh](j )}(h=void dma_fence_set_error (struct dma_fence *fence, int error)h]j )}(hhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjKhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhMMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMShjhhubj[ )}(hhh]h)}(h1helper to get the completion timestamp of a fenceh]h1helper to get the completion timestamp of a fence}(hjxhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMLhjshhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhjhMMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hX1**Parameters** ``struct dma_fence *fence`` fence to get the timestamp from. **Description** After a fence is signaled the timestamp is updated with the signaling time, but setting the timestamp can race with tasks waiting for the signaling. This helper busy waits for the correct timestamp to appear.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMPhjubj )}(hhh]j )}(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}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMMhjubj )}(hhh]h)}(h fence to get the timestamp from.h]h fence to get the timestamp from.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMOhjubh)}(hAfter a fence is signaled the timestamp is updated with the signaling time, but setting the timestamp can race with tasks waiting for the signaling. This helper busy waits for the correct timestamp to appear.h]hAfter a fence is signaled the timestamp is updated with the signaling time, but setting the timestamp can race with tasks waiting for the signaling. This helper busy waits for the correct timestamp to appear.}(hj hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMOhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_wait (C function)c.dma_fence_waithNtauh1j hjhhhNhNubj )}(hhh](j )}(h?signed long dma_fence_wait (struct dma_fence *fence, bool intr)h]j )}(h>signed long dma_fence_wait(struct dma_fence *fence, bool intr)h](jl)}(hsignedh]hsigned}(hhhj7hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj3hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMgubj )}(h h]h }(hhhjFhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj3hhhjEhMgubjl)}(hlongh]hlong}(hhhjThhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj3hhhjEhMgubj )}(h h]h }(hhhjbhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj3hhhjEhMgubj* )}(hdma_fence_waith]j0 )}(hdma_fence_waith]hdma_fence_wait}(hhhjthhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjpubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj3hhhjEhMgubj)}(h$(struct dma_fence *fence, bool intr)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jvsbc.dma_fence_waitasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h bool intrh](jl)}(hj_h]hbool}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(hintrh]hintr}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhj3hhhjEhMgubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj/hhhjEhMgubah}(h]j*ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMthj,hhubj[ )}(hhh]h)}(h#sleep until the fence gets signaledh]h#sleep until the fence gets signaled}(hjJhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMfhjEhhubah}(h]h ]h"]h$]h&]uh1jZ hj,hhhjEhMgubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j`j} j`j~ uh1j hhhjhNhNubj )}(hX<**Parameters** ``struct dma_fence *fence`` the fence to wait on ``bool intr`` if true, do an interruptible wait **Description** This function will return -ERESTARTSYS if interrupted by a signal, or 0 if the fence was signaled. Other error values may be returned on custom implementations. Performs a synchronous wait on this fence. It is assumed the caller directly or indirectly holds a reference to the fence, otherwise the fence might be freed before return, resulting in undefined behavior. See also dma_fence_wait_timeout() and dma_fence_wait_any_timeout().h](h)}(h**Parameters**h]j )}(hjjh]h Parameters}(hhhjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjhubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMjhjdubj )}(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}(hhhjhhhNhNubah}(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.hhMghjubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMghjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMghjubj )}(h0``bool intr`` if true, do an interruptible wait h](j )}(h ``bool intr``h]j)}(hjh]h bool intr}(hhhjhhhNhNubah}(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.hhMhhjubj )}(hhh]h)}(h!if true, do an interruptible waith]h!if true, do an interruptible wait}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhhjubeh}(h]h ]h"]h$]h&]uh1j hjdubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMjhjdubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMjhjdubh)}(hPerforms a synchronous wait on this fence. It is assumed the caller directly or indirectly holds a reference to the fence, otherwise the fence might be freed before return, resulting in undefined behavior.h]hPerforms a synchronous wait on this fence. It is assumed the caller directly or indirectly holds a reference to the fence, otherwise the fence might be freed before return, resulting in undefined behavior.}(hj$hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMnhjdubh)}(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().}(hj3hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMrhjdubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_is_array (C function)c.dma_fence_is_arrayhNtauh1j hjhhhNhNubj )}(hhh](j )}(h1bool dma_fence_is_array (struct dma_fence *fence)h]j )}(h0bool dma_fence_is_array(struct dma_fence *fence)h](jl)}(hj_h]hbool}(hhhj`hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj\hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hhhjnhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj\hhhjmhMubj* )}(hdma_fence_is_arrayh]j0 )}(hdma_fence_is_arrayh]hdma_fence_is_array}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj|ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj\hhhjmhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_is_arrayasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj\hhhjmhMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjXhhhjmhMubah}(h]jSah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjUhhubj[ )}(hhh]h)}(h+check if a fence is from the array subclassh]h+check if a fence is from the array subclass}(hj"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&]uh1jZ hjUhhhjmhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j8j} j8j~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_fence *fence`` the fence to test **Description** Return true if it is a dma_fence_array and false otherwise.h](h)}(h**Parameters**h]j )}(hjBh]h Parameters}(hhhjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj@ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj<ubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hjah]hstruct dma_fence *fence}(hhhjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj[ubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hj|hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhMhjwubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hjvhMhjXubah}(h]h ]h"]h$]h&]uh1j hj<ubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj<ubh)}(h;Return true if it is a dma_fence_array and false otherwise.h]h;Return true if it is a dma_fence_array and false otherwise.}(hjhjhhhNhNubah}(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&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_is_chain (C function)c.dma_fence_is_chainhNtauh1j hjhhhNhNubj )}(hhh](j )}(h1bool dma_fence_is_chain (struct dma_fence *fence)h]j )}(h0bool dma_fence_is_chain(struct dma_fence *fence)h](jl)}(hj_h]hbool}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhMubj* )}(hdma_fence_is_chainh]j0 )}(hdma_fence_is_chainh]hdma_fence_is_chain}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hhhj* hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj; hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj8 ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj= modnameN classnameNjdj)}j]ji)}j`j sbc.dma_fence_is_chainasbuh1hhj ubj )}(h h]h }(hhhj[ hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj ubj~)}(hj h]h*}(hhhji hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj ubj0 )}(hfenceh]hfence}(hhhjv hhhNhNubah}(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&]jjjM uh1j jN jO hjhhhjhMubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjhhubj[ )}(hhh]h)}(h+check if a fence is from the chain subclassh]h+check if a fence is from the chain subclass}(hj 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&]uh1jZ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j j} j j~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_fence *fence`` the fence to test **Description** Return true if it is a dma_fence_chain and false otherwise.h](h)}(h**Parameters**h]j )}(hj h]h Parameters}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj ubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hj h]hstruct dma_fence *fence}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj ubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]j )}(hj h]h Description}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj ubh)}(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.}(hj5 hj3 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_is_container (C function)c.dma_fence_is_containerhNtauh1j hjhhhNhNubj )}(hhh](j )}(h5bool dma_fence_is_container (struct dma_fence *fence)h]j )}(h4bool dma_fence_is_container(struct dma_fence *fence)h](jl)}(hj_h]hbool}(hhhjb hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj^ hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMubj )}(h h]h }(hhhjp hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj^ hhhjo hMubj* )}(hdma_fence_is_containerh]j0 )}(hdma_fence_is_containerh]hdma_fence_is_container}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj~ ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj^ hhhjo hMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj modnameN classnameNjdj)}j]ji)}j`j sbc.dma_fence_is_containerasbuh1hhj ubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj ubj~)}(hj h]h*}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj ubj0 )}(hfenceh]hfence}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubah}(h]h ]h"]h$]h&]jjuh1jhj^ hhhjo hMubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjZ hhhjo hMubah}(h]jU ah ](jS jT eh"]h$]h&]jX uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhjW hhubj[ )}(hhh]h)}(h0check if a fence is a container for other fencesh]h0check if a fence is a container for other fences}(hj$ 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&]uh1jZ hjW hhhjo hMubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| j: j} j: j~ uh1j hhhjhNhNubj )}(hX"**Parameters** ``struct dma_fence *fence`` the fence to test **Description** Return true if this fence is a container for other fences, false otherwise. This is important since we can't build up large fence structure or otherwise we run into recursion during operation on those fences.h](h)}(h**Parameters**h]j )}(hjD h]h Parameters}(hhhjF hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjB ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj> ubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hjc h]hstruct dma_fence *fence}(hhhje hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj] ubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hj~ hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjx hMhjy ubah}(h]h ]h"]h$]h&]uh1j hj] ubeh}(h]h ]h"]h$]h&]uh1j hjx hMhjZ ubah}(h]h ]h"]h$]h&]uh1j hj> ubh)}(h**Description**h]j )}(hj h]h Description}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj> ubh)}(hReturn true if this fence is a container for other fences, false otherwise. This is important since we can't build up large fence structure or otherwise we run into recursion during operation on those fences.h]hReturn true if this fence is a container for other fences, false otherwise. This is important since we can’t build up large fence structure or otherwise we run into recursion during operation on those fences.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:195: ./include/linux/dma-fence.hhMhj> ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubeh}(h]dma-fences-functions-referenceah ]h"]dma fences functions referenceah$]h&]uh1hhjޭhhhhhKubh)}(hhh](h)}(hDMA Fence Arrayh]hDMA Fence Array}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j #dma_fence_array_create (C function)c.dma_fence_array_createhNtauh1j hj hhhNhNubj )}(hhh](j )}(hstruct dma_fence_array * dma_fence_array_create (int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h]j )}(hstruct dma_fence_array *dma_fence_array_create(int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](j )}(hj h]hstruct}(hhhj 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 }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj hhhj hKubh)}(hhh]j0 )}(hdma_fence_arrayh]hdma_fence_array}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj modnameN classnameNjdj)}j]ji)}j`dma_fence_array_createsbc.dma_fence_array_createasbuh1hhj hhhj hKubj )}(h h]h }(hhhj< hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj hhhj hKubj~)}(hj h]h*}(hhhjJ hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj hhhj hKubj* )}(hdma_fence_array_createh]j0 )}(hj9 h]hdma_fence_array_create}(hhhj[ hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjW ubah}(h]h ](jB jC 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](jl)}(hinth]hint}(hhhjv hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjr ubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjr ubj0 )}(h num_fencesh]h num_fences}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjr ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjn ubj)}(hstruct dma_fence **fencesh](j )}(hj h]hstruct}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj modnameN classnameNjdj)}j]j7 c.dma_fence_array_createasbuh1hhj ubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj ubj~)}(hj h]h*}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj ubj~)}(hj h]h*}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj ubj0 )}(hfencesh]hfences}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjn ubj)}(h u64 contexth](h)}(hhh]j0 )}(hu64h]hu64}(hhhj+ hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj( ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj- modnameN classnameNjdj)}j]j7 c.dma_fence_array_createasbuh1hhj$ ubj )}(h h]h }(hhhjI hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj$ ubj0 )}(hcontexth]hcontext}(hhhjW hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj$ ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjn ubj)}(hunsigned seqnoh](jl)}(hunsignedh]hunsigned}(hhhjp hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjl ubj )}(h h]h }(hhhj~ hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjl ubj0 )}(hseqnoh]hseqno}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjl ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjn ubj)}(hbool signal_on_anyh](jl)}(hj_h]hbool}(hhhj hhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhj ubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj ubj0 )}(h signal_on_anyh]h signal_on_any}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjn ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj hhhj hKubah}(h]j ah ](jS jT eh"]h$]h&]jX uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhj hhubj[ )}(hhh]h)}(hCreate a custom fence arrayh]hCreate a custom fence array}(hj 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&]uh1jZ hj hhhj hKubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhj hNhNubj )}(hX0**Parameters** ``int num_fences`` [in] number of fences to add in the array ``struct dma_fence **fences`` [in] array containing the fences ``u64 context`` [in] fence context to use ``unsigned seqno`` [in] sequence number to use ``bool signal_on_any`` [in] signal on any fence in the array **Description** Allocate a dma_fence_array object and initialize the base fence with dma_fence_init(). In case of error it returns NULL. The caller should allocate the fences array with num_fences size and fill it with the fences it wants to add to the object. Ownership of this array is taken and dma_fence_put() is used on each fence on release. If **signal_on_any** is true the fence array signals if any fence in the array signals, otherwise it signals when all fences in the array signal.h](h)}(h**Parameters**h]j )}(hj h]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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.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}(hhhj.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] number of fences to add in the arrayh]h,[in] number of fences to add in the array}(hjGhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhKhjBubah}(h]h ]h"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]uh1j hjAhKhj#ubj )}(hB``struct dma_fence **fences`` [in] array containing the fences h](j )}(h``struct dma_fence **fences``h]j)}(hjeh]hstruct dma_fence **fences}(hhhjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(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}(hjhj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhKhj{ubah}(h]h ]h"]h$]h&]uh1j hj_ubeh}(h]h ]h"]h$]h&]uh1j hjzhKhj#ubj )}(h-``u64 context`` [in] fence context to use h](j )}(h``u64 context``h]j)}(hjh]h u64 context}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhj#ubj )}(h2``unsigned seqno`` [in] sequence number to use h](j )}(h``unsigned seqno``h]j)}(hjh]hunsigned seqno}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhj#ubj )}(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}(hhhjhhhNhNubah}(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.chKhj ubj )}(hhh]h)}(h([in] signal on any fence in the arrayh]h([in] signal on any fence in the array}(hj+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 hjubh)}(h**Description**h]j )}(hjKh]h Description}(hhhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjIubah}(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.}(hjchjahhhNhNubah}(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.}(hjrhjphhhNhNubah}(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 }(hIf hjhhhNhNubj )}(h**signal_on_any**h]h signal_on_any}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh} is true the fence array signals if any fence in the array signals, otherwise it signals when all fences in the array signal.}(h} is true the fence array signals if any fence in the array signals, otherwise it signals when all fences in the array signal.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $dma_fence_match_context (C function)c.dma_fence_match_contexthNtauh1j hj hhhNhNubj )}(hhh](j )}(hCbool dma_fence_match_context (struct dma_fence *fence, u64 context)h]j )}(hBbool dma_fence_match_context(struct dma_fence *fence, u64 context)h](jl)}(hj_h]hbool}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhKubj* )}(hdma_fence_match_contexth]j0 )}(hdma_fence_match_contexth]hdma_fence_match_context}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhKubj)}(h&(struct dma_fence *fence, u64 context)h](j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_match_contextasbuh1hhjubj )}(h h]h }(hhhj<hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjWhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h u64 contexth](h)}(hhh]j0 )}(hu64h]hu64}(hhhjshhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjpubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjumodnameN classnameNjdj)}j]j8c.dma_fence_match_contextasbuh1hhjlubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjlubj0 )}(hcontexth]hcontext}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjlubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhKubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:201: ./drivers/dma-buf/dma-fence-array.chKhjhhubj[ )}(hhh]h)}(h.Check if all fences are from the given contexth]h.Check if all fences are from the given context}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhj hNhNubj )}(hX=**Parameters** ``struct dma_fence *fence`` [in] fence or fence array ``u64 context`` [in] fence context to check all fences against **Description** Checks the provided fence or, for a fence array, all fences in the array against the given context. Returns false if any fence is from a different context.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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 )}(h9``struct dma_fence *fence`` [in] fence or fence array h](j )}(h``struct dma_fence *fence``h]j)}(hj h]hstruct dma_fence *fence}(hhhj 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.chKhjubj )}(hhh]h)}(h[in] fence or fence arrayh]h[in] fence or fence array}(hj&hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj!ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj hKhjubj )}(hB``u64 context`` [in] fence context to check all fences against h](j )}(h``u64 context``h]j)}(hjDh]h u64 context}(hhhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(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)}(h1[in] fence context to check all fences againsth]h1[in] fence context to check all fences against}(hj_hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhKhjZubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hjYhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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)}(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.}(hjhjhhhNhNubah}(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 ] kernelindenta h"]h$]h&]uh1j hj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_array_cb (C struct)c.dma_fence_array_cbhNtauh1j hj hhhNhNubj )}(hhh](j )}(hdma_fence_array_cbh]j )}(hstruct dma_fence_array_cbh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(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 }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhKubj* )}(hdma_fence_array_cbh]j0 )}(hjh]hdma_fence_array_cb}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhKubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjhhubj[ )}(hhh]h)}(hcallback helper for fence arrayh]hcallback helper for fence array}(hj 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&]uh1jZ hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j{ jj| jj} jj~ uh1j hhhj hNhNubj )}(h**Definition**:: struct dma_fence_array_cb { struct dma_fence_cb cb; struct dma_fence_array *array; }; **Members** ``cb`` fence callback structure for signaling ``array`` reference to the parent fence array objecth](h)}(h**Definition**::h](j )}(h**Definition**h]h Definition}(hhhj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj'ubh:}(hj hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhj#ubj)}(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; };}(hhhjDubah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhj#ubh)}(h **Members**h]j )}(hjUh]hMembers}(hhhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjSubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhj#ubj )}(hhh](j )}(h.``cb`` fence callback structure for signaling h](j )}(h``cb``h]j)}(hjth]hcb}(hhhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjnubj )}(hhh]h)}(h&fence callback structure for signalingh]h&fence callback structure for signaling}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjnubeh}(h]h ]h"]h$]h&]uh1j hjhKhjkubj )}(h4``array`` reference to the parent fence array objecth](j )}(h ``array``h]j)}(hjh]harray}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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 hjhKhjkubeh}(h]h ]h"]h$]h&]uh1j hj#ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_array (C struct)c.dma_fence_arrayhNtauh1j hj hhhNhNubj )}(hhh](j )}(hdma_fence_arrayh]j )}(hstruct dma_fence_arrayh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(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 }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhKubj* )}(hdma_fence_arrayh]j0 )}(hjh]hdma_fence_array}(hhhj'hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj#ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhKubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjhhubj[ )}(hhh]h)}(h%fence to represent an array of fencesh]h%fence to represent an array of fences}(hjLhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKhjGhhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j{ jj| jbj} jbj~ uh1j hhhj hNhNubj )}(hX**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; }; **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 functionh](h)}(h**Definition**::h](j )}(h**Definition**h]h Definition}(hhhjnhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjjubh:}(hj hjjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK!hjfubj)}(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; };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; };}(hhhjubah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK#hjfubh)}(h **Members**h]j )}(hjh]hMembers}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK,hjfubj )}(hhh](j )}(h``base`` fence base class h](j )}(h``base``h]j)}(hjh]hbase}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hj hj hhhNhNubah}(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)}(hj)h]h num_fences}(hhhj+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:204: ./include/linux/dma-fence-array.hhK!hj#ubj )}(hhh]h)}(hnumber of fences in the arrayh]hnumber of fences in the array}(hjDhjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hK!hj?ubah}(h]h ]h"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]uh1j hj>hK!hjubj )}(h2``num_pending`` fences in the array still pending h](j )}(h``num_pending``h]j)}(hjbh]h num_pending}(hhhjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK"hj\ubj )}(hhh]h)}(h!fences in the array still pendingh]h!fences in the array still pending}(hj}hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhK"hjxubah}(h]h ]h"]h$]h&]uh1j hj\ubeh}(h]h ]h"]h$]h&]uh1j hjwhK"hjubj )}(h``fences`` array of the fences h](j )}(h ``fences``h]j)}(hjh]hfences}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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 functionh](j )}(h``work``h]j)}(hjh]hwork}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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 hjfubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j to_dma_fence_array (C function)c.to_dma_fence_arrayhNtauh1j hj hhhNhNubj )}(hhh](j )}(hEstruct dma_fence_array * to_dma_fence_array (struct dma_fence *fence)h]j )}(hCstruct dma_fence_array *to_dma_fence_array(struct dma_fence *fence)h](j )}(hj h]hstruct}(hhhj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK2ubj )}(h h]h }(hhhj<hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj*hhhj;hK2ubh)}(hhh]j0 )}(hdma_fence_arrayh]hdma_fence_array}(hhhjMhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjJubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjOmodnameN classnameNjdj)}j]ji)}j`to_dma_fence_arraysbc.to_dma_fence_arrayasbuh1hhj*hhhj;hK2ubj )}(h h]h }(hhhjnhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj*hhhj;hK2ubj~)}(hj h]h*}(hhhj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj*hhhj;hK2ubj* )}(hto_dma_fence_arrayh]j0 )}(hjkh]hto_dma_fence_array}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj*hhhj;hK2ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]jic.to_dma_fence_arrayasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj*hhhj;hK2ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj&hhhj;hK2ubah}(h]j!ah ](jS jT eh"]h$]h&]jX uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK7hj#hhubj[ )}(hhh]h)}(h!cast a fence to a dma_fence_arrayh]h!cast a fence to a dma_fence_array}(hj,hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK1hj'hhubah}(h]h ]h"]h$]h&]uh1jZ hj#hhhj;hK2ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jBj} jBj~ uh1j hhhj hNhNubj )}(h**Parameters** ``struct dma_fence *fence`` fence to cast to a dma_fence_array **Description** Returns NULL if the fence is not a dma_fence_array, or the dma_fence_array otherwise.h](h)}(h**Parameters**h]j )}(hjLh]h Parameters}(hhhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjJubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK5hjFubj )}(hhh]j )}(h?``struct dma_fence *fence`` fence to cast to a dma_fence_array h](j )}(h``struct dma_fence *fence``h]j)}(hjkh]hstruct dma_fence *fence}(hhhjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK2hjeubj )}(hhh]h)}(h"fence to cast to a dma_fence_arrayh]h"fence to cast to a dma_fence_array}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK2hjubah}(h]h ]h"]h$]h&]uh1j hjeubeh}(h]h ]h"]h$]h&]uh1j hjhK2hjbubah}(h]h ]h"]h$]h&]uh1j hjFubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK4hjFubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhK4hjFubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dma_fence_array_for_each (C macro)c.dma_fence_array_for_eachhNtauh1j hj hhhNhNubj )}(hhh](j )}(hdma_fence_array_for_eachh]j )}(hdma_fence_array_for_eachh]j* )}(hdma_fence_array_for_eachh]j0 )}(hjh]hdma_fence_array_for_each}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKLubah}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhKLubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKKhjhhubj[ )}(hhh]h}(h]h ]h"]h$]h&]uh1jZ hjhhhjhKLubeh}(h]h ](jmacroeh"]h$]h&]j{ jj| jj} jj~ uh1j hhhj hNhNubh)}(h1``dma_fence_array_for_each (fence, index, head)``h]j)}(hj"h]h-dma_fence_array_for_each (fence, index, head)}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKMhj hhubh)}(hhh]h)}(h iterate over all fences in arrayh]h iterate over all fences in array}(hj=hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKAhj8ubah}(h]h ]h"]h$]h&]uh1hhj hhhNhNubj )}(hX\**Parameters** ``fence`` current fence ``index`` index into the array ``head`` potential dma_fence_array object **Description** Test if **array** is a dma_fence_array object and if yes iterate over all fences in the array. If not just iterate over the fence in **array** itself. For a deep dive iterator see dma_fence_unwrap_for_each().h](h)}(h**Parameters**h]j )}(hjVh]h Parameters}(hhhjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjTubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKEhjPubj )}(hhh](j )}(h``fence`` current fence h](j )}(h ``fence``h]j)}(hjuh]hfence}(hhhjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKBhjoubj )}(hhh]h)}(h current fenceh]h current fence}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKBhjubah}(h]h ]h"]h$]h&]uh1j hjoubeh}(h]h ]h"]h$]h&]uh1j hjhKBhjlubj )}(h``index`` index into the array h](j )}(h ``index``h]j)}(hjh]hindex}(hhhjhhhNhNubah}(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.hhKChjubj )}(hhh]h)}(hindex into the arrayh]hindex into the array}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKChjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKChjlubj )}(h*``head`` potential dma_fence_array object h](j )}(h``head``h]j)}(hjh]hhead}(hhhjhhhNhNubah}(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.hhKDhjubj )}(hhh]h)}(h potential dma_fence_array objecth]h potential dma_fence_array object}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKDhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKDhjlubeh}(h]h ]h"]h$]h&]uh1j hjPubh)}(h**Description**h]j )}(hj"h]h Description}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKFhjPubh)}(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 }(hTest if hj8hhhNhNubj )}(h **array**h]harray}(hhhjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj8ubht is a dma_fence_array object and if yes iterate over all fences in the array. If not just iterate over the fence in }(ht is a dma_fence_array object and if yes iterate over all fences in the array. If not just iterate over the fence in hj8hhhNhNubj )}(h **array**h]harray}(hhhjThhhNhNubah}(h]h ]h"]h$]h&]uh1j hj8ubh itself.}(h itself.hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKFhjPubh)}(h9For a deep dive iterator see dma_fence_unwrap_for_each().h]h9For a deep dive iterator see dma_fence_unwrap_for_each().}(hjphjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:204: ./include/linux/dma-fence-array.hhKIhjPubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj hhhNhNubeh}(h]dma-fence-arrayah ]h"]dma fence arrayah$]h&]uh1hhjޭhhhhhKubh)}(hhh](h)}(hDMA Fence Chainh]hDMA Fence Chain}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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 }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhK!ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`dma_fence_chain_walksbc.dma_fence_chain_walkasbuh1hhjhhhjhK!ubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhK!ubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjhhhjhK!ubj* )}(hdma_fence_chain_walkh]j0 )}(hjh]hdma_fence_chain_walk}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhK!ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubj )}(h h]h }(hhhj=hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj,ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjNhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjKubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjPmodnameN classnameNjdj)}j]jc.dma_fence_chain_walkasbuh1hhj,ubj )}(h h]h }(hhhjlhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj,ubj~)}(hj h]h*}(hhhjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj,ubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj,ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj(ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhK!ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhK!ubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK'hjhhubj[ )}(hhh]h)}(hchain walking functionh]hchain walking function}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhjhK!ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(h**Parameters** ``struct dma_fence *fence`` current chain node **Description** Walk the chain to the next node. Returns the next fence or NULL if we are at the end of the chain. Garbage collects chain nodes which are already signaled.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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}(hhhjhhhNhNubah}(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}(hjhj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK!hj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK!hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj.h]h Description}(hhhj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj,ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chK#hjubh)}(hWalk the chain to the next node. Returns the next fence or NULL if we are at the end of the chain. Garbage collects chain nodes which are already signaled.h]hWalk the chain to the next node. Returns the next fence or NULL if we are at the end of the chain. Garbage collects chain nodes which are already signaled.}(hjFhjDhhhNhNubah}(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&]uh1j 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](jl)}(hinth]hint}(hhhjshhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjohhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKQubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjohhhjhKQubj* )}(hdma_fence_chain_find_seqnoh]j0 )}(hdma_fence_chain_find_seqnoh]hdma_fence_chain_find_seqno}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjohhhjhKQubj)}(h+(struct dma_fence **pfence, uint64_t seqno)h](j)}(hstruct dma_fence **pfenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_chain_find_seqnoasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj~)}(hj h]h*}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hpfenceh]hpfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(huint64_t seqnoh](h)}(hhh]j0 )}(huint64_th]huint64_t}(hhhj2hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj/ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj4modnameN classnameNjdj)}j]jc.dma_fence_chain_find_seqnoasbuh1hhj+ubj )}(h h]h }(hhhjPhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj+ubj0 )}(hseqnoh]hseqno}(hhhj^hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjohhhjhKQubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjkhhhjhKQubah}(h]jfah ](jS jT eh"]h$]h&]jX uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKZhjhhhubj[ )}(hhh]h)}(hfind fence chain node by seqnoh]hfind fence chain node by seqno}(hjhjhhhNhNubah}(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&]uh1jZ hjhhhhjhKQubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_fence **pfence`` pointer to the chain node where to start ``uint64_t seqno`` the sequence number to search for **Description** Advance the fence pointer to the chain node which will signal this sequence number. If no sequence number is provided then this is a no-op. Returns EINVAL if the fence is not a chain node or the sequence number has not yet advanced far enough.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j 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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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)}(hjh]huint64_t seqno}(hhhjhhhNhNubah}(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.chKRhjubj )}(hhh]h)}(h!the sequence number to search forh]h!the sequence number to search for}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKRhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKRhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj>h]h Description}(hhhj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj<ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf: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.}(hjVhjThhhNhNubah}(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.}(hjehjchhhNhNubah}(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&]uh1j 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](jl)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jxah"]h$]h&]uh1jkhjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhKubj* )}(hdma_fence_chain_inith]j0 )}(hdma_fence_chain_inith]hdma_fence_chain_init}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ](jB jC 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}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(hdma_fence_chainh]hdma_fence_chain}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]ji)}j`jsbc.dma_fence_chain_initasbuh1hhjubj )}(h h]h }(hhhj hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hchainh]hchain}(hhhj(hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence *prevh](j )}(hj h]hstruct}(hhhjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubj )}(h h]h }(hhhjNhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj=ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj_hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj\ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjamodnameN classnameNjdj)}j]j c.dma_fence_chain_initasbuh1hhj=ubj )}(h h]h }(hhhj}hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj=ubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj=ubj0 )}(hprevh]hprev}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj=ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjmodnameN classnameNjdj)}j]j c.dma_fence_chain_initasbuh1hhjubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj~)}(hj h]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubj0 )}(hfenceh]hfence}(hhhjhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(huint64_t seqnoh](h)}(hhh]j0 )}(huint64_th]huint64_t}(hhhj$hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj!ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj&modnameN classnameNjdj)}j]j c.dma_fence_chain_initasbuh1hhjubj )}(h h]h }(hhhjBhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjubj0 )}(hseqnoh]hseqno}(hhhjPhhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhKubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhjhhubj[ )}(hhh]h)}(hinitialize a fence chainh]hinitialize a fence chain}(hj}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.chKhjxhhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jj} jj~ uh1j hhhjhNhNubj )}(hX**Parameters** ``struct dma_fence_chain *chain`` the chain node to initialize ``struct dma_fence *prev`` the previous fence ``struct dma_fence *fence`` the current fence ``uint64_t seqno`` the sequence number to use for the fence chain **Description** Initialize a new chain node and either start a new chain or add the node to the existing chain of the previous fence.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhjubj )}(hhh](j )}(h?``struct dma_fence_chain *chain`` the chain node to initialize h](j )}(h!``struct dma_fence_chain *chain``h]j)}(hjh]hstruct dma_fence_chain *chain}(hhhjhhhNhNubah}(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.chKhjubj )}(hhh]h)}(hthe chain node to initializeh]hthe chain node to initialize}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h.``struct dma_fence *prev`` the previous fence h](j )}(h``struct dma_fence *prev``h]j)}(hjh]hstruct dma_fence *prev}(hhhjhhhNhNubah}(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.chKhjubj )}(hhh]h)}(hthe previous fenceh]hthe previous fence}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj hKhjubj )}(h.``struct dma_fence *fence`` the current fence h](j )}(h``struct dma_fence *fence``h]j)}(hj.h]hstruct dma_fence *fence}(hhhj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhj(ubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hjIhjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChKhjDubah}(h]h ]h"]h$]h&]uh1j hj(ubeh}(h]h ]h"]h$]h&]uh1j hjChKhjubj )}(hB``uint64_t seqno`` the sequence number to use for the fence chain h](j )}(h``uint64_t seqno``h]j)}(hjgh]huint64_t seqno}(hhhjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhjaubj )}(hhh]h)}(h.the sequence number to use for the fence chainh]h.the sequence number to use for the fence chain}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hKhj}ubah}(h]h ]h"]h$]h&]uh1j hjaubeh}(h]h ]h"]h$]h&]uh1j hj|hKhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhjubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:210: ./drivers/dma-buf/dma-fence-chain.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j 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}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKubj )}(h h]h }(hhhjhhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hjhhhjhKubj* )}(hdma_fence_chainh]j0 )}(hjh]hdma_fence_chain}(hhhj hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hjhhhjhKubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hjhhhjhKubah}(h]jah ](jS jT eh"]h$]h&]jX uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhjhhubj[ )}(hhh]h)}(h+fence to represent an node of a fence chainh]h+fence to represent an node of a fence chain}(hj, hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhj' hhubah}(h]h ]h"]h$]h&]uh1jZ hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]j{ jj| jB j} jB j~ uh1j hhhjhNhNubj )}(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](j )}(h**Definition**h]h Definition}(hhhjN hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjJ ubh:}(hj 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; };}(hhhjg ubah}(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]j )}(hjx h]hMembers}(hhhjz hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjv 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}(hhhj 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 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}(hhhj 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 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}(hhhj !hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:213: ./include/linux/dma-fence-chain.hhKhj!ubj )}(hhh]h)}(h1original previous seqno before garbage collectionh]h1original previous seqno before garbage collection}(hj$!hj"!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hKhj!ubah}(h]h ]h"]h$]h&]uh1j hj!ubeh}(h]h ]h"]h$]h&]uh1j hj!hKhj ubj )}(h``fence`` encapsulated fence h](j )}(h ``fence``h]j)}(hjB!h]hfence}(hhhjD!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.hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj,.hhhj=.hK:ubh)}(hhh]j0 )}(h sync_fileh]h sync_file}(hhhjO.hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hjL.ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetjQ.modnameN classnameNjdj)}j]ji)}j`sync_file_createsbc.sync_file_createasbuh1hhj,.hhhj=.hK:ubj )}(h h]h }(hhhjp.hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj,.hhhj=.hK:ubj~)}(hj h]h*}(hhhj~.hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj,.hhhj=.hK:ubj* )}(hsync_file_createh]j0 )}(hjm.h]hsync_file_create}(hhhj.hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj.ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj,.hhhj=.hK:ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j )}(hj h]hstruct}(hhhj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubj )}(h h]h }(hhhj.hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj.ubh)}(hhh]j0 )}(h dma_fenceh]h dma_fence}(hhhj.hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj.ubah}(h]h ]h"]h$]h&] refdomainjreftypej` reftargetj.modnameN classnameNjdj)}j]jk.c.sync_file_createasbuh1hhj.ubj )}(h h]h }(hhhj.hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj.ubj~)}(hj h]h*}(hhhj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj.ubj0 )}(hfenceh]hfence}(hhhj/hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj.ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj.ubah}(h]h ]h"]h$]h&]jjuh1jhj,.hhhj=.hK:ubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj(.hhhj=.hK:ubah}(h]j#.ah ](jS jT eh"]h$]h&]jX uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKAhj%.hhubj[ )}(hhh]h)}(hcreates a sync fileh]hcreates a sync file}(hj./hj,/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chK9hj)/hhubah}(h]h ]h"]h$]h&]uh1jZ hj%.hhhj=.hK:ubeh}(h]h ](jfunctioneh"]h$]h&]j{ jj| jD/j} jD/j~ uh1j hhhj.hNhNubj )}(hXh**Parameters** ``struct dma_fence *fence`` fence to add to the sync_fence **Description** Creates a sync_file containg **fence**. This function acquires and additional reference of **fence** for the newly-created :c:type:`sync_file`, if it succeeds. The sync_file can be released with fput(sync_file->file). Returns the sync_file or NULL in case of error.h](h)}(h**Parameters**h]j )}(hjN/h]h Parameters}(hhhjP/hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjL/ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chK=hjH/ubj )}(hhh]j )}(h;``struct dma_fence *fence`` fence to add to the sync_fence h](j )}(h``struct dma_fence *fence``h]j)}(hjm/h]hstruct dma_fence *fence}(hhhjo/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:225: ./drivers/dma-buf/sync_file.chK:hjg/ubj )}(hhh]h)}(hfence to add to the sync_fenceh]hfence to add to the sync_fence}(hj/hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hK:hj/ubah}(h]h ]h"]h$]h&]uh1j hjg/ubeh}(h]h ]h"]h$]h&]uh1j hj/hK:hjd/ubah}(h]h ]h"]h$]h&]uh1j hjH/ubh)}(h**Description**h]j )}(hj/h]h Description}(hhhj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj/ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKfile). Returns the sync_file or NULL in case of error.h](hCreates a sync_file containg }(hCreates a sync_file containg hj/hhhNhNubj )}(h **fence**h]hfence}(hhhj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj/ubh5. This function acquires and additional reference of }(h5. This function acquires and additional reference of hj/hhhNhNubj )}(h **fence**h]hfence}(hhhj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj/ubh for the newly-created }(h for the newly-created hj/hhhNhNubh)}(h:c:type:`sync_file`h]j)}(hj/h]h sync_file}(hhhj/hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj sync_fileuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:225: ./drivers/dma-buf/sync_file.chKfile). Returns the sync_file or NULL in case of error.}(h{, if it succeeds. The sync_file can be released with fput(sync_file->file). Returns the sync_file or NULL in case of error.hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj 0hKhj;: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 }(hpointer to array of struct hjZ:hhhNhNubh)}(h:c:type:`sync_fence_info`h]j)}(hje:h]hsync_fence_info}(hhhjg:hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjc:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsync_fence_infouh1hhjV:hK>hjZ:ubh! with all fences in the sync_file}(h! with all fences in the sync_filehjZ:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjV:hK>hjW:ubah}(h]h ]h"]h$]h&]uh1j hj;:ubeh}(h]h ]h"]h$]h&]uh1j hjV:hK>hj9ubeh}(h]h ]h"]h$]h&]uh1j hj8ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjF4hhhje4hNubh)}(h**Description**h]j )}(hj:h]h Description}(hhhj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj:ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKBhjF4hhubh)}(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: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@hjF4hhubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_set_deadline (C struct)c.sync_set_deadlinehNtauh1j hjF4hhhje4hNubj )}(hhh](j )}(hsync_set_deadlineh]j )}(hstruct sync_set_deadlineh](j )}(hj h]hstruct}(hhhj: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.hhKQubj )}(h h]h }(hhhj:hhhNhNubah}(h]h ]j% ah"]h$]h&]uh1j hj:hhhj:hKQubj* )}(hsync_set_deadlineh]j0 )}(hj:h]hsync_set_deadline}(hhhj;hhhNhNubah}(h]h ]j; ah"]h$]h&]uh1j/ hj;ubah}(h]h ](jB jC eh"]h$]h&]jjuh1j) hj:hhhj:hKQubeh}(h]h ]h"]h$]h&]jjjM uh1j jN jO hj:hhhj:hKQubah}(h]j:ah ](jS jT eh"]h$]h&]jX uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKHhj: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+;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&]uh1jZ hj:hhhj:hKQubeh}(h]h ](jstructeh"]h$]h&]j{ jj| jA;j} jA;j~ uh1j hhhjF4hje4hNubj )}(h**Definition**:: struct sync_set_deadline { __u64 deadline_ns; __u64 pad; }; **Members** ``deadline_ns`` absolute time of the deadline ``pad`` must be zeroh](h)}(h**Definition**::h](j )}(h**Definition**h]h Definition}(hhhjM;hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjI;ubh:}(hj hjI;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKThjE;ubj)}(hCstruct sync_set_deadline { __u64 deadline_ns; __u64 pad; };h]hCstruct sync_set_deadline { __u64 deadline_ns; __u64 pad; };}(hhhjf;ubah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKVhjE;ubh)}(h **Members**h]j )}(hjw;h]hMembers}(hhhjy;hhhNhNubah}(h]h ]h"]h$]h&]uh1j hju;ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhK[hjE;ubj )}(hhh](j )}(h.``deadline_ns`` absolute time of the deadline h](j )}(h``deadline_ns``h]j)}(hj;h]h deadline_ns}(hhhj;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;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}(hhhj;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;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 hjE;ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjF4hhhje4hNubh)}(h**Description**h]j )}(hj<h]h Description}(hhhj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj<ubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKVhjF4hhubh)}(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 }(h3Allows userspace to set a deadline on a fence, see hj(<hhhNhNubh)}(h :c:type:`dma_fence_set_deadline`h]j)}(hj3<h]hdma_fence_set_deadline}(hhhj5<hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj1<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&]uh1hhjP<hKThjF4hhubh)}(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}(hjY<hjW<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:234: ./include/uapi/linux/sync_file.hhKVhjF4hhubh)}(hhh]h)}(hsclock_gettime(CLOCK_MONOTONIC, :c:type:`t`); deadline_ns = (t.tv_sec * 1000000000L) + t.tv_nsec + ns_until_deadlineh](hclock_gettime(CLOCK_MONOTONIC, }(hclock_gettime(CLOCK_MONOTONIC, hji<hhhNhNubh)}(h :c:type:`t`h]j)}(hjt<h]ht}(hhhjv<hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjr<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.hhKYhji<ubhI); deadline_ns = (t.tv_sec * 1000000000L) + t.tv_nsec + ns_until_deadline}(hI); deadline_ns = (t.tv_sec * 1000000000L) + t.tv_nsec + ns_until_deadlinehji<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj<hKYhjf<ubah}(h]h ]h"]h$]h&]uh1hhjF4hhhje4hNubeh}(h]dma-fence-sync-file-uabiah ]h"]dma fence sync file uabiah$]h&]uh1hhjޭhhhhhKubh)}(hhh](h)}(hIndefinite DMA Fencesh]hIndefinite DMA Fences}(hj<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<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<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<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=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=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:}(hj5=hj3=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.}(hjJ=hjH=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjD=ubah}(h]h ]h"]h$]h&]uh1hhjA=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.}(hjb=hj`=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj\=ubah}(h]h ]h"]h$]h&]uh1hhjA=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.}(hj|=hjz=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 } }}(hhhj=ubah}(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=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=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=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=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>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&>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.}(hj4>hj2>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.}(hjB>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.}(hjP>hjN>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:}(hj^>hj\>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.}(hjs>hjq>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjm>ubah}(h]h ]h"]h$]h&]uh1hhjj>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>hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj>ubah}(h]h ]h"]h$]h&]uh1hhjj>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>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>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>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>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. 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?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.}(hj?hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhj?ubah}(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.}(hj4?hj2?hhhNhNubah}(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 }(h>In some ways this page fault problem is a special case of the hj@?hhhNhNubhtitle_reference)}(h`Infinite DMA Fences`h]hInfinite DMA Fences}(hhhjK?hhhNhNubah}(h]h ]h"]h$]h&]uh1jI?hj@?ubhXM 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.}(hXK 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.hj@?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMyhj!>hhubeh}(h]-recoverable-hardware-page-faults-implicationsah ]h"]-recoverable hardware page faults implicationsah$]h&]uh1hhjޭhhhhhM5ubeh}(h] dma-fencesah ]h"] dma fencesah$]h&]uh1hhhhhhhhKubeh}(h]*buffer-sharing-and-synchronization-dma-bufah ]h"],buffer sharing and synchronization (dma-buf)ah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj?error_encodingUTF-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confapep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacefile_insertion_enabled raw_enabledKline_length_limitM'syntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_link embed_imagesenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}( cpu access to dma buffer objects]jaimplicit fence poll support](jjSedma buffer ioctls]jadma-buf statistics]j&Uaurefids}nameids}(jy?jv?jijfjbjbjAj>jjjqjjjj j jj$jjjbjbjۭjحjq?jn?jjjδj˴jjj j jjj{)jx)j.j.jC4j@4j<j<j>j>ji?jf?u nametypes}(jy?NjiNjbNjANjNjqNjNj NjNjNjbNjۭNjq?NjNjδNjNj NjNj{)Nj.NjC4Nj<Nj>Nji?Nuh}(jv?hjfjEjbjlj>j&jjDjjjjuj jj$j j j jy j~ jjjjjbjjj#j^jcjQjVjjjjj!j!jJ$jO$j&j&ju(jz(j.*j3*j,j,j/j/j1j1j4j4j26j76j8j8j:j:j=j=j?j?jBj Bj DjDjFjFjNjNjUjUjvWj{WjZjZj]j ]j5^j:^j_j_j9aj>ajحjbjbjbjUdjZdjejejhjhjijijljljpjpjqjqjsjsjujujwjwjyjyj+}j0}jj"j2j7jjj2j7j]jbjjjTjYj j%jjjjj5j:jjjfjkjjjޝjj~jjjjIjNjtjyjjjjj`jejn?jޭjjj˴jjjѴj jj2j7jjj-j2jjj/j4jsjxjͿjҿjjjjjqjvj$j)jjjjjnjsjyj~j jjjjj"jjjjjj!j&j+jjjjjjjjjjj_jdjYj^jj"jjjZj_jjjjjjjjjjj*j/jSjXjjjU jZ jj j j jjjjjjj!j&jjjx)jjjjfjkjjjjj"j"jP$jU$j &j&j&j&j0(j5(j.j~)j)j)jR+jW+j,j,j@4j.j#.j(.j+0j00j1j1j<jF4jc4ji4jy6j~6jg8jl8j:j:j>j<jf?j!>j=j=u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j?KsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.