drm/amdgpu/gmc10: properly set BANK_SELECT and FRAGMENT_SIZE
Subsystems (2)
PATCH 1/1 drm/amdgpu/gmc10: properly set BANK_SELECT and FRAGMENT_SIZE
These were not aligned for optimal performance for GPUVM.
--- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 9 +++++++++ 2 files changed, 18 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c +9 -0
@@ -155,6 +155,15 @@ static void gfxhub_v2_0_init_cache_regs(struct amdgpu_device *adev)WREG32_SOC15 (GC ,0 , mmGCVM_L2_CNTL2, tmp); tmp = mmGCVM_L2_CNTL3_DEFAULT; +if (adev->gmc.translate_further) { + tmp =REG_SET_FIELD (tmp,GCVM_L2_CNTL3 ,BANK_SELECT ,12 ); + tmp =REG_SET_FIELD (tmp,GCVM_L2_CNTL3 , +L2_CACHE_BIGK_FRAGMENT_SIZE ,9 ); + }else { + tmp =REG_SET_FIELD (tmp,GCVM_L2_CNTL3 ,BANK_SELECT ,9 ); + tmp =REG_SET_FIELD (tmp,GCVM_L2_CNTL3 , +L2_CACHE_BIGK_FRAGMENT_SIZE ,6 ); + }WREG32_SOC15 (GC ,0 , mmGCVM_L2_CNTL3, tmp); tmp = mmGCVM_L2_CNTL4_DEFAULT;
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c +9 -0
@@ -142,6 +142,15 @@ static void mmhub_v2_0_init_cache_regs(struct amdgpu_device *adev)WREG32_SOC15 (MMHUB ,0 , mmMMVM_L2_CNTL2, tmp); tmp = mmMMVM_L2_CNTL3_DEFAULT; +if (adev->gmc.translate_further) { + tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL3 ,BANK_SELECT ,12 ); + tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL3 , +L2_CACHE_BIGK_FRAGMENT_SIZE ,9 ); + }else { + tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL3 ,BANK_SELECT ,9 ); + tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL3 , +L2_CACHE_BIGK_FRAGMENT_SIZE ,6 ); + }WREG32_SOC15 (MMHUB ,0 , mmMMVM_L2_CNTL3, tmp); tmp = mmMMVM_L2_CNTL4_DEFAULT;
Signature · 6 lines
2.23.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20191029211544.1534432-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Am 29.10.19 um 22:15 schrieb Alex Deucher:
Quoted 3 lines
These were not aligned for optimal performance for GPUVM.
Signed-off-by Alex Deucher <[email protected]>
Good catch. But I haven't read the GMC10 documentation yet of everything is still the same as on GMC9.
So only Acked-by: Christian König <[email protected]>
Regards,
Christian.
Quoted 35 lines
--- drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 9 +++++++++ 2 files changed, 18 insertions(+)drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c +9
-0@@ -155,6 +155,15 @@ static void gfxhub_v2_0_init_cache_regs(struct amdgpu_device *adev)WREG32_SOC15 (GC ,0 , mmGCVM_L2_CNTL2, tmp); tmp = mmGCVM_L2_CNTL3_DEFAULT; +if (adev->gmc.translate_further) { + tmp =REG_SET_FIELD (tmp,GCVM_L2_CNTL3 ,BANK_SELECT ,12 ); + tmp =REG_SET_FIELD (tmp,GCVM_L2_CNTL3 , +L2_CACHE_BIGK_FRAGMENT_SIZE ,9 ); + }else { + tmp =REG_SET_FIELD (tmp,GCVM_L2_CNTL3 ,BANK_SELECT ,9 ); + tmp =REG_SET_FIELD (tmp,GCVM_L2_CNTL3 , +L2_CACHE_BIGK_FRAGMENT_SIZE ,6 ); + }WREG32_SOC15 (GC ,0 , mmGCVM_L2_CNTL3, tmp); tmp = mmGCVM_L2_CNTL4_DEFAULT;drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c +2
-0@@ -142,6 +142,15 @@ static void mmhub_v2_0_init_cache_regs(struct amdgpu_device *adev)WREG32_SOC15 (MMHUB ,0 , mmMMVM_L2_CNTL2, tmp); tmp = mmMMVM_L2_CNTL3_DEFAULT; +if (adev->gmc.translate_further) { + tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL3 ,BANK_SELECT ,12 );
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c static void mmhub_v2_0_init_cache_regs(struct amdgpu_device *adev) · line 156
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c +7
-0+ tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL3 , +L2_CACHE_BIGK_FRAGMENT_SIZE ,9 ); + }else { + tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL3 ,BANK_SELECT ,9 ); + tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL3 , +L2_CACHE_BIGK_FRAGMENT_SIZE ,6 ); + }WREG32_SOC15 (MMHUB ,0 , mmMMVM_L2_CNTL3, tmp); tmp = mmMMVM_L2_CNTL4_DEFAULT;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx