Lines Matching full:vm

16 	struct i915_address_space vm;  member
23 #define i915_is_dpt(vm) ((vm)->is_dpt) argument
26 i915_vm_to_dpt(struct i915_address_space *vm) in i915_vm_to_dpt() argument
28 BUILD_BUG_ON(offsetof(struct i915_dpt, vm)); in i915_vm_to_dpt()
29 GEM_BUG_ON(!i915_is_dpt(vm)); in i915_vm_to_dpt()
30 return container_of(vm, struct i915_dpt, vm); in i915_vm_to_dpt()
33 #define dpt_total_entries(dpt) ((dpt)->vm.total >> PAGE_SHIFT)
40 static void dpt_insert_page(struct i915_address_space *vm, in dpt_insert_page() argument
46 struct i915_dpt *dpt = i915_vm_to_dpt(vm); in dpt_insert_page()
50 vm->pte_encode(addr, level, flags)); in dpt_insert_page()
53 static void dpt_insert_entries(struct i915_address_space *vm, in dpt_insert_entries() argument
58 struct i915_dpt *dpt = i915_vm_to_dpt(vm); in dpt_insert_entries()
60 const gen8_pte_t pte_encode = vm->pte_encode(0, level, flags); in dpt_insert_entries()
75 static void dpt_clear_range(struct i915_address_space *vm, in dpt_clear_range() argument
80 static void dpt_bind_vma(struct i915_address_space *vm, in dpt_bind_vma() argument
93 if (vm->has_read_only && vma_res->bi.readonly) in dpt_bind_vma()
98 vm->insert_entries(vm, vma_res, cache_level, pte_flags); in dpt_bind_vma()
110 static void dpt_unbind_vma(struct i915_address_space *vm, in dpt_unbind_vma() argument
113 vm->clear_range(vm, vma_res->start, vma_res->vma_size); in dpt_unbind_vma()
116 static void dpt_cleanup(struct i915_address_space *vm) in dpt_cleanup() argument
118 struct i915_dpt *dpt = i915_vm_to_dpt(vm); in dpt_cleanup()
123 struct i915_vma *intel_dpt_pin(struct i915_address_space *vm) in intel_dpt_pin() argument
125 struct drm_i915_private *i915 = vm->i915; in intel_dpt_pin()
126 struct i915_dpt *dpt = i915_vm_to_dpt(vm); in intel_dpt_pin()
172 void intel_dpt_unpin(struct i915_address_space *vm) in intel_dpt_unpin() argument
174 struct i915_dpt *dpt = i915_vm_to_dpt(vm); in intel_dpt_unpin()
244 struct i915_address_space *vm; in intel_dpt_create() local
282 vm = &dpt->vm; in intel_dpt_create()
284 vm->gt = to_gt(i915); in intel_dpt_create()
285 vm->i915 = i915; in intel_dpt_create()
286 vm->dma = i915->drm.dev; in intel_dpt_create()
287 vm->total = (size / sizeof(gen8_pte_t)) * I915_GTT_PAGE_SIZE; in intel_dpt_create()
288 vm->is_dpt = true; in intel_dpt_create()
290 i915_address_space_init(vm, VM_CLASS_DPT); in intel_dpt_create()
292 vm->insert_page = dpt_insert_page; in intel_dpt_create()
293 vm->clear_range = dpt_clear_range; in intel_dpt_create()
294 vm->insert_entries = dpt_insert_entries; in intel_dpt_create()
295 vm->cleanup = dpt_cleanup; in intel_dpt_create()
297 vm->vma_ops.bind_vma = dpt_bind_vma; in intel_dpt_create()
298 vm->vma_ops.unbind_vma = dpt_unbind_vma; in intel_dpt_create()
300 vm->pte_encode = gen8_ggtt_pte_encode; in intel_dpt_create()
304 return &dpt->vm; in intel_dpt_create()
307 void intel_dpt_destroy(struct i915_address_space *vm) in intel_dpt_destroy() argument
309 struct i915_dpt *dpt = i915_vm_to_dpt(vm); in intel_dpt_destroy()
311 i915_vm_put(&dpt->vm); in intel_dpt_destroy()