/drivers/gpu/drm/i915/gt/ |
D | gen6_ppgtt.c | 19 static void gen6_write_pde(const struct gen6_ppgtt *ppgtt, in gen6_write_pde() argument 23 dma_addr_t addr = pt ? px_dma(pt) : px_dma(ppgtt->base.vm.scratch[1]); in gen6_write_pde() 27 ppgtt->pd_addr + pde); in gen6_write_pde() 77 struct gen6_ppgtt * const ppgtt = to_gen6_ppgtt(i915_vm_to_ppgtt(vm)); in gen6_ppgtt_clear_range() local 86 i915_pt_entry(ppgtt->base.pd, pde++); in gen6_ppgtt_clear_range() 94 ppgtt->scan_for_unused_pt = true; in gen6_ppgtt_clear_range() 115 struct i915_ppgtt *ppgtt = i915_vm_to_ppgtt(vm); in gen6_ppgtt_insert_entries() local 116 struct i915_page_directory * const pd = ppgtt->pd; in gen6_ppgtt_insert_entries() 150 static void gen6_flush_pd(struct gen6_ppgtt *ppgtt, u64 start, u64 end) in gen6_flush_pd() argument 152 struct i915_page_directory * const pd = ppgtt->base.pd; in gen6_flush_pd() [all …]
|
D | gen8_ppgtt.c | 87 static void gen8_ppgtt_notify_vgt(struct i915_ppgtt *ppgtt, bool create) in gen8_ppgtt_notify_vgt() argument 89 struct drm_i915_private *i915 = ppgtt->vm.i915; in gen8_ppgtt_notify_vgt() 90 struct intel_uncore *uncore = ppgtt->vm.gt->uncore; in gen8_ppgtt_notify_vgt() 95 atomic_inc(px_used(ppgtt->pd)); /* never remove */ in gen8_ppgtt_notify_vgt() 97 atomic_dec(px_used(ppgtt->pd)); in gen8_ppgtt_notify_vgt() 101 if (i915_vm_is_4lvl(&ppgtt->vm)) { in gen8_ppgtt_notify_vgt() 102 const u64 daddr = px_dma(ppgtt->pd); in gen8_ppgtt_notify_vgt() 114 const u64 daddr = i915_page_dir_dma_addr(ppgtt, i); in gen8_ppgtt_notify_vgt() 189 struct i915_ppgtt * const ppgtt = i915_vm_to_ppgtt(vm); in gen8_pdp_for_page_index() local 192 return ppgtt->pd; in gen8_pdp_for_page_index() [all …]
|
D | intel_ppgtt.c | 171 struct i915_ppgtt *ppgtt; in i915_ppgtt_create() local 173 ppgtt = __ppgtt_create(gt, lmem_pt_obj_flags); in i915_ppgtt_create() 174 if (IS_ERR(ppgtt)) in i915_ppgtt_create() 175 return ppgtt; in i915_ppgtt_create() 177 trace_i915_ppgtt_create(&ppgtt->vm); in i915_ppgtt_create() 179 return ppgtt; in i915_ppgtt_create() 307 void ppgtt_init(struct i915_ppgtt *ppgtt, struct intel_gt *gt, in ppgtt_init() argument 312 ppgtt->vm.gt = gt; in ppgtt_init() 313 ppgtt->vm.i915 = i915; in ppgtt_init() 314 ppgtt->vm.dma = i915->drm.dev; in ppgtt_init() [all …]
|
D | intel_lrc_reg.h | 33 #define ASSIGN_CTX_PDP(ppgtt, reg_state, n) do { \ argument 35 const u64 addr__ = i915_page_dir_dma_addr((ppgtt), (n)); \ 40 #define ASSIGN_CTX_PML4(ppgtt, reg_state) do { \ argument 42 const u64 addr__ = px_dma((ppgtt)->pd); \
|
D | intel_ggtt.c | 716 struct i915_ppgtt *ppgtt; in init_aliasing_ppgtt() local 719 ppgtt = i915_ppgtt_create(ggtt->vm.gt, 0); in init_aliasing_ppgtt() 720 if (IS_ERR(ppgtt)) in init_aliasing_ppgtt() 721 return PTR_ERR(ppgtt); in init_aliasing_ppgtt() 723 if (GEM_WARN_ON(ppgtt->vm.total < ggtt->vm.total)) { in init_aliasing_ppgtt() 728 err = i915_vm_alloc_pt_stash(&ppgtt->vm, &stash, ggtt->vm.total); in init_aliasing_ppgtt() 732 i915_gem_object_lock(ppgtt->vm.scratch[0], NULL); in init_aliasing_ppgtt() 733 err = i915_vm_map_pt_stash(&ppgtt->vm, &stash); in init_aliasing_ppgtt() 734 i915_gem_object_unlock(ppgtt->vm.scratch[0]); in init_aliasing_ppgtt() 744 ppgtt->vm.allocate_va_range(&ppgtt->vm, &stash, 0, ggtt->vm.total); in init_aliasing_ppgtt() [all …]
|
D | selftest_tlb.c | 228 struct i915_ppgtt *ppgtt; in mem_tlbinv() local 270 ppgtt = i915_ppgtt_create(gt, 0); in mem_tlbinv() 271 if (IS_ERR(ppgtt)) { in mem_tlbinv() 272 err = PTR_ERR(ppgtt); in mem_tlbinv() 276 va = i915_vma_instance(A, &ppgtt->vm, NULL); in mem_tlbinv() 282 vb = i915_vma_instance(B, &ppgtt->vm, NULL); in mem_tlbinv() 301 ce->vm = i915_vm_get(&ppgtt->vm); in mem_tlbinv() 348 i915_vm_put(&ppgtt->vm); in mem_tlbinv()
|
D | intel_gtt.h | 568 i915_page_dir_dma_addr(const struct i915_ppgtt *ppgtt, const unsigned int n) in i915_page_dir_dma_addr() argument 570 struct i915_page_table *pt = ppgtt->pd->entry[n]; in i915_page_dir_dma_addr() 572 return __px_dma(pt ? px_base(pt) : ppgtt->vm.scratch[ppgtt->vm.top]); in i915_page_dir_dma_addr() 575 void ppgtt_init(struct i915_ppgtt *ppgtt, struct intel_gt *gt,
|
D | intel_lrc.c | 893 static void init_ppgtt_regs(u32 *regs, const struct i915_ppgtt *ppgtt) in init_ppgtt_regs() argument 895 if (i915_vm_is_4lvl(&ppgtt->vm)) { in init_ppgtt_regs() 900 ASSIGN_CTX_PML4(ppgtt, regs); in init_ppgtt_regs() 902 ASSIGN_CTX_PDP(ppgtt, regs, 3); in init_ppgtt_regs() 903 ASSIGN_CTX_PDP(ppgtt, regs, 2); in init_ppgtt_regs() 904 ASSIGN_CTX_PDP(ppgtt, regs, 1); in init_ppgtt_regs() 905 ASSIGN_CTX_PDP(ppgtt, regs, 0); in init_ppgtt_regs()
|
D | selftest_hangcheck.c | 1592 struct i915_ppgtt *ppgtt; in igt_reset_evict_ppgtt() local 1599 ppgtt = i915_ppgtt_create(gt, 0); in igt_reset_evict_ppgtt() 1600 if (IS_ERR(ppgtt)) in igt_reset_evict_ppgtt() 1601 return PTR_ERR(ppgtt); in igt_reset_evict_ppgtt() 1603 err = __igt_reset_evict_vma(gt, &ppgtt->vm, in igt_reset_evict_ppgtt() 1605 i915_vm_put(&ppgtt->vm); in igt_reset_evict_ppgtt()
|
D | intel_gtt.c | 172 struct i915_ppgtt *ppgtt = i915_vm_to_ppgtt(vm); in i915_vm_lock_objects() local 175 return i915_gem_object_lock(ppgtt->pd->pt.base, ww); in i915_vm_lock_objects()
|
D | intel_execlists_submission.c | 2717 struct i915_ppgtt * const ppgtt = i915_vm_to_ppgtt(rq->context->vm); in emit_pdps() local 2755 const dma_addr_t pd_daddr = i915_page_dir_dma_addr(ppgtt, i); in emit_pdps()
|
/drivers/gpu/drm/i915/selftests/ |
D | mock_gtt.c | 67 struct i915_ppgtt *ppgtt; in mock_ppgtt() local 69 ppgtt = kzalloc(sizeof(*ppgtt), GFP_KERNEL); in mock_ppgtt() 70 if (!ppgtt) in mock_ppgtt() 73 ppgtt->vm.gt = to_gt(i915); in mock_ppgtt() 74 ppgtt->vm.i915 = i915; in mock_ppgtt() 75 ppgtt->vm.total = round_down(U64_MAX, PAGE_SIZE); in mock_ppgtt() 76 ppgtt->vm.dma = i915->drm.dev; in mock_ppgtt() 78 i915_address_space_init(&ppgtt->vm, VM_CLASS_PPGTT); in mock_ppgtt() 80 ppgtt->vm.alloc_pt_dma = alloc_pt_dma; in mock_ppgtt() 81 ppgtt->vm.alloc_scratch_dma = alloc_pt_dma; in mock_ppgtt() [all …]
|
D | i915_gem_gtt.c | 156 struct i915_ppgtt *ppgtt; in igt_ppgtt_alloc() local 166 ppgtt = i915_ppgtt_create(to_gt(dev_priv), 0); in igt_ppgtt_alloc() 167 if (IS_ERR(ppgtt)) in igt_ppgtt_alloc() 168 return PTR_ERR(ppgtt); in igt_ppgtt_alloc() 170 if (!ppgtt->vm.allocate_va_range) in igt_ppgtt_alloc() 181 limit = min(ppgtt->vm.total, limit); in igt_ppgtt_alloc() 185 err = i915_vm_lock_objects(&ppgtt->vm, &ww); in igt_ppgtt_alloc() 193 err = i915_vm_alloc_pt_stash(&ppgtt->vm, &stash, size); in igt_ppgtt_alloc() 197 err = i915_vm_map_pt_stash(&ppgtt->vm, &stash); in igt_ppgtt_alloc() 199 i915_vm_free_pt_stash(&ppgtt->vm, &stash); in igt_ppgtt_alloc() [all …]
|
/drivers/gpu/drm/i915/gem/selftests/ |
D | mock_context.c | 37 struct i915_ppgtt *ppgtt; in mock_context() local 41 ppgtt = mock_ppgtt(i915, name); in mock_context() 42 if (!ppgtt) in mock_context() 45 ctx->vm = &ppgtt->vm; in mock_context()
|
D | i915_gem_migrate.c | 375 struct i915_ppgtt *ppgtt; in igt_async_migrate() local 379 ppgtt = i915_ppgtt_create(gt, 0); in igt_async_migrate() 380 if (IS_ERR(ppgtt)) in igt_async_migrate() 381 return PTR_ERR(ppgtt); in igt_async_migrate() 425 err = __igt_lmem_pages_migrate(gt, &ppgtt->vm, &deps, &spin, in igt_async_migrate() 436 i915_vm_put(&ppgtt->vm); in igt_async_migrate()
|
D | huge_pages.c | 424 struct i915_ppgtt *ppgtt = arg; in igt_mock_exhaust_device_supported_pages() local 425 struct drm_i915_private *i915 = ppgtt->vm.i915; in igt_mock_exhaust_device_supported_pages() 461 vma = i915_vma_instance(obj, &ppgtt->vm, NULL); in igt_mock_exhaust_device_supported_pages() 500 struct i915_ppgtt *ppgtt = arg; in igt_mock_memory_region_huge_pages() local 501 struct drm_i915_private *i915 = ppgtt->vm.i915; in igt_mock_memory_region_huge_pages() 529 vma = i915_vma_instance(obj, &ppgtt->vm, NULL); in igt_mock_memory_region_huge_pages() 578 struct i915_ppgtt *ppgtt = arg; in igt_mock_ppgtt_misaligned_dma() local 579 struct drm_i915_private *i915 = ppgtt->vm.i915; in igt_mock_ppgtt_misaligned_dma() 621 vma = i915_vma_instance(obj, &ppgtt->vm, NULL); in igt_mock_ppgtt_misaligned_dma() 1973 struct i915_ppgtt *ppgtt; in i915_gem_huge_page_mock_selftests() local [all …]
|
/drivers/gpu/drm/i915/gvt/ |
D | scheduler.c | 438 struct i915_ppgtt *ppgtt = i915_vm_to_ppgtt(ce->vm); in set_context_ppgtt_from_shadow() local 442 set_dma_address(ppgtt->pd, mm->ppgtt_mm.shadow_pdps[0]); in set_context_ppgtt_from_shadow() 446 i915_pd_entry(ppgtt->pd, i); in set_context_ppgtt_from_shadow() 551 if (!bb->ppgtt) { in prepare_shadow_batch_buffer() 1295 struct i915_ppgtt *ppgtt) in i915_context_ppgtt_root_restore() argument 1299 if (i915_vm_is_4lvl(&ppgtt->vm)) { in i915_context_ppgtt_root_restore() 1300 set_dma_address(ppgtt->pd, s->i915_context_pml4); in i915_context_ppgtt_root_restore() 1304 i915_pd_entry(ppgtt->pd, i); in i915_context_ppgtt_root_restore() 1356 struct i915_ppgtt *ppgtt) in i915_context_ppgtt_root_save() argument 1360 if (i915_vm_is_4lvl(&ppgtt->vm)) { in i915_context_ppgtt_root_save() [all …]
|
D | scheduler.h | 133 bool ppgtt; member
|
D | cmd_parser.c | 1918 bb->ppgtt = (s->buf_addr_type == GTT_BUFFER) ? false : true; in perform_bb_shadow() 1931 if (bb->ppgtt) in perform_bb_shadow()
|
/drivers/gpu/drm/i915/gem/ |
D | i915_gem_context.c | 1616 struct i915_ppgtt *ppgtt; in i915_gem_create_context() local 1618 ppgtt = i915_ppgtt_create(to_gt(i915), 0); in i915_gem_create_context() 1619 if (IS_ERR(ppgtt)) { in i915_gem_create_context() 1621 PTR_ERR(ppgtt)); in i915_gem_create_context() 1622 err = PTR_ERR(ppgtt); in i915_gem_create_context() 1625 vm = &ppgtt->vm; in i915_gem_create_context() 1797 struct i915_ppgtt *ppgtt; in i915_gem_vm_create_ioctl() local 1807 ppgtt = i915_ppgtt_create(to_gt(i915), 0); in i915_gem_vm_create_ioctl() 1808 if (IS_ERR(ppgtt)) in i915_gem_vm_create_ioctl() 1809 return PTR_ERR(ppgtt); in i915_gem_vm_create_ioctl() [all …]
|