/linux-6.6.21/drivers/gpu/drm/i915/gt/ |
D | intel_ggtt.c | 50 static int ggtt_init_hw(struct i915_ggtt *ggtt) in ggtt_init_hw() argument 52 struct drm_i915_private *i915 = ggtt->vm.i915; in ggtt_init_hw() 54 i915_address_space_init(&ggtt->vm, VM_CLASS_GGTT); in ggtt_init_hw() 56 ggtt->vm.is_ggtt = true; in ggtt_init_hw() 59 ggtt->vm.has_read_only = IS_VALLEYVIEW(i915); in ggtt_init_hw() 62 ggtt->vm.mm.color_adjust = i915_ggtt_color_adjust; in ggtt_init_hw() 64 if (ggtt->mappable_end) { in ggtt_init_hw() 65 if (!io_mapping_init_wc(&ggtt->iomap, in ggtt_init_hw() 66 ggtt->gmadr.start, in ggtt_init_hw() 67 ggtt->mappable_end)) { in ggtt_init_hw() [all …]
|
D | intel_ggtt_gmch.c | 42 static void gmch_ggtt_invalidate(struct i915_ggtt *ggtt) in gmch_ggtt_invalidate() argument 77 int intel_ggtt_gmch_probe(struct i915_ggtt *ggtt) in intel_ggtt_gmch_probe() argument 79 struct drm_i915_private *i915 = ggtt->vm.i915; in intel_ggtt_gmch_probe() 89 intel_gmch_gtt_get(&ggtt->vm.total, &gmadr_base, &ggtt->mappable_end); in intel_ggtt_gmch_probe() 91 ggtt->gmadr = DEFINE_RES_MEM(gmadr_base, ggtt->mappable_end); in intel_ggtt_gmch_probe() 93 ggtt->vm.alloc_pt_dma = alloc_pt_dma; in intel_ggtt_gmch_probe() 94 ggtt->vm.alloc_scratch_dma = alloc_pt_dma; in intel_ggtt_gmch_probe() 99 ggtt->do_idle_maps = true; in intel_ggtt_gmch_probe() 102 ggtt->vm.insert_page = gmch_ggtt_insert_page; in intel_ggtt_gmch_probe() 103 ggtt->vm.insert_entries = gmch_ggtt_insert_entries; in intel_ggtt_gmch_probe() [all …]
|
D | intel_ggtt_fencing.c | 51 return fence->ggtt->vm.i915; in fence_to_i915() 56 return fence->ggtt->vm.gt->uncore; in fence_to_uncore() 203 struct i915_ggtt *ggtt = fence->ggtt; in fence_update() local 253 list_move(&fence->link, &ggtt->fence_list); in fence_update() 277 list_move_tail(&fence->link, &ggtt->fence_list); in fence_update() 328 static struct i915_fence_reg *fence_find(struct i915_ggtt *ggtt) in fence_find() argument 333 list_for_each_entry_safe(fence, fn, &ggtt->fence_list, link) { in fence_find() 344 list_move_tail(&fence->link, &ggtt->fence_list); in fence_find() 355 if (intel_has_pending_fb_unpin(ggtt->vm.i915)) in fence_find() 363 struct i915_ggtt *ggtt = i915_vm_to_ggtt(vma->vm); in __i915_vma_pin_fence() local [all …]
|
D | selftest_reset.c | 22 struct i915_ggtt *ggtt = gt->ggtt; in __igt_reset_stolen() local 34 if (!drm_mm_node_allocated(&ggtt->error_capture)) in __igt_reset_stolen() 87 ggtt->vm.insert_page(&ggtt->vm, dma, in __igt_reset_stolen() 88 ggtt->error_capture.start, in __igt_reset_stolen() 94 s = io_mapping_map_wc(&ggtt->iomap, in __igt_reset_stolen() 95 ggtt->error_capture.start, in __igt_reset_stolen() 111 ggtt->vm.clear_range(&ggtt->vm, ggtt->error_capture.start, PAGE_SIZE); in __igt_reset_stolen() 130 ggtt->vm.insert_page(&ggtt->vm, dma, in __igt_reset_stolen() 131 ggtt->error_capture.start, in __igt_reset_stolen() 137 s = io_mapping_map_wc(&ggtt->iomap, in __igt_reset_stolen() [all …]
|
D | intel_ggtt_fencing.h | 24 struct i915_ggtt *ggtt; member 44 struct i915_fence_reg *i915_reserve_fence(struct i915_ggtt *ggtt); 47 void intel_ggtt_restore_fences(struct i915_ggtt *ggtt); 54 void intel_ggtt_init_fences(struct i915_ggtt *ggtt); 55 void intel_ggtt_fini_fences(struct i915_ggtt *ggtt);
|
D | gen6_ppgtt.c | 166 gen6_ggtt_invalidate(ppgtt->base.vm.gt->ggtt); in gen6_flush_pd() 286 struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm); in pd_vma_bind() local 291 ppgtt->pd_addr = (gen6_pte_t __iomem *)ggtt->gsm + ggtt_offset; in pd_vma_bind() 382 struct i915_ggtt * const ggtt = ppgtt->base.vm.gt->ggtt; in gen6_alloc_top_pd() local 402 ppgtt->vma = i915_vma_instance(pd->pt.base, &ggtt->vm, NULL); in gen6_alloc_top_pd() 430 struct i915_ggtt * const ggtt = gt->ggtt; in gen6_ppgtt_create() local 452 ppgtt->base.vm.pte_encode = ggtt->vm.pte_encode; in gen6_ppgtt_create()
|
D | intel_ggtt_gmch.h | 16 int intel_ggtt_gmch_probe(struct i915_ggtt *ggtt); 23 static inline int intel_ggtt_gmch_probe(struct i915_ggtt *ggtt) { return -ENODEV; } in intel_ggtt_gmch_probe() argument
|
D | intel_gtt.h | 64 #define ggtt_total_entries(ggtt) ((ggtt)->vm.total >> PAGE_SHIFT) argument 367 void (*invalidate)(struct i915_ggtt *ggtt); 593 static inline bool i915_ggtt_has_aperture(const struct i915_ggtt *ggtt) in i915_ggtt_has_aperture() argument 595 return ggtt->mappable_end > 0; in i915_ggtt_has_aperture() 606 void i915_ggtt_resume(struct i915_ggtt *ggtt); 653 void gen6_ggtt_invalidate(struct i915_ggtt *ggtt);
|
D | intel_ring.c | 111 static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size) in create_ring_vma() argument 113 struct i915_address_space *vm = &ggtt->vm; in create_ring_vma() 120 if (IS_ERR(obj) && i915_ggtt_has_aperture(ggtt) && !HAS_LLC(i915)) in create_ring_vma() 174 vma = create_ring_vma(engine->gt->ggtt, size); in intel_engine_create_ring()
|
D | intel_gt.c | 113 gt->ggtt = to_gt(gt->i915)->ggtt; in intel_gt_assign_ggtt() 115 gt->ggtt = i915_ggtt_create(gt->i915); in intel_gt_assign_ggtt() 116 if (IS_ERR(gt->ggtt)) in intel_gt_assign_ggtt() 117 return PTR_ERR(gt->ggtt); in intel_gt_assign_ggtt() 120 list_add_tail(>->ggtt_link, >->ggtt->gt_list); in intel_gt_assign_ggtt() 478 vma = i915_vma_instance(obj, >->ggtt->vm, NULL); in intel_gt_init_scratch() 507 return i915_vm_get(>->ggtt->vm); in kernel_vm()
|
/linux-6.6.21/drivers/gpu/drm/i915/selftests/ |
D | i915_gem_evict.c | 48 static int populate_ggtt(struct i915_ggtt *ggtt, struct list_head *objects) in populate_ggtt() argument 57 obj = i915_gem_object_create_internal(ggtt->vm.i915, in populate_ggtt() 75 count, ggtt->vm.total / PAGE_SIZE); in populate_ggtt() 77 if (list_empty(&ggtt->vm.bound_list)) { in populate_ggtt() 85 static void unpin_ggtt(struct i915_ggtt *ggtt) in unpin_ggtt() argument 89 list_for_each_entry(vma, &ggtt->vm.bound_list, vm_link) in unpin_ggtt() 94 static void cleanup_objects(struct i915_ggtt *ggtt, struct list_head *list) in cleanup_objects() argument 104 i915_gem_drain_freed_objects(ggtt->vm.i915); in cleanup_objects() 110 struct i915_ggtt *ggtt = gt->ggtt; in igt_evict_something() local 116 err = populate_ggtt(ggtt, &objects); in igt_evict_something() [all …]
|
D | mock_gtt.c | 109 struct i915_ggtt *ggtt = gt->ggtt; in mock_init_ggtt() local 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() 115 ggtt->gmadr = DEFINE_RES_MEM(0, 2048 * PAGE_SIZE); in mock_init_ggtt() 116 ggtt->mappable_end = resource_size(&ggtt->gmadr); 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() [all …]
|
D | i915_gem.c | 45 struct i915_ggtt *ggtt = to_gt(i915)->ggtt; in trash_stolen() local 46 const u64 slot = ggtt->error_capture.start; in trash_stolen() 52 if (!i915_ggtt_has_aperture(ggtt)) in trash_stolen() 60 ggtt->vm.insert_page(&ggtt->vm, dma, slot, in trash_stolen() 65 s = io_mapping_map_atomic_wc(&ggtt->iomap, slot); in trash_stolen() 73 ggtt->vm.clear_range(&ggtt->vm, slot, PAGE_SIZE); in trash_stolen() 106 i915_ggtt_suspend(to_gt(i915)->ggtt); in igt_pm_suspend() 116 i915_ggtt_suspend(to_gt(i915)->ggtt); in igt_pm_hibernate() 132 i915_ggtt_resume(to_gt(i915)->ggtt); in igt_pm_resume()
|
D | i915_gem_gtt.c | 1281 struct i915_ggtt *ggtt = to_gt(i915)->ggtt; in exercise_ggtt() local 1288 list_sort(NULL, &ggtt->vm.mm.hole_stack, sort_holes); in exercise_ggtt() 1289 drm_mm_for_each_hole(node, &ggtt->vm.mm, hole_start, hole_end) { in exercise_ggtt() 1293 if (ggtt->vm.mm.color_adjust) in exercise_ggtt() 1294 ggtt->vm.mm.color_adjust(node, 0, in exercise_ggtt() 1299 err = func(&ggtt->vm, hole_start, hole_end, end_time); in exercise_ggtt() 1346 struct i915_ggtt *ggtt = to_gt(i915)->ggtt; in igt_ggtt_page() local 1353 if (!i915_ggtt_has_aperture(ggtt)) in igt_ggtt_page() 1365 mutex_lock(&ggtt->vm.mutex); in igt_ggtt_page() 1366 err = drm_mm_insert_node_in_range(&ggtt->vm.mm, &tmp, in igt_ggtt_page() [all …]
|
D | i915_vma.c | 151 struct i915_ggtt *ggtt = arg; in igt_vma_create() local 152 struct drm_i915_private *i915 = ggtt->vm.i915; in igt_vma_create() 258 struct i915_ggtt *ggtt = arg; in igt_vma_pin1() local 269 VALID(0, PIN_GLOBAL | PIN_OFFSET_BIAS | (ggtt->mappable_end - 4096)), in igt_vma_pin1() 270 VALID(0, PIN_GLOBAL | PIN_MAPPABLE | PIN_OFFSET_BIAS | (ggtt->mappable_end - 4096)), in igt_vma_pin1() 271 VALID(0, PIN_GLOBAL | PIN_OFFSET_BIAS | (ggtt->vm.total - 4096)), in igt_vma_pin1() 273 VALID(0, PIN_GLOBAL | PIN_MAPPABLE | PIN_OFFSET_FIXED | (ggtt->mappable_end - 4096)), in igt_vma_pin1() 274 INVALID(0, PIN_GLOBAL | PIN_MAPPABLE | PIN_OFFSET_FIXED | ggtt->mappable_end), in igt_vma_pin1() 275 VALID(0, PIN_GLOBAL | PIN_OFFSET_FIXED | (ggtt->vm.total - 4096)), in igt_vma_pin1() 276 INVALID(0, PIN_GLOBAL | PIN_OFFSET_FIXED | ggtt->vm.total), in igt_vma_pin1() [all …]
|
/linux-6.6.21/drivers/gpu/drm/i915/ |
D | i915_vgpu.c | 148 static void vgt_deballoon_space(struct i915_ggtt *ggtt, in vgt_deballoon_space() argument 151 struct drm_i915_private *dev_priv = ggtt->vm.i915; in vgt_deballoon_space() 161 ggtt->vm.reserved -= node->size; in vgt_deballoon_space() 172 void intel_vgt_deballoon(struct i915_ggtt *ggtt) in intel_vgt_deballoon() argument 174 struct drm_i915_private *dev_priv = ggtt->vm.i915; in intel_vgt_deballoon() 177 if (!intel_vgpu_active(ggtt->vm.i915)) in intel_vgt_deballoon() 183 vgt_deballoon_space(ggtt, &bl_info.space[i]); in intel_vgt_deballoon() 186 static int vgt_balloon_space(struct i915_ggtt *ggtt, in vgt_balloon_space() argument 190 struct drm_i915_private *dev_priv = ggtt->vm.i915; in vgt_balloon_space() 200 ret = i915_gem_gtt_reserve(&ggtt->vm, NULL, node, in vgt_balloon_space() [all …]
|
D | i915_gem.c | 64 insert_mappable_node(struct i915_ggtt *ggtt, struct drm_mm_node *node, u32 size) in insert_mappable_node() argument 68 err = mutex_lock_interruptible(&ggtt->vm.mutex); in insert_mappable_node() 73 err = drm_mm_insert_node_in_range(&ggtt->vm.mm, node, in insert_mappable_node() 75 0, ggtt->mappable_end, in insert_mappable_node() 78 mutex_unlock(&ggtt->vm.mutex); in insert_mappable_node() 84 remove_mappable_node(struct i915_ggtt *ggtt, struct drm_mm_node *node) in remove_mappable_node() argument 86 mutex_lock(&ggtt->vm.mutex); in remove_mappable_node() 88 mutex_unlock(&ggtt->vm.mutex); in remove_mappable_node() 96 struct i915_ggtt *ggtt = to_gt(i915)->ggtt; in i915_gem_get_aperture_ioctl() local 101 if (mutex_lock_interruptible(&ggtt->vm.mutex)) in i915_gem_get_aperture_ioctl() [all …]
|
D | i915_gem_gtt.c | 60 struct i915_ggtt *ggtt = to_gt(i915)->ggtt; in i915_gem_gtt_finish_pages() local 63 if (unlikely(ggtt->do_idle_maps)) in i915_gem_gtt_finish_pages() 109 GEM_BUG_ON(vm == &to_gt(vm->i915)->ggtt->alias->vm); in i915_gem_gtt_reserve() 209 GEM_BUG_ON(vm == &to_gt(vm->i915)->ggtt->alias->vm); in i915_gem_gtt_insert()
|
D | i915_vgpu.h | 39 int intel_vgt_balloon(struct i915_ggtt *ggtt); 40 void intel_vgt_deballoon(struct i915_ggtt *ggtt);
|
D | i915_gem_evict.c | 48 struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm); in ggtt_flush() local 52 list_for_each_entry(gt, &ggtt->gt_list, ggtt_link) { in ggtt_flush() 188 struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm); in i915_gem_evict_something() local 190 list_for_each_entry(gt, &ggtt->gt_list, ggtt_link) in i915_gem_evict_something() 353 struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm); in i915_gem_evict_for_node() local 356 list_for_each_entry(gt, &ggtt->gt_list, ggtt_link) in i915_gem_evict_for_node()
|
/linux-6.6.21/drivers/gpu/drm/i915/gem/ |
D | i915_gem_tiling.c | 187 struct i915_ggtt *ggtt = to_gt(i915)->ggtt; in i915_gem_object_fence_prepare() local 195 mutex_lock(&ggtt->vm.mutex); in i915_gem_object_fence_prepare() 199 GEM_BUG_ON(vma->vm != &ggtt->vm); in i915_gem_object_fence_prepare() 212 list_splice(&unbind, &ggtt->vm.bound_list); in i915_gem_object_fence_prepare() 217 mutex_unlock(&ggtt->vm.mutex); in i915_gem_object_fence_prepare() 226 return to_gt(i915)->ggtt->bit_6_swizzle_x == I915_BIT_6_SWIZZLE_9_10_17 && in i915_gem_object_needs_bit17_swizzle() 351 if (!to_gt(dev_priv)->ggtt->num_fences) in i915_gem_set_tiling_ioctl() 377 args->swizzle_mode = to_gt(dev_priv)->ggtt->bit_6_swizzle_x; in i915_gem_set_tiling_ioctl() 379 args->swizzle_mode = to_gt(dev_priv)->ggtt->bit_6_swizzle_y; in i915_gem_set_tiling_ioctl() 434 if (!to_gt(dev_priv)->ggtt->num_fences) in i915_gem_get_tiling_ioctl() [all …]
|
D | i915_gem_stolen.c | 88 struct i915_ggtt *ggtt = to_gt(i915)->ggtt; in adjust_stolen() local 89 struct intel_uncore *uncore = ggtt->vm.gt->uncore; in adjust_stolen() 113 ggtt_res = DEFINE_RES_MEM(ggtt_start, ggtt_total_entries(ggtt) * 4); in adjust_stolen() 549 static void dbg_poison(struct i915_ggtt *ggtt, in dbg_poison() argument 554 if (!drm_mm_node_allocated(&ggtt->error_capture)) in dbg_poison() 557 if (ggtt->vm.bind_async_flags & I915_VMA_GLOBAL_BIND) in dbg_poison() 562 mutex_lock(&ggtt->error_mutex); in dbg_poison() 566 ggtt->vm.insert_page(&ggtt->vm, addr, in dbg_poison() 567 ggtt->error_capture.start, in dbg_poison() 568 i915_gem_get_pat_index(ggtt->vm.i915, in dbg_poison() [all …]
|
D | i915_gem_mman.c | 302 struct i915_ggtt *ggtt = to_gt(i915)->ggtt; in vm_fault_gtt() local 334 ret = intel_gt_reset_lock_interruptible(ggtt->vm.gt, &srcu); in vm_fault_gtt() 371 ret = mutex_lock_interruptible(&ggtt->vm.mutex); in vm_fault_gtt() 373 ret = i915_gem_evict_vm(&ggtt->vm, &ww, NULL); in vm_fault_gtt() 374 mutex_unlock(&ggtt->vm.mutex); in vm_fault_gtt() 408 (ggtt->gmadr.start + i915_ggtt_offset(vma)) >> PAGE_SHIFT, in vm_fault_gtt() 410 &ggtt->iomap); in vm_fault_gtt() 417 mutex_lock(&to_gt(i915)->ggtt->vm.mutex); in vm_fault_gtt() 419 list_add(&obj->userfault_link, &to_gt(i915)->ggtt->userfault_list); in vm_fault_gtt() 420 mutex_unlock(&to_gt(i915)->ggtt->vm.mutex); in vm_fault_gtt() [all …]
|
/linux-6.6.21/drivers/gpu/drm/i915/gvt/ |
D | aperture_gm.c | 65 mutex_lock(>->ggtt->vm.mutex); in alloc_gm() 67 ret = i915_gem_gtt_insert(>->ggtt->vm, NULL, node, in alloc_gm() 72 mutex_unlock(>->ggtt->vm.mutex); in alloc_gm() 102 mutex_lock(>->ggtt->vm.mutex); in alloc_vgpu_gm() 104 mutex_unlock(>->ggtt->vm.mutex); in alloc_vgpu_gm() 113 mutex_lock(>->ggtt->vm.mutex); in free_vgpu_gm() 116 mutex_unlock(>->ggtt->vm.mutex); in free_vgpu_gm() 179 mutex_lock(&gvt->gt->ggtt->vm.mutex); in free_vgpu_fence() 186 mutex_unlock(&gvt->gt->ggtt->vm.mutex); in free_vgpu_fence() 202 mutex_lock(&gvt->gt->ggtt->vm.mutex); in alloc_vgpu_fence() [all …]
|
/linux-6.6.21/drivers/gpu/drm/i915/gt/uc/ |
D | intel_uc_fw.c | 991 struct i915_ggtt *ggtt = gt->ggtt; in uc_fw_ggtt_offset() local 992 struct drm_mm_node *node = &ggtt->uc_fw; in uc_fw_ggtt_offset() 1019 struct i915_ggtt *ggtt = __uc_fw_to_gt(uc_fw)->ggtt; in uc_fw_bind_ggtt() local 1039 if (ggtt->vm.raw_insert_entries) in uc_fw_bind_ggtt() 1040 ggtt->vm.raw_insert_entries(&ggtt->vm, vma_res, in uc_fw_bind_ggtt() 1041 i915_gem_get_pat_index(ggtt->vm.i915, in uc_fw_bind_ggtt() 1045 ggtt->vm.insert_entries(&ggtt->vm, vma_res, in uc_fw_bind_ggtt() 1046 i915_gem_get_pat_index(ggtt->vm.i915, in uc_fw_bind_ggtt() 1053 struct i915_ggtt *ggtt = __uc_fw_to_gt(uc_fw)->ggtt; in uc_fw_unbind_ggtt() local 1059 ggtt->vm.clear_range(&ggtt->vm, vma_res->start, vma_res->node_size); in uc_fw_unbind_ggtt()
|