Lines Matching refs:vma

32 nouveau_vm_map_at(struct nouveau_vma *vma, u64 delta, struct nouveau_mem *node)
34 struct nouveau_vm *vm = vma->vm;
37 int big = vma->node->type != vmm->spg_shift;
38 u32 offset = vma->node->offset + (delta >> 12);
39 u32 bits = vma->node->type - 12;
58 vmm->map(vma, pgt, node, pte, len, phys, delta);
68 delta += (u64)len << vma->node->type;
76 nouveau_vm_map_sg_table(struct nouveau_vma *vma, u64 delta, u64 length,
79 struct nouveau_vm *vm = vma->vm;
81 int big = vma->node->type != vmm->spg_shift;
82 u32 offset = vma->node->offset + (delta >> 12);
83 u32 bits = vma->node->type - 12;
84 u32 num = length >> vma->node->type;
105 vmm->map_sg(vma, pgt, mem, pte, 1, &addr);
120 vmm->map_sg(vma, pgt, mem, pte, 1, &addr);
134 nouveau_vm_map_sg(struct nouveau_vma *vma, u64 delta, u64 length,
137 struct nouveau_vm *vm = vma->vm;
140 int big = vma->node->type != vmm->spg_shift;
141 u32 offset = vma->node->offset + (delta >> 12);
142 u32 bits = vma->node->type - 12;
143 u32 num = length >> vma->node->type;
157 vmm->map_sg(vma, pgt, mem, pte, len, list);
172 nouveau_vm_map(struct nouveau_vma *vma, struct nouveau_mem *node)
175 nouveau_vm_map_sg_table(vma, 0, node->size << 12, node);
178 nouveau_vm_map_sg(vma, 0, node->size << 12, node);
180 nouveau_vm_map_at(vma, 0, node);
184 nouveau_vm_unmap_at(struct nouveau_vma *vma, u64 delta, u64 length)
186 struct nouveau_vm *vm = vma->vm;
188 int big = vma->node->type != vmm->spg_shift;
189 u32 offset = vma->node->offset + (delta >> 12);
190 u32 bits = vma->node->type - 12;
191 u32 num = length >> vma->node->type;
219 nouveau_vm_unmap(struct nouveau_vma *vma)
221 nouveau_vm_unmap_at(vma, 0, (u64)vma->node->length << 12);
290 u32 access, struct nouveau_vma *vma)
300 &vma->node);
306 fpde = (vma->node->offset >> vmm->pgt_bits);
307 lpde = (vma->node->offset + vma->node->length - 1) >> vmm->pgt_bits;
311 int big = (vma->node->type != vmm->spg_shift);
318 ret = nouveau_vm_map_pgt(vm, pde, vma->node->type);
322 nouveau_mm_free(&vm->mm, &vma->node);
329 vma->vm = NULL;
330 nouveau_vm_ref(vm, &vma->vm, NULL);
331 vma->offset = (u64)vma->node->offset << 12;
332 vma->access = access;
337 nouveau_vm_put(struct nouveau_vma *vma)
339 struct nouveau_vm *vm = vma->vm;
343 if (unlikely(vma->node == NULL))
345 fpde = (vma->node->offset >> vmm->pgt_bits);
346 lpde = (vma->node->offset + vma->node->length - 1) >> vmm->pgt_bits;
349 nouveau_vm_unmap_pgt(vm, vma->node->type != vmm->spg_shift, fpde, lpde);
350 nouveau_mm_free(&vm->mm, &vma->node);
353 nouveau_vm_ref(NULL, &vma->vm, NULL);