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()
292 struct i915_ggtt *ggtt = &i915->ggtt; in i915_gem_gtt_prepare() local
320 ret = insert_mappable_node(ggtt, node, PAGE_SIZE); in i915_gem_gtt_prepare()
330 ggtt->vm.clear_range(&ggtt->vm, node->start, node->size); in i915_gem_gtt_prepare()
331 remove_mappable_node(ggtt, node); in i915_gem_gtt_prepare()
353 struct i915_ggtt *ggtt = &i915->ggtt; in i915_gem_gtt_cleanup() local
357 ggtt->vm.clear_range(&ggtt->vm, node->start, node->size); in i915_gem_gtt_cleanup()
358 remove_mappable_node(ggtt, node); in i915_gem_gtt_cleanup()
369 struct i915_ggtt *ggtt = &i915->ggtt; in i915_gem_gtt_pread() local
401 ggtt->vm.insert_page(&ggtt->vm, in i915_gem_gtt_pread()
408 if (gtt_user_read(&ggtt->iomap, page_base, page_offset, in i915_gem_gtt_pread()
525 struct i915_ggtt *ggtt = &i915->ggtt; in i915_gem_gtt_pwrite_fast() local
574 intel_gt_flush_ggtt_writes(ggtt->vm.gt); in i915_gem_gtt_pwrite_fast()
575 ggtt->vm.insert_page(&ggtt->vm, in i915_gem_gtt_pwrite_fast()
588 if (ggtt_write(&ggtt->iomap, page_base, page_offset, in i915_gem_gtt_pwrite_fast()
599 intel_gt_flush_ggtt_writes(ggtt->vm.gt); in i915_gem_gtt_pwrite_fast()
826 &i915->ggtt.userfault_list, userfault_link) in i915_gem_runtime_suspend()
834 for (i = 0; i < i915->ggtt.num_fences; i++) { in i915_gem_runtime_suspend()
835 struct i915_fence_reg *reg = &i915->ggtt.fence_regs[i]; in i915_gem_runtime_suspend()
876 struct i915_ggtt *ggtt = &i915->ggtt; in i915_gem_object_ggtt_pin_ww() local
890 if (obj->base.size > ggtt->mappable_end) in i915_gem_object_ggtt_pin_ww()
910 obj->base.size > ggtt->mappable_end / 2) in i915_gem_object_ggtt_pin_ww()
915 vma = i915_vma_instance(obj, &ggtt->vm, view); in i915_gem_object_ggtt_pin_ww()
925 vma->fence_size > ggtt->mappable_end / 2) in i915_gem_object_ggtt_pin_ww()
948 mutex_lock(&ggtt->vm.mutex); in i915_gem_object_ggtt_pin_ww()
950 mutex_unlock(&ggtt->vm.mutex); in i915_gem_object_ggtt_pin_ww()
1103 i915_ggtt_resume(&dev_priv->ggtt); in i915_gem_init()
1126 intel_wakeref_auto_fini(&dev_priv->ggtt.userfault_wakeref); in i915_gem_driver_remove()