[PATCH 2/2] drm/amdkfd: Minor corrections to a previous commit

Sreekant Somasekharan sreekant.somasekharan at amd.com
Fri May 10 04:55:41 UTC 2024


This patch rectifies mistake in previous commit:
'drm/amdkfd: mark GFX12 system and peer GPU memory mappings as MTYPE_NC'.

Signed-off-by: Sreekant Somasekharan <sreekant.somasekharan at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 3 ++-
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c   | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
index df0363ad1a51..6eb370609d01 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
@@ -495,7 +495,8 @@ static void gmc_v12_0_get_vm_pte(struct amdgpu_device *adev,
 	struct amdgpu_bo *bo = mapping->bo_va->base.bo;
 	struct amdgpu_device *bo_adev = amdgpu_ttm_adev(bo->tbo.bdev);
 	bool coherent = bo->flags & AMDGPU_GEM_CREATE_COHERENT;
-	bool is_system = bo->tbo.resource->mem_type == TTM_PL_SYSTEM;
+	bool is_system = (bo->tbo.resource->mem_type == TTM_PL_TT) ||
+		(bo->tbo.resource->mem_type == AMDGPU_PL_PREEMPT);
 
 
 	*flags &= ~AMDGPU_PTE_EXECUTABLE;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index 2aea33d2c4d4..6175800f50f3 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -1253,6 +1253,7 @@ svm_range_get_pte_flags(struct kfd_node *node,
 		}
 		break;
 	case IP_VERSION(12, 0, 0):
+	case IP_VERSION(12, 0, 1):
 		if (domain == SVM_RANGE_VRAM_DOMAIN) {
 			if (bo_node != node)
 				mapping_flags |= AMDGPU_VM_MTYPE_NC;
-- 
2.34.1



More information about the amd-gfx mailing list