sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget&/translations/zh_CN/driver-api/dma-bufmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/zh_TW/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/it_IT/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ja_JP/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ko_KR/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/pt_BR/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/sp_SP/driver-api/dma-bufmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h,Buffer Sharing and Synchronization (dma-buf)h]h,Buffer Sharing and Synchronization (dma-buf)}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh@/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf.rsthKubh paragraph)}(hThe dma-buf subsystem provides the framework for sharing buffers for hardware (DMA) access across multiple device drivers and subsystems, and for synchronizing asynchronous hardware access.h]hThe dma-buf subsystem provides the framework for sharing buffers for hardware (DMA) access across multiple device drivers and subsystems, and for synchronizing asynchronous hardware access.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hAs an example, it is used extensively by the DRM subsystem to exchange buffers between processes, contexts, library APIs within the same process, and also to exchange buffers with other subsystems such as V4L2.h]hAs an example, it is used extensively by the DRM subsystem to exchange buffers between processes, contexts, library APIs within the same process, and also to exchange buffers with other subsystems such as V4L2.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThis document describes the way in which kernel subsystems can use and interact with the three main primitives offered by dma-buf:h]hThis document describes the way in which kernel subsystems can use and interact with the three main primitives offered by dma-buf:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh block_quote)}(hX- dma-buf, representing a sg_table and exposed to userspace as a file descriptor to allow passing between processes, subsystems, devices, etc; - dma-fence, providing a mechanism to signal when an asynchronous hardware operation has completed; and - dma-resv, which manages a set of dma-fences for a particular dma-buf allowing implicit (kernel-ordered) synchronization of work to preserve the illusion of coherent access h]h bullet_list)}(hhh](h list_item)}(hdma-buf, representing a sg_table and exposed to userspace as a file descriptor to allow passing between processes, subsystems, devices, etc;h]h)}(hdma-buf, representing a sg_table and exposed to userspace as a file descriptor to allow passing between processes, subsystems, devices, etc;h]hdma-buf, representing a sg_table and exposed to userspace as a file descriptor to allow passing between processes, subsystems, devices, etc;}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhubj)}(hedma-fence, providing a mechanism to signal when an asynchronous hardware operation has completed; andh]h)}(hedma-fence, providing a mechanism to signal when an asynchronous hardware operation has completed; andh]hedma-fence, providing a mechanism to signal when an asynchronous hardware operation has completed; and}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhubj)}(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}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj4ubah}(h]h ]h"]h$]h&]uh1jhhubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Userspace API principles and useh]h Userspace API principles and use}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhhhhhKubh)}(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.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjZhhubeh}(h] userspace-api-principles-and-useah ]h"] userspace api principles and useah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hShared DMA Buffersh]hShared DMA Buffers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK"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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjhhubh)}(hAny device driver which wishes to be a part of DMA buffer sharing, can do so as either the 'exporter' of buffers, or the 'user' or 'importer' of buffers.h]hAny device driver which wishes to be a part of DMA buffer sharing, can do so as either the ‘exporter’ of buffers, or the ‘user’ or ‘importer’ of buffers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjhhubh)}(hwSay a driver A wants to use buffers created by driver B, then we call B as the exporter, and A as buffer-user/importer.h]hwSay a driver A wants to use buffers created by driver B, then we call B as the exporter, and A as buffer-user/importer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjhhubh)}(h The exporterh]h The exporter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjhhubh)}(hX- implements and manages operations in :c:type:`struct dma_buf_ops ` for the buffer, - allows other users to share the buffer by using dma_buf sharing APIs, - manages the details of buffer allocation, wrapped in a :c:type:`struct dma_buf `, - decides about the actual backing storage where this allocation happens, - and takes care of any migration of scatterlist - for all (shared) users of this buffer. h]h)}(hhh](j)}(h_implements and manages operations in :c:type:`struct dma_buf_ops ` for the buffer,h]h)}(h_implements and manages operations in :c:type:`struct dma_buf_ops ` for the buffer,h](h%implements and manages operations in }(hjhhhNhNubh)}(h*:c:type:`struct dma_buf_ops `h]hliteral)}(hjh]hstruct dma_buf_ops}(hjhhhNhNubah}(h]h ](xrefcc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocdriver-api/dma-buf refdomainjreftypetype refexplicitrefwarn reftarget dma_buf_opsuh1hhhhK/hjubh for the buffer,}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hEallows other users to share the buffer by using dma_buf sharing APIs,h]h)}(hjh]hEallows other users to share the buffer by using dma_buf sharing APIs,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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 }(hj-hhhNhNubh)}(h":c:type:`struct dma_buf `h]j)}(hj7h]hstruct dma_buf}(hj9hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hhhhK2hj-ubh,}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK2hj)ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hGdecides about the actual backing storage where this allocation happens,h]h)}(hjfh]hGdecides about the actual backing storage where this allocation happens,}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjdubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hj{ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jRjSuh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1hhhhK/hjhhubh)}(hThe buffer-userh]hThe buffer-user}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjhhubh)}(hX~- is one of (many) sharing users of the buffer. - doesn't need to worry about how the buffer is allocated, or where. - and needs a mechanism to get access to the scatterlist that makes up this buffer in memory, mapped into its own address space, so it can access the same area of memory. This interface is provided by :c:type:`struct dma_buf_attachment `. h]h)}(hhh](j)}(h-is one of (many) sharing users of the buffer.h]h)}(hjh]h-is one of (many) sharing users of the buffer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hBdoesn't need to worry about how the buffer is allocated, or where.h]h)}(hjh]hDdoesn’t need to worry about how the buffer is allocated, or where.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hXand needs a mechanism to get access to the scatterlist that makes up this buffer in memory, mapped into its own address space, so it can access the same area of memory. This interface is provided by :c:type:`struct dma_buf_attachment `. h]h)}(hXand needs a mechanism to get access to the scatterlist that makes up this buffer in memory, mapped into its own address space, so it can access the same area of memory. This interface is provided by :c:type:`struct dma_buf_attachment `.h](hand needs a mechanism to get access to the scatterlist that makes up this buffer in memory, mapped into its own address space, so it can access the same area of memory. This interface is provided by }(hjhhhNhNubh)}(h8:c:type:`struct dma_buf_attachment `h]j)}(hjh]hstruct dma_buf_attachment}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_buf_attachmentuh1hhhhK` mutex. h](h)}(hX(Fallback operations in the kernel, for example when a device is connected over USB and the kernel needs to shuffle the data around first before sending it away. Cache coherency is handled by bracketing any transactions with calls to dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() access.h]hX(Fallback operations in the kernel, for example when a device is connected over USB and the kernel needs to shuffle the data around first before sending it away. Cache coherency is handled by bracketing any transactions with calls to dma_buf_begin_cpu_access() and dma_buf_end_cpu_access() access.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMohjubh)}(hSince for most kernel internal dma-buf accesses need the entire buffer, a vmap interface is introduced. Note that on very old 32-bit architectures vmalloc space might be limited and result in vmap calls failing.h]hSince for most kernel internal dma-buf accesses need the entire buffer, a vmap interface is introduced. Note that on very old 32-bit architectures vmalloc space might be limited and result in vmap calls failing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMuhjubh)}(h Interfaces:h]h Interfaces:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMyhjubh literal_block)}(hvoid *dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map) void dma_buf_vunmap(struct dma_buf *dmabuf, struct iosys_map *map)h]hvoid *dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map) void dma_buf_vunmap(struct dma_buf *dmabuf, struct iosys_map *map)}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveforcelanguagejhighlight_args}uh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chM{hjubh)}(hXThe vmap call can fail if there is no vmap support in the exporter, or if it runs out of vmalloc space. Note that the dma-buf layer keeps a reference count for all vmap access and calls down into the exporter's vmap function only when no vmapping exists, and only unmaps it once. Protection against concurrent vmap/vunmap calls is provided by taking the :c:type:`dma_buf.lock ` mutex.h](hXdThe vmap call can fail if there is no vmap support in the exporter, or if it runs out of vmalloc space. Note that the dma-buf layer keeps a reference count for all vmap access and calls down into the exporter’s vmap function only when no vmapping exists, and only unmaps it once. Protection against concurrent vmap/vunmap calls is provided by taking the }(hjhhhNhNubh)}(h :c:type:`dma_buf.lock `h]j)}(hjh]h dma_buf.lock}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh mutex.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj%hMhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hXFor full compatibility on the importer side with existing userspace interfaces, which might already support mmap'ing buffers. This is needed in many processing pipelines (e.g. feeding a software rendered image into a hardware pipeline, thumbnail creation, snapshots, ...). Also, Android's ION framework already supported this and for DMA buffer file descriptors to replace ION buffers mmap support was needed. There is no special interfaces, userspace simply calls mmap on the dma-buf fd. But like for CPU access there's a need to bracket the actual access, which is handled by the ioctl (DMA_BUF_IOCTL_SYNC). Note that DMA_BUF_IOCTL_SYNC can fail with -EAGAIN or -EINTR, in which case it must be restarted. Some systems might need some sort of cache coherency management e.g. when CPU and GPU domains are being accessed through dma-buf at the same time. To circumvent this problem there are begin/end coherency markers, that forward directly to existing dma-buf device drivers vfunc hooks. Userspace can make use of those markers through the DMA_BUF_IOCTL_SYNC ioctl. The sequence would be used like following: - mmap dma-buf fd - for each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write to mmap area 3. SYNC_END ioctl. This can be repeated as often as you want (with the new data being consumed by say the GPU or the scanout device) - munmap once you don't need the buffer any more For correctness and optimal performance, it is always required to use SYNC_START and SYNC_END before and after, respectively, when accessing the mapped address. Userspace cannot rely on coherent access, even when there are systems where it just works without calling these ioctls. h](h)}(hXFor full compatibility on the importer side with existing userspace interfaces, which might already support mmap'ing buffers. This is needed in many processing pipelines (e.g. feeding a software rendered image into a hardware pipeline, thumbnail creation, snapshots, ...). Also, Android's ION framework already supported this and for DMA buffer file descriptors to replace ION buffers mmap support was needed.h]hXFor full compatibility on the importer side with existing userspace interfaces, which might already support mmap’ing buffers. This is needed in many processing pipelines (e.g. feeding a software rendered image into a hardware pipeline, thumbnail creation, snapshots, ...). Also, Android’s ION framework already supported this and for DMA buffer file descriptors to replace ION buffers mmap support was needed.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhj6ubh)}(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.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhj6ubh)}(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:}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhj6ubh)}(hXE - mmap dma-buf fd - for each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write to mmap area 3. SYNC_END ioctl. This can be repeated as often as you want (with the new data being consumed by say the GPU or the scanout device) - munmap once you don't need the buffer any more For correctness and optimal performance, it is always required to use SYNC_START and SYNC_END before and after, respectively, when accessing the mapped address. Userspace cannot rely on coherent access, even when there are systems where it just works without calling these ioctls. h](h)}(hX%- mmap dma-buf fd - for each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write to mmap area 3. SYNC_END ioctl. This can be repeated as often as you want (with the new data being consumed by say the GPU or the scanout device) - munmap once you don't need the buffer any more h]h)}(hhh](j)}(hmmap dma-buf fdh]h)}(hjth]hmmap dma-buf fd}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjrubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(h/munmap once you don't need the buffer any more h]h)}(h.munmap once you don't need the buffer any moreh]h0munmap once you don’t need the buffer any more}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]jRjSuh1hhjhMhjkubah}(h]h ]h"]h$]h&]uh1hhjhMhjgubh)}(hXFor correctness and optimal performance, it is always required to use SYNC_START and SYNC_END before and after, respectively, when accessing the mapped address. Userspace cannot rely on coherent access, even when there are systems where it just works without calling these ioctls.h]hXFor correctness and optimal performance, it is always required to use SYNC_START and SYNC_END before and after, respectively, when accessing the mapped address. Userspace cannot rely on coherent access, even when there are systems where it just works without calling these ioctls.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjgubeh}(h]h ]h"]h$]h&]uh1hhjhMhj6ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hXAnd as a CPU fallback in userspace processing pipelines. Similar to the motivation for kernel cpu access it is again important that the userspace code of a given importing subsystem can use the same interfaces with a imported dma-buf buffer object as with a native buffer object. This is especially important for drm where the userspace part of contemporary OpenGL, X, and other drivers is huge, and reworking them to use a different way to mmap a buffer rather invasive. The assumption in the current dma-buf interfaces is that redirecting the initial mmap is all that's needed. A survey of some of the existing subsystems shows that no driver seems to do any nefarious thing like syncing up with outstanding asynchronous processing on the device or allocating special resources at fault time. So hopefully this is good enough, since adding interfaces to intercept pagefaults and allow pte shootdowns would increase the complexity quite a bit. Interface: .. code-block:: c int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, unsigned long); If the importing subsystem simply provides a special-purpose mmap call to set up a mapping in userspace, calling do_mmap with :c:type:`dma_buf.file ` will equally achieve that for a dma-buf object. h](h)}(h8And as a CPU fallback in userspace processing pipelines.h]h8And as a CPU fallback in userspace processing pipelines.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh)}(hXSimilar to the motivation for kernel cpu access it is again important that the userspace code of a given importing subsystem can use the same interfaces with a imported dma-buf buffer object as with a native buffer object. This is especially important for drm where the userspace part of contemporary OpenGL, X, and other drivers is huge, and reworking them to use a different way to mmap a buffer rather invasive.h]hXSimilar to the motivation for kernel cpu access it is again important that the userspace code of a given importing subsystem can use the same interfaces with a imported dma-buf buffer object as with a native buffer object. This is especially important for drm where the userspace part of contemporary OpenGL, X, and other drivers is huge, and reworking them to use a different way to mmap a buffer rather invasive.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh)}(hXThe assumption in the current dma-buf interfaces is that redirecting the initial mmap is all that's needed. A survey of some of the existing subsystems shows that no driver seems to do any nefarious thing like syncing up with outstanding asynchronous processing on the device or allocating special resources at fault time. So hopefully this is good enough, since adding interfaces to intercept pagefaults and allow pte shootdowns would increase the complexity quite a bit.h]hXThe assumption in the current dma-buf interfaces is that redirecting the initial mmap is all that’s needed. A survey of some of the existing subsystems shows that no driver seems to do any nefarious thing like syncing up with outstanding asynchronous processing on the device or allocating special resources at fault time. So hopefully this is good enough, since adding interfaces to intercept pagefaults and allow pte shootdowns would increase the complexity quite a bit.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh)}(h Interface:h]h Interface:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubj)}(hKint dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, unsigned long);h]hKint dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, unsigned long);}hj#sbah}(h]h ]h"]h$]h&]jjjjjj}uh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhjubh)}(hIf the importing subsystem simply provides a special-purpose mmap call to set up a mapping in userspace, calling do_mmap with :c:type:`dma_buf.file ` will equally achieve that for a dma-buf object.h](h~If the importing subsystem simply provides a special-purpose mmap call to set up a mapping in userspace, calling do_mmap with }(hj3hhhNhNubh)}(h :c:type:`dma_buf.file `h]j)}(hj=h]h dma_buf.file}(hj?hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:119: ./drivers/dma-buf/dma-buf.chMhj3ubh0 will equally achieve that for a dma-buf object.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjZhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jRjSuh1hhjhMohjhhubeh}(h]jah ]h"] cpu access to dma buffer objectsah$]h&]uh1hhjhhhhhKu referencedKubh)}(hhh](h)}(hImplicit Fence Poll Supporth]hImplicit Fence Poll Support}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhhhhhK{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 }(hjhhhNhNubh)}(h&:c:type:`struct dma_fence `h]j)}(hjh]hstruct dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chMhjubh) can be attached to a }(hjhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjh]hdma_buf}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_bufuh1hhjhMhjubhA. The glue for that and a few related things are provided in the }(hjhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjh]hdma_resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_resvuh1hhjhMhjubh structure.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjyhhubh)}(hgUserspace can query the state of these implicitly tracked fences using poll() and related system calls:h]hgUserspace can query the state of these implicitly tracked fences using poll() and related system calls:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chMhjyhhubh)}(hhh](j)}(hsChecking for EPOLLIN, i.e. read access, can be use to query the state of the most recent write or exclusive fence. h]h)}(hrChecking for EPOLLIN, i.e. read access, can be use to query the state of the most recent write or exclusive fence.h]hrChecking for EPOLLIN, i.e. read access, can be use to query the state of the most recent write or exclusive fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chM"hj-ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jRjSuh1hhj&hMhjyhhubh)}(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.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chM%hjyhhubh)}(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 }(hj[hhhNhNubh)}(h:c:type:`sync_file`h]j)}(hjeh]h sync_file}(hjghhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj sync_fileuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:125: ./drivers/dma-buf/dma-buf.chM)hj[ubh using }(hj[hhhNhNubh)}(h":c:type:`dma_buf_sync_file_export`h]j)}(hjh]hdma_buf_sync_file_export}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjdma_buf_sync_file_exportuh1hhjhM)hj[ubh.}(hj[hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM)hjyhhubeh}(h]jah ]h"]implicit fence poll supportah$]h&]uh1hhjhhhhhK{jxKubh)}(hhh](h)}(hDMA Buffer ioctlsh]hDMA Buffer ioctls}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singledma_buf_sync (C struct)c.dma_buf_synchNtauh1jhjhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhNubhdesc)}(hhh](hdesc_signature)}(h dma_buf_synch]hdesc_signature_line)}(hstruct dma_buf_synch](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhKubh desc_name)}(h dma_buf_synch]h desc_sig_name)}(hjh]h dma_buf_sync}(hj hhhNhNubah}(h]h ]nah"]h$]h&]uh1j hj ubah}(h]h ](sig-namedescnameeh"]h$]h&]jjuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]jj add_permalinkuh1jsphinx_line_type declaratorhjhhhjhKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhKhjhhubh desc_content)}(hhh]h)}(hSynchronize with CPU access.h]hSynchronize with CPU access.}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjB hhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]domainjobjtypej] desctypej] noindex noindexentrynocontentsentryuh1jhhhjhjhNubh container)}(hX8**Definition**:: struct dma_buf_sync { __u64 flags; }; **Members** ``flags`` Set of access flags DMA_BUF_SYNC_START: Indicates the start of a map access session. DMA_BUF_SYNC_END: Indicates the end of a map access session. DMA_BUF_SYNC_READ: Indicates that the mapped DMA buffer will be read by the client via the CPU map. DMA_BUF_SYNC_WRITE: Indicates that the mapped DMA buffer will be written by the client via the CPU map. DMA_BUF_SYNC_RW: An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.h](h)}(h**Definition**::h](hstrong)}(h**Definition**h]h Definition}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjm ubh:}(hjm hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhji ubj)}(h)struct dma_buf_sync { __u64 flags; };h]h)struct dma_buf_sync { __u64 flags; };}hj sbah}(h]h ]h"]h$]h&]jjuh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK!hji ubh)}(h **Members**h]jr )}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK%hji ubhdefinition_list)}(hhh]hdefinition_list_item)}(hX``flags`` Set of access flags DMA_BUF_SYNC_START: Indicates the start of a map access session. DMA_BUF_SYNC_END: Indicates the end of a map access session. DMA_BUF_SYNC_READ: Indicates that the mapped DMA buffer will be read by the client via the CPU map. DMA_BUF_SYNC_WRITE: Indicates that the mapped DMA buffer will be written by the client via the CPU map. DMA_BUF_SYNC_RW: An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.h](hterm)}(h ``flags``h]j)}(hj h]hflags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKJhj ubh definition)}(hhh](h)}(hSet of access flagsh]hSet of access flags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK:hj ubj )}(hhh](j )}(hADMA_BUF_SYNC_START: Indicates the start of a map access session. h](j )}(hDMA_BUF_SYNC_START:h]hDMA_BUF_SYNC_START:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK=hj ubj )}(hhh]h)}(h,Indicates the start of a map access session.h]h,Indicates the start of a map access session.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK=hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hK=hj ubj )}(h=DMA_BUF_SYNC_END: Indicates the end of a map access session. h](j )}(hDMA_BUF_SYNC_END:h]hDMA_BUF_SYNC_END:}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK@hj ubj )}(hhh]h)}(h*Indicates the end of a map access session.h]h*Indicates the end of a map access session.}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1 hK@hj2 ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj1 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:}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKDhjO 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.}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKChjb ubah}(h]h ]h"]h$]h&]uh1j hjO ubeh}(h]h ]h"]h$]h&]uh1j hja hKDhj ubj )}(hhDMA_BUF_SYNC_WRITE: Indicates that the mapped DMA buffer will be written by the client via the CPU map. h](j )}(hDMA_BUF_SYNC_WRITE:h]hDMA_BUF_SYNC_WRITE:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKHhj ubj )}(hhh]h)}(hSIndicates that the mapped DMA buffer will be written by the client via the CPU map.h]hSIndicates that the mapped DMA buffer will be written by the client via the CPU map.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKGhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKHhj ubj )}(hEDMA_BUF_SYNC_RW: An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.h](j )}(hDMA_BUF_SYNC_RW:h]hDMA_BUF_SYNC_RW:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj hKJhj ubj )}(hhh]h)}(h4An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.h]h4An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKJhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKJhj ubah}(h]h ]h"]h$]h&]uh1j hji ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhjhNubh)}(h**Description**h]jr )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKNhjhhubh)}(hX*When a DMA buffer is accessed from the CPU via mmap, it is not always possible to guarantee coherency between the CPU-visible map and underlying memory. To manage coherency, DMA_BUF_IOCTL_SYNC must be used to bracket any CPU access to give the kernel the chance to shuffle memory around if needed.h]hX*When a DMA buffer is accessed from the CPU via mmap, it is not always possible to guarantee coherency between the CPU-visible map and underlying memory. To manage coherency, DMA_BUF_IOCTL_SYNC must be used to bracket any CPU access to give the kernel the chance to shuffle memory around if needed.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjhhubh)}(hPrior to accessing the map, the client must call DMA_BUF_IOCTL_SYNC with DMA_BUF_SYNC_START and the appropriate read/write flags. Once the access is complete, the client should call DMA_BUF_IOCTL_SYNC with DMA_BUF_SYNC_END and the same read/write flags.h]hPrior to accessing the map, the client must call DMA_BUF_IOCTL_SYNC with DMA_BUF_SYNC_START and the appropriate read/write flags. Once the access is complete, the client should call DMA_BUF_IOCTL_SYNC with DMA_BUF_SYNC_END and the same read/write flags.}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK"hjhhubh)}(hXThe synchronization provided via DMA_BUF_IOCTL_SYNC only provides cache coherency. It does not prevent other processes or devices from accessing the memory at the same time. If synchronization with a GPU or other device driver is required, it is the client's responsibility to wait for buffer to be ready for reading or writing before calling this ioctl with DMA_BUF_SYNC_START. Likewise, the client must ensure that follow-up work is not submitted to GPU or other device driver until after this ioctl has been called with DMA_BUF_SYNC_END?h]hX!The synchronization provided via DMA_BUF_IOCTL_SYNC only provides cache coherency. It does not prevent other processes or devices from accessing the memory at the same time. If synchronization with a GPU or other device driver is required, it is the client’s responsibility to wait for buffer to be ready for reading or writing before calling this ioctl with DMA_BUF_SYNC_START. Likewise, the client must ensure that follow-up work is not submitted to GPU or other device driver until after this ioctl has been called with DMA_BUF_SYNC_END?}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK'hjhhubh)}(hXeIf the driver or API with which the client is interacting uses implicit synchronization, waiting for prior work to complete can be done via poll() on the DMA buffer file descriptor. If the driver or API requires explicit synchronization, the client may have to wait on a sync_file or other synchronization primitive outside the scope of the DMA buffer API.h]hXeIf the driver or API with which the client is interacting uses implicit synchronization, waiting for prior work to complete can be done via poll() on the DMA buffer file descriptor. If the driver or API requires explicit synchronization, the client may have to wait on a sync_file or other synchronization primitive outside the scope of the DMA buffer API.}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK0hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_buf_export_sync_file (C struct)c.dma_buf_export_sync_filehNtauh1jhjhhhjhNubj)}(hhh](j)}(hdma_buf_export_sync_fileh]j)}(hstruct dma_buf_export_sync_fileh](j)}(hjh]hstruct}(hjm hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhji hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK9ubj)}(h h]h }(hj{ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhji hhhjz hK9ubj )}(hdma_buf_export_sync_fileh]j )}(hjg h]hdma_buf_export_sync_file}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hji hhhjz hK9ubeoh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hje hhhjz hK9ubah}(h]j` ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjz hK9hjb hhubjA )}(hhh]h)}(hGet a sync_file from a dma-bufh]hGet a sync_file from a dma-buf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKZhj hhubah}(h]h ]h"]h$]h&]uh1j@ hjb hhhjz hK9ubeh}(h]h ](jstructeh"]h$]h&]ja jjb j jc j jd je jf uh1jhhhjhjhNubjh )}(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](jr )}(h**Definition**h]h Definition}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK^hj ubj)}(hCstruct dma_buf_export_sync_file { __u32 flags; __s32 fd; };h]hCstruct dma_buf_export_sync_file { __u32 flags; __s32 fd; };}hj sbah}(h]h ]h"]h$]h&]jjuh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK`hj ubh)}(h **Members**h]jr )}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKehj ubj )}(hhh](j )}(hXK``flags`` Read/write flags Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both. If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, the returned sync file waits on any writers of the dma-buf to complete. Waiting on the returned sync file is equivalent to poll() with POLLIN. If DMA_BUF_SYNC_WRITE is set, the returned sync file waits on any users of the dma-buf (read or write) to complete. Waiting on the returned sync file is equivalent to poll() with POLLOUT. If both DMA_BUF_SYNC_WRITE and DMA_BUF_SYNC_READ are set, this is equivalent to just DMA_BUF_SYNC_WRITE. h](j )}(h ``flags``h]j)}(hj h]hflags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj ubj )}(hhh](h)}(hRead/write flagsh]hRead/write flags}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKzhj2 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.}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK|hj2 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.}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK~hj2 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.}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj2 ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj1 hKhj ubj )}(h$``fd`` Returned sync file descriptorh](j )}(h``fd``h]j)}(hj h]hfd}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj} ubj )}(hhh]h)}(hReturned sync file descriptorh]hReturned sync file descriptor}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./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&]uh1jg hjhhhjhNubh)}(h**Description**h]jr )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjhhubh)}(hX2Userspace can perform a DMA_BUF_IOCTL_EXPORT_SYNC_FILE to retrieve the current set of fences on a dma-buf file descriptor as a sync_file. CPU waits via poll() or other driver-specific mechanisms typically wait on whatever fences are on the dma-buf at the time the wait begins. This is similar except that it takes a snapshot of the current fences on the dma-buf for waiting later instead of waiting immediately. This is useful for modern graphics APIs such as Vulkan which assume an explicit synchronization model but still need to inter-operate with dma-buf.h]hX2Userspace can perform a DMA_BUF_IOCTL_EXPORT_SYNC_FILE to retrieve the current set of fences on a dma-buf file descriptor as a sync_file. CPU waits via poll() or other driver-specific mechanisms typically wait on whatever fences are on the dma-buf at the time the wait begins. This is similar except that it takes a snapshot of the current fences on the dma-buf for waiting later instead of waiting immediately. This is useful for modern graphics APIs such as Vulkan which assume an explicit synchronization model but still need to inter-operate with dma-buf.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhK[hjhhubh)}(h,The intended usage pattern is the following:h]h,The intended usage pattern is the following:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKdhjhhubh)}(hX1. Export a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE. 2. Submit rendering work which uses the dma-buf. The work should wait on the exported sync file before rendering and produce another sync_file when complete. 3. Import the rendering-complete sync_file into the dma-buf with flags corresponding to the GPU usage via DMA_BUF_IOCTL_IMPORT_SYNC_FILE. h]jm)}(hhh](j)}(hjExport a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE. h]h)}(hiExport a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE.h]hiExport a sync_file with flags corresponding to the expected GPU usage via DMA_BUF_IOCTL_EXPORT_SYNC_FILE.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKfhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hSubmit rendering work which uses the dma-buf. The work should wait on the exported sync file before rendering and produce another sync_file when complete. h]h)}(hSubmit rendering work which uses the dma-buf. The work should wait on the exported sync file before rendering and produce another sync_file when complete.h]hSubmit rendering work which uses the dma-buf. The work should wait on the exported sync file before rendering and produce another sync_file when complete.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKihj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(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.}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKmhj3 ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]jSjTjUhjVjWuh1jlhj ubah}(h]h ]h"]h$]h&]uh1hhj hKfhjhhubh)}(hXPUnlike doing implicit synchronization via a GPU kernel driver's exec ioctl, the above is not a single atomic operation. If userspace wants to ensure ordering via these fences, it is the respnosibility of userspace to use locks or other mechanisms to ensure that no other context adds fences or submits work between steps 1 and 3 above.h]hXRUnlike doing implicit synchronization via a GPU kernel driver’s exec ioctl, the above is not a single atomic operation. If userspace wants to ensure ordering via these fences, it is the respnosibility of userspace to use locks or other mechanisms to ensure that no other context adds fences or submits work between steps 1 and 3 above.}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKphjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_buf_import_sync_file (C struct)c.dma_buf_import_sync_filehNtauh1jhjhhhjhNubj)}(hhh](j)}(hdma_buf_import_sync_fileh]j)}(hstruct dma_buf_import_sync_fileh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj| hhh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKyubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj| hhhj hKyubj )}(hdma_buf_import_sync_fileh]j )}(hjz h]hdma_buf_import_sync_file}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj| hhhj hKyubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjx hhhj hKyubah}(h]js ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj hKyhju hhubjA )}(hhh]h)}(h!Insert a sync_file into a dma-bufh]h!Insert a sync_file into a dma-buf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj hhubah}(h]h ]h"]h$]h&]uh1j@ hju hhhj hKyubeh}(h]h ](jstructeh"]h$]h&]ja jjb j jc j jd je jf uh1jhhhjhjhNubjh )}(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](jr )}(h**Definition**h]h Definition}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj ubj)}(hCstruct dma_buf_import_sync_file { __u32 flags; __s32 fd; };h]hCstruct dma_buf_import_sync_file { __u32 flags; __s32 fd; };}hj sbah}(h]h ]h"]h$]h&]jjuh1jh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj ubh)}(h **Members**h]jr )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj ubj )}(hhh](j )}(hX``flags`` Read/write flags Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both. If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set, this inserts the sync_file as a read-only fence. Any subsequent implicitly synchronized writes to this dma-buf will wait on this fence but reads will not. If DMA_BUF_SYNC_WRITE is set, this inserts the sync_file as a write fence. All subsequent implicitly synchronized access to this dma-buf will wait on this fence. h](j )}(h ``flags``h]j)}(hj/h]hflags}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhj)ubj )}(hhh](h)}(hRead/write flagsh]hRead/write flags}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjEubh)}(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.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjEubh)}(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.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjEubh)}(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.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjEubeh}(h]h ]h"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]uh1j hjDhKhj&ubj )}(h``fd`` Sync file descriptorh](j )}(h``fd``h]j)}(hjh]hfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjubj )}(hhh]h)}(hSync file descriptorh]hSync file descriptor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./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 hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhjhNubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjhhubh)}(hXbUserspace can perform a DMA_BUF_IOCTL_IMPORT_SYNC_FILE to insert a sync_file into a dma-buf for the purposes of implicit synchronization with other dma-buf consumers. This allows clients using explicitly synchronized APIs such as Vulkan to inter-op with dma-buf consumers which expect implicit synchronization such as OpenGL or most media drivers/video.h]hXbUserspace can perform a DMA_BUF_IOCTL_IMPORT_SYNC_FILE to insert a sync_file into a dma-buf for the purposes of implicit synchronization with other dma-buf consumers. This allows clients using explicitly synchronized APIs such as Vulkan to inter-op with dma-buf consumers which expect implicit synchronization such as OpenGL or most media drivers/video.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh`/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:131: ./include/uapi/linux/dma-buf.hhKhjhhubeh}(h]j-ah ]h"]dma buffer ioctlsah$]h&]uh1hhjhhhhhKjxKubh)}(hhh](h)}(hDMA-BUF locking conventionh]hDMA-BUF locking convention}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hIn order to avoid deadlock situations between dma-buf exports and importers, all dma-buf API users must follow the common dma-buf locking convention.h]hIn order to avoid deadlock situations between dma-buf exports and importers, all dma-buf API users must follow the common dma-buf locking convention.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjhhubh)}(hConvention for importersh]hConvention for importers}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjhhubjm)}(hhh](j)}(hImporters must hold the dma-buf reservation lock when calling these functions: - dma_buf_pin() - dma_buf_unpin() - dma_buf_map_attachment() - dma_buf_unmap_attachment() - dma_buf_vmap() - dma_buf_vunmap() h](h)}(hNImporters must hold the dma-buf reservation lock when calling these functions:h]hNImporters must hold the dma-buf reservation lock when calling these functions:}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhj7ubh)}(h~- dma_buf_pin() - dma_buf_unpin() - dma_buf_map_attachment() - dma_buf_unmap_attachment() - dma_buf_vmap() - dma_buf_vunmap() h]h)}(hhh](j)}(h dma_buf_pin()h]h)}(hjSh]h dma_buf_pin()}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjQubah}(h]h ]h"]h$]h&]uh1jhjNubj)}(hdma_buf_unpin()h]h)}(hjkh]hdma_buf_unpin()}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjiubah}(h]h ]h"]h$]h&]uh1jhjNubj)}(hdma_buf_map_attachment()h]h)}(hjh]hdma_buf_map_attachment()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhjNubj)}(hdma_buf_unmap_attachment()h]h)}(hjh]hdma_buf_unmap_attachment()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhjNubj)}(hdma_buf_vmap()h]h)}(hjh]hdma_buf_vmap()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhjNubj)}(hdma_buf_vunmap() h]h)}(hdma_buf_vunmap()h]hdma_buf_vunmap()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]jRjSuh1hhjbhMhjJubah}(h]h ]h"]h$]h&]uh1hhjbhMhj7ubeh}(h]h ]h"]h$]h&]uh1jhj4ubj)}(hXImporters must not hold the dma-buf reservation lock when calling these functions: - dma_buf_attach() - dma_buf_dynamic_attach() - dma_buf_detach() - dma_buf_export() - dma_buf_fd() - dma_buf_get() - dma_buf_put() - dma_buf_mmap() - dma_buf_begin_cpu_access() - dma_buf_end_cpu_access() - dma_buf_map_attachment_unlocked() - dma_buf_unmap_attachment_unlocked() - dma_buf_vmap_unlocked() - dma_buf_vunmap_unlocked() h](h)}(hRImporters must not hold the dma-buf reservation lock when calling these functions:h]hRImporters must not hold the dma-buf reservation lock when calling these functions:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubh)}(hXL- dma_buf_attach() - dma_buf_dynamic_attach() - dma_buf_detach() - dma_buf_export() - dma_buf_fd() - dma_buf_get() - dma_buf_put() - dma_buf_mmap() - dma_buf_begin_cpu_access() - dma_buf_end_cpu_access() - dma_buf_map_attachment_unlocked() - dma_buf_unmap_attachment_unlocked() - dma_buf_vmap_unlocked() - dma_buf_vunmap_unlocked() h]h)}(hhh](j)}(hdma_buf_attach()h]h)}(hjh]hdma_buf_attach()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hdma_buf_dynamic_attach()h]h)}(hj(h]hdma_buf_dynamic_attach()}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhj&ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hdma_buf_detach()h]h)}(hj@h]hdma_buf_detach()}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhj>ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hdma_buf_export()h]h)}(hjXh]hdma_buf_export()}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjVubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(h dma_buf_fd()h]h)}(hjph]h dma_buf_fd()}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjnubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(h dma_buf_get()h]h)}(hjh]h dma_buf_get()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(h dma_buf_put()h]h)}(hjh]h dma_buf_put()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hdma_buf_mmap()h]h)}(hjh]hdma_buf_mmap()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hdma_buf_begin_cpu_access()h]h)}(hjh]hdma_buf_begin_cpu_access()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hdma_buf_end_cpu_access()h]h)}(hjh]hdma_buf_end_cpu_access()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(h!dma_buf_map_attachment_unlocked()h]h)}(hjh]h!dma_buf_map_attachment_unlocked()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(h#dma_buf_unmap_attachment_unlocked()h]h)}(hjh]h#dma_buf_unmap_attachment_unlocked()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hdma_buf_vmap_unlocked()h]h)}(hj0h]hdma_buf_vmap_unlocked()}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhj.ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hdma_buf_vunmap_unlocked() h]h)}(hdma_buf_vunmap_unlocked()h]hdma_buf_vunmap_unlocked()}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjFubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]jRjSuh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]jSjTjUhjVjWuh1jlhjhhhNhNubh)}(hConvention for exportersh]hConvention for exporters}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjhhubjm)}(hhh](j)}(hXThese :c:type:`dma_buf_ops` callbacks are invoked with unlocked dma-buf reservation and exporter can take the lock: - :c:type:`dma_buf_ops.attach\(\) ` - :c:type:`dma_buf_ops.detach\(\) ` - :c:type:`dma_buf_ops.release\(\) ` - :c:type:`dma_buf_ops.begin_cpu_access\(\) ` - :c:type:`dma_buf_ops.end_cpu_access\(\) ` - :c:type:`dma_buf_ops.mmap\(\) ` h](h)}(hsThese :c:type:`dma_buf_ops` callbacks are invoked with unlocked dma-buf reservation and exporter can take the lock:h](hThese }(hjhhhNhNubh)}(h:c:type:`dma_buf_ops`h]j)}(hjh]h dma_buf_ops}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]sbj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubhX callbacks are invoked with unlocked dma-buf reservation and exporter can take the lock:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubh)}(hX7- :c:type:`dma_buf_ops.attach\(\) ` - :c:type:`dma_buf_ops.detach\(\) ` - :c:type:`dma_buf_ops.release\(\) ` - :c:type:`dma_buf_ops.begin_cpu_access\(\) ` - :c:type:`dma_buf_ops.end_cpu_access\(\) ` - :c:type:`dma_buf_ops.mmap\(\) ` h]h)}(hhh](j)}(h.:c:type:`dma_buf_ops.attach\(\) `h]h)}(hjh]h)}(h.:c:type:`dma_buf_ops.attach\(\) `h]j)}(hjh]hdma_buf_ops.attach()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h.:c:type:`dma_buf_ops.detach\(\) `h]h)}(hjh]h)}(h.:c:type:`dma_buf_ops.detach\(\) `h]j)}(hj h]hdma_buf_ops.detach()}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhj'hMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h/:c:type:`dma_buf_ops.release\(\) `h]h)}(hj6h]h)}(h/:c:type:`dma_buf_ops.release\(\) `h]j)}(hj=h]hdma_buf_ops.release()}(hj?hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhj8ubah}(h]h ]h"]h$]h&]uh1hhjZhMhj4ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h8:c:type:`dma_buf_ops.begin_cpu_access\(\) `h]h)}(hjih]h)}(h8:c:type:`dma_buf_ops.begin_cpu_access\(\) `h]j)}(hjph]hdma_buf_ops.begin_cpu_access()}(hjrhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjkubah}(h]h ]h"]h$]h&]uh1hhjhMhjgubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h6:c:type:`dma_buf_ops.end_cpu_access\(\) `h]h)}(hjh]h)}(h6:c:type:`dma_buf_ops.end_cpu_access\(\) `h]j)}(hjh]hdma_buf_ops.end_cpu_access()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h-:c:type:`dma_buf_ops.mmap\(\) ` h]h)}(h,:c:type:`dma_buf_ops.mmap\(\) `h]h)}(h,:c:type:`dma_buf_ops.mmap\(\) `h]j)}(hjh]hdma_buf_ops.mmap()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jRjSuh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hXThese :c:type:`dma_buf_ops` callbacks are invoked with locked dma-buf reservation and exporter can't take the lock: - :c:type:`dma_buf_ops.pin\(\) ` - :c:type:`dma_buf_ops.unpin\(\) ` - :c:type:`dma_buf_ops.map_dma_buf\(\) ` - :c:type:`dma_buf_ops.unmap_dma_buf\(\) ` - :c:type:`dma_buf_ops.vmap\(\) ` - :c:type:`dma_buf_ops.vunmap\(\) ` h](h)}(hsThese :c:type:`dma_buf_ops` callbacks are invoked with locked dma-buf reservation and exporter can't take the lock:h](hThese }(hjhhhNhNubh)}(h:c:type:`dma_buf_ops`h]j)}(hj!h]h dma_buf_ops}(hj#hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubhZ callbacks are invoked with locked dma-buf reservation and exporter can’t take the lock:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj>hMhjubh)}(hX,- :c:type:`dma_buf_ops.pin\(\) ` - :c:type:`dma_buf_ops.unpin\(\) ` - :c:type:`dma_buf_ops.map_dma_buf\(\) ` - :c:type:`dma_buf_ops.unmap_dma_buf\(\) ` - :c:type:`dma_buf_ops.vmap\(\) ` - :c:type:`dma_buf_ops.vunmap\(\) ` h]h)}(hhh](j)}(h+:c:type:`dma_buf_ops.pin\(\) `h]h)}(hjRh]h)}(h+:c:type:`dma_buf_ops.pin\(\) `h]j)}(hjYh]hdma_buf_ops.pin()}(hj[hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjTubah}(h]h ]h"]h$]h&]uh1hhjvhMhjPubah}(h]h ]h"]h$]h&]uh1jhjMubj)}(h-:c:type:`dma_buf_ops.unpin\(\) `h]h)}(hjh]h)}(h-:c:type:`dma_buf_ops.unpin\(\) `h]j)}(hjh]hdma_buf_ops.unpin()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjMubj)}(h3:c:type:`dma_buf_ops.map_dma_buf\(\) `h]h)}(hjh]h)}(h3:c:type:`dma_buf_ops.map_dma_buf\(\) `h]j)}(hjh]hdma_buf_ops.map_dma_buf()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjMubj)}(h5:c:type:`dma_buf_ops.unmap_dma_buf\(\) `h]h)}(hjh]h)}(h5:c:type:`dma_buf_ops.unmap_dma_buf\(\) `h]j)}(hjh]hdma_buf_ops.unmap_dma_buf()}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjMubj)}(h,:c:type:`dma_buf_ops.vmap\(\) `h]h)}(hjh]h)}(h,:c:type:`dma_buf_ops.vmap\(\) `h]j)}(hj%h]hdma_buf_ops.vmap()}(hj'hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhj ubah}(h]h ]h"]h$]h&]uh1hhjBhMhjubah}(h]h ]h"]h$]h&]uh1jhjMubj)}(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)}(hjYh]hdma_buf_ops.vunmap()}(hj[hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjSubah}(h]h ]h"]h$]h&]uh1hhjvhMhjOubah}(h]h ]h"]h$]h&]uh1jhjMubeh}(h]h ]h"]h$]h&]jRjSuh1hhjvhMhjIubah}(h]h ]h"]h$]h&]uh1hhjvhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hrExporters must hold the dma-buf reservation lock when calling these functions: - dma_buf_invalidate_mappings() h](h)}(hNExporters must hold the dma-buf reservation lock when calling these functions:h]hNExporters must hold the dma-buf reservation lock when calling these functions:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubh)}(h!- dma_buf_invalidate_mappings() h]h)}(hhh]j)}(hdma_buf_invalidate_mappings() h]h)}(hdma_buf_invalidate_mappings()h]hdma_buf_invalidate_mappings()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:136: ./drivers/dma-buf/dma-buf.chMhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jRjSuh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jSjTjUhjVjWuh1jlhjhhhNhNubeh}(h]dma-buf-locking-conventionah ]h"]dma-buf locking conventionah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h)Kernel Functions and Structures Referenceh]h)Kernel Functions and Structures Reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_export (C function)c.dma_buf_exporthNtauh1jhjhhhNhNubj)}(hhh](j)}(hLstruct dma_buf * dma_buf_export (const struct dma_buf_export_info *exp_info)h]j)}(hJstruct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetj3modnameN classnameNjj)}j]j ASTIdentifier)}jGdma_buf_exportsbc.dma_buf_exportasbuh1hhjhhhjhMubj)}(h h]h }(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubhdesc_sig_punctuation)}(h*h]h*}(hjehhhNhNubah}(h]h ]pah"]h$]h&]uh1jchjhhhjhMubj )}(hdma_buf_exporth]j )}(hjRh]hdma_buf_export}(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubhdesc_parameterlist)}(h,(const struct dma_buf_export_info *exp_info)h]hdesc_parameter)}(h*const struct dma_buf_export_info *exp_infoh](j)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_buf_export_infoh]hdma_buf_export_info}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jPc.dma_buf_exportasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hexp_infoh]hexp_info}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj hhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(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.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj1hhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jLjc jLjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjVh]h Parameters}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjTubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjPubj )}(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)}(hjuh]h*const struct dma_buf_export_info *exp_info}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjoubj )}(hhh]h)}(h[in] holds all the export related information provided by the exporter. see :c:type:`struct dma_buf_export_info ` for further details.h](hO[in] holds all the export related information provided by the exporter. see }(hjhhhNhNubh)}(h::c:type:`struct dma_buf_export_info `h]j)}(hjh]hstruct dma_buf_export_info}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_export_infouh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubh for further details.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjoubeh}(h]h ]h"]h$]h&]uh1j hjhMhjlubah}(h]h ]h"]h$]h&]uh1j hjPubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjPubh)}(hReturns, on success, a newly created struct dma_buf object, which wraps the supplied private data and operations for struct dma_buf_ops. On either missing ops, or error in allocating struct dma_buf, will return negative error.h]hReturns, on success, a newly created struct dma_buf object, which wraps the supplied private data and operations for struct dma_buf_ops. On either missing ops, or error in allocating struct dma_buf, will return negative error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjPubh)}(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 }(hjhhhNhNubjr )}(h **exp_info**h]hexp_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubh is through the }(hjhhhNhNubj)}(h``DEFINE_DMA_BUF_EXPORT_INFO``h]hDEFINE_DMA_BUF_EXPORT_INFO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh macro.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjPubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_fd (C function) c.dma_buf_fdhNtauh1jhjhhhNhNubj)}(hhh](j)}(h2int dma_buf_fd (struct dma_buf *dmabuf, int flags)h]j)}(h1int dma_buf_fd(struct dma_buf *dmabuf, int flags)h](hdesc_sig_keyword_type)}(hinth]hint}(hjNhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jLhjHhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjHhhhj]hMubj )}(h dma_buf_fdh]j )}(h dma_buf_fdh]h dma_buf_fd}(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjHhhhj]hMubj)}(h#(struct dma_buf *dmabuf, int flags)h](j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjrsb c.dma_buf_fdasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hdmabufh]hdmabuf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h int flagsh](jM)}(hinth]hint}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(hflagsh]hflags}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjHhhhj]hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjDhhhj]hMubah}(h]j?ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj]hMhjAhhubjA )}(hhh]h)}(h6returns a file descriptor for the given struct dma_bufh]h6returns a file descriptor for the given struct dma_buf}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjAhhubah}(h]h ]h"]h$]h&]uh1j@ hjAhhhj]hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j\jc j\jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjfh]h Parameters}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjdubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj`ubj )}(hhh](j )}(hP``struct dma_buf *dmabuf`` [in] pointer to dma_buf for which fd is required. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjh]hstruct dma_buf *dmabuf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhj|ubj )}(h*``int flags`` [in] flags to give to fd h](j )}(h ``int flags``h]j)}(hjh]h int flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]h)}(hn] flags to give to fdh]hn] flags to give to fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhj|ubeh}(h]h ]h"]h$]h&]uh1j hj`ubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj`ubh)}(hhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM#ubj)}(h h]h }(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:hhhjKhM#ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj_modnameN classnameNjj)}j]jO)}jG dma_buf_getsb c.dma_buf_getasbuh1hhj:hhhjKhM#ubj)}(h h]h }(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:hhhjKhM#ubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj:hhhjKhM#ubj )}(h dma_buf_geth]j )}(hj{h]h dma_buf_get}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj:hhhjKhM#ubj)}(h(int fd)h]j)}(hint fdh](jM)}(hinth]hint}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(hfdh]hfd}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj:hhhjKhM#ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj6hhhjKhM#ubah}(h]j1ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjKhM#hj3hhubjA )}(hhh]h)}(h+returns the struct dma_buf related to an fdh]h+returns the struct dma_buf related to an fd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM#hjhhubah}(h]h ]h"]h$]h&]uh1j@ hj3hhhjKhM#ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(h**Parameters** ``int fd`` [in] fd associated with the struct dma_buf to be returned **Description** On success, returns the struct dma_buf associated with an fd; uses file's refcounting done by fget to increase refcount. returns ERR_PTR otherwise.h](h)}(h**Parameters**h]jr )}(hj h]h Parameters}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM'hjubj )}(hhh]j )}(hH``int fd`` [in] fd associated with the struct dma_buf to be returned h](j )}(h ``int fd``h]j)}(hj?h]hint fd}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM$hj9ubj )}(hhh]h)}(h<[in] fd associated with the struct dma_buf to be returnedh]h<[in] fd associated with the struct dma_buf to be returned}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThM$hjUubah}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]uh1j hjThM$hj6ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjzh]h Description}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjxubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM&hjubh)}(hOn success, returns the struct dma_buf associated with an fd; uses file's refcounting done by fget to increase refcount. returns ERR_PTR otherwise.h]hOn success, returns the struct dma_buf associated with an fd; uses file’s refcounting done by fget to increase refcount. returns ERR_PTR otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM%hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_put (C function) c.dma_buf_puthNtauh1jhjhhhNhNubj)}(hhh](j)}(h)void dma_buf_put (struct dma_buf *dmabuf)h]j)}(h(void dma_buf_put(struct dma_buf *dmabuf)h](jM)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMBubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMBubj )}(h dma_buf_puth]j )}(h dma_buf_puth]h dma_buf_put}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMBubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsb c.dma_buf_putasbuh1hhjubj)}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjHhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hdmabufh]hdmabuf}(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMBubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMBubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMBhjhhubjA )}(hhh]h)}(h decreases refcount of the bufferh]h decreases refcount of the buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMBhj|hhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMBubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(hX**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to reduce refcount of **Description** Uses file's refcounting done implicitly by fput(). If, as a result of this call, the refcount becomes 0, the 'release' file operation related to this fd is called. It calls :c:type:`dma_buf_ops.release ` vfunc in turn, and frees the memory allocated for dmabuf when exported.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMFhjubj )}(hhh]j )}(h@``struct dma_buf *dmabuf`` [in] buffer to reduce refcount of h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjh]hstruct dma_buf *dmabuf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMChjubj )}(hhh]h)}(h$[in] buffer to reduce refcount ofh]h$[in] buffer to reduce refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMChjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMChjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMEhjubh)}(h2Uses file's refcounting done implicitly by fput().h]h4Uses file’s refcounting done implicitly by fput().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMDhjubh)}(hIf, as a result of this call, the refcount becomes 0, the 'release' file operation related to this fd is called. It calls :c:type:`dma_buf_ops.release ` vfunc in turn, and frees the memory allocated for dmabuf when exported.h](h~If, as a result of this call, the refcount becomes 0, the ‘release’ file operation related to this fd is called. It calls }(hj hhhNhNubh)}(h+:c:type:`dma_buf_ops.release `h]j)}(hj*h]hdma_buf_ops.release}(hj,hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMFhj ubhH vfunc in turn, and frees the memory allocated for dmabuf when exported.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjGhMFhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_buf_dynamic_attach (C function)c.dma_buf_dynamic_attachhNtauh1jhjhhhNhNubj)}(hhh](j)}(hstruct dma_buf_attachment * dma_buf_dynamic_attach (struct dma_buf *dmabuf, struct device *dev, const struct dma_buf_attach_ops *importer_ops, void *importer_priv)h]j)}(hstruct dma_buf_attachment *dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev, const struct dma_buf_attach_ops *importer_ops, void *importer_priv)h](j)}(hjh]hstruct}(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjnhhhjhMubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGdma_buf_dynamic_attachsbc.dma_buf_dynamic_attachasbuh1hhjnhhhjhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjnhhhjhMubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjnhhhjhMubj )}(hdma_buf_dynamic_attachh]j )}(hjh]hdma_buf_dynamic_attach}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjnhhhjhMubj)}(hp(struct dma_buf *dmabuf, struct device *dev, const struct dma_buf_attach_ops *importer_ops, void *importer_priv)h](j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj modnameN classnameNjj)}j]jc.dma_buf_dynamic_attachasbuh1hhjubj)}(h h]h }(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hj6hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hdmabufh]hdmabuf}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct device *devh](j)}(hjh]hstruct}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXubj)}(h h]h }(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjXubh)}(hhh]j )}(hdeviceh]hdevice}(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj|modnameN classnameNjj)}j]jc.dma_buf_dynamic_attachasbuh1hhjXubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjXubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjXubj )}(hdevh]hdev}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjXubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h-const struct dma_buf_attach_ops *importer_opsh](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_buf_attach_opsh]hdma_buf_attach_ops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.dma_buf_dynamic_attachasbuh1hhjubj)}(h h]h }(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hj1hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(h importer_opsh]h importer_ops}(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hvoid *importer_privh](jM)}(hvoidh]hvoid}(hjWhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjSubj)}(h h]h }(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjSubjd)}(hjgh]h*}(hjshhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjSubj )}(h importer_privh]h importer_priv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjSubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjnhhhjhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjjhhhjhMubah}(h]jeah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjghhubjA )}(hhh]h)}(h,Add the device to dma_buf's attachments listh]h.Add the device to dma_buf’s attachments list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjghhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(hX**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to attach device to. ``struct device *dev`` [in] device to be attached. ``const struct dma_buf_attach_ops *importer_ops`` [in] importer operations for the attachment ``void *importer_priv`` [in] importer private pointer for the attachment **Description** Returns struct dma_buf_attachment pointer for this attachment. Attachments must be cleaned up by calling dma_buf_detach(). Optionally this calls :c:type:`dma_buf_ops.attach ` to allow device-specific attach functionality. A pointer to newly created :c:type:`dma_buf_attachment` on success, or a negative error code wrapped into a pointer on failure. Note that this can fail if the backing storage of **dmabuf** is in a place not accessible to **dev**, and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh](j )}(h?``struct dma_buf *dmabuf`` [in] buffer to attach device to. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjh]hstruct dma_buf *dmabuf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]h)}(h#[in] buffer to attach device to.h]h#[in] buffer to attach device to.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h6``struct device *dev`` [in] device to be attached. h](j )}(h``struct device *dev``h]j)}(hj$h]hstruct device *dev}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]h)}(h[in] device to be attached.h]h[in] device to be attached.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj:ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj9hMhjubj )}(ha``const struct dma_buf_attach_ops *importer_ops`` [in] importer operations for the attachment h](j )}(h1``const struct dma_buf_attach_ops *importer_ops``h]j)}(hj]h]h-const struct dma_buf_attach_ops *importer_ops}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjWubj )}(hhh]h)}(h.[in] importer operations for the attachmenth]h.[in] importer operations for the attachment}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhMhjsubah}(h]h ]h"]h$]h&]uh1j hjWubeh}(h]h ]h"]h$]h&]uh1j hjrhMhjubj )}(hL``void *importer_priv`` [in] importer private pointer for the attachment h](j )}(h``void *importer_priv``h]j)}(hjh]hvoid *importer_priv}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubj )}(hhh]h)}(h3[in] importer private pointer for the attachmenth]h3[in] importer private pointer for the attachment}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubh)}(hzReturns struct dma_buf_attachment pointer for this attachment. Attachments must be cleaned up by calling dma_buf_detach().h]hzReturns struct dma_buf_attachment pointer for this attachment. Attachments must be cleaned up by calling dma_buf_detach().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubh)}(hoOptionally this calls :c:type:`dma_buf_ops.attach ` to allow device-specific attach functionality.h](hOptionally this calls }(hjhhhNhNubh)}(h*:c:type:`dma_buf_ops.attach `h]j)}(hj h]hdma_buf_ops.attach}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubh/ to allow device-specific attach functionality.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hMhjubh)}(hA pointer to newly created :c:type:`dma_buf_attachment` on success, or a negative error code wrapped into a pointer on failure.h](hA pointer to newly created }(hj( hhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hj2 h]hdma_buf_attachment}(hj4 hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj0 ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj( ubhH on success, or a negative error code wrapped into a pointer on failure.}(hj( hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjO hMhjubh)}(hNote that this can fail if the backing storage of **dmabuf** is in a place not accessible to **dev**, and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY.h](h2Note that this can fail if the backing storage of }(hjZ hhhNhNubjr )}(h **dmabuf**h]hdmabuf}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjZ ubh! is in a place not accessible to }(hjZ hhhNhNubjr )}(h**dev**h]hdev}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjZ ubh], and cannot be moved to a more suitable place. This is indicated with the error code -EBUSY.}(hjZ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_attach (C function)c.dma_buf_attachhNtauh1jhjhhhNhNubj)}(hhh](j)}(hWstruct dma_buf_attachment * dma_buf_attach (struct dma_buf *dmabuf, struct device *dev)h]j)}(hUstruct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, struct device *dev)h](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj hhhj hMubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj modnameN classnameNjj)}j]jO)}jGdma_buf_attachsbc.dma_buf_attachasbuh1hhj hhhj hMubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj hhhj hMubjd)}(hjgh]h*}(hj hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj hhhj hMubj )}(hdma_buf_attachh]j )}(hj h]hdma_buf_attach}(hj !hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj hhhj hMubj)}(h,(struct dma_buf *dmabuf, struct device *dev)h](j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj'!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#!ubj)}(h h]h }(hj4!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#!ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjE!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjB!ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjG!modnameN classnameNjj)}j]j c.dma_buf_attachasbuh1hhj#!ubj)}(h h]h }(hjc!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#!ubjd)}(hjgh]h*}(hjq!hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj#!ubj )}(hdmabufh]hdmabuf}(hj~!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#!ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj!ubj)}(hstruct device *devh](j)}(hjh]hstruct}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj!ubh)}(hhh]j )}(hdeviceh]hdevice}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj!modnameN classnameNjj)}j]j c.dma_buf_attachasbuh1hhj!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj!ubjd)}(hjgh]h*}(hj!hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj!ubj )}(hdevh]hdev}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj!ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj hhhj hMubah}(h]j ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj hMhj hhubjA )}(hhh]h)}(h"Wrapper for dma_buf_dynamic_attachh]h"Wrapper for dma_buf_dynamic_attach}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj"hhubah}(h]h ]h"]h$]h&]uh1j@ hj hhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j0"jc j0"jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj:"h]h Parameters}(hj<"hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj8"ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj4"ubj )}(hhh](j )}(h?``struct dma_buf *dmabuf`` [in] buffer to attach device to. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjY"h]hstruct dma_buf *dmabuf}(hj["hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjW"ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjS"ubj )}(hhh]h)}(h#[in] buffer to attach device to.h]h#[in] buffer to attach device to.}(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"hMhjP"ubj )}(h6``struct device *dev`` [in] device to be attached. h](j )}(h``struct device *dev``h]j)}(hj"h]hstruct device *dev}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj"ubj )}(hhh]h)}(h[in] device to be attached.h]h[in] device to be attached.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMhj"ubah}(h]h ]h"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]uh1j hj"hMhjP"ubeh}(h]h ]h"]h$]h&]uh1j hj4"ubh)}(h**Description**h]jr )}(hj"h]h Description}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj"ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj4"ubh)}(hVWrapper to call dma_buf_dynamic_attach() for drivers which still use a static mapping.h]hVWrapper to call dma_buf_dynamic_attach() for drivers which still use a static mapping.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj4"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_detach (C function)c.dma_buf_detachhNtauh1jhjhhhNhNubj)}(hhh](j)}(hOvoid dma_buf_detach (struct dma_buf *dmabuf, struct dma_buf_attachment *attach)h]j)}(hNvoid dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)h](jM)}(hvoidh]hvoid}(hj#hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj#hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM)ubj)}(h h]h }(hj!#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#hhhj #hM)ubj )}(hdma_buf_detachh]j )}(hdma_buf_detachh]hdma_buf_detach}(hj3#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/#ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj#hhhj #hM)ubj)}(h;(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)h](j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hjO#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK#ubj)}(h h]h }(hj\#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjK#ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjm#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjj#ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjo#modnameN classnameNjj)}j]jO)}jGj5#sbc.dma_buf_detachasbuh1hhjK#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjK#ubjd)}(hjgh]h*}(hj#hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjK#ubj )}(hdmabufh]hdmabuf}(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjK#ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjG#ubj)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj#modnameN classnameNjj)}j]j#c.dma_buf_detachasbuh1hhj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#ubjd)}(hjgh]h*}(hj $hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj#ubj )}(hattachh]hattach}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjG#ubeh}(h]h ]h"]h$]h&]jjuh1jhj#hhhj #hM)ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj #hhhj #hM)ubah}(h]j#ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj #hM)hj#hhubjA )}(hhh]h)}(h:Remove the given attachment from dmabuf's attachments listh]h` for device-specific detach.h](h)}(h**Parameters**h]jr )}(hjd$h]h Parameters}(hjf$hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjb$ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM-hj^$ubj )}(hhh](j )}(h:``struct dma_buf *dmabuf`` [in] buffer to detach from. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj$h]hstruct dma_buf *dmabuf}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM*hj}$ubj )}(hhh]h)}(h[in] buffer to detach from.h]h[in] buffer to detach from.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hM*hj$ubah}(h]h ]h"]h$]h&]uh1j hj}$ubeh}(h]h ]h"]h$]h&]uh1j hj$hM*hjz$ubj )}(hd``struct dma_buf_attachment *attach`` [in] attachment to be detached; is free'd after this call. h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj$h]h!struct dma_buf_attachment *attach}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM+hj$ubj )}(hhh]h)}(h=[in] attachment to be detached; is free'd after this call.h]h?[in] attachment to be detached; is free’d after this call.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hM+hj$ubah}(h]h ]h"]h$]h&]uh1j hj$ubeh}(h]h ]h"]h$]h&]uh1j hj$hM+hjz$ubeh}(h]h ]h"]h$]h&]uh1j hj^$ubh)}(h**Description**h]jr )}(hj$h]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj$ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM-hj^$ubh)}(hBClean up a device attachment obtained by calling dma_buf_attach().h]hBClean up a device attachment obtained by calling dma_buf_attach().}(hj %hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM,hj^$ubh)}(h\Optionally this calls :c:type:`dma_buf_ops.detach ` for device-specific detach.h](hOptionally this calls }(hj%hhhNhNubh)}(h*:c:type:`dma_buf_ops.detach `h]j)}(hj&%h]hdma_buf_ops.detach}(hj(%hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj$%ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_buf_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM.hj%ubh for device-specific detach.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjC%hM.hj^$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_pin (C function) c.dma_buf_pinhNtauh1jhjhhhNhNubj)}(hhh](j)}(h3int dma_buf_pin (struct dma_buf_attachment *attach)h]j)}(h2int dma_buf_pin(struct dma_buf_attachment *attach)h](jM)}(hinth]hint}(hjn%hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjj%hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMEubj)}(h h]h }(hj}%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjj%hhhj|%hMEubj )}(h dma_buf_pinh]j )}(h dma_buf_pinh]h dma_buf_pin}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjj%hhhj|%hMEubj)}(h#(struct dma_buf_attachment *attach)h]j)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj%ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj%modnameN classnameNjj)}j]jO)}jGj%sb c.dma_buf_pinasbuh1hhj%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj%ubjd)}(hjgh]h*}(hj%hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj%ubj )}(hattachh]hattach}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%ubah}(h]h ]h"]h$]h&]jjuh1jhjj%hhhj|%hMEubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjf%hhhj|%hMEubah}(h]ja%ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj|%hMEhjc%hhubjA )}(hhh]h)}(hLock down the DMA-bufh]hLock down the DMA-buf}(hj.&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMEhj+&hhubah}(h]h ]h"]h$]h&]uh1j@ hjc%hhhj|%hMEubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jF&jc jF&jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjP&h]h Parameters}(hjR&hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjN&ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMIhjJ&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)}(hjo&h]h!struct dma_buf_attachment *attach}(hjq&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm&ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMFhji&ubj )}(hhh]h)}(h)[in] attachment which should be pinnedh]h)[in] attachment which should be pinned}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMFhj&ubah}(h]h ]h"]h$]h&]uh1j hji&ubeh}(h]h ]h"]h$]h&]uh1j hj&hMFhjf&ubah}(h]h ]h"]h$]h&]uh1j hjJ&ubh)}(h**Description**h]jr )}(hj&h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj&ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMHhjJ&ubh)}(hXOnly dynamic importers (who set up **attach** with dma_buf_dynamic_attach()) may call this, and only for limited use cases like scanout and not for temporary pin operations. It is not permitted to allow userspace to pin arbitrary amounts of buffers through this interface.h](h#Only dynamic importers (who set up }(hj&hhhNhNubjr )}(h **attach**h]hattach}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj&ubh with dma_buf_dynamic_attach()) may call this, and only for limited use cases like scanout and not for temporary pin operations. It is not permitted to allow userspace to pin arbitrary amounts of buffers through this interface.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMGhjJ&ubh)}(h4Buffers must be unpinned by calling dma_buf_unpin().h]h4Buffers must be unpinned by calling dma_buf_unpin().}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMLhjJ&ubh)}(h **Return**h]jr )}(hj&h]hReturn}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj&ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMNhjJ&ubh)}(h-0 on success, negative error code on failure.h]h-0 on success, negative error code on failure.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMOhjJ&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_unpin (C function)c.dma_buf_unpinhNtauh1jhjhhhNhNubj)}(hhh](j)}(h6void dma_buf_unpin (struct dma_buf_attachment *attach)h]j)}(h5void dma_buf_unpin(struct dma_buf_attachment *attach)h](jM)}(hvoidh]hvoid}(hj7'hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj3'hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMcubj)}(h h]h }(hjF'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj3'hhhjE'hMcubj )}(h dma_buf_unpinh]j )}(h dma_buf_unpinh]h dma_buf_unpin}(hjX'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjT'ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj3'hhhjE'hMcubj)}(h#(struct dma_buf_attachment *attach)h]j)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hjt'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjp'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjp'ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj'modnameN classnameNjj)}j]jO)}jGjZ'sbc.dma_buf_unpinasbuh1hhjp'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjp'ubjd)}(hjgh]h*}(hj'hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjp'ubj )}(hattachh]hattach}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjp'ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjl'ubah}(h]h ]h"]h$]h&]jjuh1jhj3'hhhjE'hMcubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj/'hhhjE'hMcubah}(h]j*'ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjE'hMchj,'hhubjA )}(hhh]h)}(hUnpin a DMA-bufh]hUnpin a DMA-buf}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMchj'hhubah}(h]h ]h"]h$]h&]uh1j@ hj,'hhhjE'hMcubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j(jc j(jd je jf uh1jhhhjhNhNubjh )}(hXI**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.invalidate_mappings `.h](h)}(h**Parameters**h]jr )}(hj(h]h Parameters}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj(ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMghj(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)}(hj8(h]h!struct dma_buf_attachment *attach}(hj:(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6(ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMdhj2(ubj )}(hhh]h)}(h+[in] attachment which should be unpinnedh]h+[in] attachment which should be unpinned}(hjQ(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjM(hMdhjN(ubah}(h]h ]h"]h$]h&]uh1j hj2(ubeh}(h]h ]h"]h$]h&]uh1j hjM(hMdhj/(ubah}(h]h ]h"]h$]h&]uh1j hj(ubh)}(h**Description**h]jr )}(hjs(h]h Description}(hju(hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjq(ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMfhj(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.invalidate_mappings `.h](h\This unpins a buffer pinned by dma_buf_pin() and allows the exporter to move any mapping of }(hj(hhhNhNubjr )}(h **attach**h]hattach}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj(ubh' again and inform the importer through }(hj(hhhNhNubh)}(hE:c:type:`dma_buf_attach_ops.invalidate_mappings `h]j)}(hj(h]h&dma_buf_attach_ops.invalidate_mappings}(hj(hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attach_opsuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMehj(ubh.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj(hMehj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_buf_map_attachment (C function)c.dma_buf_map_attachmenthNtauh1jhjhhhNhNubj)}(hhh](j)}(hostruct sg_table * dma_buf_map_attachment (struct dma_buf_attachment *attach, enum dma_data_direction direction)h]j)}(hmstruct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j)}(hjh]hstruct}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMxubj)}(h h]h }(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj(hhhj(hMxubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj )hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj )ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj)modnameN classnameNjj)}j]jO)}jGdma_buf_map_attachmentsbc.dma_buf_map_attachmentasbuh1hhj(hhhj(hMxubj)}(h h]h }(hj-)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj(hhhj(hMxubjd)}(hjgh]h*}(hj;)hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj(hhhj(hMxubj )}(hdma_buf_map_attachmenth]j )}(hj*)h]hdma_buf_map_attachment}(hjL)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjH)ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj(hhhj(hMxubj)}(hF(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hjg)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjc)ubj)}(h h]h }(hjt)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjc)ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj)modnameN classnameNjj)}j]j()c.dma_buf_map_attachmentasbuh1hhjc)ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjc)ubjd)}(hjgh]h*}(hj)hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjc)ubj )}(hattachh]hattach}(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjc)ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj_)ubj)}(h!enum dma_data_direction directionh](j)}(henumh]henum}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj)ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj)modnameN classnameNjj)}j]j()c.dma_buf_map_attachmentasbuh1hhj)ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj)ubj )}(h directionh]h direction}(hj"*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj_)ubeh}(h]h ]h"]h$]h&]jjuh1jhj(hhhj(hMxubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj(hhhj(hMxubah}(h]j(ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj(hMxhj(hhubjA )}(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.}(hjL*hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMxhjI*hhubah}(h]h ]h"]h$]h&]uh1j@ hj(hhhj(hMxubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jd*jc jd*jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjn*h]h Parameters}(hjp*hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjl*ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM|hjh*ubj )}(hhh](j )}(h]``struct dma_buf_attachment *attach`` [in] attachment whose scatterlist is to be returned h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj*h]h!struct dma_buf_attachment *attach}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM{hj*ubj )}(hhh]h)}(h6[in] attachment whose scatterlist is to be returnedh]h6[in] attachment whose scatterlist is to be returned}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hM{hj*ubah}(h]h ]h"]h$]h&]uh1j hj*ubeh}(h]h ]h"]h$]h&]uh1j hj*hM{hj*ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hj*h]h!enum dma_data_direction direction}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM|hj*ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hM|hj*ubah}(h]h ]h"]h$]h&]uh1j hj*ubeh}(h]h ]h"]h$]h&]uh1j hj*hM|hj*ubeh}(h]h ]h"]h$]h&]uh1j hjh*ubh)}(h**Description**h]jr )}(hj+h]h Description}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj*ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM~hjh*ubh)}(hReturns sg_table containing the scatterlist to be returned; returns ERR_PTR on error. May return -EINTR if it is interrupted by a signal.h]hReturns sg_table containing the scatterlist to be returned; returns ERR_PTR on error. May return -EINTR if it is interrupted by a signal.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM}hjh*ubh)}(h\On success, the DMA addresses and lengths in the returned scatterlist are PAGE_SIZE aligned.h]h\On success, the DMA addresses and lengths in the returned scatterlist are PAGE_SIZE aligned.}(hj&+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjh*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.}(hj5+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjh*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.}(hjD+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjh*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j,dma_buf_map_attachment_unlocked (C function)!c.dma_buf_map_attachment_unlockedhNtauh1jhjhhhNhNubj)}(hhh](j)}(hxstruct sg_table * dma_buf_map_attachment_unlocked (struct dma_buf_attachment *attach, enum dma_data_direction direction)h]j)}(hvstruct sg_table *dma_buf_map_attachment_unlocked(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j)}(hjh]hstruct}(hjs+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjo+hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjo+hhhj+hMubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj+modnameN classnameNjj)}j]jO)}jGdma_buf_map_attachment_unlockedsb!c.dma_buf_map_attachment_unlockedasbuh1hhjo+hhhj+hMubj)}(h h]h }(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjo+hhhj+hMubjd)}(hjgh]h*}(hj+hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjo+hhhj+hMubj )}(hdma_buf_map_attachment_unlockedh]j )}(hj+h]hdma_buf_map_attachment_unlocked}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjo+hhhj+hMubj)}(hF(struct dma_buf_attachment *attach, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubj)}(h h]h }(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj+ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj ,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj ,modnameN classnameNjj)}j]j+!c.dma_buf_map_attachment_unlockedasbuh1hhj+ubj)}(h h]h }(hj),hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj+ubjd)}(hjgh]h*}(hj7,hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj+ubj )}(hattachh]hattach}(hjD,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+ubj)}(h!enum dma_data_direction directionh](j)}(hj)h]henum}(hj],hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjY,ubj)}(h h]h }(hjj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjY,ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj{,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjx,ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj},modnameN classnameNjj)}j]j+!c.dma_buf_map_attachment_unlockedasbuh1hhjY,ubj)}(h h]h }(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjY,ubj )}(h directionh]h direction}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjY,ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+ubeh}(h]h ]h"]h$]h&]jjuh1jhjo+hhhj+hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjk+hhhj+hMubah}(h]jf+ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj+hMhjh+hhubjA )}(hhh]h)}(hReturns the scatterlist table of the attachment; mapped into _device_ address space. Is a wrapper for map_dma_buf() of the dma_buf_ops.h]hReturns the scatterlist table of the attachment; mapped into _device_ address space. Is a wrapper for map_dma_buf() of the dma_buf_ops.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj,hhubah}(h]h ]h"]h$]h&]uh1j@ hjh+hhhj+hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j,jc j,jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj,h]h Parameters}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj,ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj,ubj )}(hhh](j )}(h]``struct dma_buf_attachment *attach`` [in] attachment whose scatterlist is to be returned h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj-h]h!struct dma_buf_attachment *attach}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj -ubj )}(hhh]h)}(h6[in] attachment whose scatterlist is to be returnedh]h6[in] attachment whose scatterlist is to be returned}(hj+-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'-hMhj(-ubah}(h]h ]h"]h$]h&]uh1j hj -ubeh}(h]h ]h"]h$]h&]uh1j hj'-hMhj -ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hjK-h]h!enum dma_data_direction direction}(hjM-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjI-ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjE-ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hjd-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`-hMhja-ubah}(h]h ]h"]h$]h&]uh1j hjE-ubeh}(h]h ]h"]h$]h&]uh1j hj`-hMhj -ubeh}(h]h ]h"]h$]h&]uh1j hj,ubh)}(h**Description**h]jr )}(hj-h]h Description}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj-ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj,ubh)}(h-Unlocked variant of dma_buf_map_attachment().h]h-Unlocked variant of dma_buf_map_attachment().}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%dma_buf_unmap_attachment (C function)c.dma_buf_unmap_attachmenthNtauh1jhjhhhNhNubj)}(hhh](j)}(hvoid dma_buf_unmap_attachment (struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h]j)}(h~void dma_buf_unmap_attachment(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h](jM)}(hvoidh]hvoid}(hj-hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj-hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj-hhhj-hMubj )}(hdma_buf_unmap_attachmenth]j )}(hdma_buf_unmap_attachmenth]hdma_buf_unmap_attachment}(hj-hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj-ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj-hhhj-hMubj)}(ha(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj.ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj&.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#.ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj(.modnameN classnameNjj)}j]jO)}jGj-sbc.dma_buf_unmap_attachmentasbuh1hhj.ubj)}(h h]h }(hjF.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj.ubjd)}(hjgh]h*}(hjT.hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj.ubj )}(hattachh]hattach}(hja.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj.ubj)}(hstruct sg_table *sg_tableh](j)}(hjh]hstruct}(hjz.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjv.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjv.ubh)}(hhh]j )}(hsg_tableh]hsg_table}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj.modnameN classnameNjj)}j]jB.c.dma_buf_unmap_attachmentasbuh1hhjv.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjv.ubjd)}(hjgh]h*}(hj.hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjv.ubj )}(hsg_tableh]hsg_table}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjv.ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj.ubj)}(h!enum dma_data_direction directionh](j)}(hj)h]henum}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj.ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj /modnameN classnameNjj)}j]jB.c.dma_buf_unmap_attachmentasbuh1hhj.ubj)}(h h]h }(hj&/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj.ubj )}(h directionh]h direction}(hj4/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&]jjj2 uh1jj3 j4 hj-hhhj-hMubah}(h]j-ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj-hMhj-hhubjA )}(hhh]h)}(hunmaps and decreases usecount of the buffer;might deallocate the scatterlist associated. Is a wrapper for unmap_dma_buf() of dma_buf_ops.h]hunmaps and decreases usecount of the buffer;might deallocate the scatterlist associated. Is a wrapper for unmap_dma_buf() of dma_buf_ops.}(hj^/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj[/hhubah}(h]h ]h"]h$]h&]uh1j@ hj-hhhj-hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jv/jc jv/jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj/h]h Parameters}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj~/ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjz/ubj )}(hhh](j )}(hN``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hj/h]h!struct dma_buf_attachment *attach}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj/ubj )}(hhh]h)}(h'[in] attachment to unmap buffer fromh]h'[in] attachment to unmap buffer from}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hMhj/ubah}(h]h ]h"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]uh1j hj/hMhj/ubj )}(hN``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap h](j )}(h``struct sg_table *sg_table``h]j)}(hj/h]hstruct sg_table *sg_table}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj/ubj )}(hhh]h)}(h/[in] scatterlist info of the buffer to unmaph]h/[in] scatterlist info of the buffer to unmap}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hMhj/ubah}(h]h ]h"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]uh1j hj/hMhj/ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hj0h]h!enum dma_data_direction direction}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj 0ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hj*0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&0hMhj'0ubah}(h]h ]h"]h$]h&]uh1j hj 0ubeh}(h]h ]h"]h$]h&]uh1j hj&0hMhj/ubeh}(h]h ]h"]h$]h&]uh1j hjz/ubh)}(h**Description**h]jr )}(hjL0h]h Description}(hjN0hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjJ0ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjz/ubh)}(hPThis unmaps a DMA mapping for **attached** obtained by dma_buf_map_attachment().h](hThis unmaps a DMA mapping for }(hjb0hhhNhNubjr )}(h **attached**h]hattached}(hjj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjb0ubh& obtained by dma_buf_map_attachment().}(hjb0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjz/ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j.dma_buf_unmap_attachment_unlocked (C function)#c.dma_buf_unmap_attachment_unlockedhNtauh1jhjhhhNhNubj)}(hhh](j)}(hvoid dma_buf_unmap_attachment_unlocked (struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h]j)}(hvoid dma_buf_unmap_attachment_unlocked(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h](jM)}(hvoidh]hvoid}(hj0hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj0hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj0hhhj0hMubj )}(h!dma_buf_unmap_attachment_unlockedh]j )}(h!dma_buf_unmap_attachment_unlockedh]h!dma_buf_unmap_attachment_unlocked}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj0hhhj0hMubj)}(ha(struct dma_buf_attachment *attach, struct sg_table *sg_table, enum dma_data_direction direction)h](j)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj0ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj1modnameN classnameNjj)}j]jO)}jGj0sb#c.dma_buf_unmap_attachment_unlockedasbuh1hhj0ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj0ubjd)}(hjgh]h*}(hj,1hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj0ubj )}(hattachh]hattach}(hj91hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubj)}(hstruct sg_table *sg_tableh](j)}(hjh]hstruct}(hjR1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjN1ubj)}(h h]h }(hj_1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjN1ubh)}(hhh]j )}(hsg_tableh]hsg_table}(hjp1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjm1ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjr1modnameN classnameNjj)}j]j1#c.dma_buf_unmap_attachment_unlockedasbuh1hhjN1ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjN1ubjd)}(hjgh]h*}(hj1hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjN1ubj )}(hsg_tableh]hsg_table}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjN1ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubj)}(h!enum dma_data_direction directionh](j)}(hj)h]henum}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj1ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj1modnameN classnameNjj)}j]j1#c.dma_buf_unmap_attachment_unlockedasbuh1hhj1ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj1ubj )}(h directionh]h direction}(hj 2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj1ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubeh}(h]h ]h"]h$]h&]jjuh1jhj0hhhj0hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj0hhhj0hMubah}(h]j0ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj0hMhj0hhubjA )}(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.}(hj62hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj32hhubah}(h]h ]h"]h$]h&]uh1j@ hj0hhhj0hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jN2jc jN2jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjX2h]h Parameters}(hjZ2hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjV2ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjR2ubj )}(hhh](j )}(hN``struct dma_buf_attachment *attach`` [in] attachment to unmap buffer from h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hjw2h]h!struct dma_buf_attachment *attach}(hjy2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhju2ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjq2ubj )}(hhh]h)}(h'[in] attachment to unmap buffer fromh]h'[in] attachment to unmap buffer from}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1j hjq2ubeh}(h]h ]h"]h$]h&]uh1j hj2hMhjn2ubj )}(hN``struct sg_table *sg_table`` [in] scatterlist info of the buffer to unmap h](j )}(h``struct sg_table *sg_table``h]j)}(hj2h]hstruct sg_table *sg_table}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj2ubj )}(hhh]h)}(h/[in] scatterlist info of the buffer to unmaph]h/[in] scatterlist info of the buffer to unmap}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1j hj2ubeh}(h]h ]h"]h$]h&]uh1j hj2hMhjn2ubj )}(hH``enum dma_data_direction direction`` [in] direction of DMA transfer h](j )}(h%``enum dma_data_direction direction``h]j)}(hj2h]h!enum dma_data_direction direction}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj2ubj )}(hhh]h)}(h![in] direction of DMA transferh]h![in] direction of DMA transfer}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj2ubah}(h]h ]h"]h$]h&]uh1j hj2ubeh}(h]h ]h"]h$]h&]uh1j hj2hMhjn2ubeh}(h]h ]h"]h$]h&]uh1j hjR2ubh)}(h**Description**h]jr )}(hj$3h]h Description}(hj&3hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj"3ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjR2ubh)}(h/Unlocked variant of dma_buf_unmap_attachment().h]h/Unlocked variant of dma_buf_unmap_attachment().}(hj:3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjR2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%dma_buf_attach_revocable (C function)c.dma_buf_attach_revocablehNtauh1jhjhhhNhNubj)}(hhh](j)}(hAbool dma_buf_attach_revocable (struct dma_buf_attachment *attach)h]j)}(h@bool dma_buf_attach_revocable(struct dma_buf_attachment *attach)h](jM)}(hboolh]hbool}(hji3hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhje3hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM)ubj)}(h h]h }(hjx3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhje3hhhjw3hM)ubj )}(hdma_buf_attach_revocableh]j )}(hdma_buf_attach_revocableh]hdma_buf_attach_revocable}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hje3hhhjw3hM)ubj)}(h#(struct dma_buf_attachment *attach)h]j)}(h!struct dma_buf_attachment *attachh](j)}(hjh]hstruct}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj3ubh)}(hhh]j )}(hdma_buf_attachmenth]hdma_buf_attachment}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj3modnameN classnameNjj)}j]jO)}jGj3sbc.dma_buf_attach_revocableasbuh1hhj3ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj3ubjd)}(hjgh]h*}(hj3hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj3ubj )}(hattachh]hattach}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj3ubah}(h]h ]h"]h$]h&]jjuh1jhje3hhhjw3hM)ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hja3hhhjw3hM)ubah}(h]j\3ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjw3hM)hj^3hhubjA )}(hhh]h)}(h8check if a DMA-buf importer implements revoke semantics.h]h8check if a DMA-buf importer implements revoke semantics.}(hj)4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM)hj&4hhubah}(h]h ]h"]h$]h&]uh1j@ hj^3hhhjw3hM)ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jA4jc jA4jd je jf uh1jhhhjhNhNubjh )}(hXR**Parameters** ``struct dma_buf_attachment *attach`` the DMA-buf attachment to check **Description** Returns true if the DMA-buf importer can support the revoke sequence explained in dma_buf_invalidate_mappings() within bounded time. Meaning the importer implements invalidate_mappings() and ensures that unmap is called as a result.h](h)}(h**Parameters**h]jr )}(hjK4h]h Parameters}(hjM4hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjI4ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM-hjE4ubj )}(hhh]j )}(hF``struct dma_buf_attachment *attach`` the DMA-buf attachment to check h](j )}(h%``struct dma_buf_attachment *attach``h]j)}(hjj4h]h!struct dma_buf_attachment *attach}(hjl4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh4ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM+hjd4ubj )}(hhh]h)}(hthe DMA-buf attachment to checkh]hthe DMA-buf attachment to check}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hM+hj4ubah}(h]h ]h"]h$]h&]uh1j hjd4ubeh}(h]h ]h"]h$]h&]uh1j hj4hM+hja4ubah}(h]h ]h"]h$]h&]uh1j hjE4ubh)}(h**Description**h]jr )}(hj4h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj4ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM-hjE4ubh)}(hReturns true if the DMA-buf importer can support the revoke sequence explained in dma_buf_invalidate_mappings() within bounded time. Meaning the importer implements invalidate_mappings() and ensures that unmap is called as a result.h]hReturns true if the DMA-buf importer can support the revoke sequence explained in dma_buf_invalidate_mappings() within bounded time. Meaning the importer implements invalidate_mappings() and ensures that unmap is called as a result.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM,hjE4ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(dma_buf_invalidate_mappings (C function)c.dma_buf_invalidate_mappingshNtauh1jhjhhhNhNubj)}(hhh](j)}(h9void dma_buf_invalidate_mappings (struct dma_buf *dmabuf)h]j)}(h8void dma_buf_invalidate_mappings(struct dma_buf *dmabuf)h](jM)}(hvoidh]hvoid}(hj4hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj4hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM:ubj)}(h h]h }(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj4hhhj4hM:ubj )}(hdma_buf_invalidate_mappingsh]j )}(hdma_buf_invalidate_mappingsh]hdma_buf_invalidate_mappings}(hj 5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj4hhhj4hM:ubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj'5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#5ubj)}(h h]h }(hj45hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#5ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjE5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjB5ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjG5modnameN classnameNjj)}j]jO)}jGj 5sbc.dma_buf_invalidate_mappingsasbuh1hhj#5ubj)}(h h]h }(hje5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#5ubjd)}(hjgh]h*}(hjs5hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj#5ubj )}(hdmabufh]hdmabuf}(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#5ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj5ubah}(h]h ]h"]h$]h&]jjuh1jhj4hhhj4hM:ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj4hhhj4hM:ubah}(h]j4ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj4hM:hj4hhubjA )}(hhh]h)}(h)notify attachments that DMA-buf is movingh]h)notify attachments that DMA-buf is moving}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM:hj5hhubah}(h]h ]h"]h$]h&]uh1j@ hj4hhhj4hM:ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j5jc j5jd je jf uh1jhhhjhNhNubjh )}(hXy**Parameters** ``struct dma_buf *dmabuf`` [in] buffer which is moving **Description** Informs all attachments that they need to destroy and recreate all their mappings. If the attachment is dynamic then the dynamic importer is expected to invalidate any caches it has of the mapping result and perform a new mapping request before allowing HW to do any further DMA. If the attachment is pinned then this informs the pinned importer that the underlying mapping is no longer available. Pinned importers may take this is as a permanent revocation and never establish new mappings so exporters should not trigger it lightly. Upon return importers may continue to access the DMA-buf memory. The caller must do two additional waits to ensure that the memory is no longer being accessed: 1) Until dma_resv_wait_timeout() retires fences the importer is allowed to fully access the memory. 2) Until the importer calls unmap it is allowed to speculatively read-and-discard the memory. It must not write to the memory. A caller wishing to use dma_buf_invalidate_mappings() to fully stop access to the DMA-buf must wait for both. Dynamic callers can often use just the first. All importers providing a invalidate_mappings() op must ensure that unmap is called within bounded time after the op. Pinned importers that do not support a invalidate_mappings() op will eventually perform unmap when they are done with the buffer, which may be an ubounded time from calling this function. dma_buf_attach_revocable() can be used to prevent such importers from attaching. Importers are free to request a new mapping in parallel as this function returns.h](h)}(h**Parameters**h]jr )}(hj5h]h Parameters}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj5ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM>hj5ubj )}(hhh]j )}(h:``struct dma_buf *dmabuf`` [in] buffer which is moving h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj5h]hstruct dma_buf *dmabuf}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM<hj5ubj )}(hhh]h)}(h[in] buffer which is movingh]h[in] buffer which is moving}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hM<hj6ubah}(h]h ]h"]h$]h&]uh1j hj5ubeh}(h]h ]h"]h$]h&]uh1j hj6hM<hj5ubah}(h]h ]h"]h$]h&]uh1j hj5ubh)}(h**Description**h]jr )}(hj&6h]h Description}(hj(6hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj$6ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM>hj5ubh)}(hXInforms all attachments that they need to destroy and recreate all their mappings. If the attachment is dynamic then the dynamic importer is expected to invalidate any caches it has of the mapping result and perform a new mapping request before allowing HW to do any further DMA.h]hXInforms all attachments that they need to destroy and recreate all their mappings. If the attachment is dynamic then the dynamic importer is expected to invalidate any caches it has of the mapping result and perform a new mapping request before allowing HW to do any further DMA.}(hj<6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM=hj5ubh)}(hIf the attachment is pinned then this informs the pinned importer that the underlying mapping is no longer available. Pinned importers may take this is as a permanent revocation and never establish new mappings so exporters should not trigger it lightly.h]hIf the attachment is pinned then this informs the pinned importer that the underlying mapping is no longer available. Pinned importers may take this is as a permanent revocation and never establish new mappings so exporters should not trigger it lightly.}(hjK6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMBhj5ubh)}(hUpon return importers may continue to access the DMA-buf memory. The caller must do two additional waits to ensure that the memory is no longer being accessed:h]hUpon return importers may continue to access the DMA-buf memory. The caller must do two additional waits to ensure that the memory is no longer being accessed:}(hjZ6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMGhj5ubh)}(h1) Until dma_resv_wait_timeout() retires fences the importer is allowed to fully access the memory. 2) Until the importer calls unmap it is allowed to speculatively read-and-discard the memory. It must not write to the memory. h]jm)}(hhh](j)}(h`Until dma_resv_wait_timeout() retires fences the importer is allowed to fully access the memory.h]h)}(h`Until dma_resv_wait_timeout() retires fences the importer is allowed to fully access the memory.h]h`Until dma_resv_wait_timeout() retires fences the importer is allowed to fully access the memory.}(hjt6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMKhjp6ubah}(h]h ]h"]h$]h&]uh1jhjm6ubj)}(h|Until the importer calls unmap it is allowed to speculatively read-and-discard the memory. It must not write to the memory. h]h)}(h{Until the importer calls unmap it is allowed to speculatively read-and-discard the memory. It must not write to the memory.h]h{Until the importer calls unmap it is allowed to speculatively read-and-discard the memory. It must not write to the memory.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMMhj6ubah}(h]h ]h"]h$]h&]uh1jhjm6ubeh}(h]h ]h"]h$]h&]jSjTjUhjV)uh1jlhji6ubah}(h]h ]h"]h$]h&]uh1hhj6hMKhj5ubh)}(hA caller wishing to use dma_buf_invalidate_mappings() to fully stop access to the DMA-buf must wait for both. Dynamic callers can often use just the first.h]hA caller wishing to use dma_buf_invalidate_mappings() to fully stop access to the DMA-buf must wait for both. Dynamic callers can often use just the first.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMPhj5ubh)}(huAll importers providing a invalidate_mappings() op must ensure that unmap is called within bounded time after the op.h]huAll importers providing a invalidate_mappings() op must ensure that unmap is called within bounded time after the op.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMShj5ubh)}(hX Pinned importers that do not support a invalidate_mappings() op will eventually perform unmap when they are done with the buffer, which may be an ubounded time from calling this function. dma_buf_attach_revocable() can be used to prevent such importers from attaching.h]hX Pinned importers that do not support a invalidate_mappings() op will eventually perform unmap when they are done with the buffer, which may be an ubounded time from calling this function. dma_buf_attach_revocable() can be used to prevent such importers from attaching.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMVhj5ubh)}(hQImporters are free to request a new mapping in parallel as this function returns.h]hQImporters are free to request a new mapping in parallel as this function returns.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM[hj5ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%dma_buf_begin_cpu_access (C function)c.dma_buf_begin_cpu_accesshNtauh1jhjhhhNhNubj)}(hhh](j)}(hXint dma_buf_begin_cpu_access (struct dma_buf *dmabuf, enum dma_data_direction direction)h]j)}(hWint dma_buf_begin_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction)h](jM)}(hinth]hint}(hj 7hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj7hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7hhhj7hMubj )}(hdma_buf_begin_cpu_accessh]j )}(hdma_buf_begin_cpu_accessh]hdma_buf_begin_cpu_access}(hj,7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(7ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj7hhhj7hMubj)}(h;(struct dma_buf *dmabuf, enum dma_data_direction direction)h](j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hjH7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjD7ubj)}(h h]h }(hjU7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjD7ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hjf7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjc7ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjh7modnameN classnameNjj)}j]jO)}jGj.7sbc.dma_buf_begin_cpu_accessasbuh1hhjD7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjD7ubjd)}(hjgh]h*}(hj7hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjD7ubj )}(hdmabufh]hdmabuf}(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjD7ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj@7ubj)}(h!enum dma_data_direction directionh](j)}(hj)h]henum}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj7modnameN classnameNjj)}j]j7c.dma_buf_begin_cpu_accessasbuh1hhj7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7ubj )}(h directionh]h direction}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj@7ubeh}(h]h ]h"]h$]h&]jjuh1jhj7hhhj7hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj7hhhj7hMubah}(h]j6ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj7hMhj7hhubjA )}(hhh]h)}(hMust be called before accessing a dma_buf from the cpu in the kernel context. Calls begin_cpu_access to allow exporter-specific preparations. Coherency is only guaranteed in the specified range for the specified access direction.h]hMust be called before accessing a dma_buf from the cpu in the kernel context. Calls begin_cpu_access to allow exporter-specific preparations. Coherency is only guaranteed in the specified range for the specified access direction.}(hj.8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj+8hhubah}(h]h ]h"]h$]h&]uh1j@ hj7hhhj7hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jF8jc jF8jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjP8h]h Parameters}(hjR8hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjN8ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjJ8ubj )}(hhh](j )}(hE``struct dma_buf *dmabuf`` [in] buffer to prepare cpu access for. h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjo8h]hstruct dma_buf *dmabuf}(hjq8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm8ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhji8ubj )}(hhh]h)}(h)[in] buffer to prepare cpu access for.h]h)[in] buffer to prepare cpu access for.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMhj8ubah}(h]h ]h"]h$]h&]uh1j hji8ubeh}(h]h ]h"]h$]h&]uh1j hj8hMhjf8ubj )}(hC``enum dma_data_direction direction`` [in] direction of access. h](j )}(h%``enum dma_data_direction direction``h]j)}(hj8h]h!enum dma_data_direction direction}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj8ubj )}(hhh]h)}(h[in] direction of access.h]h[in] direction of access.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMhj8ubah}(h]h ]h"]h$]h&]uh1j hj8ubeh}(h]h ]h"]h$]h&]uh1j hj8hMhjf8ubeh}(h]h ]h"]h$]h&]uh1j hjJ8ubh)}(h**Description**h]jr )}(hj8h]h Description}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj8ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjJ8ubh)}(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.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjJ8ubh)}(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 }(hj9hhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hj9h]h dma_buf.resv}(hj9hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj9ubh. For DMA transactions with explicit synchronization this function will only ensure cache coherency, callers must ensure synchronization with such DMA transactions on their own.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj/9hMhjJ8ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hj:9hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjJ8ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_buf_end_cpu_access (C function)c.dma_buf_end_cpu_accesshNtauh1jhjhhhNhNubj)}(hhh](j)}(hVint dma_buf_end_cpu_access (struct dma_buf *dmabuf, enum dma_data_direction direction)h]j)}(hUint dma_buf_end_cpu_access(struct dma_buf *dmabuf, enum dma_data_direction direction)h](jM)}(hinth]hint}(hji9hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhje9hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hjx9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhje9hhhjw9hMubj )}(hdma_buf_end_cpu_accessh]j )}(hdma_buf_end_cpu_accessh]hdma_buf_end_cpu_access}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hje9hhhjw9hMubj)}(h;(struct dma_buf *dmabuf, enum dma_data_direction direction)h](j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubj)}(h h]h }(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj9ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj9modnameN classnameNjj)}j]jO)}jGj9sbc.dma_buf_end_cpu_accessasbuh1hhj9ubj)}(h h]h }(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj9ubjd)}(hjgh]h*}(hj9hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj9ubj )}(hdmabufh]hdmabuf}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj9ubj)}(h!enum dma_data_direction directionh](j)}(hj)h]henum}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubj)}(h h]h }(hj%:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:ubh)}(hhh]j )}(hdma_data_directionh]hdma_data_direction}(hj6:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3:ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj8:modnameN classnameNjj)}j]j9c.dma_buf_end_cpu_accessasbuh1hhj:ubj)}(h h]h }(hjT:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:ubj )}(h directionh]h direction}(hjb:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj9ubeh}(h]h ]h"]h$]h&]jjuh1jhje9hhhjw9hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hja9hhhjw9hMubah}(h]j\9ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjw9hMhj^9hhubjA )}(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.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj:hhubah}(h]h ]h"]h$]h&]uh1j@ hj^9hhhjw9hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j:jc j:jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj:h]h Parameters}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj:ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj:ubj )}(hhh](j )}(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}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj:ubj )}(hhh]h)}(h*[in] buffer to complete cpu access for.h]h*[in] buffer to complete cpu access for.}(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 )}(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}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj;ubj )}(hhh]h)}(h[in] direction of access.h]h[in] direction of access.}(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]jr )}(hjA;h]h Description}(hjC;hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj?;ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj:ubh)}(hCThis terminates CPU access started with dma_buf_begin_cpu_access().h]hCThis terminates CPU access started with dma_buf_begin_cpu_access().}(hjW;hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj:ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hjf;hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM hj:ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_mmap (C function)c.dma_buf_mmaphNtauh1jhjhhhNhNubj)}(hhh](j)}(hZint dma_buf_mmap (struct dma_buf *dmabuf, struct vm_area_struct *vma, unsigned long pgoff)h]j)}(hYint dma_buf_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma, unsigned long pgoff)h](jM)}(hinth]hint}(hj;hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj;hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj;hhhj;hMubj )}(h dma_buf_mmaph]j )}(h dma_buf_mmaph]h dma_buf_mmap}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj;hhhj;hMubj)}(hI(struct dma_buf *dmabuf, struct vm_area_struct *vma, unsigned long pgoff)h](j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubj)}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj;ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj;modnameN classnameNjj)}j]jO)}jGj;sbc.dma_buf_mmapasbuh1hhj;ubj)}(h h]h }(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj;ubjd)}(hjgh]h*}(hj<hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj;ubj )}(hdmabufh]hdmabuf}(hj+<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj;ubj)}(hstruct vm_area_struct *vmah](j)}(hjh]hstruct}(hjD<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@<ubj)}(h h]h }(hjQ<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj@<ubh)}(hhh]j )}(hvm_area_structh]hvm_area_struct}(hjb<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_<ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjd<modnameN classnameNjj)}j]j <c.dma_buf_mmapasbuh1hhj@<ubj)}(h h]h }(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj@<ubjd)}(hjgh]h*}(hj<hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj@<ubj )}(hvmah]hvma}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@<ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj;ubj)}(hunsigned long pgoffh](jM)}(hunsignedh]hunsigned}(hj<hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj<ubj)}(h h]h }(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj<ubjM)}(hlongh]hlong}(hj<hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj<ubj)}(h h]h }(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj<ubj )}(hpgoffh]hpgoff}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj;ubeh}(h]h ]h"]h$]h&]jjuh1jhj;hhhj;hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj;hhhj;hMubah}(h]j;ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj;hMhj;hhubjA )}(hhh]h)}(h,Setup up a userspace mmap with the given vmah]h,Setup up a userspace mmap with the given vma}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj=hhubah}(h]h ]h"]h$]h&]uh1j@ hj;hhhj;hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j.=jc j.=jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj8=h]h Parameters}(hj:=hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj6=ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM"hj2=ubj )}(hhh](j )}(hC``struct dma_buf *dmabuf`` [in] buffer that should back the vma h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjW=h]hstruct dma_buf *dmabuf}(hjY=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjU=ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjQ=ubj )}(hhh]h)}(h'[in] buffer that should back the vmah]h'[in] buffer that should back the vma}(hjp=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl=hMhjm=ubah}(h]h ]h"]h$]h&]uh1j hjQ=ubeh}(h]h ]h"]h$]h&]uh1j hjl=hMhjN=ubj )}(h8``struct vm_area_struct *vma`` [in] vma for the mmap h](j )}(h``struct vm_area_struct *vma``h]j)}(hj=h]hstruct vm_area_struct *vma}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM hj=ubj )}(hhh]h)}(h[in] vma for the mmaph]h[in] vma for the mmap}(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 hjN=ubj )}(hh``unsigned long pgoff`` [in] offset in pages where this mmap should start within the dma-buf buffer. h](j )}(h``unsigned long pgoff``h]j)}(hj=h]hunsigned long pgoff}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM"hj=ubj )}(hhh]h)}(hO[in] offset in pages where this mmap should start within the dma-buf buffer.h]hO[in] offset in pages where this mmap should start within the dma-buf buffer.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM!hj=ubah}(h]h ]h"]h$]h&]uh1j hj=ubeh}(h]h ]h"]h$]h&]uh1j hj=hM"hjN=ubeh}(h]h ]h"]h$]h&]uh1j hj2=ubh)}(h**Description**h]jr )}(hj>h]h Description}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj>ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM$hj2=ubh)}(hThis function adjusts the passed in vma so that it points at the file of the dma_buf operation. It also adjusts the starting pgoff and does bounds checking on the size of the vma. Then it calls the exporters mmap function to set up the mapping.h]hThis function adjusts the passed in vma so that it points at the file of the dma_buf operation. It also adjusts the starting pgoff and does bounds checking on the size of the vma. Then it calls the exporters mmap function to set up the mapping.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM#hj2=ubh)}(h7Can return negative error values, returns 0 on success.h]h7Can return negative error values, returns 0 on success.}(hj*>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM(hj2=ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_vmap (C function)c.dma_buf_vmaphNtauh1jhjhhhNhNubj)}(hhh](j)}(h@int dma_buf_vmap (struct dma_buf *dmabuf, struct iosys_map *map)h]j)}(h?int dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map)h](jM)}(hinth]hint}(hjY>hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjU>hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMIubj)}(h h]h }(hjh>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjU>hhhjg>hMIubj )}(h dma_buf_vmaph]j )}(h dma_buf_vmaph]h dma_buf_vmap}(hjz>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjv>ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjU>hhhjg>hMIubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubj)}(h h]h }(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj>ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj>ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj>modnameN classnameNjj)}j]jO)}jGj|>sbc.dma_buf_vmapasbuh1hhj>ubj)}(h h]h }(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj>ubjd)}(hjgh]h*}(hj>hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj>ubj )}(hdmabufh]hdmabuf}(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj>ubj)}(hstruct iosys_map *maph](j)}(hjh]hstruct}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(h h]h }(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj?ubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hj&?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#?ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj(?modnameN classnameNjj)}j]j>c.dma_buf_vmapasbuh1hhj?ubj)}(h h]h }(hjD?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj?ubjd)}(hjgh]h*}(hjR?hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj?ubj )}(hmaph]hmap}(hj_?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj>ubeh}(h]h ]h"]h$]h&]jjuh1jhjU>hhhjg>hMIubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjQ>hhhjg>hMIubah}(h]jL>ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjg>hMIhjN>hhubjA )}(hhh]h)}(hxCreate virtual mapping for the buffer object into kernel address space. Same restrictions as for vmap and friends apply.h]hxCreate virtual mapping for the buffer object into kernel address space. Same restrictions as for vmap and friends apply.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMIhj?hhubah}(h]h ]h"]h$]h&]uh1j@ hjN>hhhjg>hMIubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j?jc j?jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj?h]h Parameters}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj?ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMMhj?ubj )}(hhh](j )}(h2``struct dma_buf *dmabuf`` [in] buffer to vmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj?h]hstruct dma_buf *dmabuf}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMKhj?ubj )}(hhh]h)}(h[in] buffer to vmaph]h[in] buffer to vmap}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hMKhj?ubah}(h]h ]h"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]uh1j hj?hMKhj?ubj )}(h;``struct iosys_map *map`` [out] returns the vmap pointer h](j )}(h``struct iosys_map *map``h]j)}(hj@h]hstruct iosys_map *map}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMLhj?ubj )}(hhh]h)}(h [out] returns the vmap pointerh]h [out] returns the vmap pointer}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMLhj@ubah}(h]h ]h"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]uh1j hj@hMLhj?ubeh}(h]h ]h"]h$]h&]uh1j hj?ubh)}(h**Description**h]jr )}(hj>@h]h Description}(hj@@hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj<@ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMNhj?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.}(hjT@hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMMhj?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.}(hjc@hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMQhj?ubh)}(h9Returns 0 on success, or a negative errno code otherwise.h]h9Returns 0 on success, or a negative errno code otherwise.}(hjr@hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMUhj?ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_buf_vmap_unlocked (C function)c.dma_buf_vmap_unlockedhNtauh1jhjhhhNhNubj)}(hhh](j)}(hIint dma_buf_vmap_unlocked (struct dma_buf *dmabuf, struct iosys_map *map)h]j)}(hHint dma_buf_vmap_unlocked(struct dma_buf *dmabuf, struct iosys_map *map)h](jM)}(hinth]hint}(hj@hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj@hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM~ubj)}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj@hhhj@hM~ubj )}(hdma_buf_vmap_unlockedh]j )}(hdma_buf_vmap_unlockedh]hdma_buf_vmap_unlocked}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj@hhhj@hM~ubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubj)}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj@ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj@modnameN classnameNjj)}j]jO)}jGj@sbc.dma_buf_vmap_unlockedasbuh1hhj@ubj)}(h h]h }(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj@ubjd)}(hjgh]h*}(hj*AhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj@ubj )}(hdmabufh]hdmabuf}(hj7AhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj@ubj)}(hstruct iosys_map *maph](j)}(hjh]hstruct}(hjPAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLAubj)}(h h]h }(hj]AhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjLAubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hjnAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjkAubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjpAmodnameN classnameNjj)}j]jAc.dma_buf_vmap_unlockedasbuh1hhjLAubj)}(h h]h }(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjLAubjd)}(hjgh]h*}(hjAhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjLAubj )}(hmaph]hmap}(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjLAubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj@ubeh}(h]h ]h"]h$]h&]jjuh1jhj@hhhj@hM~ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj@hhhj@hM~ubah}(h]j@ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj@hM~hj@hhubjA )}(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.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chM~hjAhhubah}(h]h ]h"]h$]h&]uh1j@ hj@hhhj@hM~ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jAjc jAjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjAh]h Parameters}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjAubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjAubj )}(hhh](j )}(h2``struct dma_buf *dmabuf`` [in] buffer to vmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjBh]hstruct dma_buf *dmabuf}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj Bubj )}(hhh]h)}(h[in] buffer to vmaph]h[in] buffer to vmap}(hj+BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'BhMhj(Bubah}(h]h ]h"]h$]h&]uh1j hj Bubeh}(h]h ]h"]h$]h&]uh1j hj'BhMhj Bubj )}(h;``struct iosys_map *map`` [out] returns the vmap pointer h](j )}(h``struct iosys_map *map``h]j)}(hjKBh]hstruct iosys_map *map}(hjMBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIBubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjEBubj )}(hhh]h)}(h [out] returns the vmap pointerh]h [out] returns the vmap pointer}(hjdBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`BhMhjaBubah}(h]h ]h"]h$]h&]uh1j hjEBubeh}(h]h ]h"]h$]h&]uh1j hj`BhMhj Bubeh}(h]h ]h"]h$]h&]uh1j hjAubh)}(h**Description**h]jr )}(hjBh]h Description}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjBubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjAubh)}(h"Unlocked version of dma_buf_vmap()h]h"Unlocked version of dma_buf_vmap()}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjAubh)}(h9Returns 0 on success, or a negative errno code otherwise.h]h9Returns 0 on success, or a negative errno code otherwise.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjAubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_vunmap (C function)c.dma_buf_vunmaphNtauh1jhjhhhNhNubj)}(hhh](j)}(hCvoid dma_buf_vunmap (struct dma_buf *dmabuf, struct iosys_map *map)h]j)}(hBvoid dma_buf_vunmap(struct dma_buf *dmabuf, struct iosys_map *map)h](jM)}(hvoidh]hvoid}(hjBhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjBhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjBhhhjBhMubj )}(hdma_buf_vunmaph]j )}(hdma_buf_vunmaph]hdma_buf_vunmap}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjBhhhjBhMubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubj)}(h h]h }(hj$ChhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjCubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj5ChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2Cubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj7CmodnameN classnameNjj)}j]jO)}jGjBsbc.dma_buf_vunmapasbuh1hhjCubj)}(h h]h }(hjUChhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjCubjd)}(hjgh]h*}(hjcChhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjCubj )}(hdmabufh]hdmabuf}(hjpChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjCubj)}(hstruct iosys_map *maph](j)}(hjh]hstruct}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubj)}(h h]h }(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjCubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjCmodnameN classnameNjj)}j]jQCc.dma_buf_vunmapasbuh1hhjCubj)}(h h]h }(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjCubjd)}(hjgh]h*}(hjChhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjCubj )}(hmaph]hmap}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjCubeh}(h]h ]h"]h$]h&]jjuh1jhjBhhhjBhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjBhhhjBhMubah}(h]jBah ](j8 j9 eh"]h$]h&]j= Hj> )j? huh1jhjBhMhjBhhubjA )}(hhh]h)}(h&Unmap a vmap obtained by dma_buf_vmap.h]h&Unmap a vmap obtained by dma_buf_vmap.}(hj DhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjDhhubah}(h]h ]h"]h$]h&]uh1j@ hjBhhhjBhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j"Djc j"Djd je jf uh1jhhhjhNhNubjh )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vunmap ``struct iosys_map *map`` [in] vmap pointer to vunmaph](h)}(h**Parameters**h]jr )}(hj,Dh]h Parameters}(hj.DhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj*Dubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj&Dubj )}(hhh](j )}(h4``struct dma_buf *dmabuf`` [in] buffer to vunmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjKDh]hstruct dma_buf *dmabuf}(hjMDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIDubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjEDubj )}(hhh]h)}(h[in] buffer to vunmaph]h[in] buffer to vunmap}(hjdDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`DhMhjaDubah}(h]h ]h"]h$]h&]uh1j hjEDubeh}(h]h ]h"]h$]h&]uh1j hj`DhMhjBDubj )}(h8``struct iosys_map *map`` [in] vmap pointer to vunmaph](j )}(h``struct iosys_map *map``h]j)}(hjDh]hstruct iosys_map *map}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj~Dubj )}(hhh]h)}(h[in] vmap pointer to vunmaph]h[in] vmap pointer to vunmap}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjDubah}(h]h ]h"]h$]h&]uh1j hj~Dubeh}(h]h ]h"]h$]h&]uh1j hjDhMhjBDubeh}(h]h ]h"]h$]h&]uh1j hj&Dubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_buf_vunmap_unlocked (C function)c.dma_buf_vunmap_unlockedhNtauh1jhjhhhNhNubj)}(hhh](j)}(hLvoid dma_buf_vunmap_unlocked (struct dma_buf *dmabuf, struct iosys_map *map)h]j)}(hKvoid dma_buf_vunmap_unlocked(struct dma_buf *dmabuf, struct iosys_map *map)h](jM)}(hvoidh]hvoid}(hjDhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjDhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMubj)}(h h]h }(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjDhhhjDhMubj )}(hdma_buf_vunmap_unlockedh]j )}(hdma_buf_vunmap_unlockedh]hdma_buf_vunmap_unlocked}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjDhhhjDhMubj)}(h/(struct dma_buf *dmabuf, struct iosys_map *map)h](j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubj)}(h h]h }(hj(EhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjEubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj9EhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6Eubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj;EmodnameN classnameNjj)}j]jO)}jGjEsbc.dma_buf_vunmap_unlockedasbuh1hhjEubj)}(h h]h }(hjYEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjEubjd)}(hjgh]h*}(hjgEhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjEubj )}(hdmabufh]hdmabuf}(hjtEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjEubj)}(hstruct iosys_map *maph](j)}(hjh]hstruct}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubj)}(h h]h }(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjEubh)}(hhh]j )}(h iosys_maph]h iosys_map}(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjEmodnameN classnameNjj)}j]jUEc.dma_buf_vunmap_unlockedasbuh1hhjEubj)}(h h]h }(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjEubjd)}(hjgh]h*}(hjEhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjEubj )}(hmaph]hmap}(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjEubeh}(h]h ]h"]h$]h&]jjuh1jhjDhhhjDhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjDhhhjDhMubah}(h]jDah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjDhMhjDhhubjA )}(hhh]h)}(h&Unmap a vmap obtained by dma_buf_vmap.h]h&Unmap a vmap obtained by dma_buf_vmap.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj Fhhubah}(h]h ]h"]h$]h&]uh1j@ hjDhhhjDhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j&Fjc j&Fjd je jf uh1jhhhjhNhNubjh )}(h**Parameters** ``struct dma_buf *dmabuf`` [in] buffer to vunmap ``struct iosys_map *map`` [in] vmap pointer to vunmaph](h)}(h**Parameters**h]jr )}(hj0Fh]h Parameters}(hj2FhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj.Fubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhj*Fubj )}(hhh](j )}(h4``struct dma_buf *dmabuf`` [in] buffer to vunmap h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjOFh]hstruct dma_buf *dmabuf}(hjQFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMFubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjIFubj )}(hhh]h)}(h[in] buffer to vunmaph]h[in] buffer to vunmap}(hjhFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdFhMhjeFubah}(h]h ]h"]h$]h&]uh1j hjIFubeh}(h]h ]h"]h$]h&]uh1j hjdFhMhjFFubj )}(h8``struct iosys_map *map`` [in] vmap pointer to vunmaph](j )}(h``struct iosys_map *map``h]j)}(hjFh]hstruct iosys_map *map}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjFubj )}(hhh]h)}(h[in] vmap pointer to vunmaph]h[in] vmap pointer to vunmap}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:142: ./drivers/dma-buf/dma-buf.chMhjFubah}(h]h ]h"]h$]h&]uh1j hjFubeh}(h]h ]h"]h$]h&]uh1j hjFhMhjFFubeh}(h]h ]h"]h$]h&]uh1j hj*Fubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_ops (C struct) c.dma_buf_opshNtauh1jhjhhhNhNubj)}(hhh](j)}(h dma_buf_opsh]j)}(hstruct dma_buf_opsh](j)}(hjh]hstruct}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKubj)}(h h]h }(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjFhhhjFhKubj )}(h dma_buf_opsh]j )}(hjFh]h dma_buf_ops}(hjGhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjFubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjFhhhjFhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjFhhhjFhKubah}(h]jFah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjFhKhjFhhubjA )}(hhh]h)}(h%operations possible on struct dma_bufh]h%operations possible on struct dma_buf}(hj$GhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK hj!Ghhubah}(h]h ]h"]h$]h&]uh1j@ hjFhhhjFhKubeh}(h]h ](jstructeh"]h$]h&]ja jjb j` 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](jr )}(h**Definition**h]h Definition}(hjHGhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjDGubh:}(hjDGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK$hj@Gubj)}(hX<struct dma_buf_ops { int (*attach)(struct dma_buf *, struct dma_buf_attachment *); void (*detach)(struct dma_buf *, struct dma_buf_attachment *); int (*pin)(struct dma_buf_attachment *attach); void (*unpin)(struct dma_buf_attachment *attach); struct sg_table * (*map_dma_buf)(struct dma_buf_attachment *, enum dma_data_direction); void (*unmap_dma_buf)(struct dma_buf_attachment *, struct sg_table *, enum dma_data_direction); void (*release)(struct dma_buf *); int (*begin_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*mmap)(struct dma_buf *, struct vm_area_struct *vma); int (*vmap)(struct dma_buf *dmabuf, struct iosys_map *map); void (*vunmap)(struct dma_buf *dmabuf, struct iosys_map *map); };h]hX<struct dma_buf_ops { int (*attach)(struct dma_buf *, struct dma_buf_attachment *); void (*detach)(struct dma_buf *, struct dma_buf_attachment *); int (*pin)(struct dma_buf_attachment *attach); void (*unpin)(struct dma_buf_attachment *attach); struct sg_table * (*map_dma_buf)(struct dma_buf_attachment *, enum dma_data_direction); void (*unmap_dma_buf)(struct dma_buf_attachment *, struct sg_table *, enum dma_data_direction); void (*release)(struct dma_buf *); int (*begin_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); int (*mmap)(struct dma_buf *, struct vm_area_struct *vma); int (*vmap)(struct dma_buf *dmabuf, struct iosys_map *map); void (*vunmap)(struct dma_buf *dmabuf, struct iosys_map *map); };}hjaGsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK&hj@Gubh)}(h **Members**h]jr )}(hjrGh]hMembers}(hjtGhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjpGubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK5hj@Gubj )}(hhh](j )}(hX``attach`` This is called from dma_buf_attach() to make sure that a given :c:type:`dma_buf_attachment.dev ` can access the provided :c:type:`dma_buf`. Exporters which support buffer objects in special locations like VRAM or device-specific carveout areas should check whether the buffer could be move to system memory (or directly accessed by the provided device), and otherwise need to fail the attach operation. The exporter should also in general check whether the current allocation fulfills the DMA constraints of the new device. If this is not the case, and the allocation cannot be moved, it should also fail the attach operation. Any exporter-private housekeeping data can be stored in the :c:type:`dma_buf_attachment.priv ` pointer. This callback is optional. Returns: 0 on success, negative error code on failure. It might return -EBUSY to signal that backing storage is already allocated and incompatible with the requirements of requesting device. h](j )}(h ``attach``h]j)}(hjGh]hattach}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK=hjGubj )}(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 }(hjGhhhNhNubh)}(h5:c:type:`dma_buf_attachment.dev `h]j)}(hjGh]hdma_buf_attachment.dev}(hjGhhhNhNubah}(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:145: ./include/linux/dma-buf.hhK(hjGubh can access the provided }(hjGhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjGh]hdma_buf}(hjGhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hhjGhK(hjGubhX. 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.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjGhK(hjGubh)}(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.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK/hjGubh)}(h{Any exporter-private housekeeping data can be stored in the :c:type:`dma_buf_attachment.priv ` pointer.h](h`h]j)}(hjHh]hdma_buf_attachment.priv}(hjHhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK4hjHubh pointer.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj5HhK4hjGubh)}(hThis callback is optional.h]hThis callback is optional.}(hj@HhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK7hjGubh)}(hReturns:h]hReturns:}(hjOHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK9hjGubh)}(h0 on success, negative error code on failure. It might return -EBUSY to signal that backing storage is already allocated and incompatible with the requirements of requesting device.h]h0 on success, negative error code on failure. It might return -EBUSY to signal that backing storage is already allocated and incompatible with the requirements of requesting device.}(hj^HhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK;hjGubeh}(h]h ]h"]h$]h&]uh1j hjGubeh}(h]h ]h"]h$]h&]uh1j hjGhK=hjGubj )}(h``detach`` This is called by dma_buf_detach() to release a :c:type:`dma_buf_attachment`. Provided so that exporters can clean up any housekeeping for an :c:type:`dma_buf_attachment`. This callback is optional. h](j )}(h ``detach``h]j)}(hjHh]hdetach}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}Hubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKHhjyHubj )}(hhh](h)}(hThis is called by dma_buf_detach() to release a :c:type:`dma_buf_attachment`. Provided so that exporters can clean up any housekeeping for an :c:type:`dma_buf_attachment`.h](h0This is called by dma_buf_detach() to release a }(hjHhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjHh]hdma_buf_attachment}(hjHhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKDhjHubhB. Provided so that exporters can clean up any housekeeping for an }(hjHhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjHh]hdma_buf_attachment}(hjHhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hhjHhKDhjHubh.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjHhKDhjHubh)}(hThis callback is optional.h]hThis callback is optional.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhKHhjHubeh}(h]h ]h"]h$]h&]uh1j hjyHubeh}(h]h ]h"]h$]h&]uh1j hjHhKHhjGubj )}(hX``pin`` This is called by dma_buf_pin() and lets the exporter know that the DMA-buf can't be moved any more. Ideally, the exporter should pin the buffer so that it is generally accessible by all devices. This is called with the :c:type:`dmabuf.resv ` object locked and is mutual exclusive with **cache_sgt_mapping**. This is called automatically for non-dynamic importers from dma_buf_attach(). Note that similar to non-dynamic exporters in their **map_dma_buf** callback the driver must guarantee that the memory is available for use and cleared of any old data by the time this function returns. Drivers which pipeline their buffer moves internally must wait for all moves and clears to complete. Returns: 0 on success, negative error code on failure. h](j )}(h``pin``h]j)}(hj Ih]hpin}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj Iubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKbhjIubj )}(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.}(hj&IhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKOhj#Iubh)}(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 }(hj5IhhhNhNubh)}(h:c:type:`dmabuf.resv `h]j)}(hj?Ih]h dmabuf.resv}(hjAIhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj=Iubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdmabufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKThj5Iubh, object locked and is mutual exclusive with }(hj5IhhhNhNubjr )}(h**cache_sgt_mapping**h]hcache_sgt_mapping}(hjaIhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj5Iubh.}(hj5IhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj\IhKThj#Iubh)}(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().}(hjyIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKWhj#Iubh)}(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 }(hjIhhhNhNubjr )}(h**map_dma_buf**h]h map_dma_buf}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjIubh 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.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKZhj#Iubh)}(hReturns:h]hReturns:}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK`hj#Iubh)}(h-0 on success, negative error code on failure.h]h-0 on success, negative error code on failure.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"IhKbhj#Iubeh}(h]h ]h"]h$]h&]uh1j hjIubeh}(h]h ]h"]h$]h&]uh1j hj"IhKbhjGubj )}(h``unpin`` This is called by dma_buf_unpin() and lets the exporter know that the DMA-buf can be moved again. This is called with the dmabuf->resv object locked and is mutual exclusive with **cache_sgt_mapping**. This callback is optional. h](j )}(h ``unpin``h]j)}(hjIh]hunpin}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKohjIubj )}(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.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKihjIubh)}(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 }(hjJhhhNhNubjr )}(h**cache_sgt_mapping**h]hcache_sgt_mapping}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjJubh.}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKlhjIubh)}(hThis callback is optional.h]hThis callback is optional.}(hj!JhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhKohjIubeh}(h]h ]h"]h$]h&]uh1j hjIubeh}(h]h ]h"]h$]h&]uh1j hjIhKohjGubj )}(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)}(hjAJh]h map_dma_buf}(hjCJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?Jubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj;Jubj )}(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 }(hjZJhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjdJh]hdma_buf}(hjfJhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjbJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKvhjZJubhJ into device address space, and it is mandatory. It can only be called if }(hjZJhhhNhNubjr )}(h **attach**h]hattach}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjZJubh has been called successfully.}(hjZJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjJhKvhjWJubh)}(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.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKzhjWJubh)}(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 }(hjJhhhNhNubh)}(h$:c:type:`device.dma_params `h]j)}(hjJh]hdevice.dma_params}(hjJhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdeviceuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK~hjJubh from the }(hjJhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjJh]hdma_buf_attachment}(hjJhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hhjJhK~hjJubh. The }(hjJhhhNhNubjr )}(h **attach**h]hattach}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjJubh. callback should also check these constraints.}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjJhK~hjWJubh)}(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.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjWJubh)}(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.}(hj#KhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjWJubh)}(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.}(hj2KhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjWJubh)}(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 }(hjAKhhhNhNubjr )}(h**pin**h]hpin}(hjIKhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjAKubhc, which has the same requirements. Dynamic importers otoh are required to obey the dma_resv fences.}(hjAKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjWJubh)}(hReturns:h]hReturns:}(hjbKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjWJubh)}(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 }(hjqKhhhNhNubh)}(h:c:type:`sg_table`h]j)}(hj{Kh]hsg_table}(hj}KhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjyKubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsg_tableuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjqKubhl scatter list of the backing storage of the DMA buffer, already mapped into the device address space of the }(hjqKhhhNhNubh)}(h:c:type:`device`h]j)}(hjKh]hdevice}(hjKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdeviceuh1hhjKhKhjqKubh attached with the provided }(hjqKhhhNhNubh)}(h:c:type:`dma_buf_attachment`h]j)}(hjKh]hdma_buf_attachment}(hjKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attachmentuh1hhjKhKhjqKubhF. The addresses and lengths in the scatter list are PAGE_SIZE aligned.}(hjqKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjKhKhjWJubh)}(hOn failure, returns a negative error value wrapped into a pointer. May also return -EINTR when a signal was received while being blocked.h]hOn failure, returns a negative error value wrapped into a pointer. May also return -EINTR when a signal was received while being blocked.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjWJubh)}(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 }(hjKhhhNhNubjr )}(h**unmap_dma_buf**h]h unmap_dma_buf}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjKubh.}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjWJubeh}(h]h ]h"]h$]h&]uh1j hj;Jubeh}(h]h ]h"]h$]h&]uh1j hjVJhKhjGubj )}(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)}(hj+Lh]h unmap_dma_buf}(hj-LhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)Lubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj%Lubj )}(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 }(hjDLhhhNhNubh)}(h:c:type:`sg_table`h]j)}(hjNLh]hsg_table}(hjPLhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjLLubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsg_tableuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjDLubh allocated in }(hjDLhhhNhNubjr )}(h**map_dma_buf**h]h map_dma_buf}(hjpLhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjDLubh, 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.}(hjDLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjkLhKhjALubah}(h]h ]h"]h$]h&]uh1j hj%Lubeh}(h]h ]h"]h$]h&]uh1j hj@LhKhjGubj )}(h_``release`` Called after the last dma_buf_put to release the :c:type:`dma_buf`, and mandatory. h](j )}(h ``release``h]j)}(hjLh]hrelease}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjLubj )}(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 }(hjLhhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hjLh]hdma_buf}(hjLhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjLubh, and mandatory.}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjLhKhjLubah}(h]h ]h"]h$]h&]uh1j hjLubeh}(h]h ]h"]h$]h&]uh1j hjLhKhjGubj )}(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}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.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).}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj Mubh)}(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 }(hjMhhhNhNubjr )}(h**mmap**h]hmmap}(hj'MhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjMubh0, and also for kernel mappings established with }(hjMhhhNhNubjr )}(h**vmap**h]hvmap}(hj9MhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjMubh.}(hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj Mubh)}(hThis callback is optional.h]hThis callback is optional.}(hjRMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj Mubh)}(hReturns:h]hReturns:}(hjaMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj Mubh)}(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.}(hjpMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj Mubeh}(h]h ]h"]h$]h&]uh1j hjLubeh}(h]h ]h"]h$]h&]uh1j hj MhKhjGubj )}(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)}(hjMh]hend_cpu_access}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjMubj )}(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 }(hjMhhhNhNubjr )}(h**begin_cpu_access**h]hbegin_cpu_access}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjMubh.}(hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjMubh)}(hThis callback is optional.h]hThis callback is optional.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjMubh)}(hReturns:h]hReturns:}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjMubh)}(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.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhjMubeh}(h]h ]h"]h$]h&]uh1j hjMubeh}(h]h ]h"]h$]h&]uh1j hjMhKhjGubj )}(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)}(hj Nh]hmmap}(hj NhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjNubj )}(hhh](h)}(h4This callback is used by the dma_buf_mmap() functionh]h4This callback is used by the dma_buf_mmap() function}(hj#NhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj Nubh)}(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.}(hj2NhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj Nubh)}(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.}(hjANhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj Nubh)}(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.}(hjPNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhKhj Nubh)}(hXHence exporters need to setup their own file (and address_space) association by setting vma->vm_file and adjusting vma->vm_pgoff in the dma_buf mmap callback. In the specific case of a gem driver the exporter could use the shmem file already provided by gem (and set vm_pgoff = 0). Exporters can then zap ptes by unmapping the corresponding range of the struct address_space associated with their own file.h]hXHence exporters need to setup their own file (and address_space) association by setting vma->vm_file and adjusting vma->vm_pgoff in the dma_buf mmap callback. In the specific case of a gem driver the exporter could use the shmem file already provided by gem (and set vm_pgoff = 0). Exporters can then zap ptes by unmapping the corresponding range of the struct address_space associated with their own file.}(hj_NhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj Nubh)}(hThis callback is optional.h]hThis callback is optional.}(hjnNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM hj Nubh)}(hReturns:h]hReturns:}(hj}NhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj Nubh)}(h10 on success or a negative error code on failure.h]h10 on success or a negative error code on failure.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhMhj Nubeh}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]uh1j hjNhMhjGubj )}(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)}(hjNh]hvmap}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK#hjNubj )}(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.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK"hjNubah}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]uh1j hjNhK#hjGubj )}(h3``vunmap`` [optional] unmaps a vmap from the bufferh](j )}(h ``vunmap``h]j)}(hjNh]hvunmap}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK#hjNubj )}(hhh]h)}(h([optional] unmaps a vmap from the bufferh]h([optional] unmaps a vmap from the buffer}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhK$hjNubah}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]uh1j hjNhK#hjGubeh}(h]h ]h"]h$]h&]uh1j hj@Gubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf (C struct) c.dma_bufhNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_bufh]j)}(hstruct dma_bufh](j)}(hjh]hstruct}(hj@OhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj )j? huh1jhjMOhK*hj5OhhubjA )}(hhh]h)}(hshared buffer objecth]hshared buffer object}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjOhhubah}(h]h ]h"]h$]h&]uh1j@ hj5OhhhjMOhK*ubeh}(h]h ](jstructeh"]h$]h&]ja jjb jOjc jOjd je jf uh1jhhhjhNhNubjh )}(hX**Definition**:: struct dma_buf { size_t size; struct file *file; struct list_head attachments; const struct dma_buf_ops *ops; unsigned vmapping_counter; struct iosys_map vmap_ptr; const char *exp_name; const char *name; spinlock_t name_lock; struct module *owner; struct list_head list_node; void *priv; struct dma_resv *resv; wait_queue_head_t poll; struct dma_buf_poll_cb_t { struct dma_fence_cb cb; wait_queue_head_t *poll; __poll_t active; } cb_in, cb_out; }; **Members** ``size`` Size of the buffer; invariant over the lifetime of the buffer. ``file`` File pointer used for sharing buffers across, and for refcounting. See dma_buf_get() and dma_buf_put(). ``attachments`` List of dma_buf_attachment that denotes all devices attached, protected by :c:type:`dma_resv` lock **resv**. ``ops`` dma_buf_ops associated with this buffer object. ``vmapping_counter`` Used internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by **resv**. ``vmap_ptr`` The current vmap ptr if **vmapping_counter** > 0. Protected by **resv**. ``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.invalidate_mappings ` callback. IMPORTANT: All drivers and memory management related functions must obey the struct dma_resv rules, specifically the rules for updating and obeying fences. See enum dma_resv_usage for further descriptions. ``poll`` for userspace poll support ``cb_in`` for userspace poll support ``cb_out`` for userspace poll supporth](h)}(h**Definition**::h](jr )}(h**Definition**h]h Definition}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjOubh:}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjOubj)}(hXstruct dma_buf { size_t size; struct file *file; struct list_head attachments; const struct dma_buf_ops *ops; unsigned vmapping_counter; struct iosys_map vmap_ptr; const char *exp_name; const char *name; spinlock_t name_lock; struct module *owner; struct list_head list_node; void *priv; struct dma_resv *resv; wait_queue_head_t poll; struct dma_buf_poll_cb_t { struct dma_fence_cb cb; wait_queue_head_t *poll; __poll_t active; } cb_in, cb_out; };h]hXstruct dma_buf { size_t size; struct file *file; struct list_head attachments; const struct dma_buf_ops *ops; unsigned vmapping_counter; struct iosys_map vmap_ptr; const char *exp_name; const char *name; spinlock_t name_lock; struct module *owner; struct list_head list_node; void *priv; struct dma_resv *resv; wait_queue_head_t poll; struct dma_buf_poll_cb_t { struct dma_fence_cb cb; wait_queue_head_t *poll; __poll_t active; } cb_in, cb_out; };}hjOsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM!hjOubh)}(h **Members**h]jr )}(hjOh]hMembers}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjOubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM7hjOubj )}(hhh](j )}(hH``size`` Size of the buffer; invariant over the lifetime of the buffer. h](j )}(h``size``h]j)}(hjOh]hsize}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM)hjOubj )}(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.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhM)hjPubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1j hjPhM)hjOubj )}(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)}(hj(Ph]hfile}(hj*PhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&Pubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM1hj"Pubj )}(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().}(hjAPhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM0hj>Pubah}(h]h ]h"]h$]h&]uh1j hj"Pubeh}(h]h ]h"]h$]h&]uh1j hj=PhM1hjOubj )}(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)}(hjbPh]h attachments}(hjdPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`Pubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM9hj\Pubj )}(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 }(hj{PhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjPh]hdma_resv}(hjPhhhNhNubah}(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:145: ./include/linux/dma-buf.hhM8hj{Pubh lock }(hj{PhhhNhNubjr )}(h**resv**h]hresv}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj{Pubh.}(hj{PhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjPhM8hjxPubah}(h]h ]h"]h$]h&]uh1j hj\Pubeh}(h]h ]h"]h$]h&]uh1j hjwPhM9hjOubj )}(h8``ops`` dma_buf_ops associated with this buffer object. h](j )}(h``ops``h]j)}(hjPh]hops}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM?hjPubj )}(hhh]h)}(h/dma_buf_ops associated with this buffer object.h]h/dma_buf_ops associated with this buffer object.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhM?hjPubah}(h]h ]h"]h$]h&]uh1j hjPubeh}(h]h ]h"]h$]h&]uh1j hjPhM?hjOubj )}(hl``vmapping_counter`` Used internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by **resv**. h](j )}(h``vmapping_counter``h]j)}(hj Qh]hvmapping_counter}(hj QhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMDhjQubj )}(hhh]h)}(hVUsed internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by **resv**.h](hMUsed internally to refcnt the vmaps returned by dma_buf_vmap(). Protected by }(hj#QhhhNhNubjr )}(h**resv**h]hresv}(hj+QhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj#Qubh.}(hj#QhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMChj Qubah}(h]h ]h"]h$]h&]uh1j hjQubeh}(h]h ]h"]h$]h&]uh1j hjQhMDhjOubj )}(hV``vmap_ptr`` The current vmap ptr if **vmapping_counter** > 0. Protected by **resv**. h](j )}(h ``vmap_ptr``h]j)}(hjVQh]hvmap_ptr}(hjXQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTQubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMKhjPQubj )}(hhh]h)}(hHThe current vmap ptr if **vmapping_counter** > 0. Protected by **resv**.h](hThe current vmap ptr if }(hjoQhhhNhNubjr )}(h**vmapping_counter**h]hvmapping_counter}(hjwQhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjoQubh > 0. Protected by }(hjoQhhhNhNubjr )}(h**resv**h]hresv}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjoQubh.}(hjoQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjkQhMKhjlQubah}(h]h ]h"]h$]h&]uh1j hjPQubeh}(h]h ]h"]h$]h&]uh1j hjkQhMKhjOubj )}(hJ``exp_name`` Name of the exporter; useful for debugging. Must not be NULL h](j )}(h ``exp_name``h]j)}(hjQh]hexp_name}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMQhjQubj )}(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)}(hj'Sh]hresv}(hj)ShhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%Subah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj!Subj )}(hhh](h)}(h*Reservation object linked to this dma-buf.h]h*Reservation object linked to this dma-buf.}(hj@ShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMuhj=Subh)}(hIMPLICIT SYNCHRONIZATION RULES:h]hIMPLICIT SYNCHRONIZATION RULES:}(hjOShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMwhj=Subh)}(hDrivers which support implicit synchronization of buffer access as e.g. exposed in `Implicit Fence Poll Support`_ must follow the below rules.h](hSDrivers which support implicit synchronization of buffer access as e.g. exposed in }(hj^ShhhNhNubj)}(h`Implicit Fence Poll Support`_h]hImplicit Fence Poll Support}(hjfShhhNhNubah}(h]h ]h"]h$]h&]nameImplicit Fence Poll Supportjjuh1jhj^SjKubh must follow the below rules.}(hj^ShhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMyhj=Subh)}(hhh](j)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM}hjSubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjSubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjSubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hSome drivers only expose a synchronous userspace API with no pipelining across drivers. These do not set any fences for their access. An example here is v4l. h]h)}(hSome drivers only expose a synchronous userspace API with no pipelining across drivers. These do not set any fences for their access. An example here is v4l.h]hSome drivers only expose a synchronous userspace API with no pipelining across drivers. These do not set any fences for their access. An example here is v4l.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjSubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hiDriver should use dma_resv_usage_rw() when retrieving fences as dependency for implicit synchronization. h]h)}(hhDriver should use dma_resv_usage_rw() when retrieving fences as dependency for implicit synchronization.h]hhDriver should use dma_resv_usage_rw() when retrieving fences as dependency for implicit synchronization.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjSubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]jRjSuh1hhjShM}hj=Subh)}(hDYNAMIC IMPORTER RULES:h]hDYNAMIC IMPORTER RULES:}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj=Subh)}(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:}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj=Subh)}(hhh](j)}(hDynamic importers must obey the write fences and wait for them to signal before allowing access to the buffer's underlying storage through the device. h]h)}(hDynamic importers must obey the write fences and wait for them to signal before allowing access to the buffer's underlying storage through the device.h]hDynamic importers must obey the write fences and wait for them to signal before allowing access to the buffer’s underlying storage through the device.}(hj,ThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj(Tubah}(h]h ]h"]h$]h&]uh1jhj%Tubj)}(hDynamic importers should set fences for any access that they can't disable immediately from their :c:type:`dma_buf_attach_ops.invalidate_mappings ` 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.invalidate_mappings ` callback.h](hdDynamic importers should set fences for any access that they can’t disable immediately from their }(hjEThhhNhNubh)}(hE:c:type:`dma_buf_attach_ops.invalidate_mappings `h]j)}(hjOTh]h&dma_buf_attach_ops.invalidate_mappings}(hjQThhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjMTubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_attach_opsuh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjETubh callback.}(hjEThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjlThMhjATubah}(h]h ]h"]h$]h&]uh1jhj%Tubeh}(h]h ]h"]h$]h&]jRjSuh1hhj:ThMhj=Subh)}(h IMPORTANT:h]h IMPORTANT:}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj=Subh)}(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.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj=Subeh}(h]h ]h"]h$]h&]uh1j hj!Subeh}(h]h ]h"]h$]h&]uh1j hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj;Uubah}(h]h ]h"]h$]h&]uh1j hjUubeh}(h]h ]h"]h$]h&]uh1j hj:UhMhjOubeh}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubh)}(h**Description**h]jr )}(hjhUh]h Description}(hjjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjfUubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubh)}(hThis represents a shared buffer, created by calling dma_buf_export(). The userspace representation is a normal file descriptor, which can be created by calling dma_buf_fd().h]hThis represents a shared buffer, created by calling dma_buf_export(). The userspace representation is a normal file descriptor, which can be created by calling dma_buf_fd().}(hj~UhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubh)}(hOShared dma buffers are reference counted using dma_buf_put() and get_dma_buf().h]hOShared dma buffers are reference counted using dma_buf_put() and get_dma_buf().}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM hjhhubh)}(hfDevice DMA access is handled by the separate :c:type:`struct dma_buf_attachment `.h](h-Device DMA access is handled by the separate }(hjUhhhNhNubh)}(h8:c:type:`struct dma_buf_attachment `h]j)}(hjUh]hstruct dma_buf_attachment}(hjUhhhNhNubah}(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:145: ./include/linux/dma-buf.hhM#hjUubh.}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjUhM#hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_attach_ops (C struct)c.dma_buf_attach_opshNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_buf_attach_opsh]j)}(hstruct dma_buf_attach_opsh](j)}(hjh]hstruct}(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM(ubj)}(h h]h }(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjUhhhjUhM(ubj )}(hdma_buf_attach_opsh]j )}(hjUh]hdma_buf_attach_ops}(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjUhhhjUhM(ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjUhhhjUhM(ubah}(h]jUah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjUhM(hjUhhubjA )}(hhh]h)}(h%importer operations for an attachmenth]h%importer operations for an attachment}(hj)VhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj&Vhhubah}(h]h ]h"]h$]h&]uh1j@ hjUhhhjUhM(ubeh}(h]h ](jstructeh"]h$]h&]ja jjb jAVjc jAVjd je jf uh1jhhhjhNhNubjh )}(hX6**Definition**:: struct dma_buf_attach_ops { bool allow_peer2peer; void (*invalidate_mappings)(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. ``invalidate_mappings`` [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. See the kdoc for dma_buf_invalidate_mappings() for details on the required behavior.h](h)}(h**Definition**::h](jr )}(h**Definition**h]h Definition}(hjMVhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjIVubh:}(hjIVhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjEVubj)}(h|struct dma_buf_attach_ops { bool allow_peer2peer; void (*invalidate_mappings)(struct dma_buf_attachment *attach); };h]h|struct dma_buf_attach_ops { bool allow_peer2peer; void (*invalidate_mappings)(struct dma_buf_attachment *attach); };}hjfVsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjEVubh)}(h **Members**h]jr )}(hjwVh]hMembers}(hjyVhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjuVubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjEVubj )}(hhh](j )}(ht``allow_peer2peer`` If this is set to true the importer must be able to handle peer resources without struct pages. h](j )}(h``allow_peer2peer``h]j)}(hjVh]hallow_peer2peer}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjVubj )}(hhh]h)}(h_If this is set to true the importer must be able to handle peer resources without struct pages.h]h_If this is set to true the importer must be able to handle peer resources without struct pages.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjVubah}(h]h ]h"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]uh1j hjVhMhjVubj )}(hX``invalidate_mappings`` [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. See the kdoc for dma_buf_invalidate_mappings() for details on the required behavior.h](j )}(h``invalidate_mappings``h]j)}(hjVh]hinvalidate_mappings}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjVubj )}(hhh](h)}(h2[optional] notification that the DMA-buf is movingh]h2[optional] notification that the DMA-buf is moving}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjVubh)}(heIf this callback is provided the framework can avoid pinning the backing store while mappings exists.h]heIf this callback is provided the framework can avoid pinning the backing store while mappings exists.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjVubh)}(hThis callback is called with the lock of the reservation object associated with the dma_buf held and the mapping function must be called with this lock held as well. This makes sure that no mapping is created concurrently with an ongoing move operation.h]hThis callback is called with the lock of the reservation object associated with the dma_buf held and the mapping function must be called with this lock held as well. This makes sure that no mapping is created concurrently with an ongoing move operation.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjVubh)}(hTSee the kdoc for dma_buf_invalidate_mappings() for details on the required behavior.h]hTSee the kdoc for dma_buf_invalidate_mappings() for details on the required behavior.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjVubeh}(h]h ]h"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]uh1j hjVhMhjVubeh}(h]h ]h"]h$]h&]uh1j hjEVubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubh)}(h**Description**h]jr )}(hj?Wh]h Description}(hjAWhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj=Wubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubh)}(h2Attachment operations implemented by the importer.h]h2Attachment operations implemented by the importer.}(hjUWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_attachment (C struct)c.dma_buf_attachmenthNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_buf_attachmenth]j)}(hstruct dma_buf_attachmenth](j)}(hjh]hstruct}(hj}WhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyWhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMubj)}(h h]h }(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjyWhhhjWhMubj )}(hdma_buf_attachmenth]j )}(hjwWh]hdma_buf_attachment}(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjWubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjyWhhhjWhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjuWhhhjWhMubah}(h]jpWah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjWhMhjrWhhubjA )}(hhh]h)}(h#holds device-buffer attachment datah]h#holds device-buffer attachment data}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjWhhubah}(h]h ]h"]h$]h&]uh1j@ hjrWhhhjWhMubeh}(h]h ](jstructeh"]h$]h&]ja jjb jWjc jWjd je jf uh1jhhhjhNhNubjh )}(hX**Definition**:: struct dma_buf_attachment { struct dma_buf *dmabuf; struct device *dev; struct list_head node; bool peer2peer; const struct dma_buf_attach_ops *importer_ops; void *importer_priv; void *priv; }; **Members** ``dmabuf`` buffer for this attachment. ``dev`` device attached to the buffer. ``node`` list of dma_buf_attachment, protected by dma_resv lock of the dmabuf. ``peer2peer`` true if the importer can handle peer resources without pages. ``importer_ops`` importer operations for this attachment, if provided dma_buf_map/unmap_attachment() must be called with the dma_resv lock held. ``importer_priv`` importer specific attachment data. ``priv`` exporter specific attachment data.h](h)}(h**Definition**::h](jr )}(h**Definition**h]h Definition}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjWubh:}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjWubj)}(hstruct dma_buf_attachment { struct dma_buf *dmabuf; struct device *dev; struct list_head node; bool peer2peer; const struct dma_buf_attach_ops *importer_ops; void *importer_priv; void *priv; };h]hstruct dma_buf_attachment { struct dma_buf *dmabuf; struct device *dev; struct list_head node; bool peer2peer; const struct dma_buf_attach_ops *importer_ops; void *importer_priv; void *priv; };}hjWsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjWubh)}(h **Members**h]jr )}(hj Xh]hMembers}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj Xubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjWubj )}(hhh](j )}(h'``dmabuf`` buffer for this attachment. h](j )}(h ``dmabuf``h]j)}(hj,Xh]hdmabuf}(hj.XhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*Xubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj&Xubj )}(hhh]h)}(hbuffer for this attachment.h]hbuffer for this attachment.}(hjEXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAXhMhjBXubah}(h]h ]h"]h$]h&]uh1j hj&Xubeh}(h]h ]h"]h$]h&]uh1j hjAXhMhj#Xubj )}(h'``dev`` device attached to the buffer. h](j )}(h``dev``h]j)}(hjeXh]hdev}(hjgXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcXubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj_Xubj )}(hhh]h)}(hdevice attached to the buffer.h]hdevice attached to the buffer.}(hj~XhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzXhMhj{Xubah}(h]h ]h"]h$]h&]uh1j hj_Xubeh}(h]h ]h"]h$]h&]uh1j hjzXhMhj#Xubj )}(hO``node`` list of dma_buf_attachment, protected by dma_resv lock of the dmabuf. h](j )}(h``node``h]j)}(hjXh]hnode}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjXubj )}(hhh]h)}(hElist of dma_buf_attachment, protected by dma_resv lock of the dmabuf.h]hElist of dma_buf_attachment, protected by dma_resv lock of the dmabuf.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhMhjXubah}(h]h ]h"]h$]h&]uh1j hjXubeh}(h]h ]h"]h$]h&]uh1j hjXhMhj#Xubj )}(hL``peer2peer`` true if the importer can handle peer resources without pages. h](j )}(h ``peer2peer``h]j)}(hjXh]h peer2peer}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjXubj )}(hhh]h)}(h=true if the importer can handle peer resources without pages.h]h=true if the importer can handle peer resources without pages.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhMhjXubah}(h]h ]h"]h$]h&]uh1j hjXubeh}(h]h ]h"]h$]h&]uh1j hjXhMhj#Xubj )}(h``importer_ops`` importer operations for this attachment, if provided dma_buf_map/unmap_attachment() must be called with the dma_resv lock held. h](j )}(h``importer_ops``h]j)}(hjYh]h importer_ops}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj Yubj )}(hhh]h)}(himporter operations for this attachment, if provided dma_buf_map/unmap_attachment() must be called with the dma_resv lock held.h]himporter operations for this attachment, if provided dma_buf_map/unmap_attachment() must be called with the dma_resv lock held.}(hj)YhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj&Yubah}(h]h ]h"]h$]h&]uh1j hj Yubeh}(h]h ]h"]h$]h&]uh1j hj%YhMhj#Xubj )}(h5``importer_priv`` importer specific attachment data. h](j )}(h``importer_priv``h]j)}(hjJYh]h importer_priv}(hjLYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHYubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjDYubj )}(hhh]h)}(h"importer specific attachment data.h]h"importer specific attachment data.}(hjcYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_YhMhj`Yubah}(h]h ]h"]h$]h&]uh1j hjDYubeh}(h]h ]h"]h$]h&]uh1j hj_YhMhj#Xubj )}(h+``priv`` exporter specific attachment data.h](j )}(h``priv``h]j)}(hjYh]hpriv}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj}Yubj )}(hhh]h)}(h"exporter specific attachment data.h]h"exporter specific attachment data.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjYubah}(h]h ]h"]h$]h&]uh1j hj}Yubeh}(h]h ]h"]h$]h&]uh1j hjYhMhj#Xubeh}(h]h ]h"]h$]h&]uh1j hjWubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubh)}(h**Description**h]jr )}(hjYh]h Description}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjYubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubh)}(hThis structure holds the attachment information between the dma_buf buffer and its user device(s). The list contains one attachment struct per device attached to the buffer.h]hThis structure holds the attachment information between the dma_buf buffer and its user device(s). The list contains one attachment struct per device attached to the buffer.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubh)}(hAn attachment is created by calling dma_buf_attach(), and released again by calling dma_buf_detach(). The DMA mapping itself needed to initiate a transfer is created by dma_buf_map_attachment() and freed again by calling dma_buf_unmap_attachment().h]hAn attachment is created by calling dma_buf_attach(), and released again by calling dma_buf_detach(). The DMA mapping itself needed to initiate a transfer is created by dma_buf_map_attachment() and freed again by calling dma_buf_unmap_attachment().}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_export_info (C struct)c.dma_buf_export_infohNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_buf_export_infoh]j)}(hstruct dma_buf_export_infoh](j)}(hjh]hstruct}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZhhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMubj)}(h h]h }(hj!ZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjZhhhj ZhMubj )}(hdma_buf_export_infoh]j )}(hj Zh]hdma_buf_export_info}(hj3ZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/Zubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjZhhhj ZhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj Zhhhj ZhMubah}(h]jZah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj ZhMhjZhhubjA )}(hhh]h)}(h,holds information needed to export a dma_bufh]h,holds information needed to export a dma_buf}(hjUZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjRZhhubah}(h]h ]h"]h$]h&]uh1j@ hjZhhhj ZhMubeh}(h]h ](jstructeh"]h$]h&]ja jjb jmZjc jmZjd je jf uh1jhhhjhNhNubjh )}(hX**Definition**:: struct dma_buf_export_info { const char *exp_name; struct module *owner; const struct dma_buf_ops *ops; size_t size; int flags; struct dma_resv *resv; void *priv; }; **Members** ``exp_name`` name of the exporter - useful for debugging. ``owner`` pointer to exporter module - used for refcounting kernel module ``ops`` Attach allocator-defined dma buf ops to the new buffer ``size`` Size of the buffer - invariant over the lifetime of the buffer ``flags`` mode flags for the file ``resv`` reservation-object, NULL to allocate default one ``priv`` Attach private data of allocator to this bufferh](h)}(h**Definition**::h](jr )}(h**Definition**h]h Definition}(hjyZhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjuZubh:}(hjuZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjqZubj)}(hstruct dma_buf_export_info { const char *exp_name; struct module *owner; const struct dma_buf_ops *ops; size_t size; int flags; struct dma_resv *resv; void *priv; };h]hstruct dma_buf_export_info { const char *exp_name; struct module *owner; const struct dma_buf_ops *ops; size_t size; int flags; struct dma_resv *resv; void *priv; };}hjZsbah}(h]h ]h"]h$]h&]jjuh1jh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjqZubh)}(h **Members**h]jr )}(hjZh]hMembers}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjZubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjqZubj )}(hhh](j )}(h:``exp_name`` name of the exporter - useful for debugging. h](j )}(h ``exp_name``h]j)}(hjZh]hexp_name}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjZubj )}(hhh]h)}(h,name of the exporter - useful for debugging.h]h,name of the exporter - useful for debugging.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhMhjZubah}(h]h ]h"]h$]h&]uh1j hjZubeh}(h]h ]h"]h$]h&]uh1j hjZhMhjZubj )}(hJ``owner`` pointer to exporter module - used for refcounting kernel module h](j )}(h ``owner``h]j)}(hjZh]howner}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjZubj )}(hhh]h)}(h?pointer to exporter module - used for refcounting kernel moduleh]h?pointer to exporter module - used for refcounting kernel module}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj[ubah}(h]h ]h"]h$]h&]uh1j hjZubeh}(h]h ]h"]h$]h&]uh1j hj[hMhjZubj )}(h?``ops`` Attach allocator-defined dma buf ops to the new buffer h](j )}(h``ops``h]j)}(hj4[h]hops}(hj6[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./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}(hjM[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjI[hMhjJ[ubah}(h]h ]h"]h$]h&]uh1j hj.[ubeh}(h]h ]h"]h$]h&]uh1j hjI[hMhjZubj )}(hH``size`` Size of the buffer - invariant over the lifetime of the buffer h](j )}(h``size``h]j)}(hjm[h]hsize}(hjo[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjg[ubj )}(hhh]h)}(h>Size of the buffer - invariant over the lifetime of the bufferh]h>Size of the buffer - invariant over the lifetime of the buffer}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj[ubah}(h]h ]h"]h$]h&]uh1j hjg[ubeh}(h]h ]h"]h$]h&]uh1j hj[hMhjZubj )}(h"``flags`` mode flags for the file h](j )}(h ``flags``h]j)}(hj[h]hflags}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj[ubj )}(hhh]h)}(hmode flags for the fileh]hmode flags for the file}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj[ubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hj[hMhjZubj )}(h:``resv`` reservation-object, NULL to allocate default one h](j )}(h``resv``h]j)}(hj[h]hresv}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj[ubj )}(hhh]h)}(h0reservation-object, NULL to allocate default oneh]h0reservation-object, NULL to allocate default one}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj[ubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hj[hMhjZubj )}(h8``priv`` Attach private data of allocator to this bufferh](j )}(h``priv``h]j)}(hj\h]hpriv}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./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}(hj1\hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj.\ubah}(h]h ]h"]h$]h&]uh1j hj\ubeh}(h]h ]h"]h$]h&]uh1j hj-\hMhjZubeh}(h]h ]h"]h$]h&]uh1j hjqZubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubh)}(h**Description**h]jr )}(hj[\h]h Description}(hj]\hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjY\ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubh)}(hdThis structure holds the information required to export the buffer. Used with dma_buf_export() only.h]hdThis structure holds the information required to export the buffer. Used with dma_buf_export() only.}(hjq\hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$DEFINE_DMA_BUF_EXPORT_INFO (C macro)c.DEFINE_DMA_BUF_EXPORT_INFOhNtauh1jhjhhhNhNubj)}(hhh](j)}(hDEFINE_DMA_BUF_EXPORT_INFOh]j)}(hDEFINE_DMA_BUF_EXPORT_INFOh]j )}(hDEFINE_DMA_BUF_EXPORT_INFOh]j )}(hj\h]hDEFINE_DMA_BUF_EXPORT_INFO}(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj\ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj\hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMubah}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj\hhhj\hMubah}(h]j\ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj\hMhj\hhubjA )}(hhh]h}(h]h ]h"]h$]h&]uh1j@ hj\hhhj\hMubeh}(h]h ](jmacroeh"]h$]h&]ja jjb j\jc j\jd je jf uh1jhhhjhNhNubh)}(h%``DEFINE_DMA_BUF_EXPORT_INFO (name)``h]j)}(hj\h]h!DEFINE_DMA_BUF_EXPORT_INFO (name)}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM hjhhubh)}(hhelper macro for exporters h]h)}(hhelper macro for exportersh]hhelper macro for exporters}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj\ubah}(h]h ]h"]h$]h&]uh1hhj\hMhjhhubjh )}(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]jr )}(hj]h]h Parameters}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj]ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM hj\ubj )}(hhh]j )}(h``name`` export-info name h](j )}(h``name``h]j)}(hj#]h]hname}(hj%]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!]ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj]ubj )}(hhh]h)}(hexport-info nameh]hexport-info name}(hj<]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8]hMhj9]ubah}(h]h ]h"]h$]h&]uh1j hj]ubeh}(h]h ]h"]h$]h&]uh1j hj8]hMhj]ubah}(h]h ]h"]h$]h&]uh1j hj\ubh)}(h**Description**h]jr )}(hj^]h]h Description}(hj`]hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj\]ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM hj\ubh)}(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 }(hjt]hhhNhNubh)}(h::c:type:`struct dma_buf_export_info `h]j)}(hj~]h]hstruct dma_buf_export_info}(hj]hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj|]ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_buf_export_infouh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM hjt]ubh1, zeroes it out and pre-populates exp_name in it.}(hjt]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj]hM hj\ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jget_dma_buf (C function) c.get_dma_bufhNtauh1jhjhhhNhNubj)}(hhh](j)}(h)void get_dma_buf (struct dma_buf *dmabuf)h]j)}(h(void get_dma_buf(struct dma_buf *dmabuf)h](jM)}(hvoidh]hvoid}(hj]hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj]hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMubj)}(h h]h }(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]hhhj]hMubj )}(h get_dma_bufh]j )}(h get_dma_bufh]h get_dma_buf}(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj]hhhj]hMubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubj)}(h h]h }(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj!^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj#^modnameN classnameNjj)}j]jO)}jGj]sb c.get_dma_bufasbuh1hhj]ubj)}(h h]h }(hjA^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]ubjd)}(hjgh]h*}(hjO^hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj]ubj )}(hdmabufh]hdmabuf}(hj\^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj]ubah}(h]h ]h"]h$]h&]jjuh1jhj]hhhj]hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj]hhhj]hMubah}(h]j]ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj]hMhj]hhubjA )}(hhh]h)}(h!convenience wrapper for get_file.h]h!convenience wrapper for get_file.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj^hhubah}(h]h ]h"]h$]h&]uh1j@ hj]hhhj]hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j^jc j^jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj^h]h Parameters}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj^ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj^ubj )}(hhh]j )}(h6``struct dma_buf *dmabuf`` [in] pointer to dma_buf h](j )}(h``struct dma_buf *dmabuf``h]j)}(hj^h]hstruct dma_buf *dmabuf}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj^ubj )}(hhh]h)}(h[in] pointer to dma_bufh]h[in] pointer to dma_buf}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hMhj^ubah}(h]h ]h"]h$]h&]uh1j hj^ubeh}(h]h ]h"]h$]h&]uh1j hj^hMhj^ubah}(h]h ]h"]h$]h&]uh1j hj^ubh)}(h**Description**h]jr )}(hj_h]h Description}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj_ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj^ubh)}(hX Increments the reference count on the dma-buf, needed in case of drivers that either need to create additional references to the dmabuf on the kernel side. For example, an exporter that needs to keep a dmabuf ptr so that subsequent exports don't create a new dmabuf.h]hX Increments the reference count on the dma-buf, needed in case of drivers that either need to create additional references to the dmabuf on the kernel side. For example, an exporter that needs to keep a dmabuf ptr so that subsequent exports don’t create a new dmabuf.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhMhj^ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_buf_is_dynamic (C function)c.dma_buf_is_dynamichNtauh1jhjhhhNhNubj)}(hhh](j)}(h0bool dma_buf_is_dynamic (struct dma_buf *dmabuf)h]j)}(h/bool dma_buf_is_dynamic(struct dma_buf *dmabuf)h](jM)}(hjk3h]hbool}(hjG_hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjC_hhh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM ubj)}(h h]h }(hjU_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjC_hhhjT_hM ubj )}(hdma_buf_is_dynamich]j )}(hdma_buf_is_dynamich]hdma_buf_is_dynamic}(hjg_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjc_ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjC_hhhjT_hM ubj)}(h(struct dma_buf *dmabuf)h]j)}(hstruct dma_buf *dmabufh](j)}(hjh]hstruct}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(h h]h }(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj_ubh)}(hhh]j )}(hdma_bufh]hdma_buf}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj_modnameN classnameNjj)}j]jO)}jGji_sbc.dma_buf_is_dynamicasbuh1hhj_ubj)}(h h]h }(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj_ubjd)}(hjgh]h*}(hj_hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj_ubj )}(hdmabufh]hdmabuf}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj{_ubah}(h]h ]h"]h$]h&]jjuh1jhjC_hhhjT_hM ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj?_hhhjT_hM ubah}(h]j:_ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjT_hM hj<_hhubjA )}(hhh]h)}(h)check if a DMA-buf uses dynamic mappings.h]h)check if a DMA-buf uses dynamic mappings.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM hj`hhubah}(h]h ]h"]h$]h&]uh1j@ hj<_hhhjT_hM ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j`jc j`jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj(`h]h Parameters}(hj*`hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj&`ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM$hj"`ubj )}(hhh]j )}(h0``struct dma_buf *dmabuf`` the DMA-buf to check h](j )}(h``struct dma_buf *dmabuf``h]j)}(hjG`h]hstruct dma_buf *dmabuf}(hjI`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE`ubah}(h]h ]h"]h$]h&]uh1j h[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM!hjA`ubj )}(hhh]h)}(hthe DMA-buf to checkh]hthe DMA-buf to check}(hj``hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\`hM!hj]`ubah}(h]h ]h"]h$]h&]uh1j hjA`ubeh}(h]h ]h"]h$]h&]uh1j hj\`hM!hj>`ubah}(h]h ]h"]h$]h&]uh1j hj"`ubh)}(h**Description**h]jr )}(hj`h]h Description}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj`ubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM#hj"`ubh)}(hReturns true if a DMA-buf exporter wants to be called with the dma_resv locked for the map/unmap callbacks, false if it doesn't wants to be called with the lock held.h]hReturns true if a DMA-buf exporter wants to be called with the dma_resv locked for the map/unmap callbacks, false if it doesn’t wants to be called with the lock held.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hh[/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:145: ./include/linux/dma-buf.hhM"hj"`ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubeh}(h])kernel-functions-and-structures-referenceah ]h"])kernel functions and structures referenceah$]h&]uh1hhjhhhhhKubeh}(h]shared-dma-buffersah ]h"]shared dma buffersah$]h&]uh1hhhhhhhhK"ubh)}(hhh](h)}(hReservation Objectsh]hReservation Objects}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hhhhhKubh)}(hXThe reservation object provides a mechanism to manage a container of dma_fence object associated with a resource. A reservation object can have any number of fences attaches to it. Each fence carries an usage parameter determining how the operation represented by the fence is using the resource. The RCU mechanism is used to protect read access to fences from locked write-side updates.h]hXThe reservation object provides a mechanism to manage a container of dma_fence object associated with a resource. A reservation object can have any number of fences attaches to it. Each fence carries an usage parameter determining how the operation represented by the fence is using the resource. The RCU mechanism is used to protect read access to fences from locked write-side updates.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:151: ./drivers/dma-buf/dma-resv.chK-hj`hhubh)}(h%See struct dma_resv for more details.h]h%See struct dma_resv for more details.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:151: ./drivers/dma-buf/dma-resv.chK4hj`hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_init (C function)c.dma_resv_inithNtauh1jhj`hhhNhNubj)}(hhh](j)}(h)void dma_resv_init (struct dma_resv *obj)h]j)}(h(void dma_resv_init(struct dma_resv *obj)h](jM)}(hvoidh]hvoid}(hjahhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjahhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKubj)}(h h]h }(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjahhhjahKubj )}(h dma_resv_inith]j )}(h dma_resv_inith]h dma_resv_init}(hj'ahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#aubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjahhhjahKubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjCahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?aubj)}(h h]h }(hjPahhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj?aubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjaahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^aubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjcamodnameN classnameNjj)}j]jO)}jGj)asbc.dma_resv_initasbuh1hhj?aubj)}(h h]h }(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj?aubjd)}(hjgh]h*}(hjahhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj?aubj )}(hobjh]hobj}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?aubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj;aubah}(h]h ]h"]h$]h&]jjuh1jhjahhhjahKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj`hhhjahKubah}(h]j`ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjahKhj`hhubjA )}(hhh]h)}(hinitialize a reservation objecth]hinitialize a reservation object}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjahhubah}(h]h ]h"]h$]h&]uh1j@ hj`hhhjahKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jajc jajd je jf uh1jhhhj`hNhNubjh )}(hA**Parameters** ``struct dma_resv *obj`` the reservation objecth](h)}(h**Parameters**h]jr )}(hjah]h Parameters}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjaubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjaubj )}(hhh]j )}(h/``struct dma_resv *obj`` the reservation objecth](j )}(h``struct dma_resv *obj``h]j)}(hjbh]hstruct dma_resv *obj}(hj bhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjbubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj bhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjbubah}(h]h ]h"]h$]h&]uh1j hjbubeh}(h]h ]h"]h$]h&]uh1j hjbhKhjaubah}(h]h ]h"]h$]h&]uh1j hjaubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_fini (C function)c.dma_resv_finihNtauh1jhj`hhhNhNubj)}(hhh](j)}(h)void dma_resv_fini (struct dma_resv *obj)h]j)}(h(void dma_resv_fini(struct dma_resv *obj)h](jM)}(hvoidh]hvoid}(hjabhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj]bhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKubj)}(h h]h }(hjpbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]bhhhjobhKubj )}(h dma_resv_finih]j )}(h dma_resv_finih]h dma_resv_fini}(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~bubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj]bhhhjobhKubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubj)}(h h]h }(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjbubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjbmodnameN classnameNjj)}j]jO)}jGjbsbc.dma_resv_finiasbuh1hhjbubj)}(h h]h }(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjbubjd)}(hjgh]h*}(hjbhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjbubj )}(hobjh]hobj}(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjbubah}(h]h ]h"]h$]h&]jjuh1jhj]bhhhjobhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjYbhhhjobhKubah}(h]jTbah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjobhKhjVbhhubjA )}(hhh]h)}(hdestroys a reservation objecth]hdestroys a reservation object}(hj!chhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjchhubah}(h]h ]h"]h$]h&]uh1j@ hjVbhhhjobhKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j9cjc j9cjd je jf uh1jhhhj`hNhNubjh )}(hA**Parameters** ``struct dma_resv *obj`` the reservation objecth](h)}(h**Parameters**h]jr )}(hjCch]h Parameters}(hjEchhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjAcubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhj=cubj )}(hhh]j )}(h/``struct dma_resv *obj`` the reservation objecth](j )}(h``struct dma_resv *obj``h]j)}(hjbch]hstruct dma_resv *obj}(hjdchhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`cubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhj\cubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj{chhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjxcubah}(h]h ]h"]h$]h&]uh1j hj\cubeh}(h]h ]h"]h$]h&]uh1j hjwchKhjYcubah}(h]h ]h"]h$]h&]uh1j hj=cubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_resv_reserve_fences (C function)c.dma_resv_reserve_fenceshNtauh1jhj`hhhNhNubj)}(hhh](j)}(hKint dma_resv_reserve_fences (struct dma_resv *obj, unsigned int num_fences)h]j)}(hJint dma_resv_reserve_fences(struct dma_resv *obj, unsigned int num_fences)h](jM)}(hinth]hint}(hjchhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjchhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKubj)}(h h]h }(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjchhhjchKubj )}(hdma_resv_reserve_fencesh]j )}(hdma_resv_reserve_fencesh]hdma_resv_reserve_fences}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjchhhjchKubj)}(h/(struct dma_resv *obj, unsigned int num_fences)h](j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubj)}(h h]h }(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjcubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjdmodnameN classnameNjj)}j]jO)}jGjcsbc.dma_resv_reserve_fencesasbuh1hhjcubj)}(h h]h }(hj7dhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjcubjd)}(hjgh]h*}(hjEdhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjcubj )}(hobjh]hobj}(hjRdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjcubj)}(hunsigned int num_fencesh](jM)}(hunsignedh]hunsigned}(hjkdhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjgdubj)}(h h]h }(hjydhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjgdubjM)}(hinth]hint}(hjdhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjgdubj)}(h h]h }(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjgdubj )}(h num_fencesh]h num_fences}(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgdubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjcubeh}(h]h ]h"]h$]h&]jjuh1jhjchhhjchKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjchhhjchKubah}(h]jcah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjchKhjchhubjA )}(hhh]h)}(h1Reserve space to add fences to a dma_resv object.h]h1Reserve space to add fences to a dma_resv object.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjdhhubah}(h]h ]h"]h$]h&]uh1j@ hjchhhjchKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jdjc jdjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjdh]h Parameters}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjdubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjdubj )}(hhh](j )}(h,``struct dma_resv *obj`` reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjeh]hstruct dma_resv *obj}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhj eubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjeubj )}(hhh]h)}(hreservation objecth]hreservation object}(hj'ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#ehKhj$eubah}(h]h ]h"]h$]h&]uh1j hjeubeh}(h]h ]h"]h$]h&]uh1j hj#ehKhjeubj )}(h<``unsigned int num_fences`` number of fences we want to add h](j )}(h``unsigned int num_fences``h]j)}(hjGeh]hunsigned int num_fences}(hjIehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEeubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjAeubj )}(hhh]h)}(hnumber of fences we want to addh]hnumber of fences we want to add}(hj`ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\ehKhj]eubah}(h]h ]h"]h$]h&]uh1j hjAeubeh}(h]h ]h"]h$]h&]uh1j hj\ehKhjeubeh}(h]h ]h"]h$]h&]uh1j hjdubh)}(h**Description**h]jr )}(hjeh]h Description}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjeubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjdubh)}(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 }(hjehhhNhNubjr )}(h**obj**h]hobj}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjeubh locked through dma_resv_lock().}(hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjdubh)}(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 }(hjehhhNhNubjr )}(h**obj**h]hobj}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjeubhu is unlocked at any time before calling dma_resv_add_fence(). This is validated when CONFIG_DEBUG_MUTEXES is enabled.}(hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjdubh)}(h#RETURNS Zero for success, or -errnoh]h#RETURNS Zero for success, or -errno}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chKhjdubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&dma_resv_reset_max_fences (C function)c.dma_resv_reset_max_fenceshNtauh1jhj`hhhNhNubj)}(hhh](j)}(h5void dma_resv_reset_max_fences (struct dma_resv *obj)h]j)}(h4void dma_resv_reset_max_fences(struct dma_resv *obj)h](jM)}(hvoidh]hvoid}(hj fhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjfhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjfhhhjfhMubj )}(hdma_resv_reset_max_fencesh]j )}(hdma_resv_reset_max_fencesh]hdma_resv_reset_max_fences}(hj*fhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&fubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjfhhhjfhMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjFfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBfubj)}(h h]h }(hjSfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjBfubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjdfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjafubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjffmodnameN classnameNjj)}j]jO)}jGj,fsbc.dma_resv_reset_max_fencesasbuh1hhjBfubj)}(h h]h }(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjBfubjd)}(hjgh]h*}(hjfhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjBfubj )}(hobjh]hobj}(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBfubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj>fubah}(h]h ]h"]h$]h&]jjuh1jhjfhhhjfhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjfhhhjfhMubah}(h]jeah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjfhMhjehhubjA )}(hhh]h)}(hreset fences for debuggingh]hreset fences for debugging}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjfhhubah}(h]h ]h"]h$]h&]uh1j@ hjehhhjfhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jfjc jfjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjfh]h Parameters}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjfubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjfubj )}(hhh]j )}(h6``struct dma_resv *obj`` the dma_resv object to reset h](j )}(h``struct dma_resv *obj``h]j)}(hj gh]hstruct dma_resv *obj}(hj ghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjgubj )}(hhh]h)}(hthe dma_resv object to reseth]hthe dma_resv object to reset}(hj#ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhj gubah}(h]h ]h"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]uh1j hjghMhjgubah}(h]h ]h"]h$]h&]uh1j hjfubh)}(h**Description**h]jr )}(hjEgh]h Description}(hjGghhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjCgubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjfubh)}(hReset the number of pre-reserved fence slots to test that drivers do correct slot allocation using dma_resv_reserve_fences(). See also :c:type:`dma_resv_list.max_fences `.h](hReset the number of pre-reserved fence slots to test that drivers do correct slot allocation using dma_resv_reserve_fences(). See also }(hj[ghhhNhNubh)}(h2:c:type:`dma_resv_list.max_fences `h]j)}(hjegh]hdma_resv_list.max_fences}(hjgghhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjcgubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_resv_listuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj[gubh.}(hj[ghhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjghMhjfubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_add_fence (C function)c.dma_resv_add_fencehNtauh1jhj`hhhNhNubj)}(hhh](j)}(hbvoid dma_resv_add_fence (struct dma_resv *obj, struct dma_fence *fence, enum dma_resv_usage usage)h]j)}(havoid dma_resv_add_fence(struct dma_resv *obj, struct dma_fence *fence, enum dma_resv_usage usage)h](jM)}(hvoidh]hvoid}(hjghhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjghhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjghhhjghMubj )}(hdma_resv_add_fenceh]j )}(hdma_resv_add_fenceh]hdma_resv_add_fence}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjghhhjghMubj)}(hJ(struct dma_resv *obj, struct dma_fence *fence, enum dma_resv_usage usage)h](j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubj)}(h h]h }(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjgubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj hmodnameN classnameNjj)}j]jO)}jGjgsbc.dma_resv_add_fenceasbuh1hhjgubj)}(h h]h }(hj(hhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjgubjd)}(hjgh]h*}(hj6hhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjgubj )}(hobjh]hobj}(hjChhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjgubj)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj\hhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXhubj)}(h h]h }(hjihhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjXhubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjzhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwhubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj|hmodnameN classnameNjj)}j]j$hc.dma_resv_add_fenceasbuh1hhjXhubj)}(h h]h }(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjXhubjd)}(hjgh]h*}(hjhhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjXhubj )}(hfenceh]hfence}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjXhubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjgubj)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubj)}(h h]h }(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjhmodnameN classnameNjj)}j]j$hc.dma_resv_add_fenceasbuh1hhjhubj)}(h h]h }(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhubj )}(husageh]husage}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjgubeh}(h]h ]h"]h$]h&]jjuh1jhjghhhjghMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjghhhjghMubah}(h]jgah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjghMhjghhubjA )}(hhh]h)}(hAdd a fence to the dma_resv objh]hAdd a fence to the dma_resv obj}(hj@ihhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj=ihhubah}(h]h ]h"]h$]h&]uh1j@ hjghhhjghMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jXijc jXijd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjbih]h Parameters}(hjdihhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj`iubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj\iubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjih]hstruct dma_resv *obj}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj{iubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihMhjiubah}(h]h ]h"]h$]h&]uh1j hj{iubeh}(h]h ]h"]h$]h&]uh1j hjihMhjxiubj )}(h-``struct dma_fence *fence`` the fence to add h](j )}(h``struct dma_fence *fence``h]j)}(hjih]hstruct dma_fence *fence}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjiubj )}(hhh]h)}(hthe fence to addh]hthe fence to add}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihMhjiubah}(h]h ]h"]h$]h&]uh1j hjiubeh}(h]h ]h"]h$]h&]uh1j hjihMhjxiubj )}(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)}(hjih]henum dma_resv_usage usage}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjiubj )}(hhh]h)}(h.how the fence is used, see enum dma_resv_usageh]h.how the fence is used, see enum dma_resv_usage}(hj jhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhMhj jubah}(h]h ]h"]h$]h&]uh1j hjiubeh}(h]h ]h"]h$]h&]uh1j hjjhMhjxiubeh}(h]h ]h"]h$]h&]uh1j hj\iubh)}(h**Description**h]jr )}(hj.jh]h Description}(hj0jhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj,jubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj\iubh)}(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, }(hjDjhhhNhNubjr )}(h**obj**h]hobj}(hjLjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjDjubhT must be locked with dma_resv_lock(), and dma_resv_reserve_fences() has been called.}(hjDjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj\iubh)}(hOSee also :c:type:`dma_resv.fence ` for a discussion of the semantics.h](h See also }(hjejhhhNhNubh)}(h#:c:type:`dma_resv.fence `h]j)}(hjojh]hdma_resv.fence}(hjqjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjmjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjejubh# for a discussion of the semantics.}(hjejhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjjhMhj\iubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_resv_replace_fences (C function)c.dma_resv_replace_fenceshNtauh1jhj`hhhNhNubj)}(hhh](j)}(hvoid dma_resv_replace_fences (struct dma_resv *obj, uint64_t context, struct dma_fence *replacement, enum dma_resv_usage usage)h]j)}(h~void dma_resv_replace_fences(struct dma_resv *obj, uint64_t context, struct dma_fence *replacement, enum dma_resv_usage usage)h](jM)}(hvoidh]hvoid}(hjjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMJubj)}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjjhhhjjhMJubj )}(hdma_resv_replace_fencesh]j )}(hdma_resv_replace_fencesh]hdma_resv_replace_fences}(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjjhhhjjhMJubj)}(hb(struct dma_resv *obj, uint64_t context, struct dma_fence *replacement, enum dma_resv_usage usage)h](j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj)}(h h]h }(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjkubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjkmodnameN classnameNjj)}j]jO)}jGjjsbc.dma_resv_replace_fencesasbuh1hhjjubj)}(h h]h }(hj2khhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjjubjd)}(hjgh]h*}(hj@khhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjjubj )}(hobjh]hobj}(hjMkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjjubj)}(huint64_t contexth](h)}(hhh]j )}(huint64_th]huint64_t}(hjikhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjfkubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjkkmodnameN classnameNjj)}j]j.kc.dma_resv_replace_fencesasbuh1hhjbkubj)}(h h]h }(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjbkubj )}(hcontexth]hcontext}(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbkubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjjubj)}(hstruct dma_fence *replacementh](j)}(hjh]hstruct}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubj)}(h h]h }(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjkubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjkubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjkmodnameN classnameNjj)}j]j.kc.dma_resv_replace_fencesasbuh1hhjkubj)}(h h]h }(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjkubjd)}(hjgh]h*}(hjkhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjkubj )}(h replacementh]h replacement}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjkubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjjubj)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubj)}(h h]h }(hj+lhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjlubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjlmodnameN classnameNjj)}j]j.kc.dma_resv_replace_fencesasbuh1hhjlubj)}(h h]h }(hjZlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjlubj )}(husageh]husage}(hjhlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjjubeh}(h]h ]h"]h$]h&]jjuh1jhjjhhhjjhMJubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjjhhhjjhMJubah}(h]jjah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjjhMJhjjhhubjA )}(hhh]h)}(h"replace fences in the dma_resv objh]h"replace fences in the dma_resv obj}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMJhjlhhubah}(h]h ]h"]h$]h&]uh1j@ hjjhhhjjhMJubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jljc jljd je jf uh1jhhhj`hNhNubjh )}(hX**Parameters** ``struct dma_resv *obj`` the reservation object ``uint64_t context`` the context of the fences to replace ``struct dma_fence *replacement`` the new fence to use instead ``enum dma_resv_usage usage`` how the new fence is used, see enum dma_resv_usage **Description** Replace fences with a specified context with a new fence. Only valid if the operation represented by the original fence has no longer access to the resources represented by the dma_resv object when the new fence completes. And example for using this is replacing a preemption fence with a page table update fence which makes the resource inaccessible.h](h)}(h**Parameters**h]jr )}(hjlh]h Parameters}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjlubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMNhjlubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjlh]hstruct dma_resv *obj}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMKhjlubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhMKhjlubah}(h]h ]h"]h$]h&]uh1j hjlubeh}(h]h ]h"]h$]h&]uh1j hjlhMKhjlubj )}(h:``uint64_t context`` the context of the fences to replace h](j )}(h``uint64_t context``h]j)}(hj mh]huint64_t context}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj mubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMLhjmubj )}(hhh]h)}(h$the context of the fences to replaceh]h$the context of the fences to replace}(hj%mhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!mhMLhj"mubah}(h]h ]h"]h$]h&]uh1j hjmubeh}(h]h ]h"]h$]h&]uh1j hj!mhMLhjlubj )}(h?``struct dma_fence *replacement`` the new fence to use instead h](j )}(h!``struct dma_fence *replacement``h]j)}(hjEmh]hstruct dma_fence *replacement}(hjGmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCmubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMMhj?mubj )}(hhh]h)}(hthe new fence to use insteadh]hthe new fence to use instead}(hj^mhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZmhMMhj[mubah}(h]h ]h"]h$]h&]uh1j hj?mubeh}(h]h ]h"]h$]h&]uh1j hjZmhMMhjlubj )}(hQ``enum dma_resv_usage usage`` how the new fence is used, see enum dma_resv_usage h](j )}(h``enum dma_resv_usage usage``h]j)}(hj~mh]henum dma_resv_usage usage}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|mubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMNhjxmubj )}(hhh]h)}(h2how the new fence is used, see enum dma_resv_usageh]h2how the new fence is used, see enum dma_resv_usage}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMNhjmubah}(h]h ]h"]h$]h&]uh1j hjxmubeh}(h]h ]h"]h$]h&]uh1j hjmhMNhjlubeh}(h]h ]h"]h$]h&]uh1j hjlubh)}(h**Description**h]jr )}(hjmh]h Description}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjmubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMPhjlubh)}(hReplace fences with a specified context with a new fence. Only valid if the operation represented by the original fence has no longer access to the resources represented by the dma_resv object when the new fence completes.h]hReplace fences with a specified context with a new fence. Only valid if the operation represented by the original fence has no longer access to the resources represented by the dma_resv object when the new fence completes.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMOhjlubh)}(hAnd example for using this is replacing a preemption fence with a page table update fence which makes the resource inaccessible.h]hAnd example for using this is replacing a preemption fence with a page table update fence which makes the resource inaccessible.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMShjlubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)dma_resv_iter_first_unlocked (C function)c.dma_resv_iter_first_unlockedhNtauh1jhj`hhhNhNubj)}(hhh](j)}(hNstruct dma_fence * dma_resv_iter_first_unlocked (struct dma_resv_iter *cursor)h]j)}(hLstruct dma_fence *dma_resv_iter_first_unlocked(struct dma_resv_iter *cursor)h](j)}(hjh]hstruct}(hj nhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj nhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj nhhhjnhMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj,nhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)nubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj.nmodnameN classnameNjj)}j]jO)}jGdma_resv_iter_first_unlockedsbc.dma_resv_iter_first_unlockedasbuh1hhj nhhhjnhMubj)}(h h]h }(hjMnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj nhhhjnhMubjd)}(hjgh]h*}(hj[nhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj nhhhjnhMubj )}(hdma_resv_iter_first_unlockedh]j )}(hjJnh]hdma_resv_iter_first_unlocked}(hjlnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhnubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj nhhhjnhMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubj)}(h h]h }(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjnubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjnubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjnmodnameN classnameNjj)}j]jHnc.dma_resv_iter_first_unlockedasbuh1hhjnubj)}(h h]h }(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjnubjd)}(hjgh]h*}(hjnhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjnubj )}(hcursorh]hcursor}(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjnubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjnubah}(h]h ]h"]h$]h&]jjuh1jhj nhhhjnhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjnhhhjnhMubah}(h]jnah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjnhMhjnhhubjA )}(hhh]h)}(h(first fence in an unlocked dma_resv obj.h]h(first fence in an unlocked dma_resv obj.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjohhubah}(h]h ]h"]h$]h&]uh1j@ hjnhhhjnhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j ojc j ojd je jf uh1jhhhj`hNhNubjh )}(hX**Parameters** ``struct dma_resv_iter *cursor`` the cursor with the current position **Description** Subsequent fences are iterated with dma_resv_iter_next_unlocked(). Beware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_first() whenever possible. Returns the first fence from an unlocked dma_resv obj.h](h)}(h**Parameters**h]jr )}(hj*oh]h Parameters}(hj,ohhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj(oubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj$oubj )}(hhh]j )}(hF``struct dma_resv_iter *cursor`` the cursor with the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjIoh]hstruct dma_resv_iter *cursor}(hjKohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGoubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjCoubj )}(hhh]h)}(h$the cursor with the current positionh]h$the cursor with the current position}(hjbohhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^ohMhj_oubah}(h]h ]h"]h$]h&]uh1j hjCoubeh}(h]h ]h"]h$]h&]uh1j hj^ohMhj@oubah}(h]h ]h"]h$]h&]uh1j hj$oubh)}(h**Description**h]jr )}(hjoh]h Description}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjoubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj$oubh)}(hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().h]hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj$oubh)}(hBeware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_first() whenever possible.h]hBeware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_first() whenever possible.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj$oubh)}(h6Returns the first fence from an unlocked dma_resv obj.h]h6Returns the first fence from an unlocked dma_resv obj.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj$oubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(dma_resv_iter_next_unlocked (C function)c.dma_resv_iter_next_unlockedhNtauh1jhj`hhhNhNubj)}(hhh](j)}(hMstruct dma_fence * dma_resv_iter_next_unlocked (struct dma_resv_iter *cursor)h]j)}(hKstruct dma_fence *dma_resv_iter_next_unlocked(struct dma_resv_iter *cursor)h](j)}(hjh]hstruct}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjohhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjohhhjohMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjpubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjpmodnameN classnameNjj)}j]jO)}jGdma_resv_iter_next_unlockedsbc.dma_resv_iter_next_unlockedasbuh1hhjohhhjohMubj)}(h h]h }(hj'phhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjohhhjohMubjd)}(hjgh]h*}(hj5phhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjohhhjohMubj )}(hdma_resv_iter_next_unlockedh]j )}(hj$ph]hdma_resv_iter_next_unlocked}(hjFphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjBpubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjohhhjohMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hjaphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]pubj)}(h h]h }(hjnphhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]pubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|pubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjpmodnameN classnameNjj)}j]j"pc.dma_resv_iter_next_unlockedasbuh1hhj]pubj)}(h h]h }(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]pubjd)}(hjgh]h*}(hjphhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj]pubj )}(hcursorh]hcursor}(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]pubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjYpubah}(h]h ]h"]h$]h&]jjuh1jhjohhhjohMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjohhhjohMubah}(h]joah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjohMhjohhubjA )}(hhh]h)}(h'next fence in an unlocked dma_resv obj.h]h'next fence in an unlocked dma_resv obj.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjphhubah}(h]h ]h"]h$]h&]uh1j@ hjohhhjohMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jpjc jpjd je jf uh1jhhhj`hNhNubjh )}(hX~**Parameters** ``struct dma_resv_iter *cursor`` the cursor with the current position **Description** Beware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the locked dma_resv_iter_next() whenever possible. Returns the next fence from an unlocked dma_resv obj.h](h)}(h**Parameters**h]jr )}(hjqh]h Parameters}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjqubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjpubj )}(hhh]j )}(hF``struct dma_resv_iter *cursor`` the cursor with the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hj#qh]hstruct dma_resv_iter *cursor}(hj%qhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!qubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjqubj )}(hhh]h)}(h$the cursor with the current positionh]h$the cursor with the current position}(hj )j? huh1jhjqhMhjqhhubjA )}(hhh]h)}(h)first fence from a locked dma_resv objecth]h)first fence from a locked dma_resv object}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjrhhubah}(h]h ]h"]h$]h&]uh1j@ hjqhhhjqhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jrjc jrjd je jf uh1jhhhj`hNhNubjh )}(hX**Parameters** ``struct dma_resv_iter *cursor`` cursor to record the current position **Description** Subsequent fences are iterated with dma_resv_iter_next_unlocked(). Return the first fence in the dma_resv object while holding the :c:type:`dma_resv.lock `.h](h)}(h**Parameters**h]jr )}(hjrh]h Parameters}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjrubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjrubj )}(hhh]j )}(hG``struct dma_resv_iter *cursor`` cursor to record the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjrh]hstruct dma_resv_iter *cursor}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjrubj )}(hhh]h)}(h%cursor to record the current positionh]h%cursor to record the current position}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshMhjsubah}(h]h ]h"]h$]h&]uh1j hjrubeh}(h]h ]h"]h$]h&]uh1j hjshMhjrubah}(h]h ]h"]h$]h&]uh1j hjrubh)}(h**Description**h]jr )}(hj)sh]h Description}(hj+shhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj'subah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjrubh)}(hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().h]hBSubsequent fences are iterated with dma_resv_iter_next_unlocked().}(hj?shhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjrubh)}(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 }(hjNshhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjXsh]h dma_resv.lock}(hjZshhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjVsubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjNsubh.}(hjNshhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjushMhjrubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_iter_next (C function)c.dma_resv_iter_nexthNtauh1jhj`hhhNhNubj)}(hhh](j)}(hDstruct dma_fence * dma_resv_iter_next (struct dma_resv_iter *cursor)%h]j)}(hBstruct dma_fence *dma_resv_iter_next(struct dma_resv_iter *cursor)h](j)}(hjh]hstruct}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjshhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjshhhjshMubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjsmodnameN classnameNjj)}j]jO)}jGdma_resv_iter_nextsbc.dma_resv_iter_nextasbuh1hhjshhhjshMubj)}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjshhhjshMubjd)}(hjgh]h*}(hjshhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjshhhjshMubj )}(hdma_resv_iter_nexth]j )}(hjsh]hdma_resv_iter_next}(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjshhhjshMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(h h]h }(hj'thhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjtubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hj8thhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5tubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj:tmodnameN classnameNjj)}j]jsc.dma_resv_iter_nextasbuh1hhjtubj)}(h h]h }(hjVthhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjtubjd)}(hjgh]h*}(hjdthhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjtubj )}(hcursorh]hcursor}(hjqthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjtubah}(h]h ]h"]h$]h&]jjuh1jhjshhhjshMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjshhhjshMubah}(h]jsah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjshMhjshhubjA )}(hhh]h)}(h(next fence from a locked dma_resv objecth]h(next fence from a locked dma_resv object}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjthhubah}(h]h ]h"]h$]h&]uh1j@ hjshhhjshMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jtjc jtjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjth]h Parameters}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjtubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjtubj )}(hhh]j )}(hG``struct dma_resv_iter *cursor`` cursor to record the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjth]hstruct dma_resv_iter *cursor}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjtubj )}(hhh]h)}(h%cursor to record the current positionh]h%cursor to record the current position}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthMhjtubah}(h]h ]h"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]uh1j hjthMhjtubah}(h]h ]h"]h$]h&]uh1j hjtubh)}(h**Description**h]jr )}(hjuh]h Description}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjuubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjtubh)}(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 }(hj-uhhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hj7uh]h dma_resv.lock}(hj9uhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj5uubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj-uubh.}(hj-uhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjTuhMhjtubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_resv_copy_fences (C function)c.dma_resv_copy_fenceshNtauh1jhj`hhhNhNubj)}(hhh](j)}(hEint dma_resv_copy_fences (struct dma_resv *dst, struct dma_resv *src)h]j)}(hDint dma_resv_copy_fences(struct dma_resv *dst, struct dma_resv *src)h](jM)}(hinth]hint}(hjuhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj{uhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj{uhhhjuhMubj )}(hdma_resv_copy_fencesh]j )}(hdma_resv_copy_fencesh]hdma_resv_copy_fences}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj{uhhhjuhMubj)}(h,(struct dma_resv *dst, struct dma_resv *src)h](j)}(hstruct dma_resv *dsth](j)}(hjh]hstruct}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubj)}(h h]h }(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjuubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjumodnameN classnameNjj)}j]jO)}jGjusbc.dma_resv_copy_fencesasbuh1hhjuubj)}(h h]h }(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjuubjd)}(hjgh]h*}(hjvhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjuubj )}(hdsth]hdst}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjuubj)}(hstruct dma_resv *srch](j)}(hjh]hstruct}(hj.vhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*vubj)}(h h]h }(hj;vhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj*vubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjLvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjIvubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjNvmodnameN classnameNjj)}j]juc.dma_resv_copy_fencesasbuh1hhj*vubj)}(h h]h }(hjjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj*vubjd)}(hjgh]h*}(hjxvhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj*vubj )}(hsrch]hsrc}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*vubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjuubeh}(h]h ]h"]h$]h&]jjuh1jhj{uhhhjuhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjwuhhhjuhMubah}(h]jruah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjuhMhjtuhhubjA )}(hhh]h)}(h Copy all fences from src to dst.h]h Copy all fences from src to dst.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjvhhubah}(h]h ]h"]h$]h&]uh1j@ hjtuhhhjuhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jvjc jvjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjvh]h Parameters}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjvubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjvubj )}(hhh](j )}(h<``struct dma_resv *dst`` the destination reservation object h](j )}(h``struct dma_resv *dst``h]j)}(hjvh]hstruct dma_resv *dst}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjvubj )}(hhh]h)}(h"the destination reservation objecth]h"the destination reservation object}(hj whhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhMhjwubah}(h]h ]h"]h$]h&]uh1j hjvubeh}(h]h ]h"]h$]h&]uh1j hjwhMhjvubj )}(h7``struct dma_resv *src`` the source reservation object h](j )}(h``struct dma_resv *src``h]j)}(hj)wh]hstruct dma_resv *src}(hj+whhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'wubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj#wubj )}(hhh]h)}(hthe source reservation objecth]hthe source reservation object}(hjBwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>whMhj?wubah}(h]h ]h"]h$]h&]uh1j hj#wubeh}(h]h ]h"]h$]h&]uh1j hj>whMhjvubeh}(h]h ]h"]h$]h&]uh1j hjvubh)}(h**Description**h]jr )}(hjdwh]h Description}(hjfwhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjbwubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjvubh)}(h7Copy all fences from src to dst. dst-lock must be held.h]h7Copy all fences from src to dst. dst-lock must be held.}(hjzwhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjvubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_get_fences (C function)c.dma_resv_get_fenceshNtauh1jhj`hhhNhNubj)}(hhh](j)}(hint dma_resv_get_fences (struct dma_resv *obj, enum dma_resv_usage usage, unsigned int *num_fences, struct dma_fence ***fences)h]j)}(h~int dma_resv_get_fences(struct dma_resv *obj, enum dma_resv_usage usage, unsigned int *num_fences, struct dma_fence ***fences)h](jM)}(hinth]hint}(hjwhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjwhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM.ubj)}(h h]h }(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjwhhhjwhM.ubj )}(hdma_resv_get_fencesh]j )}(hdma_resv_get_fencesh]hdma_resv_get_fences}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjwhhhjwhM.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)}(hjh]hstruct}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj)}(h h]h }(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjwubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjxubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjxmodnameN classnameNjj)}j]jO)}jGjwsbc.dma_resv_get_fencesasbuh1hhjwubj)}(h h]h }(hj$xhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjwubjd)}(hjgh]h*}(hj2xhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjwubj )}(hobjh]hobj}(hj?xhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjwubj)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hjXxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTxubj)}(h h]h }(hjexhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjTxubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjvxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsxubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjxxmodnameN classnameNjj)}j]j xc.dma_resv_get_fencesasbuh1hhjTxubj)}(h h]h }(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjTxubj )}(husageh]husage}(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjTxubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjwubj)}(hunsigned int *num_fencesh](jM)}(hunsignedh]hunsigned}(hjxhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjxubj)}(h h]h }(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjxubjM)}(hinth]hint}(hjxhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjxubj)}(h h]h }(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjxubjd)}(hjgh]h*}(hjxhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjxubj )}(h num_fencesh]h num_fences}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjxubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjwubj)}(hstruct dma_fence ***fencesh](j)}(hjh]hstruct}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubj)}(h h]h }(hj&yhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjyubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj7yhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4yubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj9ymodnameN classnameNjj)}j]j xc.dma_resv_get_fencesasbuh1hhjyubj)}(h h]h }(hjUyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjyubjd)}(hjgh]h*}(hjcyhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjyubjd)}(hjgh]h*}(hjpyhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjyubjd)}(hjgh]h*}(hj}yhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjyubj )}(hfencesh]hfences}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjwubeh}(h]h ]h"]h$]h&]jjuh1jhjwhhhjwhM.ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjwhhhjwhM.ubah}(h]jwah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjwhM.hjwhhubjA )}(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}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM.hjyhhubah}(h]h ]h"]h$]h&]uh1j@ hjwhhhjwhM.ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jyjc jyjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjyh]h Parameters}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjyubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM2hjyubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjyh]hstruct dma_resv *obj}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM0hjyubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj zhM0hj zubah}(h]h ]h"]h$]h&]uh1j hjyubeh}(h]h ]h"]h$]h&]uh1j hj zhM0hjyubj )}(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.zh]henum dma_resv_usage usage}(hj0zhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,zubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM1hj(zubj )}(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.}(hjGzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCzhM1hjDzubah}(h]h ]h"]h$]h&]uh1j hj(zubeh}(h]h ]h"]h$]h&]uh1j hjCzhM1hjyubj )}(h;``unsigned int *num_fences`` the number of fences returned h](j )}(h``unsigned int *num_fences``h]j)}(hjgzh]hunsigned int *num_fences}(hjizhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjezubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM2hjazubj )}(hhh]h)}(hthe number of fences returnedh]hthe number of fences returned}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|zhM2hj}zubah}(h]h ]h"]h$]h&]uh1j hjazubeh}(h]h ]h"]h$]h&]uh1j hj|zhM2hjyubj )}(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)}(hjzh]hstruct dma_fence ***fences}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM4hjzubj )}(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)}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM3hjzubah}(h]h ]h"]h$]h&]uh1j hjzubeh}(h]h ]h"]h$]h&]uh1j hjzhM4hjyubeh}(h]h ]h"]h$]h&]uh1j hjyubh)}(h**Description**h]jr )}(hjzh]h Description}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjzubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM6hjyubh)}(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.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chM5hjyubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_resv_get_singleton (C function)c.dma_resv_get_singletonhNtauh1jhj`hhhNhNubj)}(hhh](j)}(hfint dma_resv_get_singleton (struct dma_resv *obj, enum dma_resv_usage usage, struct dma_fence **fence)h]j)}(heint dma_resv_get_singleton(struct dma_resv *obj, enum dma_resv_usage usage, struct dma_fence **fence)h](jM)}(hinth]hint}(hj!{hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj{hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMeubj)}(h h]h }(hj0{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj{hhhj/{hMeubj )}(hdma_resv_get_singletonh]j )}(hdma_resv_get_singletonh]hdma_resv_get_singleton}(hjB{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj>{ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj{hhhj/{hMeubj)}(hK(struct dma_resv *obj, enum dma_resv_usage usage, struct dma_fence **fence)h](j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hj^{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZ{ubj)}(h h]h }(hjk{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjZ{ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj|{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjy{ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj~{modnameN classnameNjj)}j]jO)}jGjD{sbc.dma_resv_get_singletonasbuh1hhjZ{ubj)}(h h]h }(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjZ{ubjd)}(hjgh]h*}(hj{hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjZ{ubj )}(hobjh]hobj}(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZ{ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjV{ubj)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubj)}(h h]h }(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj{ubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj{modnameN classnameNjj)}j]j{c.dma_resv_get_singletonasbuh1hhj{ubj)}(h h]h }(hj |hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj{ubj )}(husageh]husage}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjV{ubj)}(hstruct dma_fence **fenceh](j)}(hjh]hstruct}(hj3|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/|ubj)}(h h]h }(hj@|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj/|ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjQ|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjN|ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjS|modnameN classnameNjj)}j]j{c.dma_resv_get_singletonasbuh1hhj/|ubj)}(h h]h }(hjo|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj/|ubjd)}(hjgh]h*}(hj}|hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj/|ubjd)}(hjgh]h*}(hj|hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj/|ubj )}(hfenceh]hfence}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/|ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjV{ubeh}(h]h ]h"]h$]h&]jjuh1jhj{hhhj/{hMeubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj{hhhj/{hMeubah}(h]j{ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj/{hMehj{hhubjA )}(hhh]h)}(h%Get a single fence for all the fencesh]h%Get a single fence for all the fences}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMehj|hhubah}(h]h ]h"]h$]h&]uh1j@ hj{hhhj/{hMeubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j|jc j|jd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hj|h]h Parameters}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj|ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMihj|ubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj}h]hstruct dma_resv *obj}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMfhj|ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hMfhj}ubah}(h]h ]h"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]uh1j hj}hMfhj|ubj )}(hY``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. h](j )}(h``enum dma_resv_usage usage``h]j)}(hj;}h]henum dma_resv_usage usage}(hj=}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9}ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMghj5}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.}(hjT}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjP}hMghjQ}ubah}(h]h ]h"]h$]h&]uh1j hj5}ubeh}(h]h ]h"]h$]h&]uh1j hjP}hMghj|ubj )}(h1``struct dma_fence **fence`` the resulting fence h](j )}(h``struct dma_fence **fence``h]j)}(hjt}h]hstruct dma_fence **fence}(hjv}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjr}ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhhjn}ubj )}(hhh]h)}(hthe resulting fenceh]hthe resulting fence}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hMhhj}ubah}(h]h ]h"]h$]h&]uh1j hjn}ubeh}(h]h ]h"]h$]h&]uh1j hj}hMhhj|ubeh}(h]h ]h"]h$]h&]uh1j hj|ubh)}(h**Description**h]jr )}(hj}h]h Description}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj}ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMjhj|ubh)}(hoGet a single fence representing all the fences inside the resv object. Returns either 0 for success or -ENOMEM.h]hoGet a single fence representing all the fences inside the resv object. Returns either 0 for success or -ENOMEM.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMihj|ubh)}(hWarning: This can't be used like this when adding the fence back to the resv object since that can lead to stack corruption when finalizing the dma_fence_array.h]hWarning: This can’t be used like this when adding the fence back to the resv object since that can lead to stack corruption when finalizing the dma_fence_array.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMlhj|ubh)}(h:Returns 0 on success and negative error values on failure.h]h:Returns 0 on success and negative error values on failure.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMphj|ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_resv_wait_timeout (C function)c.dma_resv_wait_timeouthNtauh1jhj`hhhNhNubj)}(hhh](j)}(hnlong dma_resv_wait_timeout (struct dma_resv *obj, enum dma_resv_usage usage, bool intr, unsigned long timeout)h]j)}(hmlong dma_resv_wait_timeout(struct dma_resv *obj, enum dma_resv_usage usage, bool intr, unsigned long timeout)h](jM)}(hlongh]hlong}(hj~hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj~hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hj!~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj~hhhj ~hMubj )}(hdma_resv_wait_timeouth]j )}(hdma_resv_wait_timeouth]hdma_resv_wait_timeout}(hj3~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/~ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj~hhhj ~hMubj)}(hS(struct dma_resv *obj, enum dma_resv_usage usage, bool intr, unsigned long timeout)h](j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjO~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK~ubj)}(h h]h }(hj\~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjK~ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjm~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjj~ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjo~modnameN classnameNjj)}j]jO)}jGj5~sbc.dma_resv_wait_timeoutasbuh1hhjK~ubj)}(h h]h }(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjK~ubjd)}(hjgh]h*}(hj~hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjK~ubj )}(hobjh]hobj}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjK~ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjG~ubj)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj)}(h h]h }(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj~ubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj~modnameN classnameNjj)}j]j~c.dma_resv_wait_timeoutasbuh1hhj~ubj)}(h h]h }(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj~ubj )}(husageh]husage}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjG~ubj)}(h bool intrh](jM)}(hjk3h]hbool}(hj$hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubj )}(hintrh]hintr}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjG~ubj)}(hunsigned long timeouth](jM)}(hunsignedh]hunsigned}(hjXhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjTubj)}(h h]h }(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjTubjM)}(hlongh]hlong}(hjthhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjTubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjTubj )}(htimeouth]htimeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjTubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjG~ubeh}(h]h ]h"]h$]h&]jjuh1jhj~hhhj ~hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj ~hhhj ~hMubah}(h]j~ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj ~hMhj~hhubjA )}(hhh]h)}(h$Wait on reservation's objects fencesh]h&Wait on reservation’s objects fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hj~hhhj ~hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(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)}(hj4h]henum dma_resv_usage usage}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj.ubj )}(hhh]h)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhMhjJubah}(h]h ]h"]h$]h&]uh1j hj.ubeh}(h]h ]h"]h$]h&]uh1j hjIhMhjubj )}(h-``bool intr`` if true, do interruptible wait h](j )}(h ``bool intr``h]j)}(hjmh]h bool intr}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjgubj )}(hhh]h)}(hif true, do interruptible waith]hif true, do interruptible wait}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(hQ``unsigned long timeout`` timeout value in jiffies or zero to return immediately h](j )}(h``unsigned long timeout``h]j)}(hjh]hunsigned long timeout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(h6timeout value in jiffies or zero to return immediatelyh]h6timeout value in jiffies or zero to return immediately}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj߀ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_resv_set_deadline (C function)c.dma_resv_set_deadlinehNtauh1jhj`hhhNhNubj)}(hhh](j)}(h^void dma_resv_set_deadline (struct dma_resv *obj, enum dma_resv_usage usage, ktime_t deadline)h]j)}(h]void dma_resv_set_deadline(struct dma_resv *obj, enum dma_resv_usage usage, ktime_t deadline)h](jM)}(hvoidh]hvoid}(hj&hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj"hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj"hhhj4hMubj )}(hdma_resv_set_deadlineh]j )}(hdma_resv_set_deadlineh]hdma_resv_set_deadline}(hjGhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj"hhhj4hMubj)}(hC(struct dma_resv *obj, enum dma_resv_usage usage, ktime_t deadline)h](j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(h h]h }(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj_ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjIsbc.dma_resv_set_deadlineasbuh1hhj_ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj_ubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj_ubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[ubj)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hjՁhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjсubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjсubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.dma_resv_set_deadlineasbuh1hhjсubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjсubj )}(husageh]husage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjсubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[ubj)}(hktime_t deadlineh](h)}(hhh]j )}(hktime_th]hktime_t}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj=modnameN classnameNjj)}j]jc.dma_resv_set_deadlineasbuh1hhj4ubj)}(h h]h }(hjYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj4ubj )}(hdeadlineh]hdeadline}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[ubeh}(h]h ]h"]h$]h&]jjuh1jhj"hhhj4hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhj4hMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj4hMhjhhubjA )}(hhh]h)}(h.Set a deadline on reservation's objects fencesh]h0Set a deadline on reservation’s objects fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhj4hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj҂h]hstruct dma_resv *obj}(hjԂhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjЂubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhĵubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hĵubeh}(h]h ]h"]h$]h&]uh1j hjhMhjɂubj )}(hY``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. h](j )}(h``enum dma_resv_usage usage``h]j)}(hj h]henum dma_resv_usage usage}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(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 )}(h8``ktime_t deadline`` the requested deadline (MONOTONIC) h](j )}(h``ktime_t deadline``h]j)}(hjDh]hktime_t deadline}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj>ubj )}(hhh]h)}(h"the requested deadline (MONOTONIC)h]h"the requested deadline (MONOTONIC)}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhMhjZubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hjYhMhjɂubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj}ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubh)}(hhMay be called without holding the dma_resv lock. Sets **deadline** on all fences filtered by **usage**.h](h7May be called without holding the dma_resv lock. Sets }(hjhhhNhNubjr )}(h **deadline**h]hdeadline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubh on all fences filtered by }(hjhhhNhNubjr )}(h **usage**h]husage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_resv_test_signaled (C function)c.dma_resv_test_signaledhNtauh1jhj`hhhNhNubj)}(hhh](j)}(hMbool dma_resv_test_signaled (struct dma_resv *obj, enum dma_resv_usage usage)h]j)}(hLbool dma_resv_test_signaled(struct dma_resv *obj, enum dma_resv_usage usage)h](jM)}(hjk3h]hbool}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(hdma_resv_test_signaledh]j )}(hdma_resv_test_signaledh]hdma_resv_test_signaled}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h1(struct dma_resv *obj, enum dma_resv_usage usage)h](j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjDmodnameN classnameNjj)}j]jO)}jGj sbc.dma_resv_test_signaledasbuh1hhj ubj)}(h h]h }(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjd)}(hjgh]h*}(hjphhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj ubj )}(hobjh]hobj}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]j^c.dma_resv_test_signaledasbuh1hhjubj)}(h h]h }(hj҄hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(husageh]husage}(hjhhhNhNubah}(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&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jۃah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhj݃hhubjA )}(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 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hj݃hhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j"jc j"jd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hj,h]h Parameters}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj*ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj&ubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjKh]hstruct dma_resv *obj}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjEubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hMhjaubah}(h]h ]h"]h$]h&]uh1j hjEubeh}(h]h ]h"]h$]h&]uh1j hj`hMhjBubj )}(hY``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage. h](j )}(h``enum dma_resv_usage usage``h]j)}(hjh]henum dma_resv_usage usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj~ubj )}(hhh]h)}(h:controls which fences to include, see enum dma_resv_usage.h]h:controls which fences to include, see enum dma_resv_usage.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hj~ubeh}(h]h ]h"]h$]h&]uh1j hjhMhjBubeh}(h]h ]h"]h$]h&]uh1j hj&ubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj&ubh)}(hXCallers are not required to hold specific locks, but maybe hold dma_resv_lock() already.h]hXCallers are not required to hold specific locks, but maybe hold dma_resv_lock() already.}(hjՅhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj&ubh)}(hRETURNSh]hRETURNS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj&ubh)}(h(True if all fences signaled, else false.h]h(True if all fences signaled, else false.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhj&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_describe (C function)c.dma_resv_describehNtauh1jhj`hhhNhNubj)}(hhh](j)}(hCvoid dma_resv_describe (struct dma_resv *obj, struct seq_file *seq)h]j)}(hBvoid dma_resv_describe(struct dma_resv *obj, struct seq_file *seq)h](jM)}(hvoidh]hvoid}(hj"hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMubj)}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhj0hMubj )}(hdma_resv_describeh]j )}(hdma_resv_describeh]hdma_resv_describe}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhj0hMubj)}(h,(struct dma_resv *obj, struct seq_file *seq)h](j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(h h]h }(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj[ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjEsbc.dma_resv_describeasbuh1hhj[ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj[ubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj[ubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWubj)}(hstruct seq_file *seqh](j)}(hjh]hstruct}(hjцhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj͆ubj)}(h h]h }(hjކhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj͆ubh)}(hhh]j )}(hseq_fileh]hseq_file}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.dma_resv_describeasbuh1hhj͆ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj͆ubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj͆ubj )}(hseqh]hseq}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj͆ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj0hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhj0hMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj0hMhjhhubjA )}(hhh]h)}(h1Dump description of the resv object into seq_fileh]h1Dump description of the resv object into seq_file}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjOhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhj0hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjjc jjjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjth]h Parameters}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjrubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjnubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(hC``struct seq_file *seq`` the seq_file to dump the description into h](j )}(h``struct seq_file *seq``h]j)}(hj̇h]hstruct seq_file *seq}(hj·hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjʇubah}(h]h ]h"]h$]h&]uh1j h^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjƇubj )}(hhh]h)}(h)the seq_file to dump the description intoh]h)the seq_file to dump the description into}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjƇubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjnubh)}(h**Description**h]jr )}(hjh]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjnubh)}(hUDump a textual description of the fences inside an dma_resv object into the seq_file.h]hUDump a textual description of the fences inside an dma_resv object into the seq_file.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:154: ./drivers/dma-buf/dma-resv.chMhjnubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_usage (C enum)c.dma_resv_usagehNtauh1jhj`hhhNhNubj)}(hhh](j)}(hdma_resv_usageh]j)}(henum dma_resv_usageh](j)}(hj)h]henum}(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKubj)}(h h]h }(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjHhhhjYhKubj )}(hdma_resv_usageh]j )}(hjFh]hdma_resv_usage}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjHhhhjYhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjDhhhjYhKubah}(h]j?ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjYhKhjAhhubjA )}(hhh]h)}(h+how the fences from a dma_resv obj are usedh]h+how the fences from a dma_resv obj are used}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhK5hjhhubah}(h]h ]h"]h$]h&]uh1j@ hjAhhhjYhKubeh}(h]h ](jenumeh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubjh )}(hX**Constants** ``DMA_RESV_USAGE_KERNEL`` For in kernel memory management only. This should only be used for things like copying or clearing memory with a DMA hardware engine for the purpose of kernel memory management. Drivers *always* must wait for those fences before accessing the resource protected by the dma_resv object. The only exception for that is when the resource is known to be locked down in place by pinning it previously. ``DMA_RESV_USAGE_WRITE`` Implicit write synchronization. This should only be used for userspace command submissions which add an implicit write dependency. ``DMA_RESV_USAGE_READ`` Implicit read synchronization. This should only be used for userspace command submissions which add an implicit read dependency. ``DMA_RESV_USAGE_BOOKKEEP`` No implicit sync. This should be used by submissions which don't want to participate in any implicit synchronization. The most common cases are preemption fences, page table updates, TLB flushes as well as explicitly synced user submissions. Explicitly synced user submissions can be promoted to DMA_RESV_USAGE_READ or DMA_RESV_USAGE_WRITE as needed using dma_buf_import_sync_file() when implicit synchronization should become necessary after initial adding of the fence.h](h)}(h **Constants**h]jr )}(hjh]h Constants}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhK9hjubj )}(hhh](j )}(hX``DMA_RESV_USAGE_KERNEL`` For in kernel memory management only. This should only be used for things like copying or clearing memory with a DMA hardware engine for the purpose of kernel memory management. Drivers *always* must wait for those fences before accessing the resource protected by the dma_resv object. The only exception for that is when the resource is known to be locked down in place by pinning it previously. h](j )}(h``DMA_RESV_USAGE_KERNEL``h]j)}(hjψh]hDMA_RESV_USAGE_KERNEL}(hjшhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj͈ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKEhjɈubj )}(hhh](h)}(h%For in kernel memory management only.h]h%For in kernel memory management only.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubh)}(hDrivers *always* must wait for those fences before accessing the resource protected by the dma_resv object. The only exception for that is when the resource is known to be locked down in place by pinning it previously.h](hDrivers }(hjhhhNhNubhemphasis)}(h*always*h]halways}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh must wait for those fences before accessing the resource protected by the dma_resv object. The only exception for that is when the resource is known to be locked down in place by pinning it previously.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKBhjubeh}(h]h ]h"]h$]h&]uh1j hjɈubeh}(h]h ]h"]h$]h&]uh1j hjhKEhjƈubj )}(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}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKKhj5ubj )}(hhh](h)}(hImplicit write synchronization.h]hImplicit write synchronization.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKHhjQubh)}(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.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKJhjQubeh}(h]h ]h"]h$]h&]uh1j hj5ubeh}(h]h ]h"]h$]h&]uh1j hjPhKKhjƈubj )}(h``DMA_RESV_USAGE_READ`` Implicit read synchronization. This should only be used for userspace command submissions which add an implicit read dependency. h](j )}(h``DMA_RESV_USAGE_READ``h]j)}(hjh]hDMA_RESV_USAGE_READ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKQhj~ubj )}(hhh](h)}(hImplicit read synchronization.h]hImplicit read synchronization.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKPhjubeh}(h]h ]h"]h$]h&]uh1j hj~ubeh}(h]h ]h"]h$]h&]uh1j hjhKQhjƈubj )}(hX``DMA_RESV_USAGE_BOOKKEEP`` No implicit sync. This should be used by submissions which don't want to participate in any implicit synchronization. The most common cases are preemption fences, page table updates, TLB flushes as well as explicitly synced user submissions. Explicitly synced user submissions can be promoted to DMA_RESV_USAGE_READ or DMA_RESV_USAGE_WRITE as needed using dma_buf_import_sync_file() when implicit synchronization should become necessary after initial adding of the fence.h](j )}(h``DMA_RESV_USAGE_BOOKKEEP``h]j)}(hj͉h]hDMA_RESV_USAGE_BOOKKEEP}(hjωhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjˉubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhK^hjljubj )}(hhh](h)}(hNo implicit sync.h]hNo implicit sync.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKThjubh)}(hcThis should be used by submissions which don't want to participate in any implicit synchronization.h]heThis should be used by submissions which don’t want to participate in any implicit synchronization.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKVhjubh)}(h{The most common cases are preemption fences, page table updates, TLB flushes as well as explicitly synced user submissions.h]h{The most common cases are preemption fences, page table updates, TLB flushes as well as explicitly synced user submissions.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKYhjubh)}(hExplicitly synced user submissions can be promoted to DMA_RESV_USAGE_READ or DMA_RESV_USAGE_WRITE as needed using dma_buf_import_sync_file() when implicit synchronization should become necessary after initial adding of the fence.h]hExplicitly synced user submissions can be promoted to DMA_RESV_USAGE_READ or DMA_RESV_USAGE_WRITE as needed using dma_buf_import_sync_file() when implicit synchronization should become necessary after initial adding of the fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhK\hjubeh}(h]h ]h"]h$]h&]uh1j hjljubeh}(h]h ]h"]h$]h&]uh1j hjhK^hjƈubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubh)}(h**Description**h]jr )}(hj=h]h Description}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj;ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKahj`hhubh)}(hvThis enum describes the different use cases for a dma_resv object and controls which fences are returned when queried.h]hvThis enum describes the different use cases for a dma_resv object and controls which fences are returned when queried.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhK6hj`hhubh)}(hAn important fact is that there is the order KERNEL )j? huh1jhjhKxhjhhubjA )}(hhh]h)}(hhelper for implicit synch]hhelper for implicit sync}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKxhjWhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhKxubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jrjc jrjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hj|h]h Parameters}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjzubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhK|hjvubj )}(hhh]j )}(h;``bool write`` true if we create a new implicit sync write h](j )}(h``bool write``h]j)}(hjh]h bool write}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKyhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKyhjubah}(h]h ]h"]h$]h&]uh1j hjvubh)}(h**Description**h]jr )}(hj֋h]h Description}(hj؋hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjԋubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhK{hjvubh)}(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 }(hjhhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hjh]h dma_buf.resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKzhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKzhjvubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv (C struct) c.dma_resvhNtauh1jhj`hhhNhNubj)}(hhh](j)}(hdma_resvh]j)}(hstruct dma_resvh](j)}(hjh]hstruct}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKubj)}(h h]h }(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:hhhjKhKubj )}(hdma_resvh]j )}(hj8h]hdma_resv}(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj:hhhjKhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj6hhhjKhKubah}(h]j1ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjKhKhj3hhubjA )}(hhh]h)}(h0a reservation object manages fences for a bufferh]h0a reservation object manages fences for a buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj}hhubah}(h]h ]h"]h$]h&]uh1j@ hj3hhhjKhKubeh}(h]h ](jstructeh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubjh )}(hX**Definition**:: struct dma_resv { struct ww_mutex lock; struct dma_resv_list *fences; }; **Members** ``lock`` Update side lock. Don't use directly, instead use the wrapper functions like dma_resv_lock() and dma_resv_unlock(). Drivers which use the reservation object to manage memory dynamically also use this lock to protect buffer object state like placement, allocation policies or throughout command submission. ``fences`` Array of fences which where added to the dma_resv object A new fence is added by calling dma_resv_add_fence(). Since this often needs to be done past the point of no return in command submission it cannot fail, and therefore sufficient slots need to be reserved by calling dma_resv_reserve_fences().h](h)}(h**Definition**::h](jr )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubj)}(hPstruct dma_resv { struct ww_mutex lock; struct dma_resv_list *fences; };h]hPstruct dma_resv { struct ww_mutex lock; struct dma_resv_list *fences; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubh)}(h **Members**h]jr )}(hjΌh]hMembers}(hjЌhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hǰubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubj )}(hhh](h)}(hsUpdate side lock. Don't use directly, instead use the wrapper functions like dma_resv_lock() and dma_resv_unlock().h]huUpdate side lock. Don’t use directly, instead use the wrapper functions like dma_resv_lock() and dma_resv_unlock().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubh)}(hDrivers which use the reservation object to manage memory dynamically also use this lock to protect buffer object state like placement, allocation policies or throughout command submission.h]hDrivers which use the reservation object to manage memory dynamically also use this lock to protect buffer object state like placement, allocation policies or throughout command submission.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(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)}(hj6h]hfences}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj0ubj )}(hhh](h)}(h8Array of fences which where added to the dma_resv objecth]h8Array of fences which where added to the dma_resv object}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjLubh)}(hA new fence is added by calling dma_resv_add_fence(). Since this often needs to be done past the point of no return in command submission it cannot fail, and therefore sufficient slots need to be reserved by calling dma_resv_reserve_fences().h]hA new fence is added by calling dma_resv_add_fence(). Since this often needs to be done past the point of no return in command submission it cannot fail, and therefore sufficient slots need to be reserved by calling dma_resv_reserve_fences().}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjLubeh}(h]h ]h"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]uh1j hjKhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj`hhubh)}(hSThis is a container for dma_fence objects which needs to handle multiple use cases.h]hSThis is a container for dma_fence objects which needs to handle multiple use cases.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj`hhubh)}(hX One use is to synchronize cross-driver access to a struct dma_buf, either for dynamic buffer management or just to handle implicit synchronization between different users of the buffer in userspace. See :c:type:`dma_buf.resv ` for a more in-depth discussion.h](hOne use is to synchronize cross-driver access to a struct dma_buf, either for dynamic buffer management or just to handle implicit synchronization between different users of the buffer in userspace. See }(hjhhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hjh]h dma_buf.resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubh for a more in-depth discussion.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjԍhKhj`hhubh)}(hX?The other major use is to manage access and locking within a driver in a buffer based memory manager. struct ttm_buffer_object is the canonical example here, since this is where reservation objects originated from. But use in drivers is spreading and some drivers also manage struct drm_gem_object with the same scheme.h]hX?The other major use is to manage access and locking within a driver in a buffer based memory manager. struct ttm_buffer_object is the canonical example here, since this is where reservation objects originated from. But use in drivers is spreading and some drivers also manage struct drm_gem_object with the same scheme.}(hjߍhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj`hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_iter (C struct)c.dma_resv_iterhNtauh1jhj`hhhNhNubj)}(hhh](j)}(h dma_resv_iterh]j)}(hstruct dma_resv_iterh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKubj )}(h dma_resv_iterh]j )}(hjh]h dma_resv_iter}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhKubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhKhjhhubjA )}(hhh]h)}(h)current position into the dma_resv fencesh]h)current position into the dma_resv fences}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjFhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]ja jjb jajc jajd je jf uh1jhhhj`hNhNubjh )}(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](jr )}(h**Definition**h]h Definition}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjiubh:}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjeubj)}(hXstruct dma_resv_iter { struct dma_resv *obj; enum dma_resv_usage usage; struct dma_fence *fence; enum dma_resv_usage fence_usage; unsigned int index; struct dma_resv_list *fences; unsigned int num_fences; bool is_restarted; };h]hXstruct dma_resv_iter { struct dma_resv *obj; enum dma_resv_usage usage; struct dma_fence *fence; enum dma_resv_usage fence_usage; unsigned int index; struct dma_resv_list *fences; unsigned int num_fences; bool is_restarted; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjeubh)}(h **Members**h]jr )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjeubj )}(hhh](j )}(h,``obj`` The dma_resv object we iterate over h](j )}(h``obj``h]j)}(hjh]hobj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(h#The dma_resv object we iterate overh]h#The dma_resv object we iterate over}(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 )}(h2``usage`` Return fences with this usage or lower. h](j )}(h ``usage``h]j)}(hjh]husage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(h'Return fences with this usage or lower.h]h'Return fences with this usage or lower.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h&``fence`` the currently handled fence h](j )}(h ``fence``h]j)}(hj(h]hfence}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj"ubj )}(hhh]h)}(hthe currently handled fenceh]hthe currently handled fence}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hKhj>ubah}(h]h ]h"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]uh1j hj=hKhjubj )}(h/``fence_usage`` the usage of the current fence h](j )}(h``fence_usage``h]j)}(hjah]h fence_usage}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj[ubj )}(hhh]h)}(hthe usage of the current fenceh]hthe usage of the current fence}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhKhjwubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hjvhKhjubj )}(h'``index`` index into the shared fences h](j )}(h ``index``h]j)}(hjh]hindex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(hindex into the shared fencesh]hindex into the shared fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h>``fences`` the shared fences; private, *MUST* not dereference h](j )}(h ``fences``h]j)}(hjӏh]hfences}(hjՏhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjяubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj͏ubj )}(hhh]h)}(h2the shared fences; private, *MUST* not dereferenceh](hthe shared fences; private, }(hjhhhNhNubj)}(h*MUST*h]hMUST}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh not dereference}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hj͏ubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h ``num_fences`` number of fences h](j )}(h``num_fences``h]j)}(hjh]h num_fences}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(hnumber of fencesh]hnumber of fences}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hKhj4ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj3hKhjubj )}(h9``is_restarted`` true if this is the first returned fenceh](j )}(h``is_restarted``h]j)}(hjWh]h is_restarted}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjQubj )}(hhh]h)}(h(true if this is the first returned fenceh]h(true if this is the first returned fence}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjmubah}(h]h ]h"]h$]h&]uh1j hjQubeh}(h]h ]h"]h$]h&]uh1j hjlhKhjubeh}(h]h ]h"]h$]h&]uh1j hjeubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj`hhubh)}(hKDon't touch this directly in the driver, use the accessor function instead.h]hMDon’t touch this directly in the driver, use the accessor function instead.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj`hhubh)}(h IMPORTANTh]h IMPORTANT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj`hhubh)}(hWhen using the lockless iterators like dma_resv_iter_next_unlocked() or dma_resv_for_each_fence_unlocked() beware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted().h]hWhen using the lockless iterators like dma_resv_iter_next_unlocked() or dma_resv_for_each_fence_unlocked() beware that the iterator can be restarted. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted().}(hjΐhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj`hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_begin (C function)c.dma_resv_iter_beginhNtauh1jhj`hhhNhNubj)}(hhh](j)}(hhvoid dma_resv_iter_begin (struct dma_resv_iter *cursor, struct dma_resv *obj, enum dma_resv_usage usage)h]j)}(hgvoid dma_resv_iter_begin(struct dma_resv_iter *cursor, struct dma_resv *obj, enum dma_resv_usage usage)h](jM)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKubj )}(hdma_resv_iter_beginh]j )}(hdma_resv_iter_beginh]hdma_resv_iter_begin}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhKubj)}(hO(struct dma_resv_iter *cursor, struct dma_resv *obj, enum dma_resv_usage usage)h](j)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubj)}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj/ubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjQhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjSmodnameN classnameNjj)}j]jO)}jGjsbc.dma_resv_iter_beginasbuh1hhj/ubj)}(h h]h }(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj/ubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj/ubj )}(hcursorh]hcursor}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+ubj)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjÑhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjőmodnameN classnameNjj)}j]jmc.dma_resv_iter_beginasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+ubj)}(henum dma_resv_usage usageh](j)}(hj)h]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj5modnameN classnameNjj)}j]jmc.dma_resv_iter_beginasbuh1hhjubj)}(h h]h }(hjQhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(husageh]husage}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhKubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhKhjhhubjA )}(hhh]h)}(h!initialize a dma_resv_iter objecth]h!initialize a dma_resv_iter object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubj )}(hhh](j )}(hH``struct dma_resv_iter *cursor`` The dma_resv_iter object to initialize h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjʒh]hstruct dma_resv_iter *cursor}(hj̒hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjȒubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjĒubj )}(hhh]h)}(h&The dma_resv_iter object to initializeh]h&The dma_resv_iter object to initialize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjߒhKhjubah}(h]h ]h"]h$]h&]uh1j hjĒubeh}(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)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjubj )}(hhh]h)}(h1The dma_resv object which we want to iterate overh]h1The dma_resv object which we want to iterate over}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(hX``enum dma_resv_usage usage`` controls which fences to include, see enum dma_resv_usage.h](j )}(h``enum dma_resv_usage usage``h]j)}(hj<h]henum dma_resv_usage usage}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj6ubj )}(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.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjRubah}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]uh1j hjQhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_iter_end (C function)c.dma_resv_iter_endhNtauh1jhj`hhhNhNubj)}(hhh](j)}(h5void dma_resv_iter_end (struct dma_resv_iter *cursor)h]j)}(h4void dma_resv_iter_end(struct dma_resv_iter *cursor)h](jM)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKubj )}(hdma_resv_iter_endh]j )}(hdma_resv_iter_endh]hdma_resv_iter_end}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhKubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hjӓhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjϓubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjϓubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsbc.dma_resv_iter_endasbuh1hhjϓubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjϓubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjϓubj )}(hcursorh]hcursor}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjϓubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj˓ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhKubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhKhjhhubjA )}(hhh]h)}(hcleanup a dma_resv_iter objecth]hcleanup a dma_resv_iter object}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjShhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jnjc jnjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjxh]h Parameters}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjvubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjrubj )}(hhh]j )}(hU``struct dma_resv_iter *cursor`` the dma_resv_iter object which should be cleaned up h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjh]hstruct dma_resv_iter *cursor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubah}(h]h ]h"]h$]h&]uh1j hjrubh)}(h**Description**h]jr )}(hjҔh]h Description}(hjԔhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjДubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjrubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjrubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_resv_iter_usage (C function)c.dma_resv_iter_usagehNtauh1jhj`hhhNhNubj)}(hhh](j)}(hFenum dma_resv_usage dma_resv_iter_usage (struct dma_resv_iter *cursor)h]j)}(hEenum dma_resv_usage dma_resv_iter_usage(struct dma_resv_iter *cursor)h](j)}(hj)h]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKubj)}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhj$hKubh)}(hhh]j )}(hdma_resv_usageh]hdma_resv_usage}(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj8modnameN classnameNjj)}j]jO)}jGdma_resv_iter_usagesbc.dma_resv_iter_usageasbuh1hhjhhhj$hKubj)}(h h]h }(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhj$hKubj )}(hdma_resv_iter_usageh]j )}(hjTh]hdma_resv_iter_usage}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhj$hKubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jRc.dma_resv_iter_usageasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjΕhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hcursorh]hcursor}(hjەhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj|ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhj$hKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhj$hKubah}(h]j ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj$hKhj hhubjA )}(hhh]h)}(h%Return the usage of the current fenceh]h%Return the usage of the current fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j@ hj hhhj$hKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hj'h]h Parameters}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj%ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhj!ubj )}(hhh]j )}(hD``struct dma_resv_iter *cursor`` the cursor of the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjFh]hstruct dma_resv_iter *cursor}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj@ubj )}(hhh]h)}(h"the cursor of the current positionh]h"the cursor of the current position}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hKhj\ubah}(h]h ]h"]h$]h&]uh1j hj@ubeh}(h]h ]h"]h$]h&]uh1j hj[hKhj=ubah}(h]h ]h"]h$]h&]uh1j hj!ubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj!ubh)}(h3Returns the usage of the currently processed fence.h]h3Returns the usage of the currently processed fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhKhj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_resv_iter_is_restarted (C function)c.dma_resv_iter_is_restartedhNtauh1jhj`hhhNhNubj)}(hhh](j)}(h>bool dma_resv_iter_is_restarted (struct dma_resv_iter *cursor)h]j)}(h=bool dma_resv_iter_is_restarted(struct dma_resv_iter *cursor)h](jM)}(hjk3h]hbool}(hjƖhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj–hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubj)}(h h]h }(hjԖhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj–hhhjӖhMubj )}(hdma_resv_iter_is_restartedh]j )}(hdma_resv_iter_is_restartedh]hdma_resv_iter_is_restarted}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj–hhhjӖhMubj)}(h(struct dma_resv_iter *cursor)h]j)}(hstruct dma_resv_iter *cursorh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_resv_iterh]h dma_resv_iter}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj"modnameN classnameNjj)}j]jO)}jGjsbc.dma_resv_iter_is_restartedasbuh1hhjubj)}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjNhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hcursorh]hcursor}(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj–hhhjӖhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjӖhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjӖhMhjhhubjA )}(hhh]h)}(h/test if this is the first fence after a restarth]h/test if this is the first fence after a restart}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjӖhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM hjubj )}(hhh]j )}(hF``struct dma_resv_iter *cursor`` the cursor with the current position h](j )}(h ``struct dma_resv_iter *cursor``h]j)}(hjƗh]hstruct dma_resv_iter *cursor}(hjȗhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjėubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM hjubj )}(hhh]h)}(h$the cursor with the current positionh]h$the cursor with the current position}(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 hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM hjubh)}(hGReturn true if this is the first fence in an iteration after a restart.h]hGReturn true if this is the first fence in an iteration after a restart.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j*dma_resv_for_each_fence_unlocked (C macro)"c.dma_resv_for_each_fence_unlockedhNtauh1jhj`hhhNhNubj)}(hhh](j)}(h dma_resv_for_each_fence_unlockedh]j)}(h dma_resv_for_each_fence_unlockedh]j )}(h dma_resv_for_each_fence_unlockedh]j )}(hj@h]h dma_resv_for_each_fence_unlocked}(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjFubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjBhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubah}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj>hhhj]hMubah}(h]j9ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj]hMhj;hhubjA )}(hhh]h}(h]h ]h"]h$]h&]uh1j@ hj;hhhj]hMubeh}(h]h ](jmacroeh"]h$]h&]ja jjb jvjc jvjd je jf uh1jhhhj`hNhNubh)}(h4``dma_resv_for_each_fence_unlocked (cursor, fence)``h]j)}(hj|h]h0dma_resv_for_each_fence_unlocked (cursor, fence)}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhj`hhubh)}(hunlocked fence iterator h]h)}(hunlocked fence iteratorh]hunlocked fence iterator}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhj`hhubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubj )}(hhh](j )}(h*``cursor`` a struct dma_resv_iter pointer h](j )}(h ``cursor``h]j)}(hjИh]hcursor}(hjҘhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjΘubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjʘubj )}(hhh]h)}(ha struct dma_resv_iter pointerh]ha struct dma_resv_iter pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjʘubeh}(h]h ]h"]h$]h&]uh1j hjhMhjǘubj )}(h``fence`` the current fence h](j )}(h ``fence``h]j)}(hj h]hfence}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hj"hhhNhNubah}(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]jr )}(hjDh]h Description}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjBubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubh)}(hX;Iterate over the fences in a struct dma_resv object without holding the :c:type:`dma_resv.lock ` and using RCU instead. The cursor needs to be initialized with dma_resv_iter_begin() and cleaned up with dma_resv_iter_end(). Inside the iterator a reference to the dma_fence is held and the RCU lock dropped.h](hHIterate over the fences in a struct dma_resv object without holding the }(hjZhhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hjdh]h dma_resv.lock}(hjfhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjZubh 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.}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubh)}(hXBeware that the iterator can be restarted when the struct dma_resv for **cursor** is modified. Code which accumulates statistics or similar needs to check for this with dma_resv_iter_is_restarted(). For this reason prefer the lock iterator dma_resv_for_each_fence() whenever possible.h](hGBeware that the iterator can be restarted when the struct dma_resv for }(hjhhhNhNubjr )}(h **cursor**h]hcursor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq 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.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_resv_for_each_fence (C macro)c.dma_resv_for_each_fencehNtauh1jhj`hhhNhNubj)}(hhh](j)}(hdma_resv_for_each_fenceh]j)}(hdma_resv_for_each_fenceh]j )}(hdma_resv_for_each_fenceh]j )}(hjǙh]hdma_resv_for_each_fence}(hjљhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj͙ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjəhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM&ubah}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjřhhhjhM&ubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhM&hj™hhubjA )}(hhh]h}(h]h ]h"]h$]h&]uh1j@ hj™hhhjhM&ubeh}(h]h ](jmacroeh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubh)}(h7``dma_resv_for_each_fence (cursor, obj, usage, fence)``h]j)}(hjh]h3dma_resv_for_each_fence (cursor, obj, usage, fence)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM(hj`hhubh)}(hfence iterator h]h)}(hfence iteratorh]hfence iterator}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM&hjubah}(h]h ]h"]h$]h&]uh1hhj+hM&hj`hhubjh )}(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]jr )}(hj8h]h Parameters}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj6ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM*hj2ubj )}(hhh](j )}(h*``cursor`` a struct dma_resv_iter pointer h](j )}(h ``cursor``h]j)}(hjWh]hcursor}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM'hjQubj )}(hhh]h)}(ha struct dma_resv_iter pointerh]ha struct dma_resv_iter pointer}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhM'hjmubah}(h]h ]h"]h$]h&]uh1j hjQubeh}(h]h ]h"]h$]h&]uh1j hjlhM'hjNubj )}(h"``obj`` a dma_resv object pointer h](j )}(h``obj``h]j)}(hjh]hobj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM(hjubj )}(hhh]h)}(ha dma_resv object pointerh]ha dma_resv object pointer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM(hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM(hjNubj )}(h*``usage`` controls which fences to return h](j )}(h ``usage``h]j)}(hjɚh]husage}(hj˚hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjǚubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.h4hM)hjÚubj )}(hhh]h)}(hcontrols which fences to returnh]hcontrols which fences to return}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjޚhM)hjߚubah}(h]h ]h"]h$]h&]uh1j hjÚubeh}(h]h ]h"]h$]h&]uh1j hjޚhM)hjNubj )}(h``fence`` the current fence h](j )}(h ``fence``h]j)}(hjh]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM*hjubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM*hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM*hjNubeh}(h]h ]h"]h$]h&]uh1j hj2ubh)}(h**Description**h]jr )}(hj=h]h Description}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj;ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM,hj2ubh)}(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 }(hjShhhNhNubh)}(h":c:type:`dma_resv.lock `h]j)}(hj]h]h dma_resv.lock}(hj_hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM+hjSubh. }(hjShhhNhNubjr )}(h**all_fences**h]h all_fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjSubh 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.}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjzhM+hj2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_lock (C function)c.dma_resv_lockhNtauh1jhj`hhhNhNubj)}(hhh](j)}(hDint dma_resv_lock (struct dma_resv *obj, struct ww_acquire_ctx *ctx)h]j)}(hCint dma_resv_lock(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](jM)}(hinth]hint}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMAubj)}(h h]h }(hjƛhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjśhMAubj )}(h dma_resv_lockh]j )}(h dma_resv_lockh]h dma_resv_lock}(hj؛hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjԛubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjśhMAubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjڛsbc.dma_resv_lockasbuh1hhjubj)}(h h]h }(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hj@hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hobjh]hobj}(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct ww_acquire_ctx *ctxh](j)}(hjh]hstruct}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubj)}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjbubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]j.c.dma_resv_lockasbuh1hhjbubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjbubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjbubj )}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjbubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjśhMAubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjśhMAubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjśhMAhjhhubjA )}(hhh]h)}(hlock the reservation objecth]hlock the reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMAhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjśhMAubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMEhjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj(h]hstruct dma_resv *obj}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMBhj"ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hMBhj>ubah}(h]h ]h"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]uh1j hj=hMBhjubj )}(h3``struct ww_acquire_ctx *ctx`` the locking context h](j )}(h``struct ww_acquire_ctx *ctx``h]j)}(hjah]hstruct ww_acquire_ctx *ctx}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMChj[ubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhMChjwubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hjvhMChjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMEhjubh)}(hLocks the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer.h]hLocks the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMDhjubh)}(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 }(hjhhhNhNubjr )}(h**ctx**h]hctx}(hjɝhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMIhjubh)}(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 }(hjhhhNhNubjr )}(h**ctx**h]hctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubh: must be unlocked and then dma_resv_lock_slow() called on }(hjhhhNhNubjr )}(h**obj**h]hobj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMNhjubh)}(h&Unlocked by calling dma_resv_unlock().h]h&Unlocked by calling dma_resv_unlock().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMQhjubh)}(hESee also dma_resv_lock_interruptible() for the interruptible variant.h]hESee also dma_resv_lock_interruptible() for the interruptible variant.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMShjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(dma_resv_lock_interruptible (C function)c.dma_resv_lock_interruptiblehNtauh1jhj`hhhNhNubj)}(hhh](j)}(hRint dma_resv_lock_interruptible (struct dma_resv *obj, struct ww_acquire_ctx *ctx)h]j)}(hQint dma_resv_lock_interruptible(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](jM)}(hinth]hint}(hjShhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjOhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM]ubj)}(h h]h }(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjOhhhjahM]ubj )}(hdma_resv_lock_interruptibleh]j )}(hdma_resv_lock_interruptibleh]hdma_resv_lock_interruptible}(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjpubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjOhhhjahM]ubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjvsbc.dma_resv_lock_interruptibleasbuh1hhjubj)}(h h]h }(hjΞhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjܞhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct ww_acquire_ctx *ctxh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj"modnameN classnameNjj)}j]jʞc.dma_resv_lock_interruptibleasbuh1hhjubj)}(h h]h }(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjLhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hctxh]hctx}(hjYhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjOhhhjahM]ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjKhhhjahM]ubah}(h]jFah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjahM]hjHhhubjA )}(hhh]h)}(hlock the reservation objecth]hlock the reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM]hjhhubah}(h]h ]h"]h$]h&]uh1j@ hjHhhhjahM]ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMahjubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjğh]hstruct dma_resv *obj}(hjƟhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjŸubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM^hjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjݟhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjٟhM^hjڟubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjٟhM^hjubj )}(h3``struct ww_acquire_ctx *ctx`` the locking context h](j )}(h``struct ww_acquire_ctx *ctx``h]j)}(hjh]hstruct ww_acquire_ctx *ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM_hjubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM_hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM_hjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj8h]h Description}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj6ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMahjubh)}(hXLocks the reservation object interruptible for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer.h]hXLocks the reservation object interruptible for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM`hjubh)}(hXAs the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as **ctx**.h](hAs the reservation object may be locked by multiple parties in an undefined order, a #ww_acquire_ctx is passed to unwind if a cycle is detected. See ww_mutex_lock() and ww_acquire_init(). A reservation object may be locked by itself by passing NULL as }(hj]hhhNhNubjr )}(h**ctx**h]hctx}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj]ubh.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMehjubh)}(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 }(hj~hhhNhNubjr )}(h**ctx**h]hctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj~ubhH must be unlocked and then dma_resv_lock_slow_interruptible() called on }(hj~hhhNhNubjr )}(h**obj**h]hobj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj~ubh.}(hj~hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMjhjubh)}(h&Unlocked by calling dma_resv_unlock().h]h&Unlocked by calling dma_resv_unlock().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMnhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_lock_slow (C function)c.dma_resv_lock_slowhNtauh1jhj`hhhNhNubj)}(hhh](j)}(hJvoid dma_resv_lock_slow (struct dma_resv *obj, struct ww_acquire_ctx *ctx)h]j)}(hIvoid dma_resv_lock_slow(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](jM)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjܠhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMxubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjܠhhhjhMxubj )}(hdma_resv_lock_slowh]j )}(hdma_resv_lock_slowh]hdma_resv_lock_slow}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjܠhhhjhMxubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj=modnameN classnameNjj)}j]jO)}jGjsbc.dma_resv_lock_slowasbuh1hhjubj)}(h h]h }(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjihhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hobjh]hobj}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct ww_acquire_ctx *ctxh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jWc.dma_resv_lock_slowasbuh1hhjubj)}(h h]h }(hjˡhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hj١hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjܠhhhjhMxubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjؠhhhjhMxubah}(h]jӠah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMxhjՠhhubjA )}(hhh]h)}(h$slowpath lock the reservation objecth]h$slowpath lock the reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMxhj hhubah}(h]h ]h"]h$]h&]uh1j@ hjՠhhhjhMxubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j(jc j(jd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hj2h]h Parameters}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj0ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM|hj,ubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjQh]hstruct dma_resv *obj}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMyhjKubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhMyhjgubah}(h]h ]h"]h$]h&]uh1j hjKubeh}(h]h ]h"]h$]h&]uh1j hjfhMyhjHubj )}(h3``struct ww_acquire_ctx *ctx`` the locking context h](j )}(h``struct ww_acquire_ctx *ctx``h]j)}(hjh]hstruct ww_acquire_ctx *ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMzhjubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMzhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMzhjHubeh}(h]h ]h"]h$]h&]uh1j hj,ubh)}(h**Description**h]jr )}(hjŢh]h Description}(hjǢhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjâubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM|hj,ubh)}(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.}(hjۢhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhM{hj,ubh)}(hJSee also dma_resv_lock_slow_interruptible() for the interruptible variant.h]hJSee also dma_resv_lock_slow_interruptible() for the interruptible variant.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j-dma_resv_lock_slow_interruptible (C function)"c.dma_resv_lock_slow_interruptiblehNtauh1jhj`hhhNhNubj)}(hhh](j)}(hWint dma_resv_lock_slow_interruptible (struct dma_resv *obj, struct ww_acquire_ctx *ctx)h]j)}(hVint dma_resv_lock_slow_interruptible(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](jM)}(hinth]hint}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubj)}(h h]h }(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhj'hMubj )}(h dma_resv_lock_slow_interruptibleh]j )}(h dma_resv_lock_slow_interruptibleh]h dma_resv_lock_slow_interruptible}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj6ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhj'hMubj)}(h2(struct dma_resv *obj, struct ww_acquire_ctx *ctx)h](j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubj)}(h h]h }(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjRubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjvmodnameN classnameNjj)}j]jO)}jGj<sb"c.dma_resv_lock_slow_interruptibleasbuh1hhjRubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjRubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjRubj )}(hobjh]hobj}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjNubj)}(hstruct ww_acquire_ctx *ctxh](j)}(hjh]hstruct}(hjȣhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjģubj)}(h h]h }(hjգhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjģubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]j"c.dma_resv_lock_slow_interruptibleasbuh1hhjģubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjģubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjģubj )}(hctxh]hctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjģubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjNubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj'hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhj'hMubah}(h]j ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj'hMhjhhubjA )}(hhh]h)}(h3slowpath lock the reservation object, interruptibleh]h3slowpath lock the reservation object, interruptible}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjFhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhj'hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jajc jajd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hjkh]h Parameters}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjiubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjeubj )}(hhh](j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h3``struct ww_acquire_ctx *ctx`` the locking context h](j )}(h``struct ww_acquire_ctx *ctx``h]j)}(hjäh]hstruct ww_acquire_ctx *ctx}(hjŤhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe locking contexth]hthe locking context}(hjܤhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjؤhMhj٤ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjؤhMhjubeh}(h]h ]h"]h$]h&]uh1j hjeubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjeubh)}(hAcquires the reservation object interruptible after a die case. This function will sleep until the lock becomes available. See dma_resv_lock_interruptible() as well.h]hAcquires the reservation object interruptible after a die case. This function will sleep until the lock becomes available. See dma_resv_lock_interruptible() as well.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjeubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_trylock (C function)c.dma_resv_trylockhNtauh1jhj`hhhNhNubj)}(hhh](j)}(h,bool dma_resv_trylock (struct dma_resv *obj)h]j)}(h+bool dma_resv_trylock(struct dma_resv *obj)h](jM)}(hjk3h]hbool}(hjChhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj?hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubj)}(h h]h }(hjQhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj?hhhjPhMubj )}(hdma_resv_trylockh]j )}(hdma_resv_trylockh]hdma_resv_trylock}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj?hhhjPhMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj{ubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjesbc.dma_resv_trylockasbuh1hhj{ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj{ubjd)}(hjgh]h*}(hj˥hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj{ubj )}(hobjh]hobj}(hjإhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjwubah}(h]h ]h"]h$]h&]jjuh1jhj?hhhjPhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj;hhhjPhMubah}(h]j6ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjPhMhj8hhubjA )}(hhh]h)}(htrylock the reservation objecth]htrylock the reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hj8hhhjPhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hj$h]h Parameters}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj"ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjCh]hstruct dma_resv *obj}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhj=ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhMhjYubah}(h]h ]h"]h$]h&]uh1j hj=ubeh}(h]h ]h"]h$]h&]uh1j hjXhMhj:ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj~h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj|ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubh)}(hTries to lock the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer.h]hTries to lock the reservation object for exclusive access and modification. Note, that the lock is only against other writers, readers will run concurrently with a writer under RCU. The seqlock is used to notify readers if they overlap with a writer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubh)}(hxAlso note that since no context is provided, no deadlock protection is possible, which is also not needed for a trylock.h]hxAlso note that since no context is provided, no deadlock protection is possible, which is also not needed for a trylock.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubh)}(h7Returns true if the lock was acquired, false otherwise.h]h7Returns true if the lock was acquired, false otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_is_locked (C function)c.dma_resv_is_lockedhNtauh1jhj`hhhNhNubj)}(hhh](j)}(h.bool dma_resv_is_locked (struct dma_resv *obj)h]j)}(h-bool dma_resv_is_locked(struct dma_resv *obj)h](jM)}(hjk3h]hbool}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjݦhhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjݦhhhjhMubj )}(hdma_resv_is_lockedh]j )}(hdma_resv_is_lockedh]hdma_resv_is_locked}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjݦhhhjhMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj=modnameN classnameNjj)}j]jO)}jGjsbc.dma_resv_is_lockedasbuh1hhjubj)}(h h]h }(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjihhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hobjh]hobj}(hjvhhhNhNubah}(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&]jjj2 uh1jj3 j4 hj٦hhhjhMubah}(h]jԦah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhj֦hhubjA )}(hhh]h)}(h is the reservation object lockedh]h is the reservation object locked}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hj֦hhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hj§h]h Parameters}(hjħhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjߧubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjۧubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjۧubeh}(h]h ]h"]h$]h&]uh1j hjhMhjاubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubh)}(h7Returns true if the mutex is locked, false if unlocked.h]h7Returns true if the mutex is locked, false if unlocked.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_resv_locking_ctx (C function)c.dma_resv_locking_ctxhNtauh1jhj`hhhNhNubj)}(hhh](j)}(hCstruct ww_acquire_ctx * dma_resv_locking_ctx (struct dma_resv *obj)h]j)}(hAstruct ww_acquire_ctx *dma_resv_locking_ctx(struct dma_resv *obj)h](j)}(hjh]hstruct}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubj)}(h h]h }(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]hhhjnhMubh)}(hhh]j )}(hww_acquire_ctxh]hww_acquire_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGdma_resv_locking_ctxsbc.dma_resv_locking_ctxasbuh1hhj]hhhjnhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]hhhjnhMubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj]hhhjnhMubj )}(hdma_resv_locking_ctxh]j )}(hjh]hdma_resv_locking_ctx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj]hhhjnhMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjۨhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjרubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjרubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.dma_resv_locking_ctxasbuh1hhjרubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjרubjd)}(hjgh]h*}(hj%hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjרubj )}(hobjh]hobj}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjרubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjӨubah}(h]h ]h"]h$]h&]jjuh1jhj]hhhjnhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjYhhhjnhMubah}(h]jTah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjnhMhjVhhubjA )}(hhh]h)}(h+returns the context used to lock the objecth]h+returns the context used to lock the object}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjYhhubah}(h]h ]h"]h$]h&]uh1j@ hjVhhhjnhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jtjc jtjd je jf uh1jhhhj`hNhNubjh )}(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]jr )}(hj~h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj|ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjxubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hjh]hstruct dma_resv *obj}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjxubh)}(h**Description**h]jr )}(hjةh]h Description}(hjکhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj֩ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjxubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjxubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjxubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_resv_unlock (C function)c.dma_resv_unlockhNtauh1jhj`hhhNhNubj)}(hhh](j)}(h+void dma_resv_unlock (struct dma_resv *obj)h]j)}(h*void dma_resv_unlock(struct dma_resv *obj)h](jM)}(hvoidh]hvoid}(hj,hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj(hhh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMubj)}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj(hhhj:hMubj )}(hdma_resv_unlockh]j )}(hdma_resv_unlockh]hdma_resv_unlock}(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjIubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj(hhhj:hMubj)}(h(struct dma_resv *obj)h]j)}(hstruct dma_resv *objh](j)}(hjh]hstruct}(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeubj)}(h h]h }(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjeubh)}(hhh]j )}(hdma_resvh]hdma_resv}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjOsbc.dma_resv_unlockasbuh1hhjeubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjeubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjeubj )}(hobjh]hobj}(hjªhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjeubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjaubah}(h]h ]h"]h$]h&]jjuh1jhj(hhhj:hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj$hhhj:hMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj:hMhj!hhubjA )}(hhh]h)}(hunlock the reservation objecth]hunlock the reservation object}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hj!hhhj:hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhj`hNhNubjh )}(h**Parameters** ``struct dma_resv *obj`` the reservation object **Description** Unlocks the reservation object following exclusive access.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubj )}(hhh]j )}(h0``struct dma_resv *obj`` the reservation object h](j )}(h``struct dma_resv *obj``h]j)}(hj-h]hstruct dma_resv *obj}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1j h\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhj'ubj )}(hhh]h)}(hthe reservation objecth]hthe reservation object}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhMhjCubah}(h]h ]h"]h$]h&]uh1j hj'ubeh}(h]h ]h"]h$]h&]uh1j hjBhMhj$ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjhh]h Description}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjfubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubh)}(h:Unlocks the reservation object following exclusive access.h]h:Unlocks the reservation object following exclusive access.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hh\/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:157: ./include/linux/dma-resv.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj`hhhNhNubeh}(h]reservation-objectsah ]h"]reservation objectsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h DMA Fencesh]h DMA Fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hDMA fences, represented by :c:type:`struct dma_fence `, are the kernel internal synchronization primitive for DMA operations like GPU rendering, video encoding/decoding, or displaying buffers on a screen.h](hDMA fences, represented by }(hjhhhNhNubh)}(h&:c:type:`struct dma_fence `h]j)}(hjh]hstruct dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:163: ./drivers/dma-buf/dma-fence.chK&hjubh, are the kernel internal synchronization primitive for DMA operations like GPU rendering, video encoding/decoding, or displaying buffers on a screen.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjԫhK&hjhhubh)}(hA fence is initialized using dma_fence_init() and completed using dma_fence_signal(). Fences are associated with a context, allocated through dma_fence_context_alloc(), and all fences on the same context are fully ordered.h]hA fence is initialized using dma_fence_init() and completed using dma_fence_signal(). Fences are associated with a context, allocated through dma_fence_context_alloc(), and all fences on the same context are fully ordered.}(hj߫hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:163: ./drivers/dma-buf/dma-fence.chK*hjhhubh)}(hSince the purposes of fences is to facilitate cross-device and cross-application synchronization, there's multiple ways to use one:h]hSince the purposes of fences is to facilitate cross-device and cross-application synchronization, there’s multiple ways to use one:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:163: ./drivers/dma-buf/dma-fence.chK/hjhhubh)}(hhh](j)}(hIndividual fences can be exposed as a :c:type:`sync_file`, accessed as a file descriptor from userspace, created by calling sync_file_create(). This is called explicit fencing, since userspace passes around explicit synchronization points. h]h)}(hIndividual fences can be exposed as a :c:type:`sync_file`, accessed as a file descriptor from userspace, created by calling sync_file_create(). This is called explicit fencing, since userspace passes around explicit synchronization points.h](h&Individual fences can be exposed as a }(hjhhhNhNubh)}(h:c:type:`sync_file`h]j)}(hjh]h sync_file}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj sync_fileuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:163: ./drivers/dma-buf/dma-fence.chK2hjubh, accessed as a file descriptor from userspace, created by calling sync_file_create(). This is called explicit fencing, since userspace passes around explicit synchronization points.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj+hK2hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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 }(hj@hhhNhNubh)}(h:c:type:`drm_syncobj`h]j)}(hjJh]h drm_syncobj}(hjLhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj drm_syncobjuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:163: ./drivers/dma-buf/dma-fence.chK7hj@ubh. Compared to }(hj@hhhNhNubh)}(h:c:type:`sync_file`h]j)}(hjnh]h sync_file}(hjphhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj sync_fileuh1hhjghK7hj@ubh, a }(hj@hhhNhNubh)}(h:c:type:`drm_syncobj`h]j)}(hjh]h drm_syncobj}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj drm_syncobjuh1hhjghK7hj@ubh+ allows the underlying fence to be updated.}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjghK7hj<ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hXThen there's also implicit fencing, where the synchronization points are implicitly passed around as part of shared :c:type:`dma_buf` instances. Such implicit fences are stored in :c:type:`struct dma_resv ` through the :c:type:`dma_buf.resv ` pointer. h]h)}(hXThen there's also implicit fencing, where the synchronization points are implicitly passed around as part of shared :c:type:`dma_buf` instances. Such implicit fences are stored in :c:type:`struct dma_resv ` through the :c:type:`dma_buf.resv ` pointer.h](hvThen there’s also implicit fencing, where the synchronization points are implicitly passed around as part of shared }(hj¬hhhNhNubh)}(h:c:type:`dma_buf`h]j)}(hj̬h]hdma_buf}(hjάhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjʬubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:163: ./drivers/dma-buf/dma-fence.chK;hj¬ubh/ instances. Such implicit fences are stored in }(hj¬hhhNhNubh)}(h$:c:type:`struct dma_resv `h]j)}(hjh]hstruct dma_resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hhjhK;hj¬ubh through the }(hj¬hhhNhNubh)}(h :c:type:`dma_buf.resv `h]j)}(hjh]h dma_buf.resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_bufuh1hhjhK;hj¬ubh pointer.}(hj¬hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK;hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jRjSuh1hhj+hK2hjhhubh)}(hhh](h)}(hDMA Fence Cross-Driver Contracth]hDMA Fence Cross-Driver Contract}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhhhhhKubh)}(hbSince :c:type:`dma_fence` provide a cross driver contract, all drivers must follow the same rules:h](hSince }(hjWhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjah]h dma_fence}(hjchhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chKDhjWubhI provide a cross driver contract, all drivers must follow the same rules:}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj~hKDhjFhhubh)}(hhh](j)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chKGhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hX*Drivers may have different ideas of what completion within a reasonable time means. Some hang recovery code uses a fixed timeout, others a mix between observing forward progress and increasingly strict timeouts. Drivers should not try to second guess timeout handling of fences from other drivers. =h]h)}(hX)Drivers may have different ideas of what completion within a reasonable time means. Some hang recovery code uses a fixed timeout, others a mix between observing forward progress and increasingly strict timeouts. Drivers should not try to second guess timeout handling of fences from other drivers.h]hX)Drivers may have different ideas of what completion within a reasonable time means. Some hang recovery code uses a fixed timeout, others a mix between observing forward progress and increasingly strict timeouts. Drivers should not try to second guess timeout handling of fences from other drivers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chKPhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hTo ensure there's no deadlocks of dma_fence_wait() against other locks drivers should annotate all code required to reach dma_fence_signal(), which completes the fences, with dma_fence_begin_signalling() and dma_fence_end_signalling(). h]h)}(hTo ensure there's no deadlocks of dma_fence_wait() against other locks drivers should annotate all code required to reach dma_fence_signal(), which completes the fences, with dma_fence_begin_signalling() and dma_fence_end_signalling().h]hTo ensure there’s no deadlocks of dma_fence_wait() against other locks drivers should annotate all code required to reach dma_fence_signal(), which completes the fences, with dma_fence_begin_signalling() and dma_fence_end_signalling().}(hj­hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chKVhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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 }(hjۭhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjh]hdma_resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./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().}(hjۭhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK[hj׭ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hDrivers are allowed to call dma_fence_wait() from their :c:type:`shrinker` callbacks. This means any code required for fence completion cannot allocate memory with GFP_KERNEL. h]h)}(hDrivers are allowed to call dma_fence_wait() from their :c:type:`shrinker` callbacks. This means any code required for fence completion cannot allocate memory with GFP_KERNEL.h](h8Drivers are allowed to call dma_fence_wait() from their }(hjhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hj!h]hshrinker}(hj#hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chK`hjubhe callbacks. This means any code required for fence completion cannot allocate memory with GFP_KERNEL.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj>hK`hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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 }(hjShhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hj]h]h mmu_notifier}(hj_hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chKdhjSubh respectively }(hjShhhNhNubh)}(h:c:type:`mmu_interval_notifier`h]j)}(hjh]hmmu_interval_notifier}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmmu_interval_notifieruh1hhjzhKdhjSubh 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.}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjzhKdhjOubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jRjguh1hhjhKGhjFhhubh)}(hX5Note that only GPU drivers have a reasonable excuse for both requiring :c:type:`mmu_interval_notifier` and :c:type:`shrinker` callbacks at the same time as having to track asynchronous compute work using :c:type:`dma_fence`. No driver outside of drivers/gpu should ever call dma_fence_wait() in such contexts.h](hGNote that only GPU drivers have a reasonable excuse for both requiring }(hjhhhNhNubh)}(h:c:type:`mmu_interval_notifier`h]j)}(hjh]hmmu_interval_notifier}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmmu_interval_notifieruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:169: ./drivers/dma-buf/dma-fence.chKihjubh and }(hjhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hjh]hshrinker}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hhjۮhKihjubhO callbacks at the same time as having to track asynchronous compute work using }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhjۮhKihjubhV. No driver outside of drivers/gpu should ever call dma_fence_wait() in such contexts.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjۮhKihjFhhubeh}(h]dma-fence-cross-driver-contractah ]h"]dma fence cross-driver contractah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h DMA Fence Signalling Annotationsh]h DMA Fence Signalling Annotations}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hhhhhKubh)}(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 }(hjEhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjOh]h dma_fence}(hjQhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhjEubh= through code review and testing is tricky for a few reasons:}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjlhKhj4hhubh)}(hhh](j)}(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~hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhjzubah}(h]h ]h"]h$]h&]uh1jhjwubj)}(hXThere is an enormous amount of driver code involved. For render drivers there's the tail of command submission, after fences are published, scheduler code, interrupt and workers to process job completion, and timeout, gpu reset and gpu hang recovery code. Plus for integration with core mm with have :c:type:`mmu_notifier`, respectively :c:type:`mmu_interval_notifier`, and :c:type:`shrinker`. For modesetting drivers there's the commit tail functions between when fences for an atomic modeset are published, and when the corresponding vblank completes, including any interrupt processing and related workers. Auditing all that code, across all drivers, is not feasible. h]h)}(hXThere is an enormous amount of driver code involved. For render drivers there's the tail of command submission, after fences are published, scheduler code, interrupt and workers to process job completion, and timeout, gpu reset and gpu hang recovery code. Plus for integration with core mm with have :c:type:`mmu_notifier`, respectively :c:type:`mmu_interval_notifier`, and :c:type:`shrinker`. For modesetting drivers there's the commit tail functions between when fences for an atomic modeset are published, and when the corresponding vblank completes, including any interrupt processing and related workers. Auditing all that code, across all drivers, is not feasible.h](hX.There is an enormous amount of driver code involved. For render drivers there’s the tail of command submission, after fences are published, scheduler code, interrupt and workers to process job completion, and timeout, gpu reset and gpu hang recovery code. Plus for integration with core mm with have }(hjhhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hjh]h mmu_notifier}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhjubh, respectively }(hjhhhNhNubh)}(h:c:type:`mmu_interval_notifier`h]j)}(hjůh]hmmu_interval_notifier}(hjǯhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjïubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjmmu_interval_notifieruh1hhjhKhjubh, and }(hjhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hjh]hshrinker}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype 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.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjwubj)}(hXDue to how many other subsystems are involved and the locking hierarchies this pulls in there is extremely thin wiggle-room for driver-specific differences. :c:type:`dma_fence` interacts with almost all of the core memory handling through page fault handlers via :c:type:`dma_resv`, dma_resv_lock() and dma_resv_unlock(). On the other side it also interacts through all allocation sites through :c:type:`mmu_notifier` and :c:type:`shrinker`. h]h)}(hXDue to how many other subsystems are involved and the locking hierarchies this pulls in there is extremely thin wiggle-room for driver-specific differences. :c:type:`dma_fence` interacts with almost all of the core memory handling through page fault handlers via :c:type:`dma_resv`, dma_resv_lock() and dma_resv_unlock(). On the other side it also interacts through all allocation sites through :c:type:`mmu_notifier` and :c:type:`shrinker`.h](hDue to how many other subsystems are involved and the locking hierarchies this pulls in there is extremely thin wiggle-room for driver-specific differences. }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hj#h]h dma_fence}(hj%hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhjubhW interacts with almost all of the core memory handling through page fault handlers via }(hjhhhNhNubh)}(h:c:type:`dma_resv`h]j)}(hjGh]hdma_resv}(hjIhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hhj@hKhjubhr, dma_resv_lock() and dma_resv_unlock(). On the other side it also interacts through all allocation sites through }(hjhhhNhNubh)}(h:c:type:`mmu_notifier`h]j)}(hjjh]h mmu_notifier}(hjlhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj mmu_notifieruh1hhj@hKhjubh and }(hjhhhNhNubh)}(h:c:type:`shrinker`h]j)}(hjh]hshrinker}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjshrinkeruh1hhj@hKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj@hKhjubah}(h]h ]h"]h$]h&]uh1jhjwubeh}(h]h ]h"]h$]h&]jRjguh1hhjhKhj4hhubh)}(hXFurthermore lockdep does not handle cross-release dependencies, which means any deadlocks between dma_fence_wait() and dma_fence_signal() can't be caught at runtime with some quick testing. The simplest example is one thread waiting on a :c:type:`dma_fence` while holding a lock::h](hFurthermore lockdep does not handle cross-release dependencies, which means any deadlocks between dma_fence_wait() and dma_fence_signal() can’t be caught at runtime with some quick testing. The simplest example is one thread waiting on a }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjʰh]h dma_fence}(hj̰hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjȰubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhjubh while holding a lock:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhj4hhubj)}(h&lock(A); dma_fence_wait(B); unlock(A);h]h&lock(A); dma_fence_wait(B); unlock(A);}hjsbah}(h]h ]h"]h$]h&]jjuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhj4hhubh)}(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:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhj4hhubj)}(h(lock(A); unlock(A); dma_fence_signal(B);h]h(lock(A); unlock(A); dma_fence_signal(B);}hjsbah}(h]h ]h"]h$]h&]jjuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhj4hhubh)}(hBy manually annotating all code relevant to signalling a :c:type:`dma_fence` we can teach lockdep about these dependencies, which also helps with the validation headache since now lockdep can check all the rules for us::h](h9By manually annotating all code relevant to signalling a }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hj)h]h dma_fence}(hj+hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhjubh we can teach lockdep about these dependencies, which also helps with the validation headache since now lockdep can check all the rules for us:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhKhj4hhubj)}(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);}hjQsbah}(h]h ]h"]h$]h&]jjuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhj4hhubh)}(hFor using dma_fence_begin_signalling() and dma_fence_end_signalling() to annotate critical sections the following rules need to be observed:h]hFor using dma_fence_begin_signalling() and dma_fence_end_signalling() to annotate critical sections the following rules need to be observed:}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhj4hhubh)}(hhh](j)}(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 }(hjvhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhjvubhX2 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.}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjrubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(h:c:type:`struct dma_resv ` deserves a special note, since the readers are only protected by rcu. This means the signalling critical section starts as soon as the new fences are installed, even before dma_resv_unlock() is called. h]h)}(h:c:type:`struct dma_resv ` deserves a special note, since the readers are only protected by rcu. This means the signalling critical section starts as soon as the new fences are installed, even before dma_resv_unlock() is called.h](h)}(h$:c:type:`struct dma_resv `h]j)}(hjh]hstruct dma_resv}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_resvuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhjubh 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&]uh1hhjձhKhjubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(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 }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chKhjubh. 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.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(hXMTo aid composability of code, the annotations can be freely nested, as long as the overall locking hierarchy is consistent. The annotations also work both in interrupt and process context. Due to implementation details this requires that callers pass an opaque cookie from dma_fence_begin_signalling() to dma_fence_end_signalling(). h]h)}(hXLTo aid composability of code, the annotations can be freely nested, as long as the overall locking hierarchy is consistent. The annotations also work both in interrupt and process context. Due to implementation details this requires that callers pass an opaque cookie from dma_fence_begin_signalling() to dma_fence_end_signalling().h]hXLTo aid composability of code, the annotations can be freely nested, as long as the overall locking hierarchy is consistent. The annotations also work both in interrupt and process context. Due to implementation details this requires that callers pass an opaque cookie from dma_fence_begin_signalling() to dma_fence_end_signalling().}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chMhj"ubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(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.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:175: ./drivers/dma-buf/dma-fence.chM hj;ubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]jRjguh1hhjhKhj4hhubeh}(h] dma-fence-signalling-annotationsah ]h"] dma fence signalling annotationsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fence Deadline Hintsh]hDMA Fence Deadline Hints}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhhhhhKubh)}(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:}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:181: ./drivers/dma-buf/dma-fence.chMhjbhhubh)}(hhh](j)}(hWorkloads that ping-pong between device and CPU, with alternating periods of CPU waiting for device, and device waiting on CPU. This can result in devfreq and cpufreq seeing idle time in their respective domains and in result reduce frequency. h]h)}(hWorkloads that ping-pong between device and CPU, with alternating periods of CPU waiting for device, and device waiting on CPU. This can result in devfreq and cpufreq seeing idle time in their respective domains and in result reduce frequency.h]hWorkloads that ping-pong between device and CPU, with alternating periods of CPU waiting for device, and device waiting on CPU. This can result in devfreq and cpufreq seeing idle time in their respective domains and in result reduce frequency.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:181: ./drivers/dma-buf/dma-fence.chMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hX}Workloads that interact with a periodic time based deadline, such as double buffered GPU rendering vs vblank sync'd page flipping. In this scenario, missing a vblank deadline results in an *increase* in idle time on the GPU (since it has to wait an additional vblank period), sending a signal to the GPU's devfreq to reduce frequency, when in fact the opposite is what is needed. h]h)}(hX|Workloads that interact with a periodic time based deadline, such as double buffered GPU rendering vs vblank sync'd page flipping. In this scenario, missing a vblank deadline results in an *increase* in idle time on the GPU (since it has to wait an additional vblank period), sending a signal to the GPU's devfreq to reduce frequency, when in fact the opposite is what is needed.h](hWorkloads that interact with a periodic time based deadline, such as double buffered GPU rendering vs vblank sync’d page flipping. In this scenario, missing a vblank deadline results in an }(hjhhhNhNubj)}(h *increase*h]hincrease}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh in idle time on the GPU (since it has to wait an additional vblank period), sending a signal to the GPU’s devfreq to reduce frequency, when in fact the opposite is what is needed.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:181: ./drivers/dma-buf/dma-fence.chMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jRjguh1hhjhMhjbhhubh)}(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 }(hjϲhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjٲh]h dma_fence}(hj۲hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjײubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:181: ./drivers/dma-buf/dma-fence.chMhjϲubh via }(hjϲhhhNhNubh)}(h :c:type:`dma_fence_set_deadline`h]j)}(hjh]hdma_fence_set_deadline}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_fence_set_deadlineuh1hhjhMhjϲubh1 (or indirectly via userspace facing ioctls like }(hjϲhhhNhNubh)}(h:c:type:`sync_set_deadline`h]j)}(hj h]hsync_set_deadline}(hj"hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsync_set_deadlineuh1hhjhMhjϲubh). 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&]uh1hhjhMhjbhhubh)}(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).}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:181: ./drivers/dma-buf/dma-fence.chMhjbhhubh)}(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 }(hjVhhhNhNubh)}(h4:c:type:`dma_fence_ops.set_deadline `h]j)}(hj`h]hdma_fence_ops.set_deadline}(hjbhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:181: ./drivers/dma-buf/dma-fence.chMhjVubh.}(hjVhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj}hMhjbhhubh)}(hThe deadline hint is just that, a hint. The driver that created the fence may react by increasing frequency, making different scheduling choices, etc. Or doing nothing at all.h]hThe deadline hint is just that, a hint. The driver that created the fence may react by increasing frequency, making different scheduling choices, etc. Or doing nothing at all.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:181: ./drivers/dma-buf/dma-fence.chMhjbhhubeh}(h]dma-fence-deadline-hintsah ]h"]dma fence deadline hintsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fences Functions Referenceh]hDMA Fences Functions Reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_get_stub (C function)c.dma_fence_get_stubhNtauh1jhjhhhNhNubj)}(hhh](j)}(h,struct dma_fence * dma_fence_get_stub (void)h]j)}(h*struct dma_fence *dma_fence_get_stub(void)h](j)}(hjh]hstruct}(hjɳhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjųhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKubj)}(h h]h }(hj׳hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjųhhhjֳhKubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGdma_fence_get_stubsbc.dma_fence_get_stubasbuh1hhjųhhhjֳhKubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjųhhhjֳhKubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjųhhhjֳhKubj )}(hdma_fence_get_stubh]j )}(hjh]hdma_fence_get_stub}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjųhhhjֳhKubj)}(h(void)h]j)}(hvoidh]jM)}(hvoidh]hvoid}(hjChhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj?ubah}(h]h ]h"]h$]h&]noemphjjuh1jhj;ubah}(h]h ]h"]h$]h&]jjuh1jhjųhhhjֳhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjֳhKubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjֳhKhjhhubjA )}(hhh]h)}(hreturn a signaled fenceh]hreturn a signaled fence}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjֳhKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(h**Parameters** ``void`` no arguments **Description** Return a stub fence which is already signaled. The fence's timestamp corresponds to the initialisation time of the linux kernel.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]j )}(h``void`` no arguments h](j )}(h``void``h]j)}(hjh]hvoid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]h)}(h no argumentsh]h no arguments}(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]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubh)}(hReturn a stub fence which is already signaled. The fence's timestamp corresponds to the initialisation time of the linux kernel.h]hReturn a stub fence which is already signaled. The fence’s timestamp corresponds to the initialisation time of the linux kernel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j,dma_fence_allocate_private_stub (C function)!c.dma_fence_allocate_private_stubhNtauh1jhjhhhNhNubj)}(hhh](j)}(hFstruct dma_fence * dma_fence_allocate_private_stub (ktime_t timestamp)h]j)}(hDstruct dma_fence *dma_fence_allocate_private_stub(ktime_t timestamp)h](j)}(hjh]hstruct}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKubj)}(h h]h }(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj*hhhj;hKubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjOmodnameN classnameNjj)}j]jO)}jGdma_fence_allocate_private_stubsb!c.dma_fence_allocate_private_stubasbuh1hhj*hhhj;hKubj)}(h h]h }(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj*hhhj;hKubjd)}(hjgh]h*}(hj|hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj*hhhj;hKubj )}(hdma_fence_allocate_private_stubh]j )}(hjkh]hdma_fence_allocate_private_stub}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj*hhhj;hKubj)}(h(ktime_t timestamp)h]j)}(hktime_t timestamph](h)}(hhh]j )}(hktime_th]hktime_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]ji!c.dma_fence_allocate_private_stubasbuh1hhjubj)}(h h]h }(hjɵhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(h timestamph]h timestamp}(hj׵hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhj*hhhj;hKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj&hhhj;hKubah}(h]j!ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj;hKhj#hhubjA )}(hhh]h)}(h return a private, signaled fenceh]h return a private, signaled fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjhhubah}(h]h ]h"]h$]h&]uh1j@ hj#hhhj;hKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj#h]h Parameters}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj!ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]j )}(h<``ktime_t timestamp`` timestamp when the fence was signaled h](j )}(h``ktime_t timestamp``h]j)}(hjBh]hktime_t timestamp}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhj<ubj )}(hhh]h)}(h%timestamp when the fence was signaledh]h%timestamp when the fence was signaled}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhKhjXubah}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hjWhKhj9ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj}h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj{ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubh)}(h1Return a newly allocated and signaled stub fence.h]h1Return a newly allocated and signaled stub fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_fence_context_alloc (C function)c.dma_fence_context_allochNtauh1jhjhhhNhNubj)}(hhh](j)}(h*u64 dma_fence_context_alloc (unsigned num)h]j)}(h)u64 dma_fence_context_alloc(unsigned num)h](h)}(hhh]j )}(hu64h]hu64}(hjŶhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj¶ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjǶmodnameN classnameNjj)}j]jO)}jGdma_fence_context_allocsbc.dma_fence_context_allocasbuh1hhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKubj )}(hdma_fence_context_alloch]j )}(hjh]hdma_fence_context_alloc}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhKubj)}(h(unsigned num)h]j)}(h unsigned numh](jM)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(hnumh]hnum}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhKubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhKhjhhubjA )}(hhh]h)}(h#allocate an array of fence contextsh]h#allocate an array of fence contexts}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjWhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jrjc jrjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj|h]h Parameters}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjzubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjvubj )}(hhh]j )}(h0``unsigned num`` amount of contexts to allocate h](j )}(h``unsigned num``h]j)}(hjh]h unsigned num}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubj )}(hhh]h)}(hamount of contexts to allocateh]hamount of contexts to allocate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubah}(h]h ]h"]h$]h&]uh1j hjvubh)}(h**Description**h]jr )}(hjַh]h Description}(hjطhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjԷubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjvubh)}(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 }(hjhhhNhNubh)}(h':c:type:`dma_fence.context `h]j)}(hjh]hdma_fence.context}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubh? to a unique number by passing the context to dma_fence_init().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjvubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_fence_begin_signalling (C function)c.dma_fence_begin_signallinghNtauh1jhjhhhNhNubj)}(hhh](j)}(h&bool dma_fence_begin_signalling (void)h]j)}(h%bool dma_fence_begin_signalling(void)h](jM)}(hjk3h]hbool}(hj>hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj:hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:hhhjKhMubj )}(hdma_fence_begin_signallingh]j )}(hdma_fence_begin_signallingh]hdma_fence_begin_signalling}(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj:hhhjKhMubj)}(h(void)h]j)}(hvoidh]jM)}(hvoidh]hvoid}(hjzhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjvubah}(h]h ]h"]h$]h&]noemphjjuh1jhjrubah}(h]h ]h"]h$]h&]jjuh1jhj:hhhjKhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj6hhhjKhMubah}(h]j1ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjKhMhj3hhubjA )}(hhh]h)}(h-begin a critical DMA fence signalling sectionh]h-begin a critical DMA fence signalling section}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hj3hhhjKhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(hX**Parameters** ``void`` no arguments **Description** Drivers should use this to annotate the beginning of any code section required to eventually complete :c:type:`dma_fence` by calling dma_fence_signal(). The end of these critical sections are annotated with dma_fence_end_signalling(). Opaque cookie needed by the implementation, which needs to be passed to dma_fence_end_signalling().h](h)}(h**Parameters**h]jr )}(hjƸh]h Parameters}(hjȸhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjĸubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h``void`` no arguments h](j )}(h``void``h]j)}(hjh]hvoid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhj߸ubj )}(hhh]h)}(h no argumentsh]h no arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hj߸ubeh}(h]h ]h"]h$]h&]uh1j hjhKhjܸubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj h]h Description}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chKhjubh)}(hDrivers should use this to annotate the beginning of any code section required to eventually complete :c:type:`dma_fence` by calling dma_fence_signal().h](hfDrivers should use this to annotate the beginning of any code section required to eventually complete }(hj6hhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hj@h]h dma_fence}(hjBhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj6ubh by calling dma_fence_signal().}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj]hMhjubh)}(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().}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(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().}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%dma_fence_end_signalling (C function)c.dma_fence_end_signallinghNtauh1jhjhhhNhNubj)}(hhh](j)}(h+void dma_fence_end_signalling (bool cookie)h]j)}(h*void dma_fence_end_signalling(bool cookie)h](jM)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM6ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhM6ubj )}(hdma_fence_end_signallingh]j )}(hdma_fence_end_signallingh]hdma_fence_end_signalling}(hjǹhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjùubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhM6ubj)}(h (bool cookie)h]j)}(h bool cookieh](jM)}(hjk3h]hbool}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj߹ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj߹ubj )}(hcookieh]hcookie}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj߹ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj۹ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM6ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhM6ubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhM6hjhhubjA )}(hhh]h)}(h+end a critical DMA fence signalling sectionh]h+end a critical DMA fence signalling section}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM6hj%hhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhM6ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j@jc j@jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjJh]h Parameters}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjHubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM:hjDubj )}(hhh]j )}(h@``bool cookie`` opaque cookie from dma_fence_begin_signalling() h](j )}(h``bool cookie``h]j)}(hjih]h bool cookie}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM7hjcubj )}(hhh]h)}(h/opaque cookie from dma_fence_begin_signalling()h]h/opaque cookie from dma_fence_begin_signalling()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hM7hjubah}(h]h ]h"]h$]h&]uh1j hjcubeh}(h]h ]h"]h$]h&]uh1j hj~hM7hj`ubah}(h]h ]h"]h$]h&]uh1j hjDubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM9hjDubh)}(hLCloses a critical section annotation opened by dma_fence_begin_signalling().h]hLCloses a critical section annotation opened by dma_fence_begin_signalling().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM8hjDubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j.dma_fence_signal_timestamp_locked (C function)#c.dma_fence_signal_timestamp_lockedhNtauh1jhjhhhNhNubj)}(hhh](j)}(hSvoid dma_fence_signal_timestamp_locked (struct dma_fence *fence, ktime_t timestamp)h]j)}(hRvoid dma_fence_signal_timestamp_locked(struct dma_fence *fence, ktime_t timestamp)h](jM)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMSubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMSubj )}(h!dma_fence_signal_timestamp_lockedh]j )}(h!dma_fence_signal_timestamp_lockedh]h!dma_fence_signal_timestamp_locked}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMSubj)}(h,(struct dma_fence *fence, ktime_t timestamp)h](j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj"ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjFmodnameN classnameNjj)}j]jO)}jGj sb#c.dma_fence_signal_timestamp_lockedasbuh1hhj"ubj)}(h h]h }(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj"ubjd)}(hjgh]h*}(hjrhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj"ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hktime_t timestamph](h)}(hhh]j )}(hktime_th]hktime_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]j`#c.dma_fence_signal_timestamp_lockedasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(h timestamph]h timestamp}(hjǻhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMSubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMSubah}(h]jܺah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMShj޺hhubjA )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMShjhhubah}(h]h ]h"]h$]h&]uh1j@ hj޺hhhjhMSubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j jc j jd je jf uh1jhhhjhNhNubjh )}(hX**Parameters** ``struct dma_fence *fence`` the fence to signal ``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain **Description** Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp. Unlike dma_fence_signal_timestamp(), this function must be called with :c:type:`dma_fence.lock ` held.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMWhj ubj )}(hhh](j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hj2h]hstruct dma_fence *fence}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMThj,ubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhMThjHubah}(h]h ]h"]h$]h&]uh1j hj,ubeh}(h]h ]h"]h$]h&]uh1j hjGhMThj)ubj )}(hU``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain h](j )}(h``ktime_t timestamp``h]j)}(hjkh]hktime_t timestamp}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMUhjeubj )}(hhh]h)}(h>fence signal timestamp in kernel's CLOCK_MONOTONIC time domainh]h@fence signal timestamp in kernel’s CLOCK_MONOTONIC time domain}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMUhjubah}(h]h ]h"]h$]h&]uh1j hjeubeh}(h]h ]h"]h$]h&]uh1j hjhMUhj)ubeh}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMWhj ubh)}(hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.h]hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMVhj ubh)}(hqUnlike dma_fence_signal_timestamp(), this function must be called with :c:type:`dma_fence.lock ` held.h](hGUnlike dma_fence_signal_timestamp(), this function must be called with }(hj˼hhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjռh]hdma_fence.lock}(hj׼hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjӼubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM]hj˼ubh held.}(hj˼hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM]hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_fence_signal_timestamp (C function)c.dma_fence_signal_timestamphNtauh1jhjhhhNhNubj)}(hhh](j)}(hLvoid dma_fence_signal_timestamp (struct dma_fence *fence, ktime_t timestamp)h]j)}(hKvoid dma_fence_signal_timestamp(struct dma_fence *fence, ktime_t timestamp)h](jM)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhj+hMubj )}(hdma_fence_signal_timestamph]j )}(hdma_fence_signal_timestamph]hdma_fence_signal_timestamp}(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj:ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhj+hMubj)}(h,(struct dma_fence *fence, ktime_t timestamp)h](j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVubj)}(h h]h }(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjVubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjzmodnameN classnameNjj)}j]jO)}jGj@sbc.dma_fence_signal_timestampasbuh1hhjVubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjVubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjVubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjRubj)}(hktime_t timestamph](h)}(hhh]j )}(hktime_th]hktime_t}(hjϽhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj̽ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjѽmodnameN classnameNjj)}j]jc.dma_fence_signal_timestampasbuh1hhjȽubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjȽubj )}(h timestamph]h timestamp}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjȽubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjRubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj+hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhj+hMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj+hMhjhhubjA )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj"hhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhj+hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j=jc j=jd je jf uh1jhhhjhNhNubjh )}(hX **Parameters** ``struct dma_fence *fence`` the fence to signal ``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain **Description** Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.h](h)}(h**Parameters**h]jr )}(hjGh]h Parameters}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjEubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjAubj )}(hhh](j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hjfh]hstruct dma_fence *fence}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj`ubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hMhj|ubah}(h]h ]h"]h$]h&]uh1j hj`ubeh}(h]h ]h"]h$]h&]uh1j hj{hMhj]ubj )}(hU``ktime_t timestamp`` fence signal timestamp in kernel's CLOCK_MONOTONIC time domain h](j )}(h``ktime_t timestamp``h]j)}(hjh]hktime_t timestamp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h>fence signal timestamp in kernel's CLOCK_MONOTONIC time domainh]h@fence signal timestamp in kernel’s CLOCK_MONOTONIC time domain}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhj]ubeh}(h]h ]h"]h$]h&]uh1j hjAubh)}(h**Description**h]jr )}(hjھh]h Description}(hjܾhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjؾubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjAubh)}(hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.h]hXtSignal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Set the timestamp provided as the fence signal timestamp.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjAubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_fence_signal_locked (C function)c.dma_fence_signal_lockedhNtauh1jhjhhhNhNubj)}(hhh](j)}(h6void dma_fence_signal_locked (struct dma_fence *fence)h]j)}(h5void dma_fence_signal_locked(struct dma_fence *fence)h](jM)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhj-hMubj )}(hdma_fence_signal_lockedh]j )}(hdma_fence_signal_lockedh]hdma_fence_signal_locked}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhj-hMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXubj)}(h h]h }(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjXubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjwubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj|modnameN classnameNjj)}j]jO)}jGjBsbc.dma_fence_signal_lockedasbuh1hhjXubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjXubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjXubj )}(hfenceh]hfence}(hjhhhNhNubah}(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&]jjj2 uh1jj3 j4 hjhhhj-hMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj-hMhjhhubjA )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hj߿hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjܿhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhj-hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(hX**Parameters** ``struct dma_fence *fence`` the fence to signal **Description** Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time. Unlike dma_fence_signal(), this function must be called with :c:type:`dma_fence.lock ` held.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hj h]hstruct dma_fence *fence}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hMhj6ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj5hMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj[h]h Description}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjYubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./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.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./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 }(hjhhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjh]hdma_fence.lock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh held.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j.dma_fence_check_and_signal_locked (C function)#c.dma_fence_check_and_signal_lockedhNtauh1jhjhhhNhNubj)}(hhh](j)}(h@bool dma_fence_check_and_signal_locked (struct dma_fence *fence)h]j)}(h?bool dma_fence_check_and_signal_locked(struct dma_fence *fence)h](jM)}(hjk3h]hbool}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(h!dma_fence_check_and_signal_lockedh]j )}(h!dma_fence_check_and_signal_lockedh]h!dma_fence_check_and_signal_locked}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj)ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj.modnameN classnameNjj)}j]jO)}jGjsb#c.dma_fence_check_and_signal_lockedasbuh1hhj ubj)}(h h]h }(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjd)}(hjgh]h*}(hjZhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj ubj )}(hfenceh]hfence}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(h)signal the fence if it's not yet signaledh]h+signal the fence if it’s not yet signaled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(hXs**Parameters** ``struct dma_fence *fence`` the fence to check and signal **Description** Checks whether a fence was signaled and signals it if it was not yet signaled. Unlike dma_fence_check_and_signal(), this function must be called with :c:type:`struct dma_fence `.lock being held. **Return** true if fence has been signaled already, false otherwise.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h:``struct dma_fence *fence`` the fence to check and signal h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to check and signalh]hthe fence to check and signal}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hNChecks whether a fence was signaled and signals it if it was not yet signaled.h]hNChecks whether a fence was signaled and signals it if it was not yet signaled.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(h~Unlike dma_fence_check_and_signal(), this function must be called with :c:type:`struct dma_fence `.lock being held.h](hGUnlike dma_fence_check_and_signal(), this function must be called with }(hj2hhhNhNubh)}(h&:c:type:`struct dma_fence `h]j)}(hj<h]hstruct dma_fence}(hj>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj2ubh.lock being held.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjYhMhjubh)}(h **Return**h]jr )}(hjfh]hReturn}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjdubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(h9true if fence has been signaled already, false otherwise.h]h9true if fence has been signaled already, false otherwise.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_fence_check_and_signal (C function)c.dma_fence_check_and_signalhNtauh1jhjhhhNhNubj)}(hhh](j)}(h9bool dma_fence_check_and_signal (struct dma_fence *fence)h]j)}(h8bool dma_fence_check_and_signal(struct dma_fence *fence)h](jM)}(hjk3h]hbool}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(hdma_fence_check_and_signalh]j )}(hdma_fence_check_and_signalh]hdma_fence_check_and_signal}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_check_and_signalasbuh1hhjubj)}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hj3hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(h)signal the fence if it's not yet signaledh]h+signal the fence if it’s not yet signaled}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjghhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(hX**Parameters** ``struct dma_fence *fence`` the fence to check and signal **Description** Checks whether a fence was signaled and signals it if it was not yet signaled. All this is done in a race-free manner. **Return** true if fence has been signaled already, false otherwise.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h:``struct dma_fence *fence`` the fence to check and signal h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to check and signalh]hthe fence to check and signal}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hvChecks whether a fence was signaled and signals it if it was not yet signaled. All this is done in a race-free manner.h]hvChecks whether a fence was signaled and signals it if it was not yet signaled. All this is done in a race-free manner.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(h **Return**h]jr )}(hj h]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(h9true if fence has been signaled already, false otherwise.h]h9true if fence has been signaled already, false otherwise.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_signal (C function)c.dma_fence_signalhNtauh1jhjhhhNhNubj)}(hhh](j)}(h/void dma_fence_signal (struct dma_fence *fence)h]j)}(h.void dma_fence_signal(struct dma_fence *fence)h](jM)}(hvoidh]hvoid}(hjRhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjNhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjNhhhj`hMubj )}(hdma_fence_signalh]j )}(hdma_fence_signalh]hdma_fence_signal}(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjoubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjNhhhj`hMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjusbc.dma_fence_signalasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjNhhhj`hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjJhhhj`hMubah}(h]jEah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj`hMhjGhhubjA )}(hhh]h)}(hsignal completion of a fenceh]hsignal completion of a fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjGhhhj`hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j*jc j*jd je jf uh1jhhhjhNhNubjh )}(hX**Parameters** ``struct dma_fence *fence`` the fence to signal **Description** Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.h](h)}(h**Parameters**h]jr )}(hj4h]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj2ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj.ubj )}(hhh]j )}(h0``struct dma_fence *fence`` the fence to signal h](j )}(h``struct dma_fence *fence``h]j)}(hjSh]hstruct dma_fence *fence}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjMubj )}(hhh]h)}(hthe fence to signalh]hthe fence to signal}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMhjiubah}(h]h ]h"]h$]h&]uh1j hjMubeh}(h]h ]h"]h$]h&]uh1j hjhhMhjJubah}(h]h ]h"]h$]h&]uh1j hj.ubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj.ubh)}(hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.h]hX:Signal completion for software callbacks on a fence, this will unblock dma_fence_wait() calls and run all the callbacks added with dma_fence_add_callback(). Can be called multiple times, but since a fence can only go from the unsignaled to the signaled state and not back, it will only be effective the first time.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj.ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_fence_wait_timeout (C function)c.dma_fence_wait_timeouthNtauh1jhjhhhNhNubj)}(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](jM)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubjM)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhhjhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(hdma_fence_wait_timeouth]j )}(hdma_fence_wait_timeouth]hdma_fence_wait_timeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h9(struct dma_fence *fence, bool intr, signed long timeout)h](j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubj)}(h h]h }(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj(ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjGubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjLmodnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_wait_timeoutasbuh1hhj(ubj)}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj(ubjd)}(hjgh]h*}(hjxhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj(ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj$ubj)}(h bool intrh](jM)}(hjk3h]hbool}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(hintrh]hintr}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj$ubj)}(hsigned long timeouth](jM)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjM)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(htimeouth]htimeout}(hj hhhNhNubah}(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&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(h )j? huh1jhjhM4hjzhhubjA )}(hhh]h)}(h#default release function for fencesh]h#default release function for fences}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM4hjBhhubah}(h]h ]h"]h$]h&]uh1j@ hjzhhhjhM4ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j]jc j]jd je jf uh1jhhhjhNhNubjh )}(h**Parameters** ``struct kref *kref`` :c:type:`dma_fence.recfount ` **Description** This is the default release functions for :c:type:`dma_fence`. Drivers shouldn't call this directly, but instead call dma_fence_put().h](h)}(h**Parameters**h]jr )}(hjgh]h Parameters}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjeubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM8hjaubj )}(hhh]j )}(h?``struct kref *kref`` :c:type:`dma_fence.recfount ` h](j )}(h``struct kref *kref``h]j)}(hjh]hstruct kref *kref}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM5hjubj )}(hhh]h)}(h(:c:type:`dma_fence.recfount `h]h)}(hjh]j)}(hjh]hdma_fence.recfount}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhjhM5hjubah}(h]h ]h"]h$]h&]uh1hhjhM5hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM5hj}ubah}(h]h ]h"]h$]h&]uh1j hjaubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM7hjaubh)}(hThis is the default release functions for :c:type:`dma_fence`. Drivers shouldn't call this directly, but instead call dma_fence_put().h](h*This is the default release functions for }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hjh]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM6hjubhK. Drivers shouldn’t call this directly, but instead call dma_fence_put().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM6hjaubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_free (C function)c.dma_fence_freehNtauh1jhjhhhNhNubj)}(hhh](j)}(h-void dma_fence_free (struct dma_fence *fence)h]j)}(h,void dma_fence_free(struct dma_fence *fence)h](jM)}(hvoidh]hvoid}(hjChhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj?hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhubj)}(h h]h }(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj?hhhjQhMhubj )}(hdma_fence_freeh]j )}(hdma_fence_freeh]hdma_fence_free}(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj?hhhjQhMhubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj|ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjfsbc.dma_fence_freeasbuh1hhj|ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj|ubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj|ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjxubah}(h]h ]h"]h$]h&]jjuh1jhj?hhhjQhMhubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj;hhhjQhMhubah}(h]j6ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjQhMhhj8hhubjA )}(hhh]h)}(h1default release function for :c:type:`dma_fence`.h](hdefault release function for }(hjhhhNhNubh)}(h:c:type:`dma_fence`h]j)}(hj h]h dma_fence}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjj)}j]jc.dma_fence_freeasbj dma_fenceuh1hhjֳhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhhjhhubah}(h]h ]h"]h$]h&]uh1j@ hj8hhhjQhMhubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jCjc jCjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjMh]h Parameters}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjKubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMlhjGubj )}(hhh]j )}(h-``struct dma_fence *fence`` fence to release h](j )}(h``struct dma_fence *fence``h]j)}(hjlh]hstruct dma_fence *fence}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMihjfubj )}(hhh]h)}(hfence to releaseh]hfence to release}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMihjubah}(h]h ]h"]h$]h&]uh1j hjfubeh}(h]h ]h"]h$]h&]uh1j hjhMihjcubah}(h]h ]h"]h$]h&]uh1j hjGubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMkhjGubh)}(hzThis is the default implementation for :c:type:`dma_fence_ops.release `. It calls kfree_rcu() on **fence**.h](h'This is the default implementation for }(hjhhhNhNubh)}(h/:c:type:`dma_fence_ops.release `h]j)}(hjh]hdma_fence_ops.release}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMjhjubh. It calls kfree_rcu() on }(hjhhhNhNubjr )}(h **fence**h]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMjhjGubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j*dma_fence_enable_sw_signaling (C function)c.dma_fence_enable_sw_signalinghNtauh1jhjhhhNhNubj)}(hhh](j)}(hubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhj/hMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubj)}(h h]h }(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjZubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjyubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj~modnameN classnameNjj)}j]jO)}jGjDsbc.dma_fence_enable_sw_signalingasbuh1hhjZubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjZubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjZubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjVubah}(h]h ]h"]h$]h&]jjuh1jhjhhhj/hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhj/hMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj/hMhjhhubjA )}(hhh]h)}(henable signaling on fenceh]henable signaling on fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhj/hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(hX**Parameters** ``struct dma_fence *fence`` the fence to enable **Description** This will request for sw signaling to be enabled, to make the fence complete as soon as possible. This calls :c:type:`dma_fence_ops.enable_signaling ` internally.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h0``struct dma_fence *fence`` the fence to enable h](j )}(h``struct dma_fence *fence``h]j)}(hj"h]hstruct dma_fence *fence}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to enableh]hthe fence to enable}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMhj8ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj7hMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj]h]h Description}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj[ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(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 }(hjshhhNhNubh)}(h8:c:type:`dma_fence_ops.enable_signaling `h]j)}(hj}h]hdma_fence_ops.enable_signaling}(hjhhhNhNubah}(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:187: ./drivers/dma-buf/dma-fence.chMhjsubh internally.}(hjshhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_fence_add_callback (C function)c.dma_fence_add_callbackhNtauh1jhjhhhNhNubj)}(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](jM)}(hinth]hint}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(hdma_fence_add_callbackh]j )}(hdma_fence_add_callbackh]hdma_fence_add_callback}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(hI(struct dma_fence *fence, struct dma_fence_cb *cb, dma_fence_func_t func)h](j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj"modnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_add_callbackasbuh1hhjubj)}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjNhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence_cb *cbh](j)}(hjh]hstruct}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjpubh)}(hhh]j )}(h dma_fence_cbh]h dma_fence_cb}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]j<c.dma_fence_add_callbackasbuh1hhjpubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjpubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjpubj )}(hcbh]hcb}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjpubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hdma_fence_func_t funch](h)}(hhh]j )}(hdma_fence_func_th]hdma_fence_func_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]j<c.dma_fence_add_callbackasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(hfunch]hfunc}(hjhhhNhNubah}(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&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(h6add a callback to be called when the fence is signaledh]h6add a callback to be called when the fence is signaled}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj:hhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jUjc jUjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj_h]h Parameters}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj]ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjYubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hj~h]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjxubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjxubeh}(h]h ]h"]h$]h&]uh1j hjhMhjuubj )}(h5``struct dma_fence_cb *cb`` the callback to register h](j )}(h``struct dma_fence_cb *cb``h]j)}(hjh]hstruct dma_fence_cb *cb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe callback to registerh]hthe callback to register}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjuubj )}(h/``dma_fence_func_t func`` the function to call h](j )}(h``dma_fence_func_t func``h]j)}(hjh]hdma_fence_func_t func}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe function to callh]hthe function to call}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjuubeh}(h]h ]h"]h$]h&]uh1j hjYubh)}(h**Description**h]jr )}(hj+h]h Description}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj)ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjYubh)}(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.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjYubh)}(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](jr )}(h**cb**h]hcb}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjPubh 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.}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjYubh)}(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 }(hjmhhhNhNubj)}(h*not*h]hnot}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh call the callback).}(hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjYubh)}(hKNote that the callback can be called from an atomic context or irq context.h]hKNote that the callback can be called from an atomic context or irq context.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjYubh)}(hdReturns 0 in case of success, -ENOENT if the fence is already signaled and -EINVAL in case of error.h]hdReturns 0 in case of success, -ENOENT if the fence is already signaled and -EINVAL in case of error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjYubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_fence_get_status (C function)c.dma_fence_get_statushNtauh1jhjhhhNhNubj)}(hhh](j)}(h2int dma_fence_get_status (struct dma_fence *fence)h]j)}(h1int dma_fence_get_status(struct dma_fence *fence)h](jM)}(hinth]hint}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(hdma_fence_get_statush]j )}(hdma_fence_get_statush]hdma_fence_get_status}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj)modnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_get_statusasbuh1hhjubj)}(h h]h }(hjGhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjUhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjbhhhNhNubah}(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&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(h"returns the status upon completionh]h"returns the status upon completion}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h3``struct dma_fence *fence`` the dma_fence to query h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe dma_fence to queryh]hthe dma_fence to query}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hThis wraps dma_fence_get_status_locked() to return the error status condition on a signaled fence. See dma_fence_get_status_locked() for more details.h]hThis wraps dma_fence_get_status_locked() to return the error status condition on a signaled fence. See dma_fence_get_status_locked() for more details.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hReturns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.h]hReturns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&dma_fence_remove_callback (C function)c.dma_fence_remove_callbackhNtauh1jhjhhhNhNubj)}(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](jM)}(hjk3h]hbool}(hj\hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjXhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjXhhhjihMubj )}(hdma_fence_remove_callbackh]j )}(hdma_fence_remove_callbackh]hdma_fence_remove_callback}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjxubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjXhhhjihMubj)}(h2(struct dma_fence *fence, struct dma_fence_cb *cb)h](j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGj~sbc.dma_fence_remove_callbackasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence_cb *cbh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fence_cbh]h dma_fence_cb}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj*modnameN classnameNjj)}j]jc.dma_fence_remove_callbackasbuh1hhjubj)}(h h]h }(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjThhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hcbh]hcb}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjXhhhjihMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjThhhjihMubah}(h]jOah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjihMhjQhhubjA )}(hhh]h)}(h)remove a callback from the signaling listh]h)remove a callback from the signaling list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjQhhhjihMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h3``struct dma_fence_cb *cb`` the callback to remove h](j )}(h``struct dma_fence_cb *cb``h]j)}(hjh]hstruct dma_fence_cb *cb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(hthe callback to removeh]hthe callback to remove}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj@h]h Description}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj>ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(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.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hX*WARNING*: Cancelling a callback should only be done if you really know what you're doing, since deadlocks and race conditions could occur all too easily. For this reason, it should only ever be done on hardware lockup recovery, with a reference held to the fence.h](j)}(h *WARNING*h]hWARNING}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubhX: 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.}(hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hkBehaviour is undefined if **cb** has not been added to **fence** using dma_fence_add_callback() beforehand.h](hBehaviour is undefined if }(hjhhhNhNubjr )}(h**cb**h]hcb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubh has not been added to }(hjhhhNhNubjr )}(h **fence**h]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubh+ using dma_fence_add_callback() beforehand.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_fence_default_wait (C function)c.dma_fence_default_waithNtauh1jhjhhhNhNubj)}(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](jM)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubjM)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhhjhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(hdma_fence_default_waith]j )}(hdma_fence_default_waith]hdma_fence_default_wait}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h9(struct dma_fence *fence, bool intr, signed long timeout)h](j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj*ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjIubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjNmodnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_default_waitasbuh1hhj*ubj)}(h h]h }(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj*ubjd)}(hjgh]h*}(hjzhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj*ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj&ubj)}(h bool intrh](jM)}(hjk3h]hbool}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(hintrh]hintr}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj&ubj)}(hsigned long timeouth](jM)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjM)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(htimeouth]htimeout}(hj hhhNhNubah}(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&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(hDdefault sleep until the fence gets signaled or until timeout elapsesh]hDdefault sleep until the fence gets signaled or until timeout elapses}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj3hhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jNjc jNjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjXh]h Parameters}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjVubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM#hjRubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hjwh]hstruct dma_fence *fence}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM!hjqubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM!hjubah}(h]h ]h"]h$]h&]uh1j hjqubeh}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM"hjubj )}(hhh]h)}(h!if true, do an interruptible waith]h!if true, do an interruptible wait}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM"hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM"hjnubj )}(hJ``signed long timeout`` timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT h](j )}(h``signed long timeout``h]j)}(hjh]hsigned long timeout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM#hjubj )}(hhh]h)}(h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUTh]h1timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM#hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM#hjnubeh}(h]h ]h"]h$]h&]uh1j hjRubh)}(h**Description**h]jr )}(hj$h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj"ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM%hjRubh)}(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.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM$hjRubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_fence_wait_any_timeout (C function)c.dma_fence_wait_any_timeouthNtauh1jhjhhhNhNubj)}(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](jM)}(hsignedh]hsigned}(hjihhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjehhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMnubj)}(h h]h }(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjehhhjwhMnubjM)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjehhhjwhMnubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjehhhjwhMnubj )}(hdma_fence_wait_any_timeouth]j )}(hdma_fence_wait_any_timeouth]hdma_fence_wait_any_timeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjehhhjwhMnubj)}(hZ(struct dma_fence **fences, uint32_t count, bool intr, signed long timeout, uint32_t *idx)h](j)}(hstruct dma_fence **fencesh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_wait_any_timeoutasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfencesh]hfences}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(huint32_t counth](h)}(hhh]j )}(huint32_th]huint32_t}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjFmodnameN classnameNjj)}j]jc.dma_fence_wait_any_timeoutasbuh1hhj=ubj)}(h h]h }(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj=ubj )}(hcounth]hcount}(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h bool intrh](jM)}(hjk3h]hbool}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(hintrh]hintr}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hsigned long timeouth](jM)}(hsignedh]hsigned}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjM)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(htimeouth]htimeout}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h uint32_t *idxh](h)}(hhh]j )}(huint32_th]huint32_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.dma_fence_wait_any_timeoutasbuh1hhj ubj)}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjd)}(hjgh]h*}(hj=hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj ubj )}(hidxh]hidx}(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjehhhjwhMnubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjahhhjwhMnubah}(h]j\ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjwhMnhj^hhubjA )}(hhh]h)}(h )j? huh1jhjFhMhj-hhubjA )}(hhh]h)}(h$set desired fence-wait deadline hinth]h$set desired fence-wait deadline hint}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj=hhubah}(h]h ]h"]h$]h&]uh1j@ hj-hhhjFhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jXjc jXjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjbh]h Parameters}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj`ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj\ubj )}(hhh](j )}(h>``struct dma_fence *fence`` the fence that is to be waited on h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hj{ubeh}(h]h ]h"]h$]h&]uh1j hjhMhjxubj )}(hU``ktime_t deadline`` the time by which the waiter hopes for the fence to be signaled h](j )}(h``ktime_t deadline``h]j)}(hjh]hktime_t deadline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]h)}(h?the time by which the waiter hopes for the fence to be signaledh]h?the time by which the waiter hopes for the fence to be signaled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjxubeh}(h]h ]h"]h$]h&]uh1j hj\ubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj\ubh)}(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..}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj\ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_describe (C function)c.dma_fence_describehNtauh1jhjhhhNhNubj)}(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](jM)}(hvoidh]hvoid}(hj;hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj7hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7hhhjIhMubj )}(hdma_fence_describeh]j )}(hdma_fence_describeh]hdma_fence_describe}(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjXubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj7hhhjIhMubj)}(h/(struct dma_fence *fence, struct seq_file *seq)h](j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjtubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGj^sbc.dma_fence_describeasbuh1hhjtubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjtubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjtubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjtubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjpubj)}(hstruct seq_file *seqh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hseq_fileh]hseq_file}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj modnameN classnameNjj)}j]jc.dma_fence_describeasbuh1hhjubj)}(h h]h }(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hj4hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hseqh]hseq}(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjpubeh}(h]h ]h"]h$]h&]jjuh1jhj7hhhjIhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj3hhhjIhMubah}(h]j.ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjIhMhj0hhubjA )}(hhh]h)}(h$Dump fence description into seq_fileh]h$Dump fence description into seq_file}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjhhhubah}(h]h ]h"]h$]h&]uh1j@ hj0hhhjIhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM hjubj )}(hhh](j )}(h2``struct dma_fence *fence`` the fence to describe h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM hjubj )}(hhh]h)}(hthe fence to describeh]hthe fence to describe}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM hjubj )}(hJ``struct seq_file *seq`` the seq_file to put the textual description into h](j )}(h``struct seq_file *seq``h]j)}(hjh]hstruct seq_file *seq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM hjubj )}(hhh]h)}(h0the seq_file to put the textual description intoh]h0the seq_file to put the textual description into}(hjhhhNhNubah}(h]h ]h"]h$]h&]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]jr )}(hj h]h Description}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM hjubh)}(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.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_init (C function)c.dma_fence_inithNtauh1jhjhhhNhNubj)}(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](jM)}(hvoidh]hvoid}(hjehhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjahhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMBubj)}(h h]h }(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjahhhjshMBubj )}(hdma_fence_inith]j )}(hdma_fence_inith]hdma_fence_init}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjahhhjshMBubj)}(hd(struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h](j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_initasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hconst struct dma_fence_ops *opsh](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hjh]hstruct}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fence_opsh]h dma_fence_ops}(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjJubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjOmodnameN classnameNjj)}j]jc.dma_fence_initasbuh1hhjubj)}(h h]h }(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjyhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hopsh]hops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hspinlock_t *lockh](h)}(hhh]j )}(h spinlock_th]h spinlock_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.dma_fence_initasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hlockh]hlock}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.dma_fence_initasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(hcontexth]hcontext}(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h u64 seqnoh](h)}(hhh]j )}(hu64h]hu64}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjAmodnameN classnameNjj)}j]jc.dma_fence_initasbuh1hhj8ubj)}(h h]h }(hj]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj8ubj )}(hseqnoh]hseqno}(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjahhhjshMBubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj]hhhjshMBubah}(h]jXah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjshMBhjZhhubjA )}(hhh]h)}(hInitialize a custom fence.h]hInitialize a custom fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMBhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjZhhhjshMBubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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`` optional 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(). It is strongly discouraged to provide an external lock because this couples lock and fence life time. This is only allowed for legacy use cases when multiple fences need to be prevented from signaling out of order.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMFhjubj )}(hhh](j )}(h4``struct dma_fence *fence`` the fence to initialize h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMChjubj )}(hhh]h)}(hthe fence to initializeh]hthe fence to initialize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMChjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMChjubj )}(hS``const struct dma_fence_ops *ops`` the dma_fence_ops for operations on this fence h](j )}(h#``const struct dma_fence_ops *ops``h]j)}(hjh]hconst struct dma_fence_ops *ops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMDhj ubj )}(hhh]h)}(h.the dma_fence_ops for operations on this fenceh]h.the dma_fence_ops for operations on this fence}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMDhj%ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj$hMDhjubj )}(hM``spinlock_t *lock`` optional irqsafe spinlock to use for locking this fence h](j )}(h``spinlock_t *lock``h]j)}(hjHh]hspinlock_t *lock}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMEhjBubj )}(hhh]h)}(h7optional irqsafe spinlock to use for locking this fenceh]h7optional irqsafe spinlock to use for locking this fence}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hMEhj^ubah}(h]h ]h"]h$]h&]uh1j hjBubeh}(h]h ]h"]h$]h&]uh1j hj]hMEhjubj )}(h;``u64 context`` the execution context this fence is run on h](j )}(h``u64 context``h]j)}(hjh]h u64 context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMFhj{ubj )}(hhh]h)}(h*the execution context this fence is run onh]h*the execution context this fence is run on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMFhjubah}(h]h ]h"]h$]h&]uh1j hj{ubeh}(h]h ]h"]h$]h&]uh1j hjhMFhjubj )}(hC``u64 seqno`` a linear increasing sequence number for this context h](j )}(h ``u64 seqno``h]j)}(hjh]h u64 seqno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMGhjubj )}(hhh]h)}(h4a linear increasing sequence number for this contexth]h4a linear increasing sequence number for this context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMGhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMGhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMIhjubh)}(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 }(hj hhhNhNubh)}(h8:c:type:`dma_fence_ops.enable_signaling `h]j)}(hjh]hdma_fence_ops.enable_signaling}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMHhj ubh gets called.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj2hMHhjubh)}(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().}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMLhjubh)}(hIt is strongly discouraged to provide an external lock because this couples lock and fence life time. This is only allowed for legacy use cases when multiple fences need to be prevented from signaling out of order.h]hIt is strongly discouraged to provide an external lock because this couples lock and fence life time. This is only allowed for legacy use cases when multiple fences need to be prevented from signaling out of order.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMOhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_init64 (C function)c.dma_fence_init64hNtauh1jhjhhhNhNubj)}(hhh](j)}(hzvoid dma_fence_init64 (struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h]j)}(hyvoid dma_fence_init64(struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h](jM)}(hvoidh]hvoid}(hj{hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjwhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM]ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjwhhhjhM]ubj )}(hdma_fence_init64h]j )}(hdma_fence_init64h]hdma_fence_init64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjwhhhjhM]ubj)}(hd(struct dma_fence *fence, const struct dma_fence_ops *ops, spinlock_t *lock, u64 context, u64 seqno)h](j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_init64asbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hconst struct dma_fence_ops *opsh](j)}(hjh]hconst}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj&ubj)}(hjh]hstruct}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubj)}(h h]h }(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj&ubh)}(hhh]j )}(h dma_fence_opsh]h dma_fence_ops}(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjemodnameN classnameNjj)}j]jc.dma_fence_init64asbuh1hhj&ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj&ubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj&ubj )}(hopsh]hops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hspinlock_t *lockh](h)}(hhh]j )}(h spinlock_th]h spinlock_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.dma_fence_init64asbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hlockh]hlock}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.dma_fence_init64asbuh1hhjubj)}(h h]h }(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(hcontexth]hcontext}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h u64 seqnoh](h)}(hhh]j )}(hu64h]hu64}(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjWmodnameN classnameNjj)}j]jc.dma_fence_init64asbuh1hhjNubj)}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjNubj )}(hseqnoh]hseqno}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjwhhhjhM]ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjshhhjhM]ubah}(h]jnah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhM]hjphhubjA )}(hhh]h)}(h4Initialize a custom fence with 64-bit seqno support.h]h4Initialize a custom fence with 64-bit seqno support.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM]hjhhubah}(h]h ]h"]h$]h&]uh1j@ hjphhhjhM]ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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`` optional 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(). It is strongly discouraged to provide an external lock because this couples lock and fence life time. This is only allowed for legacy use cases when multiple fences need to be prevented from signaling out of order.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMahjubj )}(hhh](j )}(h4``struct dma_fence *fence`` the fence to initialize h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM^hjubj )}(hhh]h)}(hthe fence to initializeh]hthe fence to initialize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM^hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM^hjubj )}(hS``const struct dma_fence_ops *ops`` the dma_fence_ops for operations on this fence h](j )}(h#``const struct dma_fence_ops *ops``h]j)}(hj%h]hconst struct dma_fence_ops *ops}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM_hjubj )}(hhh]h)}(h.the dma_fence_ops for operations on this fenceh]h.the dma_fence_ops for operations on this fence}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hM_hj;ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj:hM_hjubj )}(hM``spinlock_t *lock`` optional irqsafe spinlock to use for locking this fence h](j )}(h``spinlock_t *lock``h]j)}(hj^h]hspinlock_t *lock}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM`hjXubj )}(hhh]h)}(h7optional irqsafe spinlock to use for locking this fenceh]h7optional irqsafe spinlock to use for locking this fence}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshM`hjtubah}(h]h ]h"]h$]h&]uh1j hjXubeh}(h]h ]h"]h$]h&]uh1j hjshM`hjubj )}(h;``u64 context`` the execution context this fence is run on h](j )}(h``u64 context``h]j)}(hjh]h u64 context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMahjubj )}(hhh]h)}(h*the execution context this fence is run onh]h*the execution context this fence is run on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMahjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMahjubj )}(hC``u64 seqno`` a linear increasing sequence number for this context h](j )}(h ``u64 seqno``h]j)}(hjh]h u64 seqno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMbhjubj )}(hhh]h)}(h4a linear increasing sequence number for this contexth]h4a linear increasing sequence number for this context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMbhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMbhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMdhjubh)}(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 }(hj!hhhNhNubh)}(h8:c:type:`dma_fence_ops.enable_signaling `h]j)}(hj+h]hdma_fence_ops.enable_signaling}(hj-hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fence_opsuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMchj!ubh gets called.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjHhMchjubh)}(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().}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMghjubh)}(hIt is strongly discouraged to provide an external lock because this couples lock and fence life time. This is only allowed for legacy use cases when multiple fences need to be prevented from signaling out of order.h]hIt is strongly discouraged to provide an external lock because this couples lock and fence life time. This is only allowed for legacy use cases when multiple fences need to be prevented from signaling out of order.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMjhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_fence_driver_name (C function)c.dma_fence_driver_namehNtauh1jhjhhhNhNubj)}(hhh](j)}(hBconst char __rcu * dma_fence_driver_name (struct dma_fence *fence)h]j)}(h@const char __rcu *dma_fence_driver_name(struct dma_fence *fence)h](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMyubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMyubjM)}(hcharh]hchar}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhhjhMyubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMyubh__rcu}(hjhhhNhNubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMyubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjhhhjhMyubj )}(hdma_fence_driver_nameh]j )}(hdma_fence_driver_nameh]hdma_fence_driver_name}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMyubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj(modnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_driver_nameasbuh1hhjubj)}(h h]h }(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjThhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMyubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMyubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMyhjhhubjA )}(hhh]h)}(hAccess the driver nameh]hAccess the driver name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMyhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMyubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(hXh**Parameters** ``struct dma_fence *fence`` the fence to query **Description** Returns a driver name backing the dma-fence implementation. IMPORTANT CONSIDERATION: Dma-fence contract stipulates that access to driver provided data (data not directly embedded into the object itself), such as the :c:type:`dma_fence.lock ` and memory potentially accessed by the :c:type:`dma_fence.ops ` functions, is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do. To allow safe access drivers are mandated to guarantee a RCU grace period between signalling the fence and freeing said data. As such access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the :c:type:`rcu_read_lock` and :c:type:`rcu_read_unlock` pair.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM}hjubj )}(hhh]j )}(h/``struct dma_fence *fence`` the fence to query h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMzhjubj )}(hhh]h)}(hthe fence to queryh]hthe fence to query}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMzhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMzhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM|hjubh)}(h;Returns a driver name backing the dma-fence implementation.h]h;Returns a driver name backing the dma-fence implementation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM{hjubh)}(hX{IMPORTANT CONSIDERATION: Dma-fence contract stipulates that access to driver provided data (data not directly embedded into the object itself), such as the :c:type:`dma_fence.lock ` and memory potentially accessed by the :c:type:`dma_fence.ops ` functions, is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do.h](hIMPORTANT CONSIDERATION: Dma-fence contract stipulates that access to driver provided data (data not directly embedded into the object itself), such as the }(hj,hhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hj6h]hdma_fence.lock}(hj8hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chM}hj,ubh( and memory potentially accessed by the }(hj,hhhNhNubh)}(h#:c:type:`dma_fence.ops `h]j)}(hjZh]h dma_fence.ops}(hj\hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhjShM}hj,ubhp functions, is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjShM}hjubh)}(h}To allow safe access drivers are mandated to guarantee a RCU grace period between signalling the fence and freeing said data.h]h}To allow safe access drivers are mandated to guarantee a RCU grace period between signalling the fence and freeing said data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hAs such access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the :c:type:`rcu_read_lock` and :c:type:`rcu_read_unlock` pair.h](hAs such access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the }(hjhhhNhNubh)}(h:c:type:`rcu_read_lock`h]j)}(hjh]h rcu_read_lock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj rcu_read_lockuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh and }(hjhhhNhNubh)}(h:c:type:`rcu_read_unlock`h]j)}(hjh]hrcu_read_unlock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjrcu_read_unlockuh1hhjhMhjubh pair.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_fence_timeline_name (C function)c.dma_fence_timeline_namehNtauh1jhjhhhNhNubj)}(hhh](j)}(hDconst char __rcu * dma_fence_timeline_name (struct dma_fence *fence)h]j)}(hBconst char __rcu *dma_fence_timeline_name(struct dma_fence *fence)h](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubjM)}(hcharh]hchar}(hj!hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhhjhMubj)}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubh__rcu}(hjhhhNhNubj)}(h h]h }(hjAhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubjd)}(hjgh]h*}(hjOhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjhhhjhMubj )}(hdma_fence_timeline_nameh]j )}(hdma_fence_timeline_nameh]hdma_fence_timeline_name}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj\ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjxubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjbsbc.dma_fence_timeline_nameasbuh1hhjxubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjxubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjxubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjxubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjtubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(hAccess the timeline nameh]hAccess the timeline name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(hXn**Parameters** ``struct dma_fence *fence`` the fence to query **Description** Returns a timeline name provided by the dma-fence implementation. IMPORTANT CONSIDERATION: Dma-fence contract stipulates that access to driver provided data (data not directly embedded into the object itself), such as the :c:type:`dma_fence.lock ` and memory potentially accessed by the :c:type:`dma_fence.ops ` functions, is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do. To allow safe access drivers are mandated to guarantee a RCU grace period between signalling the fence and freeing said data. As such access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the :c:type:`rcu_read_lock` and :c:type:`rcu_read_unlock` pair.h](h)}(h**Parameters**h]jr )}(hj!h]h Parameters}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubj )}(hhh]j )}(h/``struct dma_fence *fence`` the fence to query h](j )}(h``struct dma_fence *fence``h]j)}(hj@h]hstruct dma_fence *fence}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhj:ubj )}(hhh]h)}(hthe fence to queryh]hthe fence to query}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhMhjVubah}(h]h ]h"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]uh1j hjUhMhj7ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj{h]h Description}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjyubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hAReturns a timeline name provided by the dma-fence implementation.h]hAReturns a timeline name provided by the dma-fence implementation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hX{IMPORTANT CONSIDERATION: Dma-fence contract stipulates that access to driver provided data (data not directly embedded into the object itself), such as the :c:type:`dma_fence.lock ` and memory potentially accessed by the :c:type:`dma_fence.ops ` functions, is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do.h](hIMPORTANT CONSIDERATION: Dma-fence contract stipulates that access to driver provided data (data not directly embedded into the object itself), such as the }(hjhhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjh]hdma_fence.lock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh( and memory potentially accessed by the }(hjhhhNhNubh)}(h#:c:type:`dma_fence.ops `h]j)}(hjh]h dma_fence.ops}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hhjhMhjubhp functions, is forbidden after the fence has been signalled. Drivers are allowed to free that data, and some do.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubh)}(h}To allow safe access drivers are mandated to guarantee a RCU grace period between signalling the fence and freeing said data.h]h}To allow safe access drivers are mandated to guarantee a RCU grace period between signalling the fence and freeing said data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh)}(hAs such access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the :c:type:`rcu_read_lock` and :c:type:`rcu_read_unlock` pair.h](hAs such access to the driver name is only valid inside a RCU locked section. The pointer MUST be both queried and USED ONLY WITHIN a SINGLE block guarded by the }(hjhhhNhNubh)}(h:c:type:`rcu_read_lock`h]j)}(hjh]h rcu_read_lock}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj rcu_read_lockuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:187: ./drivers/dma-buf/dma-fence.chMhjubh and }(hjhhhNhNubh)}(h:c:type:`rcu_read_unlock`h]j)}(hj2h]hrcu_read_unlock}(hj4hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjrcu_read_unlockuh1hhj+hMhjubh pair.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj+hMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence (C struct) c.dma_fencehNtauh1jhjhhhNhNubj)}(hhh](j)}(h dma_fenceh]j)}(hstruct dma_fenceh](j)}(hjh]hstruct}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjuhhhjhKubj )}(h dma_fenceh]j )}(hjsh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjuhhhjhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjqhhhjhKubah}(h]jlah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhKhjnhhubjA )}(hhh]h)}(h"software synchronization primitiveh]h"software synchronization primitive}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK hjhhubah}(h]h ]h"]h$]h&]uh1j@ hjnhhhjhKubeh}(h]h ](jstructeh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(hX**Definition**:: struct dma_fence { union { spinlock_t *extern_lock; spinlock_t inline_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** ``{unnamed_union}`` anonymous ``extern_lock`` external spin_lock_irqsave used for locking (deprecated) ``inline_lock`` alternative internal 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](jr )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK$hjubj)}(hX]struct dma_fence { union { spinlock_t *extern_lock; spinlock_t inline_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]hX]struct dma_fence { union { spinlock_t *extern_lock; spinlock_t inline_lock; }; const struct dma_fence_ops *ops; union { struct list_head cb_list; ktime_t timestamp; struct rcu_head rcu; }; u64 context; u64 seqno; unsigned long flags; struct kref refcount; int error; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK&hjubh)}(h **Members**h]jr )}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK8hjubj )}(hhh](j )}(h``{unnamed_union}`` anonymous h](j )}(h``{unnamed_union}``h]j)}(hj(h]h{unnamed_union}}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj"ubj )}(hhh]h)}(h anonymoush]h anonymous}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hKhj>ubah}(h]h ]h"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]uh1j hj=hKhjubj )}(hI``extern_lock`` external spin_lock_irqsave used for locking (deprecated) h](j )}(h``extern_lock``h]j)}(hjah]h extern_lock}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK&hj[ubj )}(hhh]h)}(h8external spin_lock_irqsave used for locking (deprecated)h]h8external spin_lock_irqsave used for locking (deprecated)}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhK&hjwubah}(h]h ]h"]h$]h&]uh1j hj[ubeh}(h]h ]h"]h$]h&]uh1j hjvhK&hjubj )}(hH``inline_lock`` alternative internal spin_lock_irqsave used for locking h](j )}(h``inline_lock``h]j)}(hjh]h inline_lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK'hjubj )}(hhh]h)}(h7alternative internal spin_lock_irqsave used for lockingh]h7alternative internal spin_lock_irqsave used for locking}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK'hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK'hjubj )}(h1``ops`` dma_fence_ops associated with this fence h](j )}(h``ops``h]j)}(hjh]hops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK#hjubj )}(hhh]h)}(h(dma_fence_ops associated with this fenceh]h(dma_fence_ops associated with this fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK#hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK#hjubj )}(h``{unnamed_union}`` anonymous h](j )}(h``{unnamed_union}``h]j)}(hj h]h{unnamed_union}}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubj )}(hhh]h)}(h anonymoush]h anonymous}(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 )}(h*``cb_list`` list of all callbacks to call h](j )}(h ``cb_list``h]j)}(hjEh]hcb_list}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK%hj?ubj )}(hhh]h)}(hlist of all callbacks to callh]hlist of all callbacks to call}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhK%hj[ubah}(h]h ]h"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]uh1j hjZhK%hjubj )}(h5``timestamp`` Timestamp when the fence was signaled. h](j )}(h ``timestamp``h]j)}(hj~h]h timestamp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK-hjxubj )}(hhh]h)}(h&Timestamp when the fence was signaled.h]h&Timestamp when the fence was signaled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK-hjubah}(h]h ]h"]h$]h&]uh1j hjxubeh}(h]h ]h"]h$]h&]uh1j hjhK-hjubj )}(h0``rcu`` used for releasing fence with kfree_rcu h](j )}(h``rcu``h]j)}(hjh]hrcu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK$hjubj )}(hhh]h)}(h'used for releasing fence with kfree_rcuh]h'used for releasing fence with kfree_rcu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK$hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK$hjubj )}(h[``context`` execution context this fence belongs to, returned by dma_fence_context_alloc() h](j )}(h ``context``h]j)}(hjh]hcontext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK)hjubj )}(hhh]h)}(hNexecution context this fence belongs to, returned by dma_fence_context_alloc()h]hNexecution context this fence belongs to, returned by dma_fence_context_alloc()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK(hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK)hjubj )}(h``seqno`` the sequence number of this fence inside the execution context, can be compared to decide which fence would be signaled later. h](j )}(h ``seqno``h]j)}(hj*h]hseqno}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK+hj$ubj )}(hhh]h)}(h~the sequence number of this fence inside the execution context, can be compared to decide which fence would be signaled later.h]h~the sequence number of this fence inside the execution context, can be compared to decide which fence would be signaled later.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK*hj@ubah}(h]h ]h"]h$]h&]uh1j hj$ubeh}(h]h ]h"]h$]h&]uh1j hj?hK+hjubj )}(h3``flags`` A mask of DMA_FENCE_FLAG_* defined below h](j )}(h ``flags``h]j)}(hjdh]hflags}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK,hj^ubj )}(hhh]h)}(h(A mask of DMA_FENCE_FLAG_* defined belowh]h(A mask of DMA_FENCE_FLAG_* defined below}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhK,hjzubah}(h]h ]h"]h$]h&]uh1j hj^ubeh}(h]h ]h"]h$]h&]uh1j hjyhK,hjubj )}(h%``refcount`` refcount for this fence h](j )}(h ``refcount``h]j)}(hjh]hrefcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK"hjubj )}(hhh]h)}(hrefcount for this fenceh]hrefcount for this fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK"hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK"hjubj )}(h``error`` Optional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.h](j )}(h ``error``h]j)}(hjh]herror}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK.hjubj )}(hhh]h)}(hOptional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.h]hOptional, only valid if < 0, must be set before calling dma_fence_signal, indicates that the fence has completed with an error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK.hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhK.hjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK2hjhhubh)}(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.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK/hjhhubh)}(hXDMA_FENCE_FLAG_INITIALIZED_BIT - fence was initialized DMA_FENCE_FLAG_INLINE_LOCK_BIT - use inline spinlock instead of external one DMA_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_INITIALIZED_BIT - fence was initialized DMA_FENCE_FLAG_INLINE_LOCK_BIT - use inline spinlock instead of external one DMA_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.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK3hjhhubh)}(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.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK )j? huh1jhjhKHhjihhubjA )}(hhh]h)}(h%callback for dma_fence_add_callback()h]h%callback for dma_fence_add_callback()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKxhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjihhhjhKHubeh}(h]h ](jstructeh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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](jr )}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK|hjubj)}(hNstruct dma_fence_cb { struct list_head node; dma_fence_func_t func; };h]hNstruct dma_fence_cb { struct list_head node; dma_fence_func_t func; };}hjsbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK~hjubh)}(h **Members**h]jr )}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubj )}(hhh](j )}(hR``node`` used by dma_fence_add_callback() to append this struct to fence::cb_list h](j )}(h``node``h]j)}(hj#h]hnode}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKzhjubj )}(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}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hKzhj9ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj8hKzhjubj )}(h!``func`` dma_fence_func_t to callh](j )}(h``func``h]j)}(hj\h]hfunc}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKzhjVubj )}(hhh]h)}(hdma_fence_func_t to callh]hdma_fence_func_t to call}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK{hjrubah}(h]h ]h"]h$]h&]uh1j hjVubeh}(h]h ]h"]h$]h&]uh1j hjqhKzhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK~hjhhubh)}(hThis struct will be initialized by dma_fence_add_callback(), additional data can be passed along by embedding dma_fence_cb in another struct.h]hThis struct will be initialized by dma_fence_add_callback(), additional data can be passed along by embedding dma_fence_cb in another struct.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhK{hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_ops (C struct)c.dma_fence_opshNtauh1jhjhhhNhNubj)}(hhh](j)}(h dma_fence_opsh]j)}(hstruct dma_fence_opsh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKubj )}(h dma_fence_opsh]j )}(hjh]h dma_fence_ops}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhKubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhKhjhhubjA )}(hhh]h)}(h operations implemented for fenceh]h operations implemented for fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]ja jjb j7jc j7jd je jf uh1jhhhjhNhNubjh )}(hX**Definition**:: struct dma_fence_ops { const char * (*get_driver_name)(struct dma_fence *fence); const char * (*get_timeline_name)(struct dma_fence *fence); bool (*enable_signaling)(struct dma_fence *fence); bool (*signaled)(struct dma_fence *fence); signed long (*wait)(struct dma_fence *fence, bool intr, signed long timeout); void (*release)(struct dma_fence *fence); void (*set_deadline)(struct dma_fence *fence, ktime_t deadline); }; **Members** ``get_driver_name`` Returns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. ``get_timeline_name`` Return the name of the context this fence belongs to. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. ``enable_signaling`` Enable software signaling of fence. For fence implementations that have the capability for hw->hw signaling, they can implement this op to enable the necessary interrupts, or insert commands into cmdstream, etc, to avoid these costly operations for the common case where only hw->hw synchronization is required. This is called in the first dma_fence_wait() or dma_fence_add_callback() path to let the fence implementation know that there is another driver waiting on the signal (ie. hw->sw case). This is called with irq's disabled, so only spinlocks which disable IRQ's can be used in the code outside of this callback. A return value of false indicates the fence already passed, or some failure occurred that made it impossible to enable signaling. True indicates successful enabling. :c:type:`dma_fence.error ` may be set in enable_signaling, but only when false is returned. Since many implementations can call dma_fence_signal() even when before **enable_signaling** has been called there's a race window, where the dma_fence_signal() might result in the final fence reference being released and its memory freed. To avoid this, implementations of this callback should grab their own reference using dma_fence_get(), to be released when the fence is signalled (through e.g. the interrupt handler). This callback is optional. If this callback is not present, then the driver must always have signaling enabled. ``signaled`` Peek whether the fence is signaled, as a fastpath optimization for e.g. dma_fence_wait() or dma_fence_add_callback(). Note that this callback does not need to make any guarantees beyond that a fence once indicates as signalled must always return true from this callback. This callback may return false even if the fence has completed already, in this case information hasn't propogated throug the system yet. See also dma_fence_is_signaled(). May set :c:type:`dma_fence.error ` if returning true. This callback is optional. ``wait`` Custom wait implementation, defaults to dma_fence_default_wait() if not set. Deprecated and should not be used by new implementations. Only used by existing implementations which need special handling for their hardware reset procedure. Must return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that. Implementing this callback prevents the fence from detaching after signaling and so it is necessary for the module providing the dma_fence_ops to stay loaded as long as the dma_fence exists. ``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. Implementing this callback prevents the fence from detaching after signaling and so it is necessary for the module providing the dma_fence_ops to stay loaded as long as the dma_fence exists. If the callback is implemented the memory backing the dma_fence object must be freed RCU safe. ``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](jr )}(h**Definition**h]h Definition}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj?ubh:}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj;ubj)}(hXstruct dma_fence_ops { const char * (*get_driver_name)(struct dma_fence *fence); const char * (*get_timeline_name)(struct dma_fence *fence); bool (*enable_signaling)(struct dma_fence *fence); bool (*signaled)(struct dma_fence *fence); signed long (*wait)(struct dma_fence *fence, bool intr, signed long timeout); void (*release)(struct dma_fence *fence); void (*set_deadline)(struct dma_fence *fence, ktime_t deadline); };h]hXstruct dma_fence_ops { const char * (*get_driver_name)(struct dma_fence *fence); const char * (*get_timeline_name)(struct dma_fence *fence); bool (*enable_signaling)(struct dma_fence *fence); bool (*signaled)(struct dma_fence *fence); signed long (*wait)(struct dma_fence *fence, bool intr, signed long timeout); void (*release)(struct dma_fence *fence); void (*set_deadline)(struct dma_fence *fence, ktime_t deadline); };}hj\sbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj;ubh)}(h **Members**h]jr )}(hjmh]hMembers}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjkubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj;ubj )}(hhh](j )}(h``get_driver_name`` Returns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. h](j )}(h``get_driver_name``h]j)}(hjh]hget_driver_name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubj )}(hhh](h)}(hReturns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort.h]hReturns the driver name. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubh)}(hThis callback is mandatory.h]hThis callback is mandatory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(hX``get_timeline_name`` Return the name of the context this fence belongs to. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort. This callback is mandatory. h](j )}(h``get_timeline_name``h]j)}(hjh]hget_timeline_name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubj )}(hhh](h)}(hReturn the name of the context this fence belongs to. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort.h]hReturn the name of the context this fence belongs to. This is a callback to allow drivers to compute the name at runtime, without having it to store permanently for each fence, or build a cache of some sort.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubh)}(hThis callback is mandatory.h]hThis callback is mandatory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(hX``enable_signaling`` Enable software signaling of fence. For fence implementations that have the capability for hw->hw signaling, they can implement this op to enable the necessary interrupts, or insert commands into cmdstream, etc, to avoid these costly operations for the common case where only hw->hw synchronization is required. This is called in the first dma_fence_wait() or dma_fence_add_callback() path to let the fence implementation know that there is another driver waiting on the signal (ie. hw->sw case). This is called with irq's disabled, so only spinlocks which disable IRQ's can be used in the code outside of this callback. A return value of false indicates the fence already passed, or some failure occurred that made it impossible to enable signaling. True indicates successful enabling. :c:type:`dma_fence.error ` may be set in enable_signaling, but only when false is returned. Since many implementations can call dma_fence_signal() even when before **enable_signaling** has been called there's a race window, where the dma_fence_signal() might result in the final fence reference being released and its memory freed. To avoid this, implementations of this callback should grab their own reference using dma_fence_get(), to be released when the fence is signalled (through e.g. the interrupt handler). This callback is optional. If this callback is not present, then the driver must always have signaling enabled. h](j )}(h``enable_signaling``h]j)}(hjh]henable_signaling}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubj )}(hhh](h)}(h#Enable software signaling of fence.h]h#Enable software signaling of fence.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj2ubh)}(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).}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj2ubh)}(h{This is called with irq's disabled, so only spinlocks which disable IRQ's can be used in the code outside of this callback.h]hThis is called with irq’s disabled, so only spinlocks which disable IRQ’s can be used in the code outside of this callback.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj2ubh)}(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.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj2ubh)}(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)}(hjwh]hdma_fence.error}(hjyhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjqubhA may be set in enable_signaling, but only when false is returned.}(hjqhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhj2ubh)}(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 }(hjhhhNhNubjr )}(h**enable_signaling**h]henable_signaling}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubhXM has been called there’s a race window, where the dma_fence_signal() might result in the final fence reference being released and its memory freed. To avoid this, implementations of this callback should grab their own reference using dma_fence_get(), to be released when the fence is signalled (through e.g. the interrupt handler).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.h%hKhj2ubh)}(hoThis callback is optional. If this callback is not present, then the driver must always have signaling enabled.h]hoThis callback is optional. If this callback is not present, then the driver must always have signaling enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj2ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj1hKhjubj )}(hX&``signaled`` Peek whether the fence is signaled, as a fastpath optimization for e.g. dma_fence_wait() or dma_fence_add_callback(). Note that this callback does not need to make any guarantees beyond that a fence once indicates as signalled must always return true from this callback. This callback may return false even if the fence has completed already, in this case information hasn't propogated throug the system yet. See also dma_fence_is_signaled(). May set :c:type:`dma_fence.error ` if returning true. This callback is optional. h](j )}(h ``signaled``h]j)}(hjh]hsignaled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubj )}(hhh](h)}(hXPeek whether the fence is signaled, as a fastpath optimization for e.g. dma_fence_wait() or dma_fence_add_callback(). Note that this callback does not need to make any guarantees beyond that a fence once indicates as signalled must always return true from this callback. This callback may return false even if the fence has completed already, in this case information hasn't propogated throug the system yet. See also dma_fence_is_signaled().h]hXPeek whether the fence is signaled, as a fastpath optimization for e.g. dma_fence_wait() or dma_fence_add_callback(). Note that this callback does not need to make any guarantees beyond that a fence once indicates as signalled must always return true from this callback. This callback may return false even if the fence has completed already, in this case information hasn’t propogated throug the system yet. See also dma_fence_is_signaled().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubh)}(h@May set :c:type:`dma_fence.error ` if returning true.h](hMay set }(hj hhhNhNubh)}(h%:c:type:`dma_fence.error `h]j)}(hjh]hdma_fence.error}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhj ubh if returning true.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj0hKhjubh)}(hThis callback is optional.h]hThis callback is optional.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(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. Implementing this callback prevents the fence from detaching after signaling and so it is necessary for the module providing the dma_fence_ops to stay loaded as long as the dma_fence exists. h](j )}(h``wait``h]j)}(hj[h]hwait}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjUubj )}(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.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjqubh)}(hDeprecated and should not be used by new implementations. Only used by existing implementations which need special handling for their hardware reset procedure.h]hDeprecated and should not be used by new implementations. Only used by existing implementations which need special handling for their hardware reset procedure.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjqubh)}(hXDMust return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that.h]hXDMust return -ERESTARTSYS if the wait is intr = true and the wait was interrupted, and remaining jiffies if fence has signaled, or 0 if wait timed out. Can also return other error values on custom implementations, which should be treated as if the fence is signaled. For example a hardware lockup could be reported like that.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjqubh)}(hImplementing this callback prevents the fence from detaching after signaling and so it is necessary for the module providing the dma_fence_ops to stay loaded as long as the dma_fence exists.h]hImplementing this callback prevents the fence from detaching after signaling and so it is necessary for the module providing the dma_fence_ops to stay loaded as long as the dma_fence exists.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjqubeh}(h]h ]h"]h$]h&]uh1j hjUubeh}(h]h ]h"]h$]h&]uh1j hjphKhjubj )}(hX``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. Implementing this callback prevents the fence from detaching after signaling and so it is necessary for the module providing the dma_fence_ops to stay loaded as long as the dma_fence exists. If the callback is implemented the memory backing the dma_fence object must be freed RCU safe. h](j )}(h ``release``h]j)}(hjh]hrelease}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubj )}(hhh](h)}(hCalled on destruction of fence to release additional resources. Can be called from irq context. This callback is optional. If it is NULL, then dma_fence_free() is instead called as the default implementation.h]hCalled on destruction of fence to release additional resources. Can be called from irq context. This callback is optional. If it is NULL, then dma_fence_free() is instead called as the default implementation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubh)}(hImplementing this callback prevents the fence from detaching after signaling and so it is necessary for the module providing the dma_fence_ops to stay loaded as long as the dma_fence exists.h]hImplementing this callback prevents the fence from detaching after signaling and so it is necessary for the module providing the dma_fence_ops to stay loaded as long as the dma_fence exists.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubh)}(h^If the callback is implemented the memory backing the dma_fence object must be freed RCU safe.h]h^If the callback is implemented the memory backing the dma_fence object must be freed RCU safe.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(hX``set_deadline`` Callback to allow a fence waiter to inform the fence signaler of an upcoming deadline, such as vblank, by which point the waiter would prefer the fence to be signaled by. This is intended to give feedback to the fence signaler to aid in power management decisions, such as boosting GPU frequency. This is called without :c:type:`dma_fence.lock ` held, it can be called multiple times and from any context. Locking is up to the callee if it has some state to manage. If multiple deadlines are set, the expectation is to track the soonest one. If the deadline is before the current time, it should be interpreted as an immediate deadline. This callback is optional.h](j )}(h``set_deadline``h]j)}(hjh]h set_deadline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM hjubj )}(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.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj0ubh)}(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 }(hjBhhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjLh]hdma_fence.lock}(hjNhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjBubhX& 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.}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjihMhj0ubh)}(hThis callback is optional.h]hThis callback is optional.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM hj0ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj/hM hjubeh}(h]h ]h"]h$]h&]uh1j hj;ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&dma_fence_was_initialized (C function)c.dma_fence_was_initializedhNtauh1jhjhhhNhNubj)}(hhh](j)}(h8bool dma_fence_was_initialized (struct dma_fence *fence)h]j)}(h7bool dma_fence_was_initialized(struct dma_fence *fence)h](jM)}(hjk3h]hbool}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(hdma_fence_was_initializedh]j )}(hdma_fence_was_initializedh]hdma_fence_was_initialized}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_was_initializedasbuh1hhjubj)}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hj=hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjJhhhNhNubah}(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&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(htest if fence was initializedh]htest if fence was initialized}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjqhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(h**Parameters** ``struct dma_fence *fence`` fence to test **Return** True if fence was ever initialized, false otherwise. Works correctly only when memory backing the fence structure is zero initialized on allocation.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM"hjubj )}(hhh]j )}(h*``struct dma_fence *fence`` fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h fence to testh]h fence to test}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h **Return**h]jr )}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM!hjubh)}(hTrue if fence was ever initialized, false otherwise. Works correctly only when memory backing the fence structure is zero initialized on allocation.h]hTrue if fence was ever initialized, false otherwise. Works correctly only when memory backing the fence structure is zero initialized on allocation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM!hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_put (C function)c.dma_fence_puthNtauh1jhjhhhNhNubj)}(hhh](j)}(h,void dma_fence_put (struct dma_fence *fence)h]j)}(h+void dma_fence_put(struct dma_fence *fence)h](jM)}(hvoidh]hvoid}(hj5hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj1hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM+ubj)}(h h]h }(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj1hhhjChM+ubj )}(h dma_fence_puth]j )}(h dma_fence_puth]h dma_fence_put}(hjVhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjRubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj1hhhjChM+ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjnubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjXsbc.dma_fence_putasbuh1hhjnubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjnubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjnubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjnubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjjubah}(h]h ]h"]h$]h&]jjuh1jhj1hhhjChM+ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj-hhhjChM+ubah}(h]j(ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjChM+hj*hhubjA )}(hhh]h)}(hdecreases refcount of the fenceh]hdecreases refcount of the fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM+hjhhubah}(h]h ]h"]h$]h&]uh1j@ hj*hhhjChM+ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j jc j jd je jf uh1jhhhjhNhNubjh )}(hI**Parameters** ``struct dma_fence *fence`` fence to reduce refcount ofh](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM/hjubj )}(hhh]j )}(h7``struct dma_fence *fence`` fence to reduce refcount ofh](j )}(h``struct dma_fence *fence``h]j)}(hj6h]hstruct dma_fence *fence}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM1hj0ubj )}(hhh]h)}(hfence to reduce refcount ofh]hfence to reduce refcount of}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM,hjLubah}(h]h ]h"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]uh1j hjKhM1hj-ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_get (C function)c.dma_fence_gethNtauh1jhjhhhNhNubj)}(hhh](j)}(h:struct dma_fence * dma_fence_get (struct dma_fence *fence)h]j)}(h8struct dma_fence *dma_fence_get(struct dma_fence *fence)h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM5ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhM5ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jG dma_fence_getsbc.dma_fence_getasbuh1hhjhhhjhM5ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhM5ubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjhhhjhM5ubj )}(h dma_fence_geth]j )}(hjh]h dma_fence_get}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhM5ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj*modnameN classnameNjj)}j]jc.dma_fence_getasbuh1hhjubj)}(h h]h }(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjThhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM5ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhM5ubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhM5hjhhubjA )}(hhh]h)}(hincreases refcount of the fenceh]hincreases refcount of the fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM5hjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhM5ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM9hjubj )}(hhh]j )}(h:``struct dma_fence *fence`` fence to increase refcount of h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM6hjubj )}(hhh]h)}(hfence to increase refcount ofh]hfence to increase refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM6hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM6hjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM8hjubh)}(h5Returns the same fence, with refcount increased by 1.h]h5Returns the same fence, with refcount increased by 1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM7hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_get_rcu (C function)c.dma_fence_get_rcuhNtauh1jhjhhhNhNubj)}(hhh](j)}(h>struct dma_fence * dma_fence_get_rcu (struct dma_fence *fence)h]j)}(h )j? huh1jhjYhMBhjAhhubjA )}(hhh]h)}(h3get a fence from a dma_resv_list with rcu read lockh]h3get a fence from a dma_resv_list with rcu read lock}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMBhjDhhubah}(h]h ]h"]h$]h&]uh1j@ hjAhhhjYhMBubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j_jc j_jd je jf uh1jhhhjhNhNubjh )}(h**Parameters** ``struct dma_fence *fence`` fence to increase refcount of **Description** Function returns NULL if no refcount could be obtained, or the fence.h](h)}(h**Parameters**h]jr )}(hjih]h Parameters}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjgubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMFhjcubj )}(hhh]j )}(h:``struct dma_fence *fence`` fence to increase refcount of h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMDhjubj )}(hhh]h)}(hfence to increase refcount ofh]hfence to increase refcount of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMDhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMDhjubah}(h]h ]h"]h$]h&]uh1j hjcubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMFhjcubh)}(hEFunction returns NULL if no refcount could be obtained, or the fence.h]hEFunction returns NULL if no refcount could be obtained, or the fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMEhjcubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_fence_get_rcu_safe (C function)c.dma_fence_get_rcu_safehNtauh1jhjhhhNhNubj)}(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)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMQubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMQubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj)modnameN classnameNjj)}j]jO)}jGdma_fence_get_rcu_safesbc.dma_fence_get_rcu_safeasbuh1hhjhhhjhMQubj)}(h h]h }(hjHhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMQubjd)}(hjgh]h*}(hjVhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjhhhjhMQubj )}(hdma_fence_get_rcu_safeh]j )}(hjEh]hdma_fence_get_rcu_safe}(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMQubj)}(h!(struct dma_fence __rcu **fencep)h]j)}(hstruct dma_fence __rcu **fenceph](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj~ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jCc.dma_fence_get_rcu_safeasbuh1hhj~ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj~ubh__rcu}(hj~hhhNhNubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj~ubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj~ubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj~ubj )}(hfenceph]hfencep}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjzubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMQubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMQubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMQhjhhubjA )}(hhh]h)}(h+acquire a reference to an RCU tracked fenceh]h+acquire a reference to an RCU tracked fence}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMQhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMQubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j:jc j:jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjDh]h Parameters}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjBubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMUhj>ubj )}(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)}(hjch]hstruct dma_fence __rcu **fencep}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMRhj]ubj )}(hhh]h)}(h(pointer to fence to increase refcount ofh]h(pointer to fence to increase refcount of}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhMRhjyubah}(h]h ]h"]h$]h&]uh1j hj]ubeh}(h]h ]h"]h$]h&]uh1j hjxhMRhjZubah}(h]h ]h"]h$]h&]uh1j hj>ubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMThj>ubh)}(hXFunction returns NULL if no refcount could be obtained, or the fence. This function handles acquiring a reference to a fence that may be reallocated within the RCU grace period (such as with SLAB_TYPESAFE_BY_RCU), so long as the caller is using RCU on the pointer to the fence.h]hXFunction returns NULL if no refcount could be obtained, or the fence. This function handles acquiring a reference to a fence that may be reallocated within the RCU grace period (such as with SLAB_TYPESAFE_BY_RCU), so long as the caller is using RCU on the pointer to the fence.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMShj>ubh)}(hAn alternative mechanism is to employ a seqlock to protect a bunch of fences, such as used by struct dma_resv. When using a seqlock, the seqlock must be taken before and checked after a reference to the fence is acquired (as shown here).h]hAn alternative mechanism is to employ a seqlock to protect a bunch of fences, such as used by struct dma_resv. When using a seqlock, the seqlock must be taken before and checked after a reference to the fence is acquired (as shown here).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMXhj>ubh)}(h1The caller is required to hold the RCU read lock.h]h1The caller is required to hold the RCU read lock.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM]hj>ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_spinlock (C function)c.dma_fence_spinlockhNtauh1jhjhhhNhNubj)}(hhh](j)}(h9spinlock_t * dma_fence_spinlock (struct dma_fence *fence)h]j)}(h7spinlock_t *dma_fence_spinlock(struct dma_fence *fence)h](h)}(hhh]j )}(h spinlock_th]h spinlock_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGdma_fence_spinlocksbc.dma_fence_spinlockasbuh1hhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhj%hMubjd)}(hjgh]h*}(hj4hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjhhhj%hMubj )}(hdma_fence_spinlockh]j )}(hj"h]hdma_fence_spinlock}(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjAubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhj%hMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubj)}(h h]h }(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj\ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj{ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]j c.dma_fence_spinlockasbuh1hhj\ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj\ubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj\ubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj\ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjXubah}(h]h ]h"]h$]h&]jjuh1jhjhhhj%hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhj%hMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj%hMhjhhubjA )}(hhh]h)}(h3return pointer to the spinlock protecting the fenceh]h3return pointer to the spinlock protecting the fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhj%hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(h**Parameters** ``struct dma_fence *fence`` the fence to get the lock from **Description** Return either the pointer to the embedded or the external spin lock.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h;``struct dma_fence *fence`` the fence to get the lock from h](j )}(h``struct dma_fence *fence``h]j)}(hj"h]hstruct dma_fence *fence}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe fence to get the lock fromh]hthe fence to get the lock from}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMhj8ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj7hMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj]h]h Description}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj[ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubh)}(hDReturn either the pointer to the embedded or the external spin lock.h]hDReturn either the pointer to the embedded or the external spin lock.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_lock_irqsave (C macro)c.dma_fence_lock_irqsavehNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_fence_lock_irqsaveh]j)}(hdma_fence_lock_irqsaveh]j )}(hdma_fence_lock_irqsaveh]j )}(hjh]hdma_fence_lock_irqsave}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubah}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jmacroeh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubh)}(h)``dma_fence_lock_irqsave (fence, flags)``h]j)}(hjh]h%dma_fence_lock_irqsave (fence, flags)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjhhubh)}(hirqsave lock the fence h]h)}(hirqsave lock the fenceh]hirqsave lock the fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubah}(h]h ]h"]h$]h&]uh1hhjhMhjhhubjh )}(h**Parameters** ``fence`` the fence to lock ``flags`` where to store the CPU flags. **Description** Lock the fence, preventing it from changing to the signaled state.h](h)}(h**Parameters**h]jr )}(hj h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh](j )}(h``fence`` the fence to lock h](j )}(h ``fence``h]j)}(hj,h]hfence}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj&ubj )}(hhh]h)}(hthe fence to lockh]hthe fence to lock}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMhjBubah}(h]h ]h"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]uh1j hjAhMhj#ubj )}(h(``flags`` where to store the CPU flags. h](j )}(h ``flags``h]j)}(hjeh]hflags}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj_ubj )}(hhh]h)}(hwhere to store the CPU flags.h]hwhere to store the CPU flags.}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhMhj{ubah}(h]h ]h"]h$]h&]uh1j hj_ubeh}(h]h ]h"]h$]h&]uh1j hjzhMhj#ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubh)}(hBLock the fence, preventing it from changing to the signaled state.h]hBLock the fence, preventing it from changing to the signaled state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%dma_fence_unlock_irqrestore (C macro)c.dma_fence_unlock_irqrestorehNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_fence_unlock_irqrestoreh]j)}(hdma_fence_unlock_irqrestoreh]j )}(hdma_fence_unlock_irqrestoreh]j )}(hjh]hdma_fence_unlock_irqrestore}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubah}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jmacroeh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubh)}(h.``dma_fence_unlock_irqrestore (fence, flags)``h]j)}(hjh]h*dma_fence_unlock_irqrestore (fence, flags)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjhhubh)}(h unlock the fence and irqrestore h]h)}(hunlock the fence and irqrestoreh]hunlock the fence and irqrestore}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj1ubah}(h]h ]h"]h$]h&]uh1hhjChMhjhhubjh )}(h**Parameters** ``fence`` the fence to unlock ``flags`` the CPU flags to restore **Description** Unlock the fence, allowing it to change its state to signaled again.h](h)}(h**Parameters**h]jr )}(hjPh]h Parameters}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjJubj )}(hhh](j )}(h``fence`` the fence to unlock h](j )}(h ``fence``h]j)}(hjoh]hfence}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjiubj )}(hhh]h)}(hthe fence to unlockh]hthe fence to unlock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjiubeh}(h]h ]h"]h$]h&]uh1j hjhMhjfubj )}(h#``flags`` the CPU flags to restore h](j )}(h ``flags``h]j)}(hjh]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe CPU flags to restoreh]hthe CPU flags to restore}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjfubeh}(h]h ]h"]h$]h&]uh1j hjJubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjJubh)}(hDUnlock the fence, allowing it to change its state to signaled again.h]hDUnlock the fence, allowing it to change its state to signaled again.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjJubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_assert_held (C macro)c.dma_fence_assert_heldhNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_fence_assert_heldh]j)}(hdma_fence_assert_heldh]j )}(hdma_fence_assert_heldh]j )}(hj"h]hdma_fence_assert_held}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj$hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubah}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj hhhj?hMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj?hMhjhhubjA )}(hhh]h}(h]h ]h"]h$]h&]uh1j@ hjhhhj?hMubeh}(h]h ](jmacroeh"]h$]h&]ja jjb jXjc jXjd je jf uh1jhhhjhNhNubh)}(h!``dma_fence_assert_held (fence)``h]j)}(hj^h]hdma_fence_assert_held (fence)}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjhhubh)}(h'lockdep assertion that fence is locked h]h)}(h&lockdep assertion that fence is lockedh]h&lockdep assertion that fence is locked}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjtubah}(h]h ]h"]h$]h&]uh1hhjhMhjhhubjh )}(h<**Parameters** ``fence`` the fence which should be lockedh](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h*``fence`` the fence which should be lockedh](j )}(h ``fence``h]j)}(hjh]hfence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h the fence which should be lockedh]h the fence which should be locked}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)dma_fence_is_signaled_locked (C function)c.dma_fence_is_signaled_lockedhNtauh1jhjhhhNhNubj)}(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](jM)}(hjk3h]hbool}(hj hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(hdma_fence_is_signaled_lockedh]j )}(hdma_fence_is_signaled_lockedh]hdma_fence_is_signaled_locked}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubj)}(h h]h }(hjUhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjDubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjhmodnameN classnameNjj)}j]jO)}jGj.sbc.dma_fence_is_signaled_lockedasbuh1hhjDubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjDubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjDubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj@ubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(h2Return an indication if the fence is signaled yet.h]h2Return an indication if the fence is signaled yet.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h/``struct dma_fence *fence`` the fence to check h](j )}(h``struct dma_fence *fence``h]j)}(hj h]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe fence to checkh]hthe fence to check}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hMhj"ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj!hMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjGh]h Description}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjEubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubh)}(hXReturns true if the fence was already signaled, false if not. Since this function doesn't enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven't been called before.h]hXReturns true if the fence was already signaled, false if not. Since this function doesn’t enable signaling, it is not guaranteed to ever return true if dma_fence_add_callback(), dma_fence_wait() or dma_fence_enable_sw_signaling() haven’t been called before.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubh)}(hGThis function requires :c:type:`dma_fence.lock ` to be held.h](hThis function requires }(hjlhhhNhNubh)}(h$:c:type:`dma_fence.lock `h]j)}(hjvh]hdma_fence.lock}(hjxhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj dma_fenceuh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjlubh to be held.}(hjlhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubh)}(h!See also dma_fence_is_signaled().h]h!See also dma_fence_is_signaled().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_fence_is_signaled (C function)c.dma_fence_is_signaledhNtauh1jhjhhhNhNubj)}(hhh](j)}(h4bool dma_fence_is_signaled (struct dma_fence *fence)h]j)}(h3bool dma_fence_is_signaled(struct dma_fence *fence)h](jM)}(hjk3h]hbool}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(hdma_fence_is_signaledh]j )}(hdma_fence_is_signaledh]hdma_fence_is_signaled}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj)modnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_is_signaledasbuh1hhjubj)}(h h]h }(hjGhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjUhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjbhhhNhNubah}(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&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(h2Return an indication if the fence is signaled yet.h]h2Return an indication if the fence is signaled yet.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h/``struct dma_fence *fence`` the fence to check h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe fence to checkh]hthe fence to check}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./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.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubh)}(h(See also dma_fence_is_signaled_locked().h]h(See also dma_fence_is_signaled_locked().}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!__dma_fence_is_later (C function)c.__dma_fence_is_laterhNtauh1jhjhhhNhNubj)}(hhh](j)}(hCbool __dma_fence_is_later (struct dma_fence *fence, u64 f1, u64 f2)h]j)}(hBbool __dma_fence_is_later(struct dma_fence *fence, u64 f1, u64 f2)h](jM)}(hjk3h]hbool}(hjkhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjghhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM7ubj)}(h h]h }(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjghhhjxhM7ubj )}(h__dma_fence_is_laterh]j )}(h__dma_fence_is_laterh]h__dma_fence_is_later}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjghhhjxhM7ubj)}(h)(struct dma_fence *fence, u64 f1, u64 f2)h](j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsbc.__dma_fence_is_laterasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hu64 f1h](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.__dma_fence_is_laterasbuh1hhjubj)}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(hf1h]hf1}(hjHhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hu64 f2h](h)}(hhh]j )}(hu64h]hu64}(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjaubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjfmodnameN classnameNjj)}j]jc.__dma_fence_is_laterasbuh1hhj]ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]ubj )}(hf2h]hf2}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjghhhjxhM7ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjchhhjxhM7ubah}(h]j^ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjxhM7hj`hhubjA )}(hhh]h)}(h-return if f1 is chronologically later than f2h]h-return if f1 is chronologically later than f2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM7hjhhubah}(h]h ]h"]h$]h&]uh1j@ hj`hhhjxhM7ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(hX[**Parameters** ``struct dma_fence *fence`` fence in whose context to do the comparison ``u64 f1`` the first fence's seqno ``u64 f2`` the second fence's seqno from the same context **Description** Returns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not common across contexts.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM;hjubj )}(hhh](j )}(hH``struct dma_fence *fence`` fence in whose context to do the comparison h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM8hjubj )}(hhh]h)}(h+fence in whose context to do the comparisonh]h+fence in whose context to do the comparison}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM8hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhM8hjubj )}(h#``u64 f1`` the first fence's seqno h](j )}(h ``u64 f1``h]j)}(hj4h]hu64 f1}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM9hj.ubj )}(hhh]h)}(hthe first fence's seqnoh]hthe first fence’s seqno}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhM9hjJubah}(h]h ]h"]h$]h&]uh1j hj.ubeh}(h]h ]h"]h$]h&]uh1j hjIhM9hjubj )}(h:``u64 f2`` the second fence's seqno from the same context h](j )}(h ``u64 f2``h]j)}(hjmh]hu64 f2}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM:hjgubj )}(hhh]h)}(h.the second fence's seqno from the same contexth]h0the second fence’s seqno from the same context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM:hjubah}(h]h ]h"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]uh1j hjhM:hjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM<hjubh)}(hReturns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not common across contexts.h]hReturns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not common across contexts.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM;hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_is_later (C function)c.dma_fence_is_laterhNtauh1jhjhhhNhNubj)}(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](jM)}(hjk3h]hbool}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMLubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMLubj )}(hdma_fence_is_laterh]j )}(hdma_fence_is_laterh]hdma_fence_is_later}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMLubj)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hstruct dma_fence *f1h](j)}(hjh]hstruct}(hj) hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj% ubj)}(h h]h }(hj6 hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj% ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjG hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjD ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjI modnameN classnameNjj)}j]jO)}jGj sbc.dma_fence_is_laterasbuh1hhj% ubj)}(h h]h }(hjg hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj% ubjd)}(hjgh]h*}(hju hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj% ubj )}(hf1h]hf1}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj% ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj! ubj)}(hstruct dma_fence *f2h](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj modnameN classnameNjj)}j]jc c.dma_fence_is_laterasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjd)}(hjgh]h*}(hj hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj ubj )}(hf2h]hf2}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj! ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMLubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMLubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMLhjhhubjA )}(hhh]h)}(h-return if f1 is chronologically later than f2h]h-return if f1 is chronologically later than f2}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMLhj hhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMLubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j4 jc j4 jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj> h]h Parameters}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj< ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMPhj8 ubj )}(hhh](j )}(h?``struct dma_fence *f1`` the first fence from the same context h](j )}(h``struct dma_fence *f1``h]j)}(hj] h]hstruct dma_fence *f1}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMMhjW ubj )}(hhh]h)}(h%the first fence from the same contexth]h%the first fence from the same context}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjr hMMhjs ubah}(h]h ]h"]h$]h&]uh1j hjW ubeh}(h]h ]h"]h$]h&]uh1j hjr hMMhjT ubj )}(h@``struct dma_fence *f2`` the second fence from the same context h](j )}(h``struct dma_fence *f2``h]j)}(hj h]hstruct dma_fence *f2}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMNhj ubj )}(hhh]h)}(h&the second fence from the same contexth]h&the second fence from the same context}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMNhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hMNhjT ubeh}(h]h ]h"]h$]h&]uh1j hj8 ubh)}(h**Description**h]jr )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMPhj8 ubh)}(hReturns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not re-used across contexts.h]hReturns true if f1 is chronologically later than f2. Both fences must be from the same context, since a seqno is not re-used across contexts.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMOhj8 ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_fence_is_later_or_same (C function)c.dma_fence_is_later_or_samehNtauh1jhjhhhNhNubj)}(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](jM)}(hjk3h]hbool}(hj hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM]ubj)}(h h]h }(hj$ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj hhhj# hM]ubj )}(hdma_fence_is_later_or_sameh]j )}(hdma_fence_is_later_or_sameh]hdma_fence_is_later_or_same}(hj6 hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2 ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj hhhj# hM]ubj)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hstruct dma_fence *f1h](j)}(hjh]hstruct}(hjR hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjN ubj)}(h h]h }(hj_ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjN ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjp hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjm ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjr modnameN classnameNjj)}j]jO)}jGj8 sbc.dma_fence_is_later_or_sameasbuh1hhjN ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjN ubjd)}(hjgh]h*}(hj hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjN ubj )}(hf1h]hf1}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjN ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjJ ubj)}(hstruct dma_fence *f2h](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj modnameN classnameNjj)}j]j c.dma_fence_is_later_or_sameasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjd)}(hjgh]h*}(hj hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj ubj )}(hf2h]hf2}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjJ ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj# hM]ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj hhhj# hM]ubah}(h]j ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj# hM]hj hhubjA )}(hhh]h)}(h(return true if f1 is later or same as f2h]h(return true if f1 is later or same as f2}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM]hjB hhubah}(h]h ]h"]h$]h&]uh1j@ hj hhhj# hM]ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j] jc j] jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjg h]h Parameters}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hje ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMahja ubj )}(hhh](j )}(h?``struct dma_fence *f1`` the first fence from the same context h](j )}(h``struct dma_fence *f1``h]j)}(hj h]hstruct dma_fence *f1}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM^hj ubj )}(hhh]h)}(h%the first fence from the same contexth]h%the first fence from the same context}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hM^hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hM^hj} ubj )}(h@``struct dma_fence *f2`` the second fence from the same context h](j )}(h``struct dma_fence *f2``h]j)}(hj h]hstruct dma_fence *f2}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM_hj ubj )}(hhh]h)}(h&the second fence from the same contexth]h&the second fence from the same context}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hM_hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hM_hj} ubeh}(h]h ]h"]h$]h&]uh1j hja ubh)}(h**Description**h]jr )}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMahja ubh)}(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.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM`hja ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_later (C function)c.dma_fence_laterhNtauh1jhjhhhNhNubj)}(hhh](j)}(hOstruct dma_fence * dma_fence_later (struct dma_fence *f1, struct dma_fence *f2)h]j)}(hMstruct dma_fence *dma_fence_later(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hjh]hstruct}(hj? hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj; hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMlubj)}(h h]h }(hjM hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj; hhhjL hMlubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj^ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj[ ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj` modnameN classnameNjj)}j]jO)}jGdma_fence_latersbc.dma_fence_laterasbuh1hhj; hhhjL hMlubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj; hhhjL hMlubjd)}(hjgh]h*}(hj hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj; hhhjL hMlubj )}(hdma_fence_laterh]j )}(hj| h]hdma_fence_later}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj; hhhjL hMlubj)}(h,(struct dma_fence *f1, struct dma_fence *f2)h](j)}(hstruct dma_fence *f1h](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj modnameN classnameNjj)}j]jz c.dma_fence_laterasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj ubj )}(hf1h]hf1}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hstruct dma_fence *f2h](j)}(hjh]hstruct}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(h h]h }(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj%ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjGhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjImodnameN classnameNjj)}j]jz c.dma_fence_laterasbuh1hhj%ubj)}(h h]h }(hjehhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj%ubjd)}(hjgh]h*}(hjshhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj%ubj )}(hf2h]hf2}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhj; hhhjL hMlubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj7 hhhjL hMlubah}(h]j2 ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjL hMlhj4 hhubjA )}(hhh]h)}(h&return the chronologically later fenceh]h&return the chronologically later fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMlhjhhubah}(h]h ]h"]h$]h&]uh1j@ hj4 hhhjL hMlubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMphjubj )}(hhh](j )}(h?``struct dma_fence *f1`` the first fence from the same context h](j )}(h``struct dma_fence *f1``h]j)}(hjh]hstruct dma_fence *f1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMmhjubj )}(hhh]h)}(h%the first fence from the same contexth]h%the first fence from the same context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMmhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMmhjubj )}(h@``struct dma_fence *f2`` the second fence from the same context h](j )}(h``struct dma_fence *f2``h]j)}(hj$h]hstruct dma_fence *f2}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMnhjubj )}(hhh]h)}(h&the second fence from the same contexth]h&the second fence from the same context}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMnhj:ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hj9hMnhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj_h]h Description}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj]ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMphjubh)}(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.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMohjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(dma_fence_get_status_locked (C function)c.dma_fence_get_status_lockedhNtauh1jhjhhhNhNubj)}(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](jM)}(hinth]hint}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(hdma_fence_get_status_lockedh]j )}(hdma_fence_get_status_lockedh]hdma_fence_get_status_locked}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_get_status_lockedasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hj-hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(h"returns the status upon completionh]h"returns the status upon completion}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjahhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j|jc j|jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h3``struct dma_fence *fence`` the dma_fence to query h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe dma_fence to queryh]hthe dma_fence to query}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubh)}(hXTDrivers can supply an optional error status condition before they signal the fence (to indicate whether the fence was completed due to an error rather than success). The value of the status condition is only valid if the fence has been signaled, dma_fence_get_status_locked() first checks the signal state before reporting the error status.h]hXTDrivers can supply an optional error status condition before they signal the fence (to indicate whether the fence was completed due to an error rather than success). The value of the status condition is only valid if the fence has been signaled, dma_fence_get_status_locked() first checks the signal state before reporting the error status.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubh)}(hReturns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.h]hReturns 0 if the fence has not yet been signaled, 1 if the fence has been signaled without an error condition, or a negative error code if the fence has been completed in err.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_set_error (C function)c.dma_fence_set_errorhNtauh1jhjhhhNhNubj)}(hhh](j)}(h=void dma_fence_set_error (struct dma_fence *fence, int error)h]j)}(h )j? huh1jhjBhMhj)hhubjA )}(hhh]h)}(h$flag an error condition on the fenceh]h$flag an error condition on the fence}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj&hhubah}(h]h ]h"]h$]h&]uh1j@ hj)hhhjBhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jAjc jAjd je jf uh1jhhhjhNhNubjh )}(hX**Parameters** ``struct dma_fence *fence`` the dma_fence ``int error`` the error to store **Description** Drivers can supply an optional error status condition before they signal the fence, to indicate that the fence was completed due to an error rather than success. This must be set before signaling (so that the value is visible before any waiters on the signal callback are woken). This helper exists to help catching erroneous setting of #dma_fence.error. Examples of error codes which drivers should use: * ``-ENODATA`` This operation produced no data, no other operation affected. * ``-ECANCELED`` All operations from the same context have been canceled. * ``-ETIME`` Operation caused a timeout and potentially device reset.h](h)}(h**Parameters**h]jr )}(hjKh]h Parameters}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjIubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjEubj )}(hhh](j )}(h*``struct dma_fence *fence`` the dma_fence h](j )}(h``struct dma_fence *fence``h]j)}(hjjh]hstruct dma_fence *fence}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjdubj )}(hhh]h)}(h the dma_fenceh]h the dma_fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjdubeh}(h]h ]h"]h$]h&]uh1j hjhMhjaubj )}(h!``int error`` the error to store h](j )}(h ``int error``h]j)}(hjh]h int error}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe error to storeh]hthe error to store}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjaubeh}(h]h ]h"]h$]h&]uh1j hjEubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjEubh)}(hXbDrivers can supply an optional error status condition before they signal the fence, to indicate that the fence was completed due to an error rather than success. This must be set before signaling (so that the value is visible before any waiters on the signal callback are woken). This helper exists to help catching erroneous setting of #dma_fence.error.h]hXbDrivers can supply an optional error status condition before they signal the fence, to indicate that the fence was completed due to an error rather than success. This must be set before signaling (so that the value is visible before any waiters on the signal callback are woken). This helper exists to help catching erroneous setting of #dma_fence.error.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjEubh)}(h1Examples of error codes which drivers should use:h]h1Examples of error codes which drivers should use:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjEubh)}(hhh](j)}(hL``-ENODATA`` This operation produced no data, no other operation affected.h]h)}(hjh](j)}(h ``-ENODATA``h]h-ENODATA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh@ This operation produced no data, no other operation affected.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hG``-ECANCELED`` All operations from the same context have been canceled.h]h)}(hj=h](j)}(h``-ECANCELED``h]h -ECANCELED}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh9 All operations from the same context have been canceled.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj;ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hG``-ETIME`` Operation caused a timeout and potentially device reset.h]h)}(hjch](j)}(h ``-ETIME``h]h-ETIME}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubh= Operation caused a timeout and potentially device reset.}(hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjaubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jRjguh1hhj4hMhjEubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_timestamp (C function)c.dma_fence_timestamphNtauh1jhjhhhNhNubj)}(hhh](j)}(h5ktime_t dma_fence_timestamp (struct dma_fence *fence)h]j)}(h4ktime_t dma_fence_timestamp(struct dma_fence *fence)h](h)}(hhh]j )}(hktime_th]hktime_t}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGdma_fence_timestampsbc.dma_fence_timestampasbuh1hhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(hdma_fence_timestamph]j )}(hjh]hdma_fence_timestamp}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.dma_fence_timestampasbuh1hhjubj)}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjIhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjVhhhNhNubah}(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&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(h1helper to get the completion timestamp of a fenceh]h1helper to get the completion timestamp of a fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj}hhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h=``struct dma_fence *fence`` fence to get the timestamp from. h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h fence to get the timestamp from.h]h fence to get the timestamp from.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_wait (C function)c.dma_fence_waithNtauh1jhjhhhNhNubj)}(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](jM)}(hsignedh]hsigned}(hjAhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj=hhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjPhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj=hhhjOhMubjM)}(hlongh]hlong}(hj^hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj=hhhjOhMubj)}(h h]h }(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj=hhhjOhMubj )}(hdma_fence_waith]j )}(hdma_fence_waith]hdma_fence_wait}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjzubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj=hhhjOhMubj)}(h$(struct dma_fence *fence, bool intr)h](j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_waitasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h bool intrh](jM)}(hjk3h]hbool}(hj hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(hintrh]hintr}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhj=hhhjOhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj9hhhjOhMubah}(h]j4ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjOhMhj6hhubjA )}(hhh]h)}(h#sleep until the fence gets signaledh]h#sleep until the fence gets signaled}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjNhhubah}(h]h ]h"]h$]h&]uh1j@ hj6hhhjOhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jijc jijd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjsh]h Parameters}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjqubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjmubj )}(hhh](j )}(h1``struct dma_fence *fence`` the fence to wait on h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe fence to wait onh]hthe fence to wait on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj )}(h0``bool intr`` if true, do an interruptible wait h](j )}(h ``bool intr``h]j)}(hjh]h bool intr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(h!if true, do an interruptible waith]h!if true, do an interruptible wait}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubeh}(h]h ]h"]h$]h&]uh1j hjmubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjmubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjmubh)}(hPerforms a synchronous wait on this fence. It is assumed the caller directly or indirectly holds a reference to the fence, otherwise the fence might be freed before return, resulting in undefined behavior.h]hPerforms a synchronous wait on this fence. It is assumed the caller directly or indirectly holds a reference to the fence, otherwise the fence might be freed before return, resulting in undefined behavior.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjmubh)}(hCSee also dma_fence_wait_timeout() and dma_fence_wait_any_timeout().h]hCSee also dma_fence_wait_timeout() and dma_fence_wait_any_timeout().}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjmubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_is_array (C function)c.dma_fence_is_arrayhNtauh1jhjhhhNhNubj)}(hhh](j)}(h1bool dma_fence_is_array (struct dma_fence *fence)h]j)}(h0bool dma_fence_is_array(struct dma_fence *fence)h](jM)}(hjk3h]hbool}(hjihhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjehhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjehhhjvhMubj )}(hdma_fence_is_arrayh]j )}(hdma_fence_is_arrayh]hdma_fence_is_array}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjehhhjvhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_is_arrayasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjehhhjvhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjahhhjvhMubah}(h]j\ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjvhMhj^hhubjA )}(hhh]h)}(h+check if a fence is from the array subclassh]h+check if a fence is from the array subclass}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhj%hhubah}(h]h ]h"]h$]h&]uh1j@ hj^hhhjvhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j@jc j@jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjJh]h Parameters}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjHubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjDubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hjih]hstruct dma_fence *fence}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjcubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hMhjubah}(h]h ]h"]h$]h&]uh1j hjcubeh}(h]h ]h"]h$]h&]uh1j hj~hMhj`ubah}(h]h ]h"]h$]h&]uh1j hjDubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjDubh)}(h;Return true if it is a dma_fence_array and false otherwise.h]h;Return true if it is a dma_fence_array and false otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjDubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_is_chain (C function)c.dma_fence_is_chainhNtauh1jhjhhhNhNubj)}(hhh](j)}(h1bool dma_fence_is_chain (struct dma_fence *fence)h]j)}(h0bool dma_fence_is_chain(struct dma_fence *fence)h](jM)}(hjk3h]hbool}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhMubj )}(hdma_fence_is_chainh]j )}(hdma_fence_is_chainh]hdma_fence_is_chain}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhMubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj)}(h h]h }(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj!ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjEmodnameN classnameNjj)}j]jO)}jGj sbc.dma_fence_is_chainasbuh1hhj!ubj)}(h h]h }(hjchhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj!ubjd)}(hjgh]h*}(hjqhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj!ubj )}(hfenceh]hfence}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhMubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhMhjhhubjA )}(hhh]h)}(h+check if a fence is from the chain subclassh]h+check if a fence is from the chain subclass}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hjh]hstruct dma_fence *fence}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj$h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj"ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubh)}(h;Return true if it is a dma_fence_chain and false otherwise.h]h;Return true if it is a dma_fence_chain and false otherwise.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_fence_is_container (C function)c.dma_fence_is_containerhNtauh1jhjhhhNhNubj)}(hhh](j)}(h5bool dma_fence_is_container (struct dma_fence *fence)h]j)}(h4bool dma_fence_is_container(struct dma_fence *fence)h](jM)}(hjk3h]hbool}(hjihhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjehhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM ubj)}(h h]h }(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjehhhjvhM ubj )}(hdma_fence_is_containerh]j )}(hdma_fence_is_containerh]hdma_fence_is_container}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjehhhjvhM ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_is_containerasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(hfenceh]hfence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjehhhjvhM ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjahhhjvhM ubah}(h]j\ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjvhM hj^hhubjA )}(hhh]h)}(h0check if a fence is a container for other fencesh]h0check if a fence is a container for other fences}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhM hj%hhubah}(h]h ]h"]h$]h&]uh1j@ hj^hhhjvhM ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j@jc j@jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hjJh]h Parameters}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjHubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjDubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hjih]hstruct dma_fence *fence}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjcubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hMhjubah}(h]h ]h"]h$]h&]uh1j hjcubeh}(h]h ]h"]h$]h&]uh1j hj~hMhj`ubah}(h]h ]h"]h$]h&]uh1j hjDubh)}(h**Description**h]jr )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjDubh)}(hReturn true if this fence is a container for other fences, false otherwise. This is important since we can't build up large fence structure or otherwise we run into recursion during operation on those fences.h]hReturn true if this fence is a container for other fences, false otherwise. This is important since we can’t build up large fence structure or otherwise we run into recursion during operation on those fences.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:190: ./include/linux/dma-fence.hhMhjDubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubeh}(h]dma-fences-functions-referenceah ]h"]dma fences functions referenceah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fence Arrayh]hDMA Fence Array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_fence_array_alloc (C function)c.dma_fence_array_allochNtauh1jhjhhhNhNubj)}(hhh](j)}(h?struct dma_fence_array * dma_fence_array_alloc (int num_fences)h]j)}(h=struct dma_fence_array *dma_fence_array_alloc(int num_fences)h](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj#modnameN classnameNjj)}j]jO)}jGdma_fence_array_allocsbc.dma_fence_array_allocasbuh1hhjhhhjhKubj)}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKubjd)}(hjgh]h*}(hjPhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjhhhjhKubj )}(hdma_fence_array_alloch]j )}(hj?h]hdma_fence_array_alloc}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhKubj)}(h(int num_fences)h]j)}(hint num_fencesh](jM)}(hinth]hint}(hj|hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjxubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjxubj )}(h num_fencesh]h num_fences}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjxubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjtubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjhhhjhKubah}(h]jah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhKhjhhubjA )}(hhh]h)}(hAllocate a custom fence arrayh]hAllocate a custom fence array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(h**Parameters** ``int num_fences`` [in] number of fences to add in the array **Description** Return dma fence array on success, NULL on failureh](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]j )}(h@``int num_fences`` [in] number of fences to add in the array h](j )}(h``int num_fences``h]j)}(hjh]hint num_fences}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h,[in] number of fences to add in the arrayh]h,[in] number of fences to add in the array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj>h]h Description}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj<ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjubh)}(h2Return dma fence array on success, NULL on failureh]h2Return dma fence array on success, NULL on failure}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_fence_array_init (C function)c.dma_fence_array_inithNtauh1jhjhhhNhNubj)}(hhh](j)}(hvoid dma_fence_array_init (struct dma_fence_array *array, int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h]j)}(hvoid dma_fence_array_init(struct dma_fence_array *array, int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](jM)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjhhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKubj )}(hdma_fence_array_inith]j )}(hdma_fence_array_inith]hdma_fence_array_init}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjhhhjhKubj)}(h{(struct dma_fence_array *array, int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](j)}(hstruct dma_fence_array *arrayh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jO)}jGjsbc.dma_fence_array_initasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjd)}(hjgh]h*}(hj hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjubj )}(harrayh]harray}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hint num_fencesh](jM)}(hinth]hint}(hj2hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj.ubj)}(h h]h }(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj.ubj )}(h num_fencesh]h num_fences}(hjNhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct dma_fence **fencesh](j)}(hjh]hstruct}(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubj)}(h h]h }(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjcubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.dma_fence_array_initasbuh1hhjcubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjcubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjcubjd)}(hjgh]h*}(hjhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjcubj )}(hfencesh]hfences}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjcubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjmodnameN classnameNjj)}j]jc.dma_fence_array_initasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj )}(hcontexth]hcontext}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned seqnoh](jM)}(hunsignedh]hunsigned}(hj,hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj(ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj(ubj )}(hseqnoh]hseqno}(hjHhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hbool signal_on_anyh](jM)}(hjk3h]hbool}(hjahhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj]ubj)}(h h]h }(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]ubj )}(h signal_on_anyh]h signal_on_any}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj{hhhjhKubah}(h]jvah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjhKhjxhhubjA )}(hhh]h)}(hInit a custom fence arrayh]hInit a custom fence array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjhhubah}(h]h ]h"]h$]h&]uh1j@ hjxhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jjc jjd je jf uh1jhhhjhNhNubjh )}(hX2**Parameters** ``struct dma_fence_array *array`` [in] dma fence array to arm ``int num_fences`` [in] number of fences to add in the array ``struct dma_fence **fences`` [in] array containing the fences ``u64 context`` [in] fence context to use ``unsigned seqno`` [in] sequence number to use ``bool signal_on_any`` [in] signal on any fence in the array **Description** Implementation of **dma_fence_array_create** without allocation. Useful to init a preallocated dma fence array in the path of reclaim or dma fence signaling.h](h)}(h**Parameters**h]jr )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh](j )}(hA``struct dma_fence_array *array`` [in] dma fence array to arm h](j )}(h!``struct dma_fence_array *array``h]j)}(hjh]hstruct dma_fence_array *array}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjubj )}(hhh]h)}(h[in] dma fence array to armh]h[in] dma fence array to arm}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj )}(h@``int num_fences`` [in] number of fences to add in the array h](j )}(h``int num_fences``h]j)}(hj h]hint num_fences}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./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}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5 hKhj6 ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj5 hKhjubj )}(hB``struct dma_fence **fences`` [in] array containing the fences h](j )}(h``struct dma_fence **fences``h]j)}(hjY h]hstruct dma_fence **fences}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjW ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjS ubj )}(hhh]h)}(h#[in] array containing the fencesh]h#[in] array containing the fences}(hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjn hKhjo ubah}(h]h ]h"]h$]h&]uh1j hjS ubeh}(h]h ]h"]h$]h&]uh1j hjn hKhjubj )}(h-``u64 context`` [in] fence context to use h](j )}(h``u64 context``h]j)}(hj h]h u64 context}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj ubj )}(hhh]h)}(h[in] fence context to useh]h[in] fence context to use}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKhjubj )}(h2``unsigned seqno`` [in] sequence number to use h](j )}(h``unsigned seqno``h]j)}(hj h]hunsigned seqno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj ubj )}(hhh]h)}(h[in] sequence number to useh]h[in] sequence number to use}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKhjubj )}(h@``bool signal_on_any`` [in] signal on any fence in the array h](j )}(h``bool signal_on_any``h]j)}(hj!h]hbool signal_on_any}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj ubj )}(hhh]h)}(h([in] signal on any fence in the arrayh]h([in] signal on any fence in the array}(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!hKhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]jr )}(hj?!h]h Description}(hjA!hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj=!ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjubh)}(hImplementation of **dma_fence_array_create** without allocation. Useful to init a preallocated dma fence array in the path of reclaim or dma fence signaling.h](hImplementation of }(hjU!hhhNhNubjr )}(h**dma_fence_array_create**h]hdma_fence_array_create}(hj]!hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjU!ubhq without allocation. Useful to init a preallocated dma fence array in the path of reclaim or dma fence signaling.}(hjU!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_fence_array_create (C function)c.dma_fence_array_createhNtauh1jhjhhhNhNubj)}(hhh](j)}(hstruct dma_fence_array * dma_fence_array_create (int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h]j)}(hstruct dma_fence_array *dma_fence_array_create(int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](j)}(hjh]hstruct}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKubj)}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj!hhhj!hKubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj!modnameN classnameNjj)}j]jO)}jGdma_fence_array_createsbc.dma_fence_array_createasbuh1hhj!hhhj!hKubj)}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj!hhhj!hKubjd)}(hjgh]h*}(hj!hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj!hhhj!hKubj )}(hdma_fence_array_createh]j )}(hj!h]hdma_fence_array_create}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj!hhhj!hKubj)}(h\(int num_fences, struct dma_fence **fences, u64 context, unsigned seqno, bool signal_on_any)h](j)}(hint num_fencesh](jM)}(hinth]hint}(hj"hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj "ubj)}(h h]h }(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj "ubj )}(h num_fencesh]h num_fences}(hj,"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj "ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubj)}(hstruct dma_fence **fencesh](j)}(hjh]hstruct}(hjE"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjA"ubj)}(h h]h }(hjR"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjA"ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjc"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj`"ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetje"modnameN classnameNjj)}j]j!c.dma_fence_array_createasbuh1hhjA"ubj)}(h h]h }(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjA"ubjd)}(hjgh]h*}(hj"hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjA"ubjd)}(hjgh]h*}(hj"hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjA"ubj )}(hfencesh]hfences}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjA"ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj"modnameN classnameNjj)}j]j!c.dma_fence_array_createasbuh1hhj"ubj)}(h h]h }(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj"ubj )}(hcontexth]hcontext}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubj)}(hunsigned seqnoh](jM)}(hunsignedh]hunsigned}(hj #hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj#ubj )}(hseqnoh]hseqno}(hj&#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubj)}(hbool signal_on_anyh](jM)}(hjk3h]hbool}(hj?#hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj;#ubj)}(h h]h }(hjL#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj;#ubj )}(h signal_on_anyh]h signal_on_any}(hjZ#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;#ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubeh}(h]h ]h"]h$]h&]jjuh1jhj!hhhj!hKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj!hhhj!hKubah}(h]j!ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj!hKhj!hhubjA )}(hhh]h)}(hCreate a custom fence arrayh]hCreate a custom fence array}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj#hhubah}(h]h ]h"]h$]h&]uh1j@ hj!hhhj!hKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j#jc j#jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj#h]h Parameters}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj#ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj#ubj )}(hhh](j )}(h@``int num_fences`` [in] number of fences to add in the array h](j )}(h``int num_fences``h]j)}(hj#h]hint num_fences}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./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}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hKhj#ubah}(h]h ]h"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]uh1j hj#hKhj#ubj )}(hB``struct dma_fence **fences`` [in] array containing the fences h](j )}(h``struct dma_fence **fences``h]j)}(hj#h]hstruct dma_fence **fences}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj#ubj )}(hhh]h)}(h#[in] array containing the fencesh]h#[in] array containing the fences}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hKhj$ubah}(h]h ]h"]h$]h&]uh1j hj#ubeh}(h]h ]h"]h$]h&]uh1j hj$hKhj#ubj )}(h-``u64 context`` [in] fence context to use h](j )}(h``u64 context``h]j)}(hj7$h]h u64 context}(hj9$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5$ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj1$ubj )}(hhh]h)}(h[in] fence context to useh]h[in] fence context to use}(hjP$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjL$hKhjM$ubah}(h]h ]h"]h$]h&]uh1j hj1$ubeh}(h]h ]h"]h$]h&]uh1j hjL$hKhj#ubj )}(h2``unsigned seqno`` [in] sequence number to use h](j )}(h``unsigned seqno``h]j)}(hjp$h]hunsigned seqno}(hjr$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjn$ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhjj$ubj )}(hhh]h)}(h[in] sequence number to useh]h[in] sequence number to use}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hKhj$ubah}(h]h ]h"]h$]h&]uh1j hjj$ubeh}(h]h ]h"]h$]h&]uh1j hj$hKhj#ubj )}(h@``bool signal_on_any`` [in] signal on any fence in the array h](j )}(h``bool signal_on_any``h]j)}(hj$h]hbool signal_on_any}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj$ubj )}(hhh]h)}(h([in] signal on any fence in the arrayh]h([in] signal on any fence in the array}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hKhj$ubah}(h]h ]h"]h$]h&]uh1j hj$ubeh}(h]h ]h"]h$]h&]uh1j hj$hKhj#ubeh}(h]h ]h"]h$]h&]uh1j hj#ubh)}(h**Description**h]jr )}(hj$h]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj$ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj#ubh)}(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.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chKhj#ubh)}(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.}(hj %hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chMhj#ubh)}(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 }(hj%hhhNhNubjr )}(h**signal_on_any**h]h signal_on_any}(hj %hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj%ubh} is true the fence array signals if any fence in the array signals, otherwise it signals when all fences in the array signal.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chMhj#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$dma_fence_match_context (C function)c.dma_fence_match_contexthNtauh1jhjhhhNhNubj)}(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](jM)}(hjk3h]hbool}(hjY%hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjU%hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chMubj)}(h h]h }(hjg%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjU%hhhjf%hMubj )}(hdma_fence_match_contexth]j )}(hdma_fence_match_contexth]hdma_fence_match_context}(hjy%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hju%ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjU%hhhjf%hMubj)}(h&(struct dma_fence *fence, u64 context)h](j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj%ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj%modnameN classnameNjj)}j]jO)}jGj{%sbc.dma_fence_match_contextasbuh1hhj%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj%ubjd)}(hjgh]h*}(hj%hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj%ubj )}(hfenceh]hfence}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%ubj)}(h u64 contexth](h)}(hhh]j )}(hu64h]hu64}(hj &hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj &modnameN classnameNjj)}j]j%c.dma_fence_match_contextasbuh1hhj&ubj)}(h h]h }(hj(&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj&ubj )}(hcontexth]hcontext}(hj6&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%ubeh}(h]h ]h"]h$]h&]jjuh1jhjU%hhhjf%hMubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjQ%hhhjf%hMubah}(h]jL%ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjf%hMhjN%hhubjA )}(hhh]h)}(h.Check if all fences are from the given contexth]h.Check if all fences are from the given context}(hj`&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chMhj]&hhubah}(h]h ]h"]h$]h&]uh1j@ hjN%hhhjf%hMubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jx&jc jx&jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj&h]h Parameters}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj&ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chM hj|&ubj )}(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}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chMhj&ubj )}(hhh]h)}(h[in] fence or fence arrayh]h[in] fence or fence array}(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 )}(hB``u64 context`` [in] fence context to check all fences against h](j )}(h``u64 context``h]j)}(hj&h]h u64 context}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chMhj&ubj )}(hhh]h)}(h1[in] fence context to check all fences againsth]h1[in] fence context to check all fences against}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]uh1j hj&hMhj&ubeh}(h]h ]h"]h$]h&]uh1j hj|&ubh)}(h**Description**h]jr )}(hj'h]h Description}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj'ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chM hj|&ubh)}(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.}(hj+'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:196: ./drivers/dma-buf/dma-fence-array.chMhj|&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_array_cb (C struct)c.dma_fence_array_cbhNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_fence_array_cbh]j)}(hstruct dma_fence_array_cbh](j)}(hjh]hstruct}(hjZ'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV'hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKubj)}(h h]h }(hjh'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjV'hhhjg'hKubj )}(hdma_fence_array_cbh]j )}(hjT'h]hdma_fence_array_cb}(hjz'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjv'ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjV'hhhjg'hKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjR'hhhjg'hKubah}(h]jM'ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjg'hKhjO'hhubjA )}(hhh]h)}(hcallback helper for fence arrayh]hcallback helper for fence array}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhj'hhubah}(h]h ]h"]h$]h&]uh1j@ hjO'hhhjg'hKubeh}(h]h ](jstructeh"]h$]h&]ja jjb j'jc j'jd je jf uh1jhhhjhNhNubjh )}(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](jr )}(h**Definition**h]h Definition}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj'ubh:}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./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; };}hj'sbah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhj'ubh)}(h **Members**h]jr )}(hj'h]hMembers}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj'ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhj'ubj )}(hhh](j )}(h.``cb`` fence callback structure for signaling h](j )}(h``cb``h]j)}(hj (h]hcb}(hj (hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhj(ubj )}(hhh]h)}(h&fence callback structure for signalingh]h&fence callback structure for signaling}(hj"(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hKhj(ubah}(h]h ]h"]h$]h&]uh1j hj(ubeh}(h]h ]h"]h$]h&]uh1j hj(hKhj(ubj )}(h4``array`` reference to the parent fence array objecth](j )}(h ``array``h]j)}(hjB(h]harray}(hjD(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@(ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhj<(ubj )}(hhh]h)}(h*reference to the parent fence array objecth]h*reference to the parent fence array object}(hj[(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhjX(ubah}(h]h ]h"]h$]h&]uh1j hj<(ubeh}(h]h ]h"]h$]h&]uh1j hjW(hKhj(ubeh}(h]h ]h"]h$]h&]uh1j hj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_array (C struct)c.dma_fence_arrayhNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_fence_arrayh]j)}(hstruct dma_fence_arrayh](j)}(hjh]hstruct}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKubj)}(h h]h }(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj(hhhj(hKubj )}(hdma_fence_arrayh]j )}(hj(h]hdma_fence_array}(hj(hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj(ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj(hhhj(hKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj(hhhj(hKubah}(h]j(ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj(hKhj(hhubjA )}(hhh]h)}(h%fence to represent an array of fencesh]h%fence to represent an array of fences}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhj(hhubah}(h]h ]h"]h$]h&]uh1j@ hj(hhhj(hKubeh}(h]h ](jstructeh"]h$]h&]ja jjb j(jc j(jd je jf uh1jhhhjhNhNubjh )}(hX**Definition**:: struct dma_fence_array { struct dma_fence base; unsigned num_fences; atomic_t num_pending; struct dma_fence **fences; struct irq_work work; struct dma_fence_array_cb callbacks[]; }; **Members** ``base`` fence base class ``num_fences`` number of fences in the array ``num_pending`` fences in the array still pending ``fences`` array of the fences ``work`` internal irq_work function ``callbacks`` array of callback helpersh](h)}(h**Definition**::h](jr )}(h**Definition**h]h Definition}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj(ubh:}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK!hj(ubj)}(hstruct dma_fence_array { struct dma_fence base; unsigned num_fences; atomic_t num_pending; struct dma_fence **fences; struct irq_work work; struct dma_fence_array_cb callbacks[]; };h]hstruct dma_fence_array { struct dma_fence base; unsigned num_fences; atomic_t num_pending; struct dma_fence **fences; struct irq_work work; struct dma_fence_array_cb callbacks[]; };}hj)sbah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK#hj(ubh)}(h **Members**h]jr )}(hj,)h]hMembers}(hj.)hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj*)ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK,hj(ubj )}(hhh](j )}(h``base`` fence base class h](j )}(h``base``h]j)}(hjK)h]hbase}(hjM)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjI)ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKhjE)ubj )}(hhh]h)}(hfence base classh]hfence base class}(hjd)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`)hKhja)ubah}(h]h ]h"]h$]h&]uh1j hjE)ubeh}(h]h ]h"]h$]h&]uh1j hj`)hKhjB)ubj )}(h-``num_fences`` number of fences in the array h](j )}(h``num_fences``h]j)}(hj)h]h num_fences}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK!hj~)ubj )}(hhh]h)}(hnumber of fences in the arrayh]hnumber of fences in the array}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hK!hj)ubah}(h]h ]h"]h$]h&]uh1j hj~)ubeh}(h]h ]h"]h$]h&]uh1j hj)hK!hjB)ubj )}(h2``num_pending`` fences in the array still pending h](j )}(h``num_pending``h]j)}(hj)h]h num_pending}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK"hj)ubj )}(hhh]h)}(h!fences in the array still pendingh]h!fences in the array still pending}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hK"hj)ubah}(h]h ]h"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]uh1j hj)hK"hjB)ubj )}(h``fences`` array of the fences h](j )}(h ``fences``h]j)}(hj)h]hfences}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK#hj)ubj )}(hhh]h)}(harray of the fencesh]harray of the fences}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj *hK#hj *ubah}(h]h ]h"]h$]h&]uh1j hj)ubeh}(h]h ]h"]h$]h&]uh1j hj *hK#hjB)ubj )}(h$``work`` internal irq_work function h](j )}(h``work``h]j)}(hj/*h]hwork}(hj1*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-*ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK$hj)*ubj )}(hhh]h)}(hinternal irq_work functionh]hinternal irq_work function}(hjH*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjD*hK$hjE*ubah}(h]h ]h"]h$]h&]uh1j hj)*ubeh}(h]h ]h"]h$]h&]uh1j hjD*hK$hjB)ubj )}(h'``callbacks`` array of callback helpersh](j )}(h ``callbacks``h]j)}(hjh*h]h callbacks}(hjj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjf*ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK$hjb*ubj )}(hhh]h)}(harray of callback helpersh]harray of callback helpers}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK%hj~*ubah}(h]h ]h"]h$]h&]uh1j hjb*ubeh}(h]h ]h"]h$]h&]uh1j hj}*hK$hjB)ubeh}(h]h ]h"]h$]h&]uh1j hj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jto_dma_fence_array (C function)c.to_dma_fence_arrayhNtauh1jhjhhhNhNubj)}(hhh](j)}(hEstruct dma_fence_array * to_dma_fence_array (struct dma_fence *fence)h]j)}(hCstruct dma_fence_array *to_dma_fence_array(struct dma_fence *fence)h](j)}(hjh]hstruct}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK3ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj*hhhj*hK3ubh)}(hhh]j )}(hdma_fence_arrayh]hdma_fence_array}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj*ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj*modnameN classnameNjj)}j]jO)}jGto_dma_fence_arraysbc.to_dma_fence_arrayasbuh1hhj*hhhj*hK3ubj)}(h h]h }(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj*hhhj*hK3ubjd)}(hjgh]h*}(hj+hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj*hhhj*hK3ubj )}(hto_dma_fence_arrayh]j )}(hj*h]hto_dma_fence_array}(hj!+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj+ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj*hhhj*hK3ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj<+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8+ubj)}(h h]h }(hjI+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj8+ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjZ+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjW+ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj\+modnameN classnameNjj)}j]j*c.to_dma_fence_arrayasbuh1hhj8+ubj)}(h h]h }(hjx+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj8+ubjd)}(hjgh]h*}(hj+hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj8+ubj )}(hfenceh]hfence}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj4+ubah}(h]h ]h"]h$]h&]jjuh1jhj*hhhj*hK3ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj*hhhj*hK3ubah}(h]j*ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj*hK3hj*hhubjA )}(hhh]h)}(h!cast a fence to a dma_fence_arrayh]h!cast a fence to a dma_fence_array}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK3hj+hhubah}(h]h ]h"]h$]h&]uh1j@ hj*hhhj*hK3ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j+jc j+jd je jf uh1jhhhjhNhNubjh )}(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]jr )}(hj+h]h Parameters}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj+ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK7hj+ubj )}(hhh]j )}(h?``struct dma_fence *fence`` fence to cast to a dma_fence_array h](j )}(h``struct dma_fence *fence``h]j)}(hj+h]hstruct dma_fence *fence}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK4hj+ubj )}(hhh]h)}(h"fence to cast to a dma_fence_arrayh]h"fence to cast to a dma_fence_array}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hK4hj,ubah}(h]h ]h"]h$]h&]uh1j hj+ubeh}(h]h ]h"]h$]h&]uh1j hj,hK4hj+ubah}(h]h ]h"]h$]h&]uh1j hj+ubh)}(h**Description**h]jr )}(hj9,h]h Description}(hj;,hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj7,ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK6hj+ubh)}(hUReturns NULL if the fence is not a dma_fence_array, or the dma_fence_array otherwise.h]hUReturns NULL if the fence is not a dma_fence_array, or the dma_fence_array otherwise.}(hjO,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhK5hj+ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_fence_array_for_each (C macro)c.dma_fence_array_for_eachhNtauh1jhjhhhNhNubj)}(hhh](j)}(hdma_fence_array_for_eachh]j)}(hdma_fence_array_for_eachh]j )}(hdma_fence_array_for_eachh]j )}(hjx,h]hdma_fence_array_for_each}(hj,hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj~,ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjz,hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKCubah}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjv,hhhj,hKCubah}(h]jq,ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj,hKChjs,hhubjA )}(hhh]h}(h]h ]h"]h$]h&]uh1j@ hjs,hhhj,hKCubeh}(h]h ](jmacroeh"]h$]h&]ja jjb j,jc j,jd je jf uh1jhhhjhNhNubh)}(h1``dma_fence_array_for_each (fence, index, head)``h]j)}(hj,h]h-dma_fence_array_for_each (fence, index, head)}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKEhjhhubh)}(h!iterate over all fences in array h]h)}(h iterate over all fences in arrayh]h iterate over all fences in array}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKChj,ubah}(h]h ]h"]h$]h&]uh1hhj,hKChjhhubjh )}(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]jr )}(hj,h]h Parameters}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj,ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKGhj,ubj )}(hhh](j )}(h``fence`` current fence h](j )}(h ``fence``h]j)}(hj-h]hfence}(hj -hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKDhj-ubj )}(hhh]h)}(h current fenceh]h current fence}(hj!-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hKDhj-ubah}(h]h ]h"]h$]h&]uh1j hj-ubeh}(h]h ]h"]h$]h&]uh1j hj-hKDhj,ubj )}(h``index`` index into the array h](j )}(h ``index``h]j)}(hjA-h]hindex}(hjC-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?-ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKEhj;-ubj )}(hhh]h)}(hindex into the arrayh]hindex into the array}(hjZ-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjV-hKEhjW-ubah}(h]h ]h"]h$]h&]uh1j hj;-ubeh}(h]h ]h"]h$]h&]uh1j hjV-hKEhj,ubj )}(h*``head`` potential dma_fence_array object h](j )}(h``head``h]j)}(hjz-h]hhead}(hj|-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjx-ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKFhjt-ubj )}(hhh]h)}(h potential dma_fence_array objecth]h potential dma_fence_array object}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hKFhj-ubah}(h]h ]h"]h$]h&]uh1j hjt-ubeh}(h]h ]h"]h$]h&]uh1j hj-hKFhj,ubeh}(h]h ]h"]h$]h&]uh1j hj,ubh)}(h**Description**h]jr )}(hj-h]h Description}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj-ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKHhj,ubh)}(hTest if **array** is a dma_fence_array object and if yes iterate over all fences in the array. If not just iterate over the fence in **array** itself.h](hTest if }(hj-hhhNhNubjr )}(h **array**h]harray}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj-ubht is a dma_fence_array object and if yes iterate over all fences in the array. If not just iterate over the fence in }(hj-hhhNhNubjr )}(h **array**h]harray}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj-ubh itself.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKGhj,ubh)}(h9For a deep dive iterator see dma_fence_unwrap_for_each().h]h9For a deep dive iterator see dma_fence_unwrap_for_each().}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:199: ./include/linux/dma-fence-array.hhKJhj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjhhhNhNubeh}(h]dma-fence-arrayah ]h"]dma fence arrayah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fence Chainh]hDMA Fence Chain}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_fence_chain_walk (C function)c.dma_fence_chain_walkhNtauh1jhj.hhhNhNubj)}(hhh](j)}(hAstruct dma_fence * dma_fence_chain_walk (struct dma_fence *fence)h]j)}(h?struct dma_fence *dma_fence_chain_walk(struct dma_fence *fence)h](j)}(hjh]hstruct}(hjF.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjB.hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chK ubj)}(h h]h }(hjT.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjB.hhhjS.hK ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hje.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjb.ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjg.modnameN classnameNjj)}j]jO)}jGdma_fence_chain_walksbc.dma_fence_chain_walkasbuh1hhjB.hhhjS.hK ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjB.hhhjS.hK ubjd)}(hjgh]h*}(hj.hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjB.hhhjS.hK ubj )}(hdma_fence_chain_walkh]j )}(hj.h]hdma_fence_chain_walk}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjB.hhhjS.hK ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj.ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj.modnameN classnameNjj)}j]j.c.dma_fence_chain_walkasbuh1hhj.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj.ubjd)}(hjgh]h*}(hj /hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj.ubj )}(hfenceh]hfence}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj.ubah}(h]h ]h"]h$]h&]jjuh1jhjB.hhhjS.hK ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj>.hhhjS.hK ubah}(h]j9.ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjS.hK hj;.hhubjA )}(hhh]h)}(hchain walking functionh]hchain walking function}(hjA/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chK hj>/hhubah}(h]h ]h"]h$]h&]uh1j@ hj;.hhhjS.hK ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jY/jc jY/jd je jf uh1jhhhj.hNhNubjh )}(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]jr )}(hjc/h]h Parameters}(hje/hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hja/ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chK$hj]/ubj )}(hhh]j )}(h/``struct dma_fence *fence`` current chain node h](j )}(h``struct dma_fence *fence``h]j)}(hj/h]hstruct dma_fence *fence}(hj/hhhNhNubah}(h]h @]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chK!hj|/ubj )}(hhh]h)}(hcurrent chain nodeh]hcurrent chain node}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hK!hj/ubah}(h]h ]h"]h$]h&]uh1j hj|/ubeh}(h]h ]h"]h$]h&]uh1j hj/hK!hjy/ubah}(h]h ]h"]h$]h&]uh1j hj]/ubh)}(h**Description**h]jr )}(hj/h]h Description}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj/ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chK#hj]/ubh)}(hWalk the chain to the next node. Returns the next fence or NULL if we are at the end of the chain. Garbage collects chain nodes which are already signaled.h]hWalk the chain to the next node. Returns the next fence or NULL if we are at the end of the chain. Garbage collects chain nodes which are already signaled.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chK"hj]/ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj.hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'dma_fence_chain_find_seqno (C function)c.dma_fence_chain_find_seqnohNtauh1jhj.hhhNhNubj)}(hhh](j)}(hJint dma_fence_chain_find_seqno (struct dma_fence **pfence, uint64_t seqno)h]j)}(hIint dma_fence_chain_find_seqno(struct dma_fence **pfence, uint64_t seqno)h](jM)}(hinth]hint}(hj0hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj/hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKPubj)}(h h]h }(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj/hhhj0hKPubj )}(hdma_fence_chain_find_seqnoh]j )}(hdma_fence_chain_find_seqnoh]hdma_fence_chain_find_seqno}(hj#0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj/hhhj0hKPubj)}(h+(struct dma_fence **pfence, uint64_t seqno)h](j)}(hstruct dma_fence **pfenceh](j)}(hjh]hstruct}(hj?0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;0ubj)}(h h]h }(hjL0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj;0ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj]0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZ0ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj_0modnameN classnameNjj)}j]jO)}jGj%0sbc.dma_fence_chain_find_seqnoasbuh1hhj;0ubj)}(h h]h }(hj}0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj;0ubjd)}(hjgh]h*}(hj0hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj;0ubjd)}(hjgh]h*}(hj0hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj;0ubj )}(hpfenceh]hpfence}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;0ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj70ubj)}(huint64_t seqnoh](h)}(hhh]j )}(huint64_th]huint64_t}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj0modnameN classnameNjj)}j]jy0c.dma_fence_chain_find_seqnoasbuh1hhj0ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj0ubj )}(hseqnoh]hseqno}(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj70ubeh}(h]h ]h"]h$]h&]jjuh1jhj/hhhj0hKPubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj/hhhj0hKPubah}(h]j/ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj0hKPhj/hhubjA )}(hhh]h)}(hfind fence chain node by seqnoh]hfind fence chain node by seqno}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKPhj1hhubah}(h]h ]h"]h$]h&]uh1j@ hj/hhhj0hKPubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j/1jc j/1jd je jf uh1jhhhj.hNhNubjh )}(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]jr )}(hj91h]h Parameters}(hj;1hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj71ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKThj31ubj )}(hhh](j )}(hG``struct dma_fence **pfence`` pointer to the chain node where to start h](j )}(h``struct dma_fence **pfence``h]j)}(hjX1h]hstruct dma_fence **pfence}(hjZ1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjV1ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKQhjR1ubj )}(hhh]h)}(h(pointer to the chain node where to starth]h(pointer to the chain node where to start}(hjq1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjm1hKQhjn1ubah}(h]h ]h"]h$]h&]uh1j hjR1ubeh}(h]h ]h"]h$]h&]uh1j hjm1hKQhjO1ubj )}(h5``uint64_t seqno`` the sequence number to search for h](j )}(h``uint64_t seqno``h]j)}(hj1h]huint64_t seqno}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKRhj1ubj )}(hhh]h)}(h!the sequence number to search forh]h!the sequence number to search for}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hKRhj1ubah}(h]h ]h"]h$]h&]uh1j hj1ubeh}(h]h ]h"]h$]h&]uh1j hj1hKRhjO1ubeh}(h]h ]h"]h$]h&]uh1j hj31ubh)}(h**Description**h]jr )}(hj1h]h Description}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj1ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKThj31ubh)}(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.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKShj31ubh)}(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.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKVhj31ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj.hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_fence_chain_init (C function)c.dma_fence_chain_inithNtauh1jhj.hhhNhNubj)}(hhh](j)}(hzvoid dma_fence_chain_init (struct dma_fence_chain *chain, struct dma_fence *prev, struct dma_fence *fence, uint64_t seqno)h]j)}(hyvoid dma_fence_chain_init(struct dma_fence_chain *chain, struct dma_fence *prev, struct dma_fence *fence, uint64_t seqno)h](jM)}(hvoidh]hvoid}(hj 2hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj2hhhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKubj)}(h h]h }(hj/2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj2hhhj.2hKubj )}(hdma_fence_chain_inith]j )}(hdma_fence_chain_inith]hdma_fence_chain_init}(hjA2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=2ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj2hhhj.2hKubj)}(h`(struct dma_fence_chain *chain, struct dma_fence *prev, struct dma_fence *fence, uint64_t seqno)h](j)}(hstruct dma_fence_chain *chainh](j)}(hjh]hstruct}(hj]2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjY2ubj)}(h h]h }(hjj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjY2ubh)}(hhh]j )}(hdma_fence_chainh]hdma_fence_chain}(hj{2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjx2ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj}2modnameN classnameNjj)}j]jO)}jGjC2sbc.dma_fence_chain_initasbuh1hhjY2ubj)}(h h]h }(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjY2ubjd)}(hjgh]h*}(hj2hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjY2ubj )}(hchainh]hchain}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjY2ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjU2ubj)}(hstruct dma_fence *prevh](j)}(hjh]hstruct}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubj)}(h h]h }(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj2ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj2modnameN classnameNjj)}j]j2c.dma_fence_chain_initasbuh1hhj2ubj)}(h h]h }(hj 3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj2ubjd)}(hjgh]h*}(hj3hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj2ubj )}(hprevh]hprev}(hj&3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj2ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjU2ubj)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj?3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;3ubj)}(h h]h }(hjL3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj;3ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj]3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZ3ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj_3modnameN classnameNjj)}j]j2c.dma_fence_chain_initasbuh1hhj;3ubj)}(h h]h }(hj{3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj;3ubjd)}(hjgh]h*}(hj3hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj;3ubj )}(hfenceh]hfence}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;3ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjU2ubj)}(huint64_t seqnoh](h)}(hhh]j )}(huint64_th]huint64_t}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj3modnameN classnameNjj)}j]j2c.dma_fence_chain_initasbuh1hhj3ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj3ubj )}(hseqnoh]hseqno}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjU2ubeh}(h]h ]h"]h$]h&]jjuh1jhj2hhhj.2hKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj2hhhj.2hKubah}(h]j2ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj.2hKhj2hhubjA )}(hhh]h)}(hinitialize a fence chainh]hinitialize a fence chain}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKhj4hhubah}(h]h ]h"]h$]h&]uh1j@ hj2hhhj.2hKubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j 4jc j 4jd je jf uh1jhhhj.hNhNubjh )}(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]jr )}(hj*4h]h Parameters}(hj,4hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj(4ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKhj$4ubj )}(hhh](j )}(h?``struct dma_fence_chain *chain`` the chain node to initialize h](j )}(h!``struct dma_fence_chain *chain``h]j)}(hjI4h]hstruct dma_fence_chain *chain}(hjK4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjG4ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKhjC4ubj )}(hhh]h)}(hthe chain node to initializeh]hthe chain node to initialize}(hjb4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^4hKhj_4ubah}(h]h ]h"]h$]h&]uh1j hjC4ubeh}(h]h ]h"]h$]h&]uh1j hj^4hKhj@4ubj )}(h.``struct dma_fence *prev`` the previous fence h](j )}(h``struct dma_fence *prev``h]j)}(hj4h]hstruct dma_fence *prev}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKhj|4ubj )}(hhh]h)}(hthe previous fenceh]hthe previous fence}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hKhj4ubah}(h]h ]h"]h$]h&]uh1j hj|4ubeh}(h]h ]h"]h$]h&]uh1j hj4hKhj@4ubj )}(h.``struct dma_fence *fence`` the current fence h](j )}(h``struct dma_fence *fence``h]j)}(hj4h]hstruct dma_fence *fence}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKhj4ubj )}(hhh]h)}(hthe current fenceh]hthe current fence}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hKhj4ubah}(h]h ]h"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]uh1j hj4hKhj@4ubj )}(hB``uint64_t seqno`` the sequence number to use for the fence chain h](j )}(h``uint64_t seqno``h]j)}(hj4h]huint64_t seqno}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j he/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKhj4ubj )}(hhh]h)}(h.the sequence number to use for the fence chainh]h.the sequence number to use for the fence chain}(hj 5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 5hKhj 5ubah}(h]h ]h"]h$]h&]uh1j hj4ubeh}(h]h ]h"]h$]h&]uh1j hj 5hKhj@4ubeh}(h]h ]h"]h$]h&]uh1j hj$4ubh)}(h**Description**h]jr )}(hj/5h]h Description}(hj15hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj-5ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKhj$4ubh)}(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.}(hjE5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:205: ./drivers/dma-buf/dma-fence-chain.chKhj$4ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj.hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_chain (C struct)c.dma_fence_chainhNtauh1jhj.hhhNhNubj)}(hhh](j)}(hdma_fence_chainh]j)}(hstruct dma_fence_chainh](j)}(hjh]hstruct}(hjt5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjp5hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKubj)}(h h]h }(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjp5hhhj5hKubj )}(hdma_fence_chainh]j )}(hjn5h]hdma_fence_chain}(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjp5hhhj5hKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjl5hhhj5hKubah}(h]jg5ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj5hKhji5hhubjA )}(hhh]h)}(h+fence to represent an node of a fence chainh]h+fence to represent an node of a fence chain}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKhj5hhubah}(h]h ]h"]h$]h&]uh1j@ hji5hhhj5hKubeh}(h]h ](jstructeh"]h$]h&]ja jjb j5jc j5jd je jf uh1jhhhj.hNhNubjh )}(hX-**Definition**:: struct dma_fence_chain { struct dma_fence base; struct dma_fence *prev; u64 prev_seqno; struct dma_fence *fence; union { struct dma_fence_cb cb; struct irq_work work; }; }; **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.h](h)}(h**Definition**::h](jr )}(h**Definition**h]h Definition}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj5ubh:}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKhj5ubj)}(hstruct dma_fence_chain { struct dma_fence base; struct dma_fence *prev; u64 prev_seqno; struct dma_fence *fence; union { struct dma_fence_cb cb; struct irq_work work; }; };h]hstruct dma_fence_chain { struct dma_fence base; struct dma_fence *prev; u64 prev_seqno; struct dma_fence *fence; union { struct dma_fence_cb cb; struct irq_work work; }; };}hj5sbah}(h]h ]h"]h$]h&]jjuh1jhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKhj5ubh)}(h **Members**h]jr )}(hj6h]hMembers}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj6ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK#hj5ubj )}(hhh](j )}(h``base`` fence base class h](j )}(h``base``h]j)}(hj#6h]hbase}(hj%6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!6ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKhj6ubj )}(hhh]h)}(hfence base classh]hfence base class}(hj<6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj86hKhj96ubah}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]uh1j hj86hKhj6ubj )}(h%``prev`` previous fence of the chain h](j )}(h``prev``h]j)}(hj\6h]hprev}(hj^6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ6ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKhjV6ubj )}(hhh]h)}(hprevious fence of the chainh]hprevious fence of the chain}(hju6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjq6hKhjr6ubah}(h]h ]h"]h$]h&]uh1j hjV6ubeh}(h]h ]h"]h$]h&]uh1j hjq6hKhj6ubj )}(hA``prev_seqno`` original previous seqno before garbage collection h](j )}(h``prev_seqno``h]j)}(hj6h]h prev_seqno}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKhj6ubj )}(hhh]h)}(h1original previous seqno before garbage collectionh]h1original previous seqno before garbage collection}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hKhj6ubah}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]uh1j hj6hKhj6ubj )}(h``fence`` encapsulated fence h](j )}(h ``fence``h]j)}(hj6h]hfence}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKhj6ubj )}(hhh]h)}(hencapsulated fenceh]hencapsulated fence}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hKhj6ubah}(h]h ]h"]h$]h&]uh1j hj6ubeh}(h]h ]h"]h$]h&]uh1j hj6hKhj6ubj )}(h``{unnamed_union}`` anonymous h](j )}(h``{unnamed_union}``h]j)}(hj7h]h{unnamed_union}}(hj 7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKhj7ubj )}(hhh]h)}(h anonymoush]h anonymous}(hj 7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hKhj7ubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hj7hKhj6ubj )}(h``cb`` callback for signaling This is used to add the callback for signaling the complection of the fence chain. Never used at the same time as the irq work. h](j )}(h``cb``h]j)}(hj@7h]hcb}(hjB7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>7ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK%hj:7ubj )}(hhh](h)}(hcallback for signalingh]hcallback for signaling}(hjY7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK!hjV7ubh)}(hThis is used to add the callback for signaling the complection of the fence chain. Never used at the same time as the irq work.h]hThis is used to add the callback for signaling the complection of the fence chain. Never used at the same time as the irq work.}(hjh7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK#hjV7ubeh}(h]h ]h"]h$]h&]uh1j hj:7ubeh}(h]h ]h"]h$]h&]uh1j hjU7hK%hj6ubj )}(h``work`` irq work item for signaling Irq work structure to allow us to add the callback without running into lock inversion. Never used at the same time as the callback.h](j )}(h``work``h]j)}(hj7h]hwork}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK-hj7ubj )}(hhh](h)}(hirq work item for signalingh]hirq work item for signaling}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK*hj7ubh)}(hIrq work structure to allow us to add the callback without running into lock inversion. Never used at the same time as the callback.h]hIrq work structure to allow us to add the callback without running into lock inversion. Never used at the same time as the callback.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK,hj7ubeh}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1j hj7hK-hj6ubeh}(h]h ]h"]h$]h&]uh1j hj5ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj.hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jto_dma_fence_chain (C function)c.to_dma_fence_chainhNtauh1jhj.hhhNhNubj)}(hhh](j)}(hEstruct dma_fence_chain * to_dma_fence_chain (struct dma_fence *fence)h]j)}(hCstruct dma_fence_chain *to_dma_fence_chain(struct dma_fence *fence)h](j)}(hjh]hstruct}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK5ubj)}(h h]h }(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7hhhj7hK5ubh)}(hhh]j )}(hdma_fence_chainh]hdma_fence_chain}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj8modnameN classnameNjj)}j]jO)}jGto_dma_fence_chainsbc.to_dma_fence_chainasbuh1hhj7hhhj7hK5ubj)}(h h]h }(hj28hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7hhhj7hK5ubjd)}(hjgh]h*}(hj@8hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj7hhhj7hK5ubj )}(hto_dma_fence_chainh]j )}(hj/8h]hto_dma_fence_chain}(hjQ8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjM8ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj7hhhj7hK5ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjl8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjh8ubj)}(h h]h }(hjy8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjh8ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj8modnameN classnameNjj)}j]j-8c.to_dma_fence_chainasbuh1hhjh8ubj)}(h h]h }(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjh8ubjd)}(hjgh]h*}(hj8hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjh8ubj )}(hfenceh]hfence}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh8ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjd8ubah}(h]h ]h"]h$]h&]jjuh1jhj7hhhj7hK5ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj7hhhj7hK5ubah}(h]j7ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj7hK5hj7hhubjA )}(hhh]h)}(h!cast a fence to a dma_fence_chainh]h!cast a fence to a dma_fence_chain}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK5hj8hhubah}(h]h ]h"]h$]h&]uh1j@ hj7hhhj7hK5ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j9jc j9jd je jf uh1jhhhj.hNhNubjh )}(h**Parameters** ``struct dma_fence *fence`` fence to cast to a dma_fence_array **Description** Returns NULL if the fence is not a dma_fence_chain, or the dma_fence_chain otherwise.h](h)}(h**Parameters**h]jr )}(hj9h]h Parameters}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj 9ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK9hj 9ubj )}(hhh]j )}(h?``struct dma_fence *fence`` fence to cast to a dma_fence_array h](j )}(h``struct dma_fence *fence``h]j)}(hj.9h]hstruct dma_fence *fence}(hj09hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,9ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK6hj(9ubj )}(hhh]h)}(h"fence to cast to a dma_fence_arrayh]h"fence to cast to a dma_fence_array}(hjG9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjC9hK6hjD9ubah}(h]h ]h"]h$]h&]uh1j hj(9ubeh}(h]h ]h"]h$]h&]uh1j hjC9hK6hj%9ubah}(h]h ]h"]h$]h&]uh1j hj 9ubh)}(h**Description**h]jr )}(hji9h]h Description}(hjk9hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjg9ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK8hj 9ubh)}(hUReturns NULL if the fence is not a dma_fence_chain, or the dma_fence_chain otherwise.h]hUReturns NULL if the fence is not a dma_fence_chain, or the dma_fence_chain otherwise.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK7hj 9ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj.hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&dma_fence_chain_contained (C function)c.dma_fence_chain_containedhNtauh1jhj.hhhNhNubj)}(hhh](j)}(hFstruct dma_fence * dma_fence_chain_contained (struct dma_fence *fence)h]j)}(hDstruct dma_fence *dma_fence_chain_contained(struct dma_fence *fence)h](j)}(hjh]hstruct}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKEubj)}(h h]h }(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj9hhhj9hKEubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj9ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj9modnameN classnameNjj)}j]jO)}jGdma_fence_chain_containedsbc.dma_fence_chain_containedasbuh1hhj9hhhj9hKEubj)}(h h]h }(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj9hhhj9hKEubjd)}(hjgh]h*}(hj9hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj9hhhj9hKEubj )}(hdma_fence_chain_containedh]j )}(hj9h]hdma_fence_chain_contained}(hj :hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj :ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj9hhhj9hKEubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hj(:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$:ubj)}(h h]h }(hj5:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj$:ubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjF:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjC:ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjH:modnameN classnameNjj)}j]j9c.dma_fence_chain_containedasbuh1hhj$:ubj)}(h h]h }(hjd:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj$:ubjd)}(hjgh]h*}(hjr:hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchj$:ubj )}(hfenceh]hfence}(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$:ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj :ubah}(h]h ]h"]h$]h&]jjuh1jhj9hhhj9hKEubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj9hhhj9hKEubah}(h]j9ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj9hKEhj9hhubjA )}(hhh]h)}(hreturn the contained fenceh]hreturn the contained fence}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKEhj:hhubah}(h]h ]h"]h$]h&]uh1j@ hj9hhhj9hKEubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j:jc j:jd je jf uh1jhhhj.hNhNubjh )}(h**Parameters** ``struct dma_fence *fence`` the fence to test **Description** If the fence is a dma_fence_chain the function returns the fence contained inside the chain object, otherwise it returns the fence itself.h](h)}(h**Parameters**h]jr )}(hj:h]h Parameters}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj:ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKIhj:ubj )}(hhh]j )}(h.``struct dma_fence *fence`` the fence to test h](j )}(h``struct dma_fence *fence``h]j)}(hj:h]hstruct dma_fence *fence}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKFhj:ubj )}(hhh]h)}(hthe fence to testh]hthe fence to test}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hKFhj;ubah}(h]h ]h"]h$]h&]uh1j hj:ubeh}(h]h ]h"]h$]h&]uh1j hj:hKFhj:ubah}(h]h ]h"]h$]h&]uh1j hj:ubh)}(h**Description**h]jr )}(hj%;h]h Description}(hj';hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj#;ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKHhj:ubh)}(hIf the fence is a dma_fence_chain the function returns the fence contained inside the chain object, otherwise it returns the fence itself.h]hIf the fence is a dma_fence_chain the function returns the fence contained inside the chain object, otherwise it returns the fence itself.}(hj;;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKGhj:ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj.hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_chain_alloc (C macro)c.dma_fence_chain_allochNtauh1jhj.hhhNhNubj)}(hhh](j)}(hdma_fence_chain_alloch]j)}(hdma_fence_chain_alloch]j )}(hdma_fence_chain_alloch]j )}(hjd;h]hdma_fence_chain_alloc}(hjn;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjj;ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjf;hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKTubah}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjb;hhhj;hKTubah}(h]j];ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj;hKThj_;hhubjA )}(hhh]h}(h]h ]h"]h$]h&]uh1j@ hj_;hhhj;hKTubeh}(h]h ](jmacroeh"]h$]h&]ja jjb j;jc j;jd je jf uh1jhhhj.hNhNubh)}(h``dma_fence_chain_alloc ()``h]j)}(hj;h]hdma_fence_chain_alloc ()}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKVhj.hhubh)}(hX**Description** Returns a new struct dma_fence_chain object or NULL on failure. This specialized allocator has to be a macro for its allocations to be accounted separately (to have a separate alloc_tag). The typecast is intentional to enforce typesafety. h](h)}(h**Description**h]jr )}(hj;h]h Description}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj;ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKVhj;ubh)}(h?Returns a new struct dma_fence_chain object or NULL on failure.h]h?Returns a new struct dma_fence_chain object or NULL on failure.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKUhj;ubh)}(hThis specialized allocator has to be a macro for its allocations to be accounted separately (to have a separate alloc_tag). The typecast is intentional to enforce typesafety.h]hThis specialized allocator has to be a macro for its allocations to be accounted separately (to have a separate alloc_tag). The typecast is intentional to enforce typesafety.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKWhj;ubeh}(h]h ]h"]h$]h&]uh1hhj;hKVhj.hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!dma_fence_chain_free (C function)c.dma_fence_chain_freehNtauh1jhj.hhhNhNubj)}(hhh](j)}(h9void dma_fence_chain_free (struct dma_fence_chain *chain)h]j)}(h8void dma_fence_chain_free(struct dma_fence_chain *chain)h](jM)}(hvoidh]hvoid}(hj<hhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhj <hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhK`ubj)}(h h]h }(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj <hhhj<hK`ubj )}(hdma_fence_chain_freeh]j )}(hdma_fence_chain_freeh]hdma_fence_chain_free}(hj0<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj,<ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj <hhhj<hK`ubj)}(h(struct dma_fence_chain *chain)h]j)}(hstruct dma_fence_chain *chainh](j)}(hjh]hstruct}(hjL<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjH<ubj)}(h h]h }(hjY<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjH<ubh)}(hhh]j )}(hdma_fence_chainh]hdma_fence_chain}(hjj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjg<ubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjl<modnameN classnameNjj)}j]jO)}jGj2<sbc.dma_fence_chain_freeasbuh1hhjH<ubj)}(h h]h }(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjH<ubjd)}(hjgh]h*}(hj<hhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjH<ubj )}(hchainh]hchain}(hj<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjH<ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjD<ubah}(h]h ]h"]h$]h&]jjuh1jhj <hhhj<hK`ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj<hhhj<hK`ubah}(h]j<ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj<hK`hj<hhubjA )}(hhh]h}(h]h ]h"]h$]h&]uh1j@ hj<hhhj<hK`ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb j<jc j<jd je jf uh1jhhhj.hNhNubjh )}(hXx**Parameters** ``struct dma_fence_chain *chain`` chain node to free **Description** Frees up an allocated but not used struct dma_fence_chain object. This doesn't need an RCU grace period since the fence was never initialized nor published. After dma_fence_chain_init() has been called the fence must be released by calling dma_fence_put(), and not through this function.h](h)}(h**Parameters**h]jr )}(hj<h]h Parameters}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj<ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKdhj<ubj )}(hhh]j )}(h5``struct dma_fence_chain *chain`` chain node to free h](j )}(h!``struct dma_fence_chain *chain``h]j)}(hj=h]hstruct dma_fence_chain *chain}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKahj<ubj )}(hhh]h)}(hchain node to freeh]hchain node to free}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hKahj=ubah}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ]h"]h$]h&]uh1j hj=hKahj<ubah}(h]h ]h"]h$]h&]uh1j hj<ubh)}(h**Description**h]jr )}(hj<=h]h Description}(hj>=hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj:=ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKchj<ubh)}(hXFrees up an allocated but not used struct dma_fence_chain object. This doesn't need an RCU grace period since the fence was never initialized nor published. After dma_fence_chain_init() has been called the fence must be released by calling dma_fence_put(), and not through this function.h]hX!Frees up an allocated but not used struct dma_fence_chain object. This doesn’t need an RCU grace period since the fence was never initialized nor published. After dma_fence_chain_init() has been called the fence must be released by calling dma_fence_put(), and not through this function.}(hjR=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKbhj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj.hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"dma_fence_chain_for_each (C macro)c.dma_fence_chain_for_eachhNtauh1jhj.hhhNhNubj)}(hhh](j)}(hdma_fence_chain_for_eachh]j)}(hdma_fence_chain_for_eachh]j )}(hdma_fence_chain_for_eachh]j )}(hj{=h]hdma_fence_chain_for_each}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj}=hhhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKnubah}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjy=hhhj=hKnubah}(h]jt=ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj=hKnhjv=hhubjA )}(hhh]h}(h]h ]h"]h$]h&]uh1j@ hjv=hhhj=hKnubeh}(h]h ](jmacroeh"]h$]h&]ja jjb j=jc j=jd je jf uh1jhhhj.hNhNubh)}(h)``dma_fence_chain_for_each (iter, head)``h]j)}(hj=h]h%dma_fence_chain_for_each (iter, head)}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKphj.hhubh)}(h!iterate over all fences in chain h]h)}(h iterate over all fences in chainh]h iterate over all fences in chain}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKnhj=ubah}(h]h ]h"]h$]h&]uh1hhj=hKnhj.hhubjh )}(hX**Parameters** ``iter`` current fence ``head`` starting point **Description** Iterate over all fences in the chain. We keep a reference to the current fence while inside the loop which must be dropped when breaking out. For a deep dive iterator see dma_fence_unwrap_for_each().h](h)}(h**Parameters**h]jr )}(hj=h]h Parameters}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj=ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKrhj=ubj )}(hhh](j )}(h``iter`` current fence h](j )}(h``iter``h]j)}(hj >h]hiter}(hj >hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj >ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKohj>ubj )}(hhh]h)}(h current fenceh]h current fence}(hj$>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj >hKohj!>ubah}(h]h ]h"]h$]h&]uh1j hj>ubeh}(h]h ]h"]h$]h&]uh1j hj >hKohj>ubj )}(h``head`` starting point h](j )}(h``head``h]j)}(hjD>h]hhead}(hjF>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB>ubah}(h]h ]h"]h$]h&]uh1j hc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKphj>>ubj )}(hhh]h)}(hstarting pointh]hstarting point}(hj]>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjY>hKphjZ>ubah}(h]h ]h"]h$]h&]uh1j hj>>ubeh}(h]h ]h"]h$]h&]uh1j hjY>hKphj>ubeh}(h]h ]h"]h$]h&]uh1j hj=ubh)}(h**Description**h]jr )}(hj>h]h Description}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj}>ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKrhj=ubh)}(hIterate over all fences in the chain. We keep a reference to the current fence while inside the loop which must be dropped when breaking out.h]hIterate over all fences in the chain. We keep a reference to the current fence while inside the loop which must be dropped when breaking out.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKqhj=ubh)}(h9For a deep dive iterator see dma_fence_unwrap_for_each().h]h9For a deep dive iterator see dma_fence_unwrap_for_each().}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:208: ./include/linux/dma-fence-chain.hhKthj=ubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj.hhhNhNubeh}(h]dma-fence-chainah ]h"]dma fence chainah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fence unwraph]hDMA Fence unwrap}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jdma_fence_unwrap (C struct)c.dma_fence_unwraphNtauh1jhj>hhhNhNubj)}(hhh](j)}(hdma_fence_unwraph]j)}(hstruct dma_fence_unwraph](j)}(hjh]hstruct}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>hhhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKubj)}(h h]h }(hj>hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj>hhhj>hKubj )}(hdma_fence_unwraph]j )}(hj>h]hdma_fence_unwrap}(hj ?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj?ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj>hhhj>hKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj>hhhj>hKubah}(h]j>ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj>hKhj>hhubjA )}(hhh]h)}(h#cursor into the container structureh]h#cursor into the container structure}(hj.?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhj+?hhubah}(h]h ]h"]h$]h&]uh1j@ hj>hhhj>hKubeh}(h]h ](jstructeh"]h$]h&]ja jjb jF?jc jF?jd je jf uh1jhhhj>hNhNubjh )}(hXo**Definition**:: struct dma_fence_unwrap { struct dma_fence *chain; struct dma_fence *array; unsigned int index; }; **Members** ``chain`` potential dma_fence_chain, but can be other fence as well ``array`` potential dma_fence_array, but can be other fence as well ``index`` last returned index if **array** is really a dma_fence_arrayh](h)}(h**Definition**::h](jr )}(h**Definition**h]h Definition}(hjR?hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjN?ubh:}(hjN?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhjJ?ubj)}(hnstruct dma_fence_unwrap { struct dma_fence *chain; struct dma_fence *array; unsigned int index; };h]hnstruct dma_fence_unwrap { struct dma_fence *chain; struct dma_fence *array; unsigned int index; };}hjk?sbah}(h]h ]h"]h$]h&]jjuh1jhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhjJ?ubh)}(h **Members**h]jr )}(hj|?h]hMembers}(hj~?hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjz?ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhjJ?ubj )}(hhh](j )}(hD``chain`` potential dma_fence_chain, but can be other fence as well h](j )}(h ``chain``h]j)}(hj?h]hchain}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhj?ubj )}(hhh]h)}(h9potential dma_fence_chain, but can be other fence as wellh]h9potential dma_fence_chain, but can be other fence as well}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hKhj?ubah}(h]h ]h"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]uh1j hj?hKhj?ubj )}(hD``array`` potential dma_fence_array, but can be other fence as well h](j )}(h ``array``h]j)}(hj?h]harray}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhj?ubj )}(hhh]h)}(h9potential dma_fence_array, but can be other fence as wellh]h9potential dma_fence_array, but can be other fence as well}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hKhj?ubah}(h]h ]h"]h$]h&]uh1j hj?ubeh}(h]h ]h"]h$]h&]uh1j hj?hKhj?ubj )}(hF``index`` last returned index if **array** is really a dma_fence_arrayh](j )}(h ``index``h]j)}(hj @h]hindex}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj @ubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhj@ubj )}(hhh]h)}(hhhhNhNubh)}(h**Description**h]jr )}(hjb@h]h Description}(hjd@hhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj`@ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK hj>hhubh)}(h?Should be used with dma_fence_unwrap_for_each() iterator macro.h]h?Should be used with dma_fence_unwrap_for_each() iterator macro.}(hjx@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhj>hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#dma_fence_unwrap_for_each (C macro)c.dma_fence_unwrap_for_eachhNtauh1jhj>hhhNhNubj)}(hhh](j)}(hdma_fence_unwrap_for_eachh]j)}(hdma_fence_unwrap_for_eachh]j )}(hdma_fence_unwrap_for_eachh]j )}(hj@h]hdma_fence_unwrap_for_each}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj@ubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj@hhhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK&ubah}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj@hhhj@hK&ubah}(h]j@ah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj@hK&hj@hhubjA )}(hhh]h}(h]h ]h"]h$]h&]uh1j@ hj@hhhj@hK&ubeh}(h]h ](jmacroeh"]h$]h&]ja jjb j@jc j@jd je jf uh1jhhhj>hNhNubh)}(h3``dma_fence_unwrap_for_each (fence, cursor, head)``h]j)}(hj@h]h/dma_fence_unwrap_for_each (fence, cursor, head)}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK(hj>hhubh)}(h&iterate over all fences in containers h]h)}(h%iterate over all fences in containersh]h%iterate over all fences in containers}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK&hj@ubah}(h]h ]h"]h$]h&]uh1hhj@hK&hj>hhubjh )}(hXA**Parameters** ``fence`` current fence ``cursor`` current position inside the containers ``head`` starting point for the iterator **Description** Unwrap dma_fence_chain and dma_fence_array containers and deep dive into all potential fences in them. If **head** is just a normal fence only that one is returned.h](h)}(h**Parameters**h]jr )}(hj Ah]h Parameters}(hj AhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj Aubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK*hjAubj )}(hhh](j )}(h``fence`` current fence h](j )}(h ``fence``h]j)}(hj*Ah]hfence}(hj,AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(Aubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK'hj$Aubj )}(hhh]h)}(h current fenceh]h current fence}(hjCAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?AhK'hj@Aubah}(h]h ]h"]h$]h&]uh1j hj$Aubeh}(h]h ]h"]h$]h&]uh1j hj?AhK'hj!Aubj )}(h2``cursor`` current position inside the containers h](j )}(h ``cursor``h]j)}(hjcAh]hcursor}(hjeAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaAubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK(hj]Aubj )}(hhh]h)}(h¤t position inside the containersh]h¤t position inside the containers}(hj|AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxAhK(hjyAubah}(h]h ]h"]h$]h&]uh1j hj]Aubeh}(h]h ]h"]h$]h&]uh1j hjxAhK(hj!Aubj )}(h)``head`` starting point for the iterator h](j )}(h``head``h]j)}(hjAh]hhead}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK)hjAubj )}(hhh]h)}(hstarting point for the iteratorh]hstarting point for the iterator}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhK)hjAubah}(h]h ]h"]h$]h&]uh1j hjAubeh}(h]h ]h"]h$]h&]uh1j hjAhK)hj!Aubeh}(h]h ]h"]h$]h&]uh1j hjAubh)}(h**Description**h]jr )}(hjAh]h Description}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjAubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK+hjAubh)}(hUnwrap dma_fence_chain and dma_fence_array containers and deep dive into all potential fences in them. If **head** is just a normal fence only that one is returned.h](hjUnwrap dma_fence_chain and dma_fence_array containers and deep dive into all potential fences in them. If }(hjAhhhNhNubjr )}(h**head**h]hhead}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjAubh2 is just a normal fence only that one is returned.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK*hjAubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj>hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j dma_fence_unwrap_merge (C macro)c.dma_fence_unwrap_mergehNtauh1jhj>hhhNhNubj)}(hhh](j)}(hdma_fence_unwrap_mergeh]j)}(hdma_fence_unwrap_mergeh]j )}(hdma_fence_unwrap_mergeh]j )}(hj(Bh]hdma_fence_unwrap_merge}(hj2BhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj.Bubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hj*Bhhhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK:ubah}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hj&BhhhjEBhK:ubah}(h]j!Bah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjEBhK:hj#BhhubjA )}(hhh]h}(h]h ]h"]h$]h&]uh1j@ hj#BhhhjEBhK:ubeh}(h]h ](jmacroeh"]h$]h&]ja jjb j^Bjc j^Bjd je jf uh1jhhhj>hNhNubh)}(h ``dma_fence_unwrap_merge (...)``h]j)}(hjdBh]hdma_fence_unwrap_merge (...)}(hjfBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbBubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhhubh)}(hunwrap and merge fences h]h)}(hunwrap and merge fencesh]hunwrap and merge fences}(hj~BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK:hjzBubah}(h]h ]h"]h$]h&]uh1hhjBhK:hj>hhubjh )}(hX**Parameters** ``...`` variable arguments **Description** All fences given as parameters are unwrapped and merged back together as flat dma_fence_array. Useful if multiple containers need to be merged together. Implemented as a macro to allocate the necessary arrays on the stack and account the stack frame size to the caller. Returns NULL on memory allocation failure, a dma_fence object representing all the given fences otherwise.h](h)}(h**Parameters**h]jr )}(hjBh]h Parameters}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjBubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK>hjBubj )}(hhh]j )}(h``...`` variable arguments h](j )}(h``...``h]j)}(hjBh]h...}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1j hd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhjBubj )}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhKhjBubah}(h]h ]h"]h$]h&]uh1j hjBubeh}(h]h ]h"]h$]h&]uh1j hjBhKhjBubah}(h]h ]h"]h$]h&]uh1j hjBubh)}(h**Description**h]jr )}(hjBh]h Description}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjBubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKhjBubh)}(hAll fences given as parameters are unwrapped and merged back together as flat dma_fence_array. Useful if multiple containers need to be merged together.h]hAll fences given as parameters are unwrapped and merged back together as flat dma_fence_array. Useful if multiple containers need to be merged together.}(hj ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK;hjBubh)}(htImplemented as a macro to allocate the necessary arrays on the stack and account the stack frame size to the caller.h]htImplemented as a macro to allocate the necessary arrays on the stack and account the stack frame size to the caller.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhK>hjBubh)}(hjReturns NULL on memory allocation failure, a dma_fence object representing all the given fences otherwise.h]hjReturns NULL on memory allocation failure, a dma_fence object representing all the given fences otherwise.}(hj'ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhd/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:214: ./include/linux/dma-fence-unwrap.hhKAhjBubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj>hhhNhNubeh}(h]dma-fence-unwrapah ]h"]dma fence unwrapah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fence Sync Fileh]hDMA Fence Sync File}(hjHChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEChhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jsync_file_create (C function)c.sync_file_createhNtauh1jhjEChhhNhNubj)}(hhh](j)}(h=struct sync_file * sync_file_create (struct dma_fence *fence)h]j)}(h;struct sync_file *sync_file_create(struct dma_fence *fence)h](j)}(hjh]hstruct}(hjoChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkChhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chK9ubj)}(h h]h }(hj}ChhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjkChhhj|ChK9ubh)}(hhh]j )}(h sync_fileh]h sync_file}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjCmodnameN classnameNjj)}j]jO)}jGsync_file_createsbc.sync_file_createasbuh1hhjkChhhj|ChK9ubj)}(h h]h }(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjkChhhj|ChK9ubjd)}(hjgh]h*}(hjChhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjkChhhj|ChK9ubj )}(hsync_file_createh]j )}(hjCh]hsync_file_create}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjkChhhj|ChK9ubj)}(h(struct dma_fence *fence)h]j)}(hstruct dma_fence *fenceh](j)}(hjh]hstruct}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubj)}(h h]h }(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjCubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjDubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetj DmodnameN classnameNjj)}j]jCc.sync_file_createasbuh1hhjCubj)}(h h]h }(hj%DhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjCubjd)}(hjgh]h*}(hj3DhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjCubj )}(hfenceh]hfence}(hj@DhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjCubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjCubah}(h]h ]h"]h$]h&]jjuh1jhjkChhhj|ChK9ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjgChhhj|ChK9ubah}(h]jbCah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj|ChK9hjdChhubjA )}(hhh]h)}(hcreates a sync fileh]hcreates a sync file}(hjjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chK9hjgDhhubah}(h]h ]h"]h$]h&]uh1j@ hjdChhhj|ChK9ubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jDjc jDjd je jf uh1jhhhjEChNhNubjh )}(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]jr )}(hjDh]h Parameters}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjDubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chK=hjDubj )}(hhh]j )}(h;``struct dma_fence *fence`` fence to add to the sync_fence h](j )}(h``struct dma_fence *fence``h]j)}(hjDh]hstruct dma_fence *fence}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chK:hjDubj )}(hhh]h)}(hfence to add to the sync_fenceh]hfence to add to the sync_fence}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhK:hjDubah}(h]h ]h"]h$]h&]uh1j hjDubeh}(h]h ]h"]h$]h&]uh1j hjDhK:hjDubah}(h]h ]h"]h$]h&]uh1j hjDubh)}(h**Description**h]jr )}(hjDh]h Description}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjDubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKfile). Returns the sync_file or NULL in case of error.h](hCreates a sync_file containg }(hjDhhhNhNubjr )}(h **fence**h]hfence}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjDubh5. This function acquires and additional reference of }(hjDhhhNhNubjr )}(h **fence**h]hfence}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjDubh for the newly-created }(hjDhhhNhNubh)}(h:c:type:`sync_file`h]j)}(hj*Eh]h sync_file}(hj,EhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj(Eubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjj sync_fileuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chK;hjDubh{, if it succeeds. The sync_file can be released with fput(sync_file->file). Returns the sync_file or NULL in case of error.}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjGEhK;hjDubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjEChhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j sync_file_get_fence (C function)c.sync_file_get_fencehNtauh1jhjEChhhNhNubj)}(hhh](j)}(h/struct dma_fence * sync_file_get_fence (int fd)h]j)}(h-struct dma_fence *sync_file_get_fence(int fd)h](j)}(hjh]hstruct}(hjrEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnEhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKaubj)}(h h]h }(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjnEhhhjEhKaubh)}(hhh]j )}(h dma_fenceh]h dma_fence}(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubah}(h]h ]h"]h$]h&] refdomainjreftypejG reftargetjEmodnameN classnameNjj)}j]jO)}jGsync_file_get_fencesbc.sync_file_get_fenceasbuh1hhjnEhhhjEhKaubj)}(h h]h }(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjnEhhhjEhKaubjd)}(hjgh]h*}(hjEhhhNhNubah}(h]h ]jpah"]h$]h&]uh1jchjnEhhhjEhKaubj )}(hsync_file_get_fenceh]j )}(hjEh]hsync_file_get_fence}(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjnEhhhjEhKaubj)}(h(int fd)h]j)}(hint fdh](jM)}(hinth]hint}(hjEhhhNhNubah}(h]h ]jYah"]h$]h&]uh1jLhjEubj)}(h h]h }(hjEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjEubj )}(hfdh]hfd}(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjEubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjEubah}(h]h ]h"]h$]h&]jjuh1jhjnEhhhjEhKaubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjjEhhhjEhKaubah}(h]jeEah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjEhKahjgEhhubjA )}(hhh]h)}(h)get the fence related to the sync_file fdh]h)get the fence related to the sync_file fd}(hj2FhhhNhNubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKahj/Fhhubah}(h]h ]h"]h$]h&]uh1j@ hjgEhhhjEhKaubeh}(h]h ](jfunctioneh"]h$]h&]ja jjb jJFjc jJFjd je jf uh1jhhhjEChNhNubjh )}(h**Parameters** ``int fd`` sync_file fd to get the fence from **Description** Ensures **fd** references a valid sync_file and returns a fence that represents all fence in the sync_file. On error NULL is returned.h](h)}(h**Parameters**h]jr )}(hjTFh]h Parameters}(hjVFhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjRFubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKehjNFubj )}(hhh]j )}(h.``int fd`` sync_file fd to get the fence from h](j )}(h ``int fd``h]j)}(hjsFh]hint fd}(hjuFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqFubah}(h]h ]h"]h$]h&]uh1j h_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKbhjmFubj )}(hhh]h)}(h"sync_file fd to get the fence fromh]h"sync_file fd to get the fence from}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhKbhjFubah}(h]h ]h"]h$]h&]uh1j hjmFubeh}(h]h ]h"]h$]h&]uh1j hjFhKbhjjFubah}(h]h ]h"]h$]h&]uh1j hjNFubh)}(h**Description**h]jr )}(hjFh]h Description}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjFubah}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKdhjNFubh)}(hEnsures **fd** references a valid sync_file and returns a fence that represents all fence in the sync_file. On error NULL is returned.h](hEnsures }(hjFhhhNhNubjr )}(h**fd**h]hfd}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjFubhx references a valid sync_file and returns a fence that represents all fence in the sync_file. On error NULL is returned.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:220: ./drivers/dma-buf/sync_file.chKchjNFubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjEChhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jsync_file (C struct) c.sync_filehNtauh1jhjEChhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhNubj)}(hhh](j)}(h sync_fileh]j)}(hstruct sync_fileh](j)}(hjh]hstruct}(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGhhh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKubj)}(h h]h }(hjGhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjGhhhjGhKubj )}(h sync_fileh]j )}(hjGh]h sync_file}(hj&GhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj"Gubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjGhhhjGhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjFhhhjGhKubah}(h]jFah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjGhKhjFhhubjA )}(hhh]h)}(h$sync file to export to the userspaceh]h$sync file to export to the userspace}(hjHGhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhjEGhhubah}(h]h ]h"]h$]h&]uh1j@ hjFhhhjGhKubeh}(h]h ](jstructeh"]h$]h&]ja jjb j`Gjc j`Gjd je jf uh1jhhhjEChjFhNubjh )}(hX**Definition**:: struct sync_file { struct file *file; char user_name[32]; #ifdef CONFIG_DEBUG_FS; struct list_head sync_file_list; #endif; wait_queue_head_t wq; unsigned long flags; struct dma_fence *fence; struct dma_fence_cb cb; }; **Members** ``file`` file representing this fence ``user_name`` Name of the sync file provided by userspace, for merged fences. Otherwise generated through driver callbacks (in which case the entire array is 0). ``sync_file_list`` membership in global file list ``wq`` wait queue for fence signaling ``flags`` flags for the sync_file ``fence`` fence with the fences in the sync_file ``cb`` fence callback informationh](h)}(h**Definition**::h](jr )}(h**Definition**h]h Definition}(hjlGhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjhGubh:}(hjhGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhjdGubj)}(hXstruct sync_file { struct file *file; char user_name[32]; #ifdef CONFIG_DEBUG_FS; struct list_head sync_file_list; #endif; wait_queue_head_t wq; unsigned long flags; struct dma_fence *fence; struct dma_fence_cb cb; };h]hXstruct sync_file { struct file *file; char user_name[32]; #ifdef CONFIG_DEBUG_FS; struct list_head sync_file_list; #endif; wait_queue_head_t wq; unsigned long flags; struct dma_fence *fence; struct dma_fence_cb cb; };}hjGsbah}(h]h ]h"]h$]h&]jjuh1jh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhjdGubh)}(h **Members**h]jr )}(hjGh]hMembers}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjGubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhK*hjdGubj )}(hhh](j )}(h&``file`` file representing this fence h](j )}(h``file``h]j)}(hjGh]hfile}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhjGubj )}(hhh]h)}(hfile representing this fenceh]hfile representing this fence}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhKhjGubah}(h]h ]h"]h$]h&]uh1j hjGubeh}(h]h ]h"]h$]h&]uh1j hjGhKhjGubj )}(h``user_name`` Name of the sync file provided by userspace, for merged fences. Otherwise generated through driver callbacks (in which case the entire array is 0). h](j )}(h ``user_name``h]j)}(hjGh]h user_name}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhK)hjGubj )}(hhh]h)}(hName of the sync file provided by userspace, for merged fences. Otherwise generated through driver callbacks (in which case the entire array is 0).h]hName of the sync file provided by userspace, for merged fences. Otherwise generated through driver callbacks (in which case the entire array is 0).}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhK'hjHubah}(h]h ]h"]h$]h&]uh1j hjGubeh}(h]h ]h"]h$]h&]uh1j hjHhK)hjGubj )}(h2``sync_file_list`` membership in global file list h](j )}(h``sync_file_list``h]j)}(hj(Hh]hsync_file_list}(hj*HhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&Hubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhj"Hubj )}(hhh]h)}(hmembership in global file listh]hmembership in global file list}(hjAHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=HhKhj>Hubah}(h]h ]h"]h$]h&]uh1j hj"Hubeh}(h]h ]h"]h$]h&]uh1j hj=HhKhjGubj )}(h&``wq`` wait queue for fence signaling h](j )}(h``wq``h]j)}(hjaHh]hwq}(hjcHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_Hubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhj[Hubj )}(hhh]h)}(hwait queue for fence signalingh]hwait queue for fence signaling}(hjzHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvHhKhjwHubah}(h]h ]h"]h$]h&]uh1j hj[Hubeh}(h]h ]h"]h$]h&]uh1j hjvHhKhjGubj )}(h"``flags`` flags for the sync_file h](j )}(h ``flags``h]j)}(hjHh]hflags}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhjHubj )}(hhh]h)}(hflags for the sync_fileh]hflags for the sync_file}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhKhjHubah}(h]h ]h"]h$]h&]uh1j hjHubeh}(h]h ]h"]h$]h&]uh1j hjHhKhjGubj )}(h1``fence`` fence with the fences in the sync_file h](j )}(h ``fence``h]j)}(hjHh]hfence}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhjHubj )}(hhh]h)}(h&fence with the fences in the sync_fileh]h&fence with the fences in the sync_file}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhKhjHubah}(h]h ]h"]h$]h&]uh1j hjHubeh}(h]h ]h"]h$]h&]uh1j hjHhKhjGubj )}(h!``cb`` fence callback informationh](j )}(h``cb``h]j)}(hj Ih]hcb}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj Iubah}(h]h ]h"]h$]h&]uh1j h]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhjIubj )}(hhh]h)}(hfence callback informationh]hfence callback information}(hj%IhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhj"Iubah}(h]h ]h"]h$]h&]uh1j hjIubeh}(h]h ]h"]h$]h&]uh1j hj!IhKhjGubeh}(h]h ]h"]h$]h&]uh1j hjdGubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hjEChhhjFhNubh)}(h**Description**h]jr )}(hjOIh]h Description}(hjQIhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjMIubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhK"hjEChhubh)}(hEflags: POLL_ENABLED: whether userspace is currently poll()'ing or noth]hGflags: POLL_ENABLED: whether userspace is currently poll()’ing or not}(hjeIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:223: ./include/linux/sync_file.hhKhjEChhubeh}(h]dma-fence-sync-fileah ]h"]dma fence sync fileah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hDMA Fence Sync File uABIh]hDMA Fence Sync File uABI}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|IhhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jsync_merge_data (C struct)c.sync_merge_datahNtauh1jhj|Ihhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhNubj)}(hhh](j)}(hsync_merge_datah]j)}(hstruct sync_merge_datah](j)}(hjh]hstruct}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKubj)}(h h]h }(hjIhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjIhhhjIhKubj )}(hsync_merge_datah]j )}(hjIh]hsync_merge_data}(hjIhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjIubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjIhhhjIhKubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjIhhhjIhKubah}(h]jIah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjIhKhjIhhubjA )}(hhh]h)}(h SYNC_IOC_MERGE: merge two fencesh]h SYNC_IOC_MERGE: merge two fences}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjIhhubah}(h]h ]h"]h$]h&]uh1j@ hjIhhhjIhKubeh}(h]h ](jstructeh"]h$]h&]ja jjb jJjc jJjd je jf uh1jhhhj|IhjIhNubjh )}(hX{**Definition**:: struct sync_merge_data { char name[32]; __s32 fd2; __s32 fence; __u32 flags; __u32 pad; }; **Members** ``name`` name of new fence ``fd2`` file descriptor of second fence ``fence`` returns the fd of the new fence to userspace ``flags`` merge_data flags ``pad`` padding for 64-bit alignment, should always be zeroh](h)}(h**Definition**::h](jr )}(h**Definition**h]h Definition}(hj JhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj Jubh:}(hj JhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjJubj)}(hnstruct sync_merge_data { char name[32]; __s32 fd2; __s32 fence; __u32 flags; __u32 pad; };h]hnstruct sync_merge_data { char name[32]; __s32 fd2; __s32 fence; __u32 flags; __u32 pad; };}hj&Jsbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjJubh)}(h **Members**h]jr )}(hj7Jh]hMembers}(hj9JhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj5Jubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK!hjJubj )}(hhh](j )}(h``name`` name of new fence h](j )}(h``name``h]j)}(hjVJh]hname}(hjXJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTJubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjPJubj )}(hhh]h)}(hname of new fenceh]hname of new fence}(hjoJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkJhKhjlJubah}(h]h ]h"]h$]h&]uh1j hjPJubeh}(h]h ]h"]h$]h&]uh1j hjkJhKhjMJubj )}(h(``fd2`` file descriptor of second fence h](j )}(h``fd2``h]j)}(hjJh]hfd2}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjJubj )}(hhh]h)}(hfile descriptor of second fenceh]hfile descriptor of second fence}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhKhjJubah}(h]h ]h"]h$]h&]uh1j hjJubeh}(h]h ]h"]h$]h&]uh1j hjJhKhjMJubj )}(h7``fence`` returns the fd of the new fence to userspace h](j )}(h ``fence``h]j)}(hjJh]hfence}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjJubj )}(hhh]h)}(h,returns the fd of the new fence to userspaceh]h,returns the fd of the new fence to userspace}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhKhjJubah}(h]h ]h"]h$]h&]uh1j hjJubeh}(h]h ]h"]h$]h&]uh1j hjJhKhjMJubj )}(h``flags`` merge_data flags h](j )}(h ``flags``h]j)}(hjKh]hflags}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjJubj )}(hhh]h)}(hmerge_data flagsh]hmerge_data flags}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhKhjKubah}(h]h ]h"]h$]h&]uh1j hjJubeh}(h]h ]h"]h$]h&]uh1j hjKhKhjMJubj )}(h;``pad`` padding for 64-bit alignment, should always be zeroh](j )}(h``pad``h]j)}(hj:Kh]hpad}(hj )j? huh1jhjKhK hjKhhubjA )}(hhh]h)}(hdetailed fence informationh]hdetailed fence information}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK'hjKhhubah}(h]h ]h"]h$]h&]uh1j@ hjKhhhjKhK ubeh}(h]h ](jstructeh"]h$]h&]ja jjb jLjc jLjd je jf uh1jhhhj|IhjIhNubjh )}(hX**Definition**:: struct sync_fence_info { char obj_name[32]; char driver_name[32]; __s32 status; __u32 flags; __u64 timestamp_ns; }; **Members** ``obj_name`` name of parent sync_timeline ``driver_name`` name of driver implementing the parent ``status`` status of the fence 0:active 1:signaled <0:error ``flags`` fence_info flags ``timestamp_ns`` timestamp of status change in nanosecondsh](h)}(h**Definition**::h](jr )}(h**Definition**h]h Definition}(hj!LhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjLubh:}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK+hjLubj)}(hstruct sync_fence_info { char obj_name[32]; char driver_name[32]; __s32 status; __u32 flags; __u64 timestamp_ns; };h]hstruct sync_fence_info { char obj_name[32]; char driver_name[32]; __s32 status; __u32 flags; __u64 timestamp_ns; };}hj:Lsbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK-hjLubh)}(h **Members**h]jr )}(hjKLh]hMembers}(hjMLhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjILubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK5hjLubj )}(hhh](j )}(h*``obj_name`` name of parent sync_timeline h](j )}(h ``obj_name``h]j)}(hjjLh]hobj_name}(hjlLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhLubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK)hjdLubj )}(hhh]h)}(hname of parent sync_timelineh]hname of parent sync_timeline}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhK)hjLubah}(h]h ]h"]h$]h&]uh1j hjdLubeh}(h]h ]h"]h$]h&]uh1j hjLhK)hjaLubj )}(h7``driver_name`` name of driver implementing the parent h](j )}(h``driver_name``h]j)}(hjLh]h driver_name}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK*hjLubj )}(hhh]h)}(h&name of driver implementing the parenth]h&name of driver implementing the parent}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhK*hjLubah}(h]h ]h"]h$]h&]uh1j hjLubeh}(h]h ]h"]h$]h&]uh1j hjLhK*hjaLubj )}(h<``status`` status of the fence 0:active 1:signaled <0:error h](j )}(h ``status``h]j)}(hjLh]hstatus}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK+hjLubj )}(hhh]h)}(h0status of the fence 0:active 1:signaled <0:errorh]h0status of the fence 0:active 1:signaled <0:error}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhK+hjLubah}(h]h ]h"]h$]h&]uh1j hjLubeh}(h]h ]h"]h$]h&]uh1j hjLhK+hjaLubj )}(h``flags`` fence_info flags h](j )}(h ``flags``h]j)}(hjMh]hflags}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK,hjMubj )}(hhh]h)}(hfence_info flagsh]hfence_info flags}(hj.MhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*MhK,hj+Mubah}(h]h ]h"]h$]h&]uh1j hjMubeh}(h]h ]h"]h$]h&]uh1j hj*MhK,hjaLubj )}(h:``timestamp_ns`` timestamp of status change in nanosecondsh](j )}(h``timestamp_ns``h]j)}(hjNMh]h timestamp_ns}(hjPMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLMubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK,hjHMubj )}(hhh]h)}(h)timestamp of status change in nanosecondsh]h)timestamp of status change in nanoseconds}(hjgMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK-hjdMubah}(h]h ]h"]h$]h&]uh1j hjHMubeh}(h]h ]h"]h$]h&]uh1j hjcMhK,hjaLubeh}(h]h ]h"]h$]h&]uh1j hjLubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj|IhhhjIhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jsync_file_info (C struct)c.sync_file_infohNtauh1jhj|IhhhjIhNubj)}(hhh](j)}(hsync_file_infoh]j)}(hstruct sync_file_infoh](j)}(hjh]hstruct}(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK3ubj)}(h h]h }(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjMhhhjMhK3ubj )}(hsync_file_infoh]j )}(hjMh]hsync_file_info}(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjMubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjMhhhjMhK3ubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjMhhhjMhK3ubah}(h]jMah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhjMhK3hjMhhubjA )}(hhh]h)}(h;SYNC_IOC_FILE_INFO: get detailed information on a sync_fileh]h;SYNC_IOC_FILE_INFO: get detailed information on a sync_file}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK7hjMhhubah}(h]h ]h"]h$]h&]uh1j@ hjMhhhjMhK3ubeh}(h]h ](jstructeh"]h$]h&]ja jjb jNjc jNjd je jf uh1jhhhj|IhjIhNubjh )}(hX**Definition**:: struct sync_file_info { char name[32]; __s32 status; __u32 flags; __u32 num_fences; __u32 pad; __u64 sync_fence_info; }; **Members** ``name`` name of fence ``status`` status of fence. 1: signaled 0:active <0:error ``flags`` sync_file_info flags ``num_fences`` number of fences in the sync_file ``pad`` padding for 64-bit alignment, should always be zero ``sync_fence_info`` pointer to array of struct :c:type:`sync_fence_info` with all fences in the sync_fileh](h)}(h**Definition**::h](jr )}(h**Definition**h]h Definition}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj Nubh:}(hj NhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK;hjNubj)}(hstruct sync_file_info { char name[32]; __s32 status; __u32 flags; __u32 num_fences; __u32 pad; __u64 sync_fence_info; };h]hstruct sync_file_info { char name[32]; __s32 status; __u32 flags; __u32 num_fences; __u32 pad; __u64 sync_fence_info; };}hj'Nsbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK=hjNubh)}(h **Members**h]jr )}(hj8Nh]hMembers}(hj:NhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj6Nubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKFhjNubj )}(hhh](j )}(h``name`` name of fence h](j )}(h``name``h]j)}(hjWNh]hname}(hjYNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUNubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK9hjQNubj )}(hhh]h)}(h name of fenceh]h name of fence}(hjpNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlNhK9hjmNubah}(h]h ]h"]h$]h&]uh1j hjQNubeh}(h]h ]h"]h$]h&]uh1j hjlNhK9hjNNubj )}(h:``status`` status of fence. 1: signaled 0:active <0:error h](j )}(h ``status``h]j)}(hjNh]hstatus}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK:hjNubj )}(hhh]h)}(h.status of fence. 1: signaled 0:active <0:errorh]h.status of fence. 1: signaled 0:active <0:error}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhK:hjNubah}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]uh1j hjNhK:hjNNubj )}(h``flags`` sync_file_info flags h](j )}(h ``flags``h]j)}(hjNh]hflags}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK;hjNubj )}(hhh]h)}(hsync_file_info flagsh]hsync_file_info flags}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhK;hjNubah}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ]h"]h$]h&]uh1j hjNhK;hjNNubj )}(h1``num_fences`` number of fences in the sync_file h](j )}(h``num_fences``h]j)}(hjOh]h num_fences}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKhjnOubj )}(hhh]h)}(hUpointer to array of struct :c:type:`sync_fence_info` with all fences in the sync_fileh](hpointer to array of struct }(hjOhhhNhNubh)}(h:c:type:`sync_fence_info`h]j)}(hjOh]hsync_fence_info}(hjOhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjsync_fence_infouh1hhjOhK>hjOubh! with all fences in the sync_file}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjOhK>hjOubah}(h]h ]h"]h$]h&]uh1j hjnOubeh}(h]h ]h"]h$]h&]uh1j hjOhK>hjNNubeh}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj|IhhhjIhNubh)}(h**Description**h]jr )}(hjOh]h Description}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjOubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKBhj|Ihhubh)}(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.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK?hj|Ihhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jsync_set_deadline (C struct)c.sync_set_deadlinehNtauh1jhj|IhhhjIhNubj)}(hhh](j)}(hsync_set_deadlineh]j)}(hstruct sync_set_deadlineh](j)}(hjh]hstruct}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPhhhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKGubj)}(h h]h }(hj%PhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjPhhhj$PhKGubj )}(hsync_set_deadlineh]j )}(hjPh]hsync_set_deadline}(hj7PhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj3Pubah}(h]h ](j' j( eh"]h$]h&]jjuh1j hjPhhhj$PhKGubeh}(h]h ]h"]h$]h&]jjj2 uh1jj3 j4 hjPhhhj$PhKGubah}(h]j Pah ](j8 j9 eh"]h$]h&]j= j> )j? huh1jhj$PhKGhj PhhubjA )}(hhh]h)}(h6SYNC_IOC_SET_DEADLINE - set a deadline hint on a fenceh]h6SYNC_IOC_SET_DEADLINE - set a deadline hint on a fence}(hjYPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKPhjVPhhubah}(h]h ]h"]h$]h&]uh1j@ hj Phhhj$PhKGubeh}(h]h ](jstructeh"]h$]h&]ja jjb jqPjc jqPjd je jf uh1jhhhj|IhjIhNubjh )}(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](jr )}(h**Definition**h]h Definition}(hj}PhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjyPubh:}(hjyPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKThjuPubj)}(hCstruct sync_set_deadline { __u64 deadline_ns; __u64 pad; };h]hCstruct sync_set_deadline { __u64 deadline_ns; __u64 pad; };}hjPsbah}(h]h ]h"]h$]h&]jjuh1jhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKVhjuPubh)}(h **Members**h]jr )}(hjPh]hMembers}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hjPubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhK[hjuPubj )}(hhh](j )}(h.``deadline_ns`` absolute time of the deadline h](j )}(h``deadline_ns``h]j)}(hjPh]h deadline_ns}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKRhjPubj )}(hhh]h)}(habsolute time of the deadlineh]habsolute time of the deadline}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhKRhjPubah}(h]h ]h"]h$]h&]uh1j hjPubeh}(h]h ]h"]h$]h&]uh1j hjPhKRhjPubj )}(h``pad`` must be zeroh](j )}(h``pad``h]j)}(hjPh]hpad}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1j hb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKRhjPubj )}(hhh]h)}(h must be zeroh]h must be zero}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKShjQubah}(h]h ]h"]h$]h&]uh1j hjPubeh}(h]h ]h"]h$]h&]uh1j hjQhKRhjPubeh}(h]h ]h"]h$]h&]uh1j hjuPubeh}(h]h ] kernelindentah"]h$]h&]uh1jg hj|IhhhjIhNubh)}(h**Description**h]jr )}(hjBQh]h Description}(hjDQhhhNhNubah}(h]h ]h"]h$]h&]uh1jq hj@Qubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKVhj|Ihhubh)}(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 }(hjXQhhhNhNubh)}(h :c:type:`dma_fence_set_deadline`h]j)}(hjbQh]hdma_fence_set_deadline}(hjdQhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhj`Qubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjdma_fence_set_deadlineuh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKShjXQubeh}(h]h ]h"]h$]h&]uh1hhjQhKShj|Ihhubh)}(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}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKUhj|Ihhubh)}(huclock_gettime(CLOCK_MONOTONIC, :c:type:`t`); deadline_ns = (t.tv_sec * 1000000000L) + t.tv_nsec + ns_until_deadline h]h)}(hsclock_gettime(CLOCK_MONOTONIC, :c:type:`t`); deadline_ns = (t.tv_sec * 1000000000L) + t.tv_nsec + ns_until_deadlineh](hclock_gettime(CLOCK_MONOTONIC, }(hjQhhhNhNubh)}(h :c:type:`t`h]j)}(hjQh]ht}(hjQhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjjjtuh1hhb/var/lib/git/docbuild/linux/Documentation/driver-api/dma-buf:229: ./include/uapi/linux/sync_file.hhKXhjQubhI); deadline_ns = (t.tv_sec * 1000000000L) + t.tv_nsec + ns_until_deadline}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjQhKXhjQubah}(h]h ]h"]h$]h&]uh1hhjQhKXhj|Ihhubeh}(h]dma-fence-sync-file-uabiah ]h"]dma fence sync file uabiah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hIndefinite DMA Fencesh]hIndefinite DMA Fences}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhhhhhKubh)}(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:}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQhhubh)}(hhh](j)}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQubah}(h]h ]h"]h$]h&]uh1jhjQhhhhhNubj)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjRubah}(h]h ]h"]h$]h&]uh1jhjQhhhhhNubj)}(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/RhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj+Rubah}(h]h ]h"]h$]h&]uh1jhjQhhhhhNubj)}(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.}(hjGRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjCRubah}(h]h ]h"]h$]h&]uh1jhjQhhhhhNubeh}(h]h ]h"]h$]h&]jRjguh1hhhhKhjQhhubh)}(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:}(hjaRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQhhubh)}(hhh](j)}(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.}(hjvRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjrRubah}(h]h ]h"]h$]h&]uh1jhjoRhhhhhNubj)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjRubah}(h]h ]h"]h$]h&]uh1jhjoRhhhhhNubeh}(h]h ]h"]h$]h&]jRjguh1hhhhMhjQhhubh)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjQhhubhfigure)}(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 } }}hjRsbah}(h]h ]h"]h$]h&]jjuh1jhjRhhubah}(h]h ]h"]h$]h&]alt#Indefinite Fencing Dependency CyclesrclangDOTuh1jRhjRubhcaption)}(h#Indefinite Fencing Dependency Cycleh]h#Indefinite Fencing Dependency Cycle}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jRhhhKhjRubeh}(h]id1ah ]h"]h$]h&]altjRcaptionjRuh1jRhjQhhhhhNubh)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQhhubh)}(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:}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjQhhubh)}(hhh](j)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hjSubah}(h]h ]h"]h$]h&]uh1jhjShhhhhNubj)}(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-ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj)Subah}(h]h ]h"]h$]h&]uh1jhjShhhhhNubeh}(h]h ]h"]h$]h&]jRjguh1hhhhM'hjQhhubeh}(h]indefinite-dma-fencesah ]h"]indefinite dma fencesah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(h-Recoverable Hardware Page Faults Implicationsh]h-Recoverable Hardware Page Faults Implications}(hjRShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOShhhhhM0ubh)}(haModern hardware supports recoverable page faults, which has a lot of implications for DMA fences.h]haModern hardware supports recoverable page faults, which has a lot of implications for DMA fences.}(hj`ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hjOShhubh)}(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.}(hjnShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hjOShhubh)}(hXOn GPUs this poses a problem, because current desktop compositor protocols on Linux rely on DMA fences, which means without an entirely new userspace stack built on top of userspace fences, they cannot benefit from recoverable page faults. Specifically this means implicit synchronization will not be possible. The exception is when page faults are only used as migration hints and never to on-demand fill a memory request. For now this means recoverable page faults on GPUs are limited to pure compute workloads.h]hXOn GPUs this poses a problem, because current desktop compositor protocols on Linux rely on DMA fences, which means without an entirely new userspace stack built on top of userspace fences, they cannot benefit from recoverable page faults. Specifically this means implicit synchronization will not be possible. The exception is when page faults are only used as migration hints and never to on-demand fill a memory request. For now this means recoverable page faults on GPUs are limited to pure compute workloads.}(hj|ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjOShhubh)}(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:}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhjOShhubh)}(hhh](j)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjSubah}(h]h ]h"]h$]h&]uh1jhjShhhhhNubj)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhjSubah}(h]h ]h"]h$]h&]uh1jhjShhhhhNubeh}(h]h ]h"]h$]h&]jRjSuh1hhhhMIhjOShhubh)}(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:}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjOShhubh)}(hhh](j)}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjSubah}(h]h ]h"]h$]h&]uh1jhjShhhhhNubj)}(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.F+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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjSubah}(h]h ]h"]h$]h&]uh1jhjShhhhhNubj)}(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().}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjTubah}(h]h ]h"]h$]h&]uh1jhjShhhhhNubj)}(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.ThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hj*Tubah}(h]h ]h"]h$]h&]uh1jhjShhhhhNubj)}(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.}(hjFThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMghjBTubah}(h]h ]h"]h$]h&]uh1jhjShhhhhNubeh}(h]h ]h"]h$]h&]jRjSuh1hhhhMRhjOShhubh)}(hX+Note that workloads that run on independent hardware like copy engines or other GPUs do not have any impact. This allows us to keep using DMA fences internally in the kernel even for resolving hardware page faults, e.g. by using copy engines to clear or copy memory needed to resolve the page fault.h]hX+Note that workloads that run on independent hardware like copy engines or other GPUs do not have any impact. This allows us to keep using DMA fences internally in the kernel even for resolving hardware page faults, e.g. by using copy engines to clear or copy memory needed to resolve the page fault.}(hj`ThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjOShhubh)}(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 }(hjnThhhNhNubhtitle_reference)}(h`Infinite DMA Fences`h]hInfinite DMA Fences}(hjxThhhNhNubah}(h]h ]h"]h$]h&]uh1jvThjnTubhXM 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.}(hjnThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMthjOShhubeh}(h]-recoverable-hardware-page-faults-implicationsah ]h"]-recoverable hardware page faults implicationsah$]h&]uh1hhjhhhhhM0ubeh}(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_handlerjTerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehʌ _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}( cpu access to dma buffer objects]jaimplicit fence poll support](jjfSedma buffer ioctls]jaurefids}nameids}(jTjTj~j{j`j`jIjFjjjujjjjj-jjj`j`jjjTjTj1j.j_j\jjjjj.j.j>j>jBCj?CjyIjvIjQjQjLSjISjTjTu nametypes}(jTj~j`jIjjujjjj`jjTj1j_jjj.j>jBCjyIjQjLSjTuh}(jThj{jZj`jjFj7jjLjjjjyj-jjjj` je js jx jjj`jjj j?jDj1j6jjjejjj j j#j #ja%jf%j*'j/'j(j(jf+jk+j-j-j0j0j\3ja3j4j4j6j7j\9ja9j;j;jL>jQ>j@j@jBjBjDjDjFjFj3Oj8OjUjUjpWjuWjZj Zj\j\j]j]j:_j?_jj`j`j`jTbjYbjcjcjejfjgjgjjjjjnjnjojojqjqjsjsjrujwujwjwj{j{j~j ~jjjۃjjjj?jDjjj1j6jjjjjjj jjjj9j>jjřjjjFjKjӠjؠj jj6j;jԦj٦jTjYjj$jTjj.jFj\j4jjbjjjjj!j&jjj1j6jjjܺjjjjjjjjjjEjJjjjxj}j6j;jjjjjjjOjTjjj\jaj+j0j.j3jXj]jnjsjjjjjljqjgjljjjjj(j-jjj?jDjjjjjjjjjj jjjjj^jcjjj j j2 j7 jjj'j,jjj4j9j\jajjj\jaj.jjjjvj{j!j!jL%jQ%jM'jR'j(j(j*j*jq,jv,j>j.j9.j>.j/j/j2j2jg5jl5j7j7j9j9j];jb;j<j<jt=jy=j?Cj>j>j>j@j@j!Bj&BjvIjECjbCjgCjeEjjEjFjFjQj|IjIjIjKjKjMjMj PjPjISjQjTjOSjRjRu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jTKsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.