/Linux-v5.15/drivers/iommu/ |
D | tegra-gart.c | 58 #define FLUSH_GART_REGS(gart) readl_relaxed((gart)->regs + GART_CONFIG) argument 60 #define for_each_gart_pte(gart, iova) \ argument 61 for (iova = gart->iovmm_base; \ 62 iova < gart->iovmm_end; \ 65 static inline void gart_set_pte(struct gart_device *gart, in gart_set_pte() argument 68 writel_relaxed(iova, gart->regs + GART_ENTRY_ADDR); in gart_set_pte() 69 writel_relaxed(pte, gart->regs + GART_ENTRY_DATA); in gart_set_pte() 72 static inline unsigned long gart_read_pte(struct gart_device *gart, in gart_read_pte() argument 77 writel_relaxed(iova, gart->regs + GART_ENTRY_ADDR); in gart_read_pte() 78 pte = readl_relaxed(gart->regs + GART_ENTRY_DATA); in gart_read_pte() [all …]
|
D | Makefile | 23 obj-$(CONFIG_TEGRA_IOMMU_GART) += tegra-gart.o
|
/Linux-v5.15/drivers/gpu/drm/radeon/ |
D | radeon_gart.c | 75 ptr = dma_alloc_coherent(&rdev->pdev->dev, rdev->gart.table_size, in radeon_gart_table_ram_alloc() 76 &rdev->gart.table_addr, GFP_KERNEL); in radeon_gart_table_ram_alloc() 84 rdev->gart.table_size >> PAGE_SHIFT); in radeon_gart_table_ram_alloc() 87 rdev->gart.ptr = ptr; in radeon_gart_table_ram_alloc() 102 if (rdev->gart.ptr == NULL) { in radeon_gart_table_ram_free() 108 set_memory_wb((unsigned long)rdev->gart.ptr, in radeon_gart_table_ram_free() 109 rdev->gart.table_size >> PAGE_SHIFT); in radeon_gart_table_ram_free() 112 dma_free_coherent(&rdev->pdev->dev, rdev->gart.table_size, in radeon_gart_table_ram_free() 113 (void *)rdev->gart.ptr, rdev->gart.table_addr); in radeon_gart_table_ram_free() 114 rdev->gart.ptr = NULL; in radeon_gart_table_ram_free() [all …]
|
D | rs400.c | 84 if (rdev->gart.ptr) { in rs400_gart_init() 106 rdev->gart.table_size = rdev->gart.num_gpu_pages * 4; in rs400_gart_init() 164 tmp = (u32)rdev->gart.table_addr & 0xfffff000; in rs400_gart_enable() 165 tmp |= (upper_32_bits(rdev->gart.table_addr) & 0xff) << 4; in rs400_gart_enable() 192 (unsigned long long)rdev->gart.table_addr); in rs400_gart_enable() 193 rdev->gart.ready = true; in rs400_gart_enable() 236 u32 *gtt = rdev->gart.ptr; in rs400_gart_set_page()
|
D | radeon_asic.c | 167 rdev->asic->gart.tlb_flush = &rv370_pcie_gart_tlb_flush; in radeon_agp_disable() 168 rdev->asic->gart.get_page_entry = &rv370_pcie_gart_get_page_entry; in radeon_agp_disable() 169 rdev->asic->gart.set_page = &rv370_pcie_gart_set_page; in radeon_agp_disable() 173 rdev->asic->gart.tlb_flush = &r100_pci_gart_tlb_flush; in radeon_agp_disable() 174 rdev->asic->gart.get_page_entry = &r100_pci_gart_get_page_entry; in radeon_agp_disable() 175 rdev->asic->gart.set_page = &r100_pci_gart_set_page; in radeon_agp_disable() 209 .gart = { 277 .gart = { 373 .gart = { 441 .gart = { [all …]
|
D | r300.c | 122 void __iomem *ptr = rdev->gart.ptr; in rv370_pcie_gart_set_page() 134 if (rdev->gart.robj) { in rv370_pcie_gart_init() 144 rdev->gart.table_size = rdev->gart.num_gpu_pages * 4; in rv370_pcie_gart_init() 145 rdev->asic->gart.tlb_flush = &rv370_pcie_gart_tlb_flush; in rv370_pcie_gart_init() 146 rdev->asic->gart.get_page_entry = &rv370_pcie_gart_get_page_entry; in rv370_pcie_gart_init() 147 rdev->asic->gart.set_page = &rv370_pcie_gart_set_page; in rv370_pcie_gart_init() 157 if (rdev->gart.robj == NULL) { in rv370_pcie_gart_enable() 172 table_addr = rdev->gart.table_addr; in rv370_pcie_gart_enable() 187 rdev->gart.ready = true; in rv370_pcie_gart_enable()
|
D | rs600.c | 549 if (rdev->gart.robj) { in rs600_gart_init() 558 rdev->gart.table_size = rdev->gart.num_gpu_pages * 8; in rs600_gart_init() 567 if (rdev->gart.robj == NULL) { in rs600_gart_enable() 604 rdev->gart.table_addr); in rs600_gart_enable() 621 (unsigned long long)rdev->gart.table_addr); in rs600_gart_enable() 622 rdev->gart.ready = true; in rs600_gart_enable() 662 void __iomem *ptr = (void *)rdev->gart.ptr; in rs600_gart_set_page()
|
D | radeon_ttm.c | 908 if (p >= rdev->gart.num_cpu_pages) in radeon_ttm_gtt_read() 911 page = rdev->gart.pages[p]; in radeon_ttm_gtt_read() 917 kunmap(rdev->gart.pages[p]); in radeon_ttm_gtt_read()
|
D | rv770.c | 909 if (rdev->gart.robj == NULL) { in rv770_pcie_gart_enable() 938 WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12); in rv770_pcie_gart_enable() 949 (unsigned long long)rdev->gart.table_addr); in rv770_pcie_gart_enable() 950 rdev->gart.ready = true; in rv770_pcie_gart_enable()
|
D | r100.c | 654 if (rdev->gart.ptr) { in r100_pci_gart_init() 662 rdev->gart.table_size = rdev->gart.num_gpu_pages * 4; in r100_pci_gart_init() 663 rdev->asic->gart.tlb_flush = &r100_pci_gart_tlb_flush; in r100_pci_gart_init() 664 rdev->asic->gart.get_page_entry = &r100_pci_gart_get_page_entry; in r100_pci_gart_init() 665 rdev->asic->gart.set_page = &r100_pci_gart_set_page; in r100_pci_gart_init() 680 WREG32(RADEON_AIC_PT_BASE, rdev->gart.table_addr); in r100_pci_gart_enable() 686 (unsigned long long)rdev->gart.table_addr); in r100_pci_gart_enable() 687 rdev->gart.ready = true; in r100_pci_gart_enable() 710 u32 *gtt = rdev->gart.ptr; in r100_pci_gart_set_page()
|
D | ni.c | 1265 if (rdev->gart.robj == NULL) { in cayman_pcie_gart_enable() 1294 WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12); in cayman_pcie_gart_enable() 1340 (unsigned long long)rdev->gart.table_addr); in cayman_pcie_gart_enable() 1341 rdev->gart.ready = true; in cayman_pcie_gart_enable()
|
D | radeon_vm.c | 369 uint64_t src = rdev->gart.table_addr + (addr >> 12) * 8; in radeon_vm_set_pages() 601 result = rdev->gart.pages_entry[addr >> RADEON_GPU_PAGE_SHIFT]; in radeon_vm_map_gart()
|
/Linux-v5.15/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_gart.c | 118 if (adev->gart.bo == NULL) { in amdgpu_gart_table_vram_alloc() 122 bp.size = adev->gart.table_size; in amdgpu_gart_table_vram_alloc() 131 r = amdgpu_bo_create(adev, &bp, &adev->gart.bo); in amdgpu_gart_table_vram_alloc() 153 r = amdgpu_bo_reserve(adev->gart.bo, false); in amdgpu_gart_table_vram_pin() 156 r = amdgpu_bo_pin(adev->gart.bo, AMDGPU_GEM_DOMAIN_VRAM); in amdgpu_gart_table_vram_pin() 158 amdgpu_bo_unreserve(adev->gart.bo); in amdgpu_gart_table_vram_pin() 161 r = amdgpu_bo_kmap(adev->gart.bo, &adev->gart.ptr); in amdgpu_gart_table_vram_pin() 163 amdgpu_bo_unpin(adev->gart.bo); in amdgpu_gart_table_vram_pin() 164 amdgpu_bo_unreserve(adev->gart.bo); in amdgpu_gart_table_vram_pin() 180 if (adev->gart.bo == NULL) { in amdgpu_gart_table_vram_unpin() [all …]
|
D | gmc_v6_0.c | 475 if (adev->gart.bo == NULL) { in gmc_v6_0_gart_enable() 483 table_addr = amdgpu_bo_gpu_offset(adev->gart.bo); in gmc_v6_0_gart_enable() 561 adev->gart.ready = true; in gmc_v6_0_gart_enable() 569 if (adev->gart.bo) { in gmc_v6_0_gart_init() 576 adev->gart.table_size = adev->gart.num_gpu_pages * 8; in gmc_v6_0_gart_init() 577 adev->gart.gart_pte_flags = 0; in gmc_v6_0_gart_init()
|
D | gmc_v10_0.c | 374 job->vm_pd_addr = amdgpu_gmc_pd_addr(adev->gart.bo); in gmc_v10_0_flush_gpu_tlb() 831 if (adev->gart.bo) { in gmc_v10_0_gart_init() 841 adev->gart.table_size = adev->gart.num_gpu_pages * 8; in gmc_v10_0_gart_init() 842 adev->gart.gart_pte_flags = AMDGPU_PTE_MTYPE_NV10(MTYPE_UC) | in gmc_v10_0_gart_init() 1019 if (adev->gart.bo == NULL) { in gmc_v10_0_gart_enable() 1051 (unsigned long long)amdgpu_bo_gpu_offset(adev->gart.bo)); in gmc_v10_0_gart_enable() 1053 adev->gart.ready = true; in gmc_v10_0_gart_enable()
|
D | gmc_v7_0.c | 619 if (adev->gart.bo == NULL) { in gmc_v7_0_gart_enable() 627 table_addr = amdgpu_bo_gpu_offset(adev->gart.bo); in gmc_v7_0_gart_enable() 715 adev->gart.ready = true; in gmc_v7_0_gart_enable() 723 if (adev->gart.bo) { in gmc_v7_0_gart_init() 731 adev->gart.table_size = adev->gart.num_gpu_pages * 8; in gmc_v7_0_gart_init() 732 adev->gart.gart_pte_flags = 0; in gmc_v7_0_gart_init()
|
D | gmc_v9_0.c | 1425 if (adev->gart.bo) { in gmc_v9_0_gart_init() 1442 adev->gart.table_size = adev->gart.num_gpu_pages * 8; in gmc_v9_0_gart_init() 1443 adev->gart.gart_pte_flags = AMDGPU_PTE_MTYPE_VG10(MTYPE_UC) | in gmc_v9_0_gart_init() 1706 if (adev->gart.bo == NULL) { in gmc_v9_0_gart_enable() 1729 (unsigned long long)amdgpu_bo_gpu_offset(adev->gart.bo)); in gmc_v9_0_gart_enable() 1731 adev->gart.ready = true; in gmc_v9_0_gart_enable()
|
D | gmc_v8_0.c | 836 if (adev->gart.bo == NULL) { in gmc_v8_0_gart_enable() 844 table_addr = amdgpu_bo_gpu_offset(adev->gart.bo); in gmc_v8_0_gart_enable() 949 adev->gart.ready = true; in gmc_v8_0_gart_enable() 957 if (adev->gart.bo) { in gmc_v8_0_gart_init() 965 adev->gart.table_size = adev->gart.num_gpu_pages * 8; in gmc_v8_0_gart_init() 966 adev->gart.gart_pte_flags = AMDGPU_PTE_EXECUTABLE; in gmc_v8_0_gart_init()
|
D | amdgpu_gmc.c | 743 uint64_t flags = adev->gart.gart_pte_flags; //TODO it is UC. explore NC/RW? in amdgpu_gmc_init_pdb0() 751 u64 gart_ptb_gpu_pa = amdgpu_gmc_vram_pa(adev, adev->gart.bo); in amdgpu_gmc_init_pdb0()
|
/Linux-v5.15/include/soc/tegra/ |
D | mc.h | 118 int tegra_gart_suspend(struct gart_device *gart); 119 int tegra_gart_resume(struct gart_device *gart); 127 static inline int tegra_gart_suspend(struct gart_device *gart) in tegra_gart_suspend() argument 132 static inline int tegra_gart_resume(struct gart_device *gart) in tegra_gart_resume() argument 213 struct gart_device *gart; member
|
/Linux-v5.15/drivers/gpu/drm/nouveau/ |
D | nouveau_chan.h | 24 struct nvif_object gart; member
|
D | nouveau_chan.c | 97 nvif_object_dtor(&chan->gart); in nouveau_channel_del() 381 nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart) in nouveau_channel_init() argument 444 ret = nvif_object_ctor(&chan->user, "abi16ChanGartCtxDma", gart, in nouveau_channel_init() 446 &chan->gart); in nouveau_channel_init()
|
/Linux-v5.15/drivers/memory/tegra/ |
D | tegra20.c | 694 if (IS_ENABLED(CONFIG_TEGRA_IOMMU_GART) && mc->gart) { in tegra20_mc_suspend() 695 err = tegra_gart_suspend(mc->gart); in tegra20_mc_suspend() 707 if (IS_ENABLED(CONFIG_TEGRA_IOMMU_GART) && mc->gart) { in tegra20_mc_resume() 708 err = tegra_gart_resume(mc->gart); in tegra20_mc_resume()
|
D | mc.c | 807 mc->gart = tegra_gart_probe(&pdev->dev, mc); in tegra_mc_probe() 808 if (IS_ERR(mc->gart)) { in tegra_mc_probe() 810 PTR_ERR(mc->gart)); in tegra_mc_probe() 811 mc->gart = NULL; in tegra_mc_probe()
|
/Linux-v5.15/drivers/gpu/drm/amd/amdkfd/ |
D | kfd_migrate.c | 70 dst_addr = amdgpu_bo_gpu_offset(adev->gart.bo); in svm_migrate_gart_map() 81 pte_flags |= adev->gart.gart_pte_flags; in svm_migrate_gart_map()
|