]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/amdkfd: Add GFX12 PTE flag to SVM get PTE function
authorSreekant Somasekharan <sreekant.somasekharan@amd.com>
Fri, 23 Feb 2024 17:44:43 +0000 (12:44 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 May 2024 20:18:13 +0000 (16:18 -0400)
Add new GFX12 PTE flag AMDGPU_PTE_IS_PTE to svm_range_get_pte_flags
function. This resolves the issues related to SVM enablement in GFX12.

Signed-off-by: Sreekant Somasekharan <sreekant.somasekharan@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_svm.c

index 037e502f50bc5326f10d5c47a6bf38c20282a45d..7bb3d76505689f27aaa6d42376d339d9bc1170d6 100644 (file)
@@ -1264,6 +1264,8 @@ svm_range_get_pte_flags(struct kfd_node *node,
        pte_flags = AMDGPU_PTE_VALID;
        pte_flags |= (domain == SVM_RANGE_VRAM_DOMAIN) ? 0 : AMDGPU_PTE_SYSTEM;
        pte_flags |= snoop ? AMDGPU_PTE_SNOOPED : 0;
+       if (KFD_GC_VERSION(node) >= IP_VERSION(12, 0, 0))
+               pte_flags |= AMDGPU_PTE_IS_PTE;
 
        pte_flags |= amdgpu_gem_va_map_flags(node->adev, mapping_flags);
        return pte_flags;