[PATCH] drm/amdkfd: Make EXT_COHERENT parameter affect APU svm memory

Francis, David David.Francis at amd.com
Tue Oct 10 14:32:59 UTC 2023


[AMD Official Use Only - General]

By the intended semantics of the EXT_COHERENT parameter,
it should cause the driver to use MTYPE_UC instead of
MTYPE_NC on non-local gfx9.4.3 APU memory.

Signed-off-by: David Francis <David.Francis at amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index 7b81233bc9ae..d9ef937308ed 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -1286,7 +1286,7 @@ svm_range_get_pte_flags(struct kfd_node *node,
                         if (num_possible_nodes() <= 1)
                                 mapping_flags |= mtype_local;
                         else
-                               mapping_flags |= AMDGPU_VM_MTYPE_NC;
+                               mapping_flags |= ext_coherent ? AMDGPU_VM_MTYPE_UC : AMDGPU_VM_MTYPE_NC;
                 /* system memory accessed by the dGPU */
                 } else {
                         mapping_flags |= AMDGPU_VM_MTYPE_UC;
--
2.34.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20231010/c6050e84/attachment-0001.htm>


More information about the amd-gfx mailing list