Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: add new amdgpu_gmc_emit_flush_gpu_tlb callback

Add a new GMC function to unify vm flushing.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Christian König and committed by
Alex Deucher
7ef11047 0b5f83a3

+4
+1
drivers/gpu/drm/amd/amdgpu/amdgpu.h
··· 1777 1777 #define amdgpu_asic_flush_hdp(adev) (adev)->asic_funcs->flush_hdp((adev)) 1778 1778 #define amdgpu_asic_invalidate_hdp(adev) (adev)->asic_funcs->invalidate_hdp((adev)) 1779 1779 #define amdgpu_gmc_flush_gpu_tlb(adev, vmid) (adev)->gmc.gmc_funcs->flush_gpu_tlb((adev), (vmid)) 1780 + #define amdgpu_gmc_emit_flush_gpu_tlb(r, vmid, pasid, addr) (r)->adev->gmc.gmc_funcs->emit_flush_gpu_tlb((r), (vmid), (pasid), (addr)) 1780 1781 #define amdgpu_gmc_set_pte_pde(adev, pt, idx, addr, flags) (adev)->gmc.gmc_funcs->set_pte_pde((adev), (pt), (idx), (addr), (flags)) 1781 1782 #define amdgpu_gmc_get_vm_pde(adev, level, dst, flags) (adev)->gmc.gmc_funcs->get_vm_pde((adev), (level), (dst), (flags)) 1782 1783 #define amdgpu_gmc_get_pte_flags(adev, flags) (adev)->gmc.gmc_funcs->get_vm_pte_flags((adev),(flags))
+3
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
··· 52 52 /* flush the vm tlb via mmio */ 53 53 void (*flush_gpu_tlb)(struct amdgpu_device *adev, 54 54 uint32_t vmid); 55 + /* flush the vm tlb via ring */ 56 + uint64_t (*emit_flush_gpu_tlb)(struct amdgpu_ring *ring, unsigned vmid, 57 + unsigned pasid, uint64_t pd_addr); 55 58 /* write pte/pde updates using the cpu */ 56 59 int (*set_pte_pde)(struct amdgpu_device *adev, 57 60 void *cpu_pt_addr, /* cpu addr of page table */