Commit d839a158 authored by Graham Sider's avatar Graham Sider Committed by Alex Deucher

drm/amdgpu: Correct dGPU MTYPE settings for gfx943

Revert temporary dGPU VRAM MTYPE setting and align with expected
coherency protocol.
Signed-off-by: default avatarGraham Sider <Graham.Sider@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 30b52995
...@@ -1238,17 +1238,12 @@ static void gmc_v9_0_get_coherence_flags(struct amdgpu_device *adev, ...@@ -1238,17 +1238,12 @@ static void gmc_v9_0_get_coherence_flags(struct amdgpu_device *adev,
mtype = MTYPE_RW; mtype = MTYPE_RW;
} else { } else {
/* dGPU */ /* dGPU */
/* if (is_vram && bo_adev == adev)
if ((mem->alloc_flags & KFD_IOC_ALLOC_MEM_FLAGS_VRAM) && mtype = MTYPE_RW;
bo_adev == adev) else if (is_vram)
mapping_flags |= AMDGPU_VM_MTYPE_RW; mtype = MTYPE_NC;
else else
*/ mtype = MTYPE_UC;
/* Temporarily comment out above lines and use MTYPE_NC
* on both VRAM and system memory access until
* MTYPE_RW can properly work on VRAM access
*/
mtype = MTYPE_NC;
} }
break; break;
......
...@@ -1198,13 +1198,9 @@ svm_range_get_pte_flags(struct kfd_node *node, ...@@ -1198,13 +1198,9 @@ svm_range_get_pte_flags(struct kfd_node *node,
if (uncached) { if (uncached) {
mapping_flags |= AMDGPU_VM_MTYPE_UC; mapping_flags |= AMDGPU_VM_MTYPE_UC;
} else if (domain == SVM_RANGE_VRAM_DOMAIN) { } else if (domain == SVM_RANGE_VRAM_DOMAIN) {
/* local HBM region close to partition with a workaround /* local HBM region close to partition */
* for Endpoint systems.
*/
if (bo_node == node) if (bo_node == node)
mapping_flags |= mapping_flags |= AMDGPU_VM_MTYPE_RW;
(node->adev->flags & AMD_IS_APU) ?
AMDGPU_VM_MTYPE_RW : AMDGPU_VM_MTYPE_NC;
/* local HBM region far from partition or remote XGMI GPU */ /* local HBM region far from partition or remote XGMI GPU */
else if (svm_nodes_in_same_hive(bo_node, node)) else if (svm_nodes_in_same_hive(bo_node, node))
mapping_flags |= AMDGPU_VM_MTYPE_NC; mapping_flags |= AMDGPU_VM_MTYPE_NC;
......
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