drm/amdgpu: Change extended-scope MTYPE on gfx v9_4_3
Subsystems (3)
PATCH 1/1 drm/amdgpu: Change extended-scope MTYPE on gfx v9_4_3
Change local memory type on gfx943 to MTYPE_UC on revision id 0
Signed-off-by David Yat Sin <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 ++++- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +4 -1
@@ -1176,7 +1176,10 @@ static void gmc_v9_0_get_coherence_flags(struct amdgpu_device *adev,if (uncached) { mtype =MTYPE_UC ; }else if (ext_coherent) { - mtype = is_local ?MTYPE_CC :MTYPE_UC ; +if (adev->rev_id) + mtype = is_local ?MTYPE_CC :MTYPE_UC ; +else + mtype =MTYPE_UC ; }else if (adev->flags &AMD_IS_APU ) { mtype = is_local ? mtype_local :MTYPE_NC ; }else {
drivers/gpu/drm/amd/amdkfd/kfd_svm.c +5 -3
@@ -1253,9 +1253,11 @@ svm_range_get_pte_flags(struct kfd_node *node, }break ;case IP_VERSION (9 ,4 ,3 ): - mtype_local = amdgpu_mtype_local ==1 ?AMDGPU_VM_MTYPE_NC : - (amdgpu_mtype_local ==2 || ext_coherent ? -AMDGPU_VM_MTYPE_CC :AMDGPU_VM_MTYPE_RW ); +if (ext_coherent) + mtype_local = node->adev->rev_id ?AMDGPU_VM_MTYPE_CC :AMDGPU_VM_MTYPE_UC ; +else + mtype_local = amdgpu_mtype_local ==1 ?AMDGPU_VM_MTYPE_NC : + amdgpu_mtype_local ==2 ?AMDGPU_VM_MTYPE_CC :AMDGPU_VM_MTYPE_RW ; snoop = true;if (uncached) { mapping_flags |=AMDGPU_VM_MTYPE_UC ;
Signature · 1 line
2.34.1