Commit 6890f4cb authored by Eric Huang's avatar Eric Huang Committed by Alex Deucher

drm/amdkfd: change MTYPEs for Aldebaran's HW requirement

Due to changes of HW memory model, we need to change Aldebaran
MTYPEs to meet HW changes.
Signed-off-by: default avatarEric Huang <jinhuieric.huang@amd.com>
Reviewed-by: default avatarHarish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 36c08237
...@@ -445,22 +445,19 @@ static uint64_t get_pte_flags(struct amdgpu_device *adev, struct kgd_mem *mem) ...@@ -445,22 +445,19 @@ static uint64_t get_pte_flags(struct amdgpu_device *adev, struct kgd_mem *mem)
mapping_flags |= AMDGPU_VM_MTYPE_UC; mapping_flags |= AMDGPU_VM_MTYPE_UC;
} else if (mem->alloc_flags & KFD_IOC_ALLOC_MEM_FLAGS_VRAM) { } else if (mem->alloc_flags & KFD_IOC_ALLOC_MEM_FLAGS_VRAM) {
if (bo_adev == adev) { if (bo_adev == adev) {
mapping_flags |= AMDGPU_VM_MTYPE_RW; mapping_flags |= coherent ?
AMDGPU_VM_MTYPE_CC : AMDGPU_VM_MTYPE_RW;
if (adev->gmc.xgmi.connected_to_cpu) if (adev->gmc.xgmi.connected_to_cpu)
snoop = true; snoop = true;
} else { } else {
mapping_flags |= AMDGPU_VM_MTYPE_NC; mapping_flags |= AMDGPU_VM_MTYPE_UC;
if (amdgpu_xgmi_same_hive(adev, bo_adev)) if (amdgpu_xgmi_same_hive(adev, bo_adev))
snoop = true; snoop = true;
} }
} else { } else {
snoop = true; snoop = true;
if (adev->gmc.xgmi.connected_to_cpu) mapping_flags |= coherent ?
/* system memory uses NC on A+A */ AMDGPU_VM_MTYPE_UC : AMDGPU_VM_MTYPE_NC;
mapping_flags |= AMDGPU_VM_MTYPE_NC;
else
mapping_flags |= coherent ?
AMDGPU_VM_MTYPE_UC : AMDGPU_VM_MTYPE_NC;
} }
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment