diff options
| author | Hawking Zhang <[email protected]> | 2023-03-08 14:56:43 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-04-30 14:01:01 +0000 |
| commit | 980a0a9452e1a74cb1384378989d0c5237ad8cd2 (patch) | |
| tree | 70318aa4e6044b21073ac6f4ec7042efc4ccae85 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | |
| parent | drm/amdgpu: Set pte_is_pte flag in gmc v12 gart (diff) | |
| download | kernel-980a0a9452e1a74cb1384378989d0c5237ad8cd2.tar.gz kernel-980a0a9452e1a74cb1384378989d0c5237ad8cd2.zip | |
drm/amdgpu: support gfx v12 specific pte/pde fields
Add gfx v12 pte/pde support to gmc common helper.
v2: squash in fixes (Alex)
Signed-off-by: Hawking Zhang <[email protected]>
Reviewed-by: Likun Gao <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h index e0e7e944a323..bc71b44387b2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h @@ -113,6 +113,8 @@ struct amdgpu_mem_stats; /* gfx12 */ #define AMDGPU_PTE_PRT_GFX12 (1ULL << 56) +#define AMDGPU_PTE_PRT_FLAG(adev) \ + ((amdgpu_ip_version((adev), GC_HWIP, 0) >= IP_VERSION(12, 0, 0)) ? AMDGPU_PTE_PRT_GFX12 : AMDGPU_PTE_PRT) #define AMDGPU_PTE_MTYPE_GFX12(a) ((uint64_t)(a) << 54) #define AMDGPU_PTE_MTYPE_GFX12_MASK AMDGPU_PTE_MTYPE_GFX12(3ULL) @@ -121,8 +123,12 @@ struct amdgpu_mem_stats; /* PDE Block Fragment Size for gfx v12 */ #define AMDGPU_PDE_BFS_GFX12(a) ((uint64_t)((a) & 0x1fULL) << 58) +#define AMDGPU_PDE_BFS_FLAG(adev, a) \ + ((amdgpu_ip_version((adev), GC_HWIP, 0) >= IP_VERSION(12, 0, 0)) ? AMDGPU_PDE_BFS_GFX12(a) : AMDGPU_PDE_BFS(a)) /* PDE is handled as PTE for gfx v12 */ #define AMDGPU_PDE_PTE_GFX12 (1ULL << 63) +#define AMDGPU_PDE_PTE_FLAG(adev) \ + ((amdgpu_ip_version((adev), GC_HWIP, 0) >= IP_VERSION(12, 0, 0)) ? AMDGPU_PDE_PTE_GFX12 : AMDGPU_PDE_PTE) /* How to program VM fault handling */ #define AMDGPU_VM_FAULT_STOP_NEVER 0 |
