drm/amdgpu: Arcturus: MTYPE_NC for coarse-grain remote memory
authorFelix Kuehling <Felix.Kuehling@amd.com>
Mon, 10 May 2021 22:37:56 +0000 (18:37 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 May 2021 02:29:53 +0000 (22:29 -0400)
MTYPE UC was used for a specific use case that ended up not being
implemented. Use NC for better performance for coarse-grained memory where
cache coherence during shader execution is not required.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oak Zeng <Oak.Zeng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.c

index dfa025d694f87dbb6ca1e9442a3210a987c1b3aa..941a204d28f5af07f5cebb8770938860f511e126 100644 (file)
@@ -433,7 +433,8 @@ static uint64_t get_pte_flags(struct amdgpu_device *adev, struct kgd_mem *mem)
                                mapping_flags |= coherent ?
                                        AMDGPU_VM_MTYPE_CC : AMDGPU_VM_MTYPE_RW;
                        else
-                               mapping_flags |= AMDGPU_VM_MTYPE_UC;
+                               mapping_flags |= coherent ?
+                                       AMDGPU_VM_MTYPE_UC : AMDGPU_VM_MTYPE_NC;
                } else {
                        mapping_flags |= coherent ?
                                AMDGPU_VM_MTYPE_UC : AMDGPU_VM_MTYPE_NC;
index b665e9ff77e3cd82977177041f5812d32852dd40..12c827854d1d22f0caac3ad37476bb8d5daecc67 100644 (file)
@@ -1022,7 +1022,8 @@ svm_range_get_pte_flags(struct amdgpu_device *adev, struct svm_range *prange)
                                mapping_flags |= coherent ?
                                        AMDGPU_VM_MTYPE_CC : AMDGPU_VM_MTYPE_RW;
                        } else {
-                               mapping_flags |= AMDGPU_VM_MTYPE_UC;
+                               mapping_flags |= coherent ?
+                                       AMDGPU_VM_MTYPE_UC : AMDGPU_VM_MTYPE_NC;
                                if (amdgpu_xgmi_same_hive(adev, bo_adev))
                                        snoop = true;
                        }