Lines Matching refs:vm
27 static void mock_insert_page(struct i915_address_space *vm, in mock_insert_page() argument
35 static void mock_insert_entries(struct i915_address_space *vm, in mock_insert_entries() argument
41 static void mock_bind_ppgtt(struct i915_address_space *vm, in mock_bind_ppgtt() argument
51 static void mock_unbind_ppgtt(struct i915_address_space *vm, in mock_unbind_ppgtt() argument
56 static void mock_cleanup(struct i915_address_space *vm) in mock_cleanup() argument
60 static void mock_clear_range(struct i915_address_space *vm, in mock_clear_range() argument
73 ppgtt->vm.gt = to_gt(i915); in mock_ppgtt()
74 ppgtt->vm.i915 = i915; in mock_ppgtt()
75 ppgtt->vm.total = round_down(U64_MAX, PAGE_SIZE); in mock_ppgtt()
76 ppgtt->vm.dma = i915->drm.dev; in mock_ppgtt()
78 i915_address_space_init(&ppgtt->vm, VM_CLASS_PPGTT); in mock_ppgtt()
80 ppgtt->vm.alloc_pt_dma = alloc_pt_dma; in mock_ppgtt()
81 ppgtt->vm.alloc_scratch_dma = alloc_pt_dma; in mock_ppgtt()
83 ppgtt->vm.clear_range = mock_clear_range; in mock_ppgtt()
84 ppgtt->vm.insert_page = mock_insert_page; in mock_ppgtt()
85 ppgtt->vm.insert_entries = mock_insert_entries; in mock_ppgtt()
86 ppgtt->vm.cleanup = mock_cleanup; in mock_ppgtt()
88 ppgtt->vm.vma_ops.bind_vma = mock_bind_ppgtt; in mock_ppgtt()
89 ppgtt->vm.vma_ops.unbind_vma = mock_unbind_ppgtt; in mock_ppgtt()
94 static void mock_bind_ggtt(struct i915_address_space *vm, in mock_bind_ggtt() argument
102 static void mock_unbind_ggtt(struct i915_address_space *vm, in mock_unbind_ggtt() argument
111 ggtt->vm.gt = gt; in mock_init_ggtt()
112 ggtt->vm.i915 = gt->i915; in mock_init_ggtt()
113 ggtt->vm.is_ggtt = true; in mock_init_ggtt()
117 ggtt->vm.total = 4096 * PAGE_SIZE; in mock_init_ggtt()
119 ggtt->vm.alloc_pt_dma = alloc_pt_dma; in mock_init_ggtt()
120 ggtt->vm.alloc_scratch_dma = alloc_pt_dma; in mock_init_ggtt()
122 ggtt->vm.clear_range = mock_clear_range; in mock_init_ggtt()
123 ggtt->vm.insert_page = mock_insert_page; in mock_init_ggtt()
124 ggtt->vm.insert_entries = mock_insert_entries; in mock_init_ggtt()
125 ggtt->vm.cleanup = mock_cleanup; in mock_init_ggtt()
127 ggtt->vm.vma_ops.bind_vma = mock_bind_ggtt; in mock_init_ggtt()
128 ggtt->vm.vma_ops.unbind_vma = mock_unbind_ggtt; in mock_init_ggtt()
130 i915_address_space_init(&ggtt->vm, VM_CLASS_GGTT); in mock_init_ggtt()
135 i915_address_space_fini(&ggtt->vm); in mock_fini_ggtt()