Lines Matching refs:ggtt
60 insert_mappable_node(struct i915_ggtt *ggtt, struct drm_mm_node *node, u32 size) in insert_mappable_node() argument
64 err = mutex_lock_interruptible(&ggtt->vm.mutex); in insert_mappable_node()
69 err = drm_mm_insert_node_in_range(&ggtt->vm.mm, node, in insert_mappable_node()
71 0, ggtt->mappable_end, in insert_mappable_node()
74 mutex_unlock(&ggtt->vm.mutex); in insert_mappable_node()
80 remove_mappable_node(struct i915_ggtt *ggtt, struct drm_mm_node *node) in remove_mappable_node() argument
82 mutex_lock(&ggtt->vm.mutex); in remove_mappable_node()
84 mutex_unlock(&ggtt->vm.mutex); in remove_mappable_node()
91 struct i915_ggtt *ggtt = &to_i915(dev)->ggtt; in i915_gem_get_aperture_ioctl() local
96 if (mutex_lock_interruptible(&ggtt->vm.mutex)) in i915_gem_get_aperture_ioctl()
99 pinned = ggtt->vm.reserved; in i915_gem_get_aperture_ioctl()
100 list_for_each_entry(vma, &ggtt->vm.bound_list, vm_link) in i915_gem_get_aperture_ioctl()
104 mutex_unlock(&ggtt->vm.mutex); in i915_gem_get_aperture_ioctl()
106 args->aper_size = ggtt->vm.total; in i915_gem_get_aperture_ioctl()
381 struct i915_ggtt *ggtt = &i915->ggtt; in i915_gem_gtt_pread() local
401 ret = insert_mappable_node(ggtt, &node, PAGE_SIZE); in i915_gem_gtt_pread()
440 ggtt->vm.insert_page(&ggtt->vm, in i915_gem_gtt_pread()
447 if (gtt_user_read(&ggtt->iomap, page_base, page_offset, in i915_gem_gtt_pread()
461 ggtt->vm.clear_range(&ggtt->vm, node.start, node.size); in i915_gem_gtt_pread()
462 remove_mappable_node(ggtt, &node); in i915_gem_gtt_pread()
570 struct i915_ggtt *ggtt = &i915->ggtt; in i915_gem_gtt_pwrite_fast() local
606 ret = insert_mappable_node(ggtt, &node, PAGE_SIZE); in i915_gem_gtt_pwrite_fast()
647 intel_gt_flush_ggtt_writes(ggtt->vm.gt); in i915_gem_gtt_pwrite_fast()
648 ggtt->vm.insert_page(&ggtt->vm, in i915_gem_gtt_pwrite_fast()
661 if (ggtt_write(&ggtt->iomap, page_base, page_offset, in i915_gem_gtt_pwrite_fast()
672 intel_gt_flush_ggtt_writes(ggtt->vm.gt); in i915_gem_gtt_pwrite_fast()
678 ggtt->vm.clear_range(&ggtt->vm, node.start, node.size); in i915_gem_gtt_pwrite_fast()
679 remove_mappable_node(ggtt, &node); in i915_gem_gtt_pwrite_fast()
901 &i915->ggtt.userfault_list, userfault_link) in i915_gem_runtime_suspend()
909 for (i = 0; i < i915->ggtt.num_fences; i++) { in i915_gem_runtime_suspend()
910 struct i915_fence_reg *reg = &i915->ggtt.fence_regs[i]; in i915_gem_runtime_suspend()
951 struct i915_ggtt *ggtt = &i915->ggtt; in i915_gem_object_ggtt_pin_ww() local
965 if (obj->base.size > ggtt->mappable_end) in i915_gem_object_ggtt_pin_ww()
985 obj->base.size > ggtt->mappable_end / 2) in i915_gem_object_ggtt_pin_ww()
990 vma = i915_vma_instance(obj, &ggtt->vm, view); in i915_gem_object_ggtt_pin_ww()
1000 vma->fence_size > ggtt->mappable_end / 2) in i915_gem_object_ggtt_pin_ww()
1019 mutex_lock(&ggtt->vm.mutex); in i915_gem_object_ggtt_pin_ww()
1021 mutex_unlock(&ggtt->vm.mutex); in i915_gem_object_ggtt_pin_ww()
1174 i915_ggtt_resume(&dev_priv->ggtt); in i915_gem_init()
1196 intel_wakeref_auto_fini(&dev_priv->ggtt.userfault_wakeref); in i915_gem_driver_remove()