[PATCH] amdkfd: MTYPE_UC for ext-coherent system memory
Felix Kuehling
felix.kuehling at amd.com
Wed Jun 25 22:12:30 UTC 2025
On 2025-06-19 14:40, David Yat Sin wrote:
> Set memory mtype to UC host memory when ext-coherent
> flag is set and memory is registered as a SVM allocation.
>
> Signed-off-by: David Yat Sin <David.YatSin at amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling 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 16fb19800f9e..9dba0e4ae4b3 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
> @@ -1282,7 +1282,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;
More information about the amd-gfx
mailing list