• Home
  • Raw
  • Download

Lines Matching refs:vma

30 __vma_matches(struct vm_area_struct *vma, struct file *filp,  in __vma_matches()  argument
33 if (vma->vm_file != filp) in __vma_matches()
36 return vma->vm_start == addr && in __vma_matches()
37 (vma->vm_end - vma->vm_start) == PAGE_ALIGN(size); in __vma_matches()
107 struct vm_area_struct *vma; in i915_gem_mmap_ioctl() local
113 vma = find_vma(mm, addr); in i915_gem_mmap_ioctl()
114 if (vma && __vma_matches(vma, obj->base.filp, addr, args->size)) in i915_gem_mmap_ioctl()
115 vma->vm_page_prot = in i915_gem_mmap_ioctl()
116 pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); in i915_gem_mmap_ioctl()
252 struct vm_area_struct *area = vmf->vma; in vm_fault_cpu()
294 struct i915_vma *vma, in set_address_limits() argument
308 vma_size = vma->size >> PAGE_SHIFT; in set_address_limits()
317 start += vma->gtt_view.partial.offset; in set_address_limits()
331 struct vm_area_struct *area = vmf->vma; in vm_fault_gtt()
343 struct i915_vma *vma; in vm_fault_gtt() local
378 vma = i915_gem_object_ggtt_pin_ww(obj, &ww, NULL, 0, 0, in vm_fault_gtt()
382 if (IS_ERR(vma) && vma != ERR_PTR(-EDEADLK)) { in vm_fault_gtt()
397 vma = i915_gem_object_ggtt_pin_ww(obj, &ww, &view, 0, 0, flags); in vm_fault_gtt()
398 if (IS_ERR(vma) && vma != ERR_PTR(-EDEADLK)) { in vm_fault_gtt()
401 vma = i915_gem_object_ggtt_pin_ww(obj, &ww, &view, 0, 0, flags); in vm_fault_gtt()
409 if (vma == ERR_PTR(-ENOSPC)) { in vm_fault_gtt()
417 vma = i915_gem_object_ggtt_pin_ww(obj, &ww, &view, 0, 0, flags); in vm_fault_gtt()
420 if (IS_ERR(vma)) { in vm_fault_gtt()
421 ret = PTR_ERR(vma); in vm_fault_gtt()
440 ret = i915_vma_pin_fence(vma); in vm_fault_gtt()
444 set_address_limits(area, vma, obj_offset, &start, &end); in vm_fault_gtt()
446 pfn = (ggtt->gmadr.start + i915_ggtt_offset(vma)) >> PAGE_SHIFT; in vm_fault_gtt()
448 pfn += obj_offset - vma->gtt_view.partial.offset; in vm_fault_gtt()
459 if (!i915_vma_set_userfault(vma) && !obj->userfault_count++) in vm_fault_gtt()
464 vma->mmo = mmo; in vm_fault_gtt()
472 i915_vma_set_ggtt_write(vma); in vm_fault_gtt()
477 i915_vma_unpin_fence(vma); in vm_fault_gtt()
479 __i915_vma_unpin(vma); in vm_fault_gtt()
549 struct i915_vma *vma; in __i915_gem_object_release_mmap_gtt() local
553 for_each_ggtt_vma(vma, obj) in __i915_gem_object_release_mmap_gtt()
554 i915_vma_revoke_mmap(vma); in __i915_gem_object_release_mmap_gtt()
909 static void vm_open(struct vm_area_struct *vma) in vm_open() argument
911 struct i915_mmap_offset *mmo = vma->vm_private_data; in vm_open()
918 static void vm_close(struct vm_area_struct *vma) in vm_close() argument
920 struct i915_mmap_offset *mmo = vma->vm_private_data; in vm_close()
984 struct vm_area_struct *vma) in i915_gem_object_mmap() argument
991 if (vma->vm_flags & VM_WRITE) { in i915_gem_object_mmap()
995 vm_flags_clear(vma, VM_MAYWRITE); in i915_gem_object_mmap()
1004 vm_flags_set(vma, VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP | VM_IO); in i915_gem_object_mmap()
1014 vma_set_file(vma, anon); in i915_gem_object_mmap()
1019 vma->vm_page_prot = pgprot_decrypted(vm_get_page_prot(vma->vm_flags)); in i915_gem_object_mmap()
1020 vma->vm_ops = obj->ops->mmap_ops; in i915_gem_object_mmap()
1021 vma->vm_private_data = obj->base.vma_node.driver_private; in i915_gem_object_mmap()
1025 vma->vm_private_data = mmo; in i915_gem_object_mmap()
1029 vma->vm_page_prot = in i915_gem_object_mmap()
1030 pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); in i915_gem_object_mmap()
1031 vma->vm_ops = &vm_ops_cpu; in i915_gem_object_mmap()
1038 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); in i915_gem_object_mmap()
1039 vma->vm_ops = &vm_ops_cpu; in i915_gem_object_mmap()
1043 vma->vm_page_prot = in i915_gem_object_mmap()
1044 pgprot_noncached(vm_get_page_prot(vma->vm_flags)); in i915_gem_object_mmap()
1045 vma->vm_ops = &vm_ops_cpu; in i915_gem_object_mmap()
1049 vma->vm_page_prot = in i915_gem_object_mmap()
1050 pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); in i915_gem_object_mmap()
1051 vma->vm_ops = &vm_ops_gtt; in i915_gem_object_mmap()
1054 vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); in i915_gem_object_mmap()
1065 int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma) in i915_gem_mmap() argument
1079 vma->vm_pgoff, in i915_gem_mmap()
1080 vma_pages(vma)); in i915_gem_mmap()
1105 return i915_gem_object_mmap(obj, mmo, vma); in i915_gem_mmap()
1108 int i915_gem_fb_mmap(struct drm_i915_gem_object *obj, struct vm_area_struct *vma) in i915_gem_fb_mmap() argument
1125 vma->vm_pgoff += drm_vma_node_start(&obj->base.vma_node); in i915_gem_fb_mmap()
1133 vma->vm_pgoff += drm_vma_node_start(&mmo->vma_node); in i915_gem_fb_mmap()
1143 return i915_gem_object_mmap(obj, mmo, vma); in i915_gem_fb_mmap()