Lines Matching refs:vm
15 struct i915_page_table *alloc_pt(struct i915_address_space *vm) in alloc_pt() argument
23 pt->base = vm->alloc_pt_dma(vm, I915_GTT_PAGE_SIZE_4K); in alloc_pt()
51 struct i915_page_directory *alloc_pd(struct i915_address_space *vm) in alloc_pd() argument
59 pd->pt.base = vm->alloc_pt_dma(vm, I915_GTT_PAGE_SIZE_4K); in alloc_pd()
69 void free_px(struct i915_address_space *vm, struct i915_page_table *pt, int lvl) in free_px() argument
174 trace_i915_ppgtt_create(&ppgtt->vm); in i915_ppgtt_create()
179 void ppgtt_bind_vma(struct i915_address_space *vm, in ppgtt_bind_vma() argument
188 vm->allocate_va_range(vm, stash, vma->node.start, vma->size); in ppgtt_bind_vma()
199 vm->insert_entries(vm, vma, cache_level, pte_flags); in ppgtt_bind_vma()
203 void ppgtt_unbind_vma(struct i915_address_space *vm, struct i915_vma *vma) in ppgtt_unbind_vma() argument
206 vm->clear_range(vm, vma->node.start, vma->size); in ppgtt_unbind_vma()
215 int i915_vm_alloc_pt_stash(struct i915_address_space *vm, in i915_vm_alloc_pt_stash() argument
222 shift = vm->pd_shift; in i915_vm_alloc_pt_stash()
230 pt = alloc_pt(vm); in i915_vm_alloc_pt_stash()
232 i915_vm_free_pt_stash(vm, stash); in i915_vm_alloc_pt_stash()
240 for (n = 1; n < vm->top; n++) { in i915_vm_alloc_pt_stash()
246 pd = alloc_pd(vm); in i915_vm_alloc_pt_stash()
248 i915_vm_free_pt_stash(vm, stash); in i915_vm_alloc_pt_stash()
260 int i915_vm_map_pt_stash(struct i915_address_space *vm, in i915_vm_map_pt_stash() argument
268 err = map_pt_dma_locked(vm, pt->base); in i915_vm_map_pt_stash()
277 void i915_vm_free_pt_stash(struct i915_address_space *vm, in i915_vm_free_pt_stash() argument
286 free_px(vm, pt, n); in i915_vm_free_pt_stash()
305 ppgtt->vm.gt = gt; in ppgtt_init()
306 ppgtt->vm.i915 = i915; in ppgtt_init()
307 ppgtt->vm.dma = i915->drm.dev; in ppgtt_init()
308 ppgtt->vm.total = BIT_ULL(INTEL_INFO(i915)->ppgtt_size); in ppgtt_init()
310 dma_resv_init(&ppgtt->vm._resv); in ppgtt_init()
311 i915_address_space_init(&ppgtt->vm, VM_CLASS_PPGTT); in ppgtt_init()
313 ppgtt->vm.vma_ops.bind_vma = ppgtt_bind_vma; in ppgtt_init()
314 ppgtt->vm.vma_ops.unbind_vma = ppgtt_unbind_vma; in ppgtt_init()
315 ppgtt->vm.vma_ops.set_pages = ppgtt_set_pages; in ppgtt_init()
316 ppgtt->vm.vma_ops.clear_pages = clear_pages; in ppgtt_init()