mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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 <Hawking.Zhang@amd.com> Reviewed-by: Likun Gao <Likun.Gao@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
f3c3dd1207
commit
980a0a9452
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user