aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Yat Sin <[email protected]>2025-06-19 17:51:13 +0000
committerAlex Deucher <[email protected]>2025-06-30 15:53:38 +0000
commit5d14fdab4778c29cfd39e62c3ce84d232b4a7d8c (patch)
treed129406803fbbff1725e719dd48cf4ff5fd4f318
parentdrm/amdgpu/sdma5.x: suspend KFD queues in ring reset (diff)
downloadkernel-5d14fdab4778c29cfd39e62c3ce84d232b4a7d8c.tar.gz
kernel-5d14fdab4778c29cfd39e62c3ce84d232b4a7d8c.zip
amdkfd: MTYPE_UC for ext-coherent system memory
Set memory mtype to UC host memory when ext-coherent flag is set and memory is registered as a SVM allocation. Reviewed-by: Amber Lin <[email protected]> Signed-off-by: David Yat Sin <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_svm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index 865dca2547de..7763e4742080 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -1278,7 +1278,7 @@ svm_range_get_pte_flags(struct kfd_node *node,
mapping_flags |= ext_coherent ? AMDGPU_VM_MTYPE_UC : AMDGPU_VM_MTYPE_NC;
/* system memory accessed by the dGPU */
} else {
- if (gc_ip_version < IP_VERSION(9, 5, 0))
+ if (gc_ip_version < IP_VERSION(9, 5, 0) || ext_coherent)
mapping_flags |= AMDGPU_VM_MTYPE_UC;
else
mapping_flags |= AMDGPU_VM_MTYPE_NC;