Lines Matching +full:use +full:- +full:guard +full:- +full:pages

1 /* SPDX-License-Identifier: MIT */
9 #include <linux/dma-fence.h>
21 * The sg mask of the pages sg_table. i.e the mask of
27 * The gtt page sizes we are allowed to use given the
29 * express the smallest unit we can use for the whole
31 * to use opportunistically.
37 * struct i915_vma_bindinfo - Information needed for async bind
42 * @pages: The pages sg-table.
43 * @page_sizes: Page sizes of the pages.
44 * @pages_rsgt: Refcounted sg-table when delayed object destruction
46 * @readonly: Whether the vma should be bound read-only.
50 struct sg_table *pages; member
58 * struct i915_vma_resource - Snapshotted unbind information.
72 * @vm: non-refcounted pointer to the vm. This is for internal use only and
82 * @guard: The size of guard area preceding and trailing the bind.
91 * take a wakeref in the dma-fence signalling critical path, it needs to be
95 * @tlb: pointer for obj->mm.tlb, if async unbind. Otherwise, NULL
129 u32 guard; member
157 * i915_vma_resource_get - Take a reference on a vma resource
165 dma_fence_get(&vma_res->unbind_fence); in i915_vma_resource_get()
170 * i915_vma_resource_put - Release a reference to a struct i915_vma_resource
175 dma_fence_put(&vma_res->unbind_fence); in i915_vma_resource_put()
179 * i915_vma_resource_init - Initialize a vma resource.
182 * @pages: The pages sg-table.
183 * @page_sizes: Page sizes of the pages.
186 * @readonly: Whether the vma should be bound read-only.
194 * @guard: The size of the guard area preceding and trailing the bind.
203 struct sg_table *pages, in i915_vma_resource_init() argument
214 u32 guard) in i915_vma_resource_init() argument
217 vma_res->vm = vm; in i915_vma_resource_init()
218 vma_res->bi.pages = pages; in i915_vma_resource_init()
219 vma_res->bi.page_sizes = *page_sizes; in i915_vma_resource_init()
221 vma_res->bi.pages_rsgt = i915_refct_sgt_get(pages_rsgt); in i915_vma_resource_init()
222 vma_res->bi.readonly = readonly; in i915_vma_resource_init()
223 vma_res->bi.lmem = lmem; in i915_vma_resource_init()
225 vma_res->mr = mr; in i915_vma_resource_init()
227 vma_res->ops = ops; in i915_vma_resource_init()
228 vma_res->private = private; in i915_vma_resource_init()
229 vma_res->start = start; in i915_vma_resource_init()
230 vma_res->node_size = node_size; in i915_vma_resource_init()
231 vma_res->vma_size = size; in i915_vma_resource_init()
232 vma_res->guard = guard; in i915_vma_resource_init()
237 GEM_BUG_ON(refcount_read(&vma_res->hold_count) != 1); in i915_vma_resource_fini()
238 if (vma_res->bi.pages_rsgt) in i915_vma_resource_fini()
239 i915_refct_sgt_put(vma_res->bi.pages_rsgt); in i915_vma_resource_fini()
240 i915_sw_fence_fini(&vma_res->chain); in i915_vma_resource_fini()