drm/amdgpu: Apply noretry setting for gfx10 and mmhub9.4
Subsystems (2)
PATCH 1/1 drm/amdgpu: Apply noretry setting for gfx10 and mmhub9.4
Config the translation retry behavior according to noretry kernel parameter
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +3 -1
@@ -1751,7 +1751,9 @@ static void gfx_v10_0_constants_init(struct amdgpu_device *adev)for (i =0 ; i < adev->vm_manager.id_mgr[AMDGPU_GFXHUB_0 ].num_ids; i++) {nv_grbm_select (adev,0 ,0 ,0 , i);/* CP and shaders */ -WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG,DEFAULT_SH_MEM_CONFIG ); + tmp =REG_SET_FIELD (DEFAULT_SH_MEM_CONFIG ,SH_MEM_CONFIG , +RETRY_MODE , amdgpu_noretry ?2 :0 ); +WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp);if (i !=0 ) { tmp =REG_SET_FIELD (0 ,SH_MEM_BASES ,PRIVATE_BASE , (adev->gmc.private_aperture_start >>48 ));
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c +3 -2
@@ -314,7 +314,8 @@ static void mmhub_v9_4_setup_vmid_config(struct amdgpu_device *adev, int hubid) adev->vm_manager.block_size - 9);/* Send no-retry XNACK on fault to suppress VM fault storm. */ tmp =REG_SET_FIELD (tmp,VML2VC0_VM_CONTEXT1_CNTL , -RETRY_PERMISSION_OR_INVALID_PAGE_FAULT ,0 ); +RETRY_PERMISSION_OR_INVALID_PAGE_FAULT , + !amdgpu_noretry);WREG32_SOC15_OFFSET (MMHUB ,0 , mmVML2VC0_VM_CONTEXT1_CNTL, hubid *MMHUB_INSTANCE_REGISTER_OFFSET + i, tmp);
@@ -905,4 +906,4 @@ static void mmhub_v9_4_query_ras_error_count(struct amdgpu_device *adev,const struct amdgpu_mmhub_funcs mmhub_v9_4_funcs = { .ras_late_init = amdgpu_mmhub_ras_late_init, .query_ras_error_count = mmhub_v9_4_query_ras_error_count, -}; +};
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1574454197-13273-1-git-send-email-Oak.Zeng-5C7GfCeVMHo@public.gmane.org
Quoted 16 lines · Oak Zeng
Config the translation retry behavior according to noretry kernel parameter
Change-Id I5b91ea77715137cf8cb84e258ccdfbb19c7a4ed1Signed-off-by Oak Zeng <[email protected]>Suggested-by Jay Cornwall <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c static void gfx_v10_0_constants_init(struct amdgpu_device *adev) · line 1756
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +3
-1@@ -1751,7 +1751,9 @@ static void gfx_v10_0_constants_init(struct amdgpu_device *adev)for (i =0 ; i < adev->vm_manager.id_mgr[AMDGPU_GFXHUB_0 ].num_ids; i++) {nv_grbm_select (adev,0 ,0 ,0 , i);/* CP and shaders */ -WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG,DEFAULT_SH_MEM_CONFIG ); + tmp =REG_SET_FIELD (DEFAULT_SH_MEM_CONFIG ,SH_MEM_CONFIG , +RETRY_MODE , amdgpu_noretry ?2 :0 ); +WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp);
I didn't fix gfx_v10_0 on purpose last time I worked on this ("75ee64875e75 drm/amdkfd: Consistently apply noretry setting"), because the retry works differently on GFXv10. Do you have new information about how the RETRY_MODE setting works on GFXv10? Does it affect performance?
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +0
-0if (i !=0 ) { tmp =REG_SET_FIELD (0 ,SH_MEM_BASES ,PRIVATE_BASE , (adev->gmc.private_aperture_start >>48 ));drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c +0
-0
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c static void mmhub_v9_4_setup_vmid_config(struct amdgpu_device *adev, int hubid) · line 318
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c +2
-1@@ -314,7 +314,8 @@ static void mmhub_v9_4_setup_vmid_config(struct amdgpu_device *adev, int hubid) adev->vm_manager.block_size - 9);/* Send no-retry XNACK on fault to suppress VM fault storm. */ tmp =REG_SET_FIELD (tmp,VML2VC0_VM_CONTEXT1_CNTL , -RETRY_PERMISSION_OR_INVALID_PAGE_FAULT ,0 ); +RETRY_PERMISSION_OR_INVALID_PAGE_FAULT , + !amdgpu_noretry);
Right, this was missed in my previous commit because mmhub_v9_4 was added later.
Regards,
Felix
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c static void mmhub_v9_4_query_ras_error_count(struct amdgpu_device *adev, · line 909
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c +1
-1WREG32_SOC15_OFFSET (MMHUB ,0 , mmVML2VC0_VM_CONTEXT1_CNTL, hubid *MMHUB_INSTANCE_REGISTER_OFFSET + i, tmp);@@ -905,4 +906,4 @@ static void mmhub_v9_4_query_ras_error_count(struct amdgpu_device *adev,const struct amdgpu_mmhub_funcs mmhub_v9_4_funcs = { .ras_late_init = amdgpu_mmhub_ras_late_init, .query_ras_error_count = mmhub_v9_4_query_ras_error_count, -}; +};
_______________________________________________
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): b4dcc63c-e57e-30cb-06f2-11451c37a195-5C7GfCeVMHo@public.gmane.org
I didn't have new information about the retry_mode setting for gfx10. I just saw the noretry kernel parameter wasn't applied to gfx10 but I didn't know gfx10 is excluded purposely. Let me drop the gfx10 part for now.
Oak
-----Original Message-----
From: Kuehling, Felix <[email protected]>
Sent: Friday, November 22, 2019 3:51 PM
To: Zeng, Oak <[email protected]>; [email protected]
Cc: Cornwall, Jay <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Apply noretry setting for gfx10 and mmhub9.4
Quoted 17 lines · Oak Zeng
Config the translation retry behavior according to noretry kernel parameter
Change-Id I5b91ea77715137cf8cb84e258ccdfbb19c7a4ed1Signed-off-by Oak Zeng <[email protected]>Suggested-by Jay Cornwall <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 +++- drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c static void gfx_v10_0_constants_init(struct amdgpu_device *adev) · line 1756
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +3
-1@@ -1751,7 +1751,9 @@ static void gfx_v10_0_constants_init(struct amdgpu_device *adev)for (i =0 ; i < adev->vm_manager.id_mgr[AMDGPU_GFXHUB_0 ].num_ids; i++) {nv_grbm_select (adev,0 ,0 ,0 , i);/* CP and shaders */ -WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG,DEFAULT_SH_MEM_CONFIG ); + tmp =REG_SET_FIELD (DEFAULT_SH_MEM_CONFIG ,SH_MEM_CONFIG , +RETRY_MODE , amdgpu_noretry ?2 :0 ); +WREG32_SOC15 (GC ,0 , mmSH_MEM_CONFIG, tmp);
I didn't fix gfx_v10_0 on purpose last time I worked on this
("75ee64875e75 drm/amdkfd: Consistently apply noretry setting"), because the retry works differently on GFXv10. Do you have new information about how the RETRY_MODE setting works on GFXv10? Does it affect performance?
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +0
-0if (i !=0 ) { tmp =REG_SET_FIELD (0 ,SH_MEM_BASES ,PRIVATE_BASE , (adev->gmc.private_aperture_start >> 48)); diff --git
a/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.cb/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
index 753eea2..8599bfd 100644
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c static void mmhub_v9_4_setup_vmid_config(struct amdgpu_device *adev, int hubid) · line 318
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c +2
-1@@ -314,7 +314,8 @@ static void mmhub_v9_4_setup_vmid_config(struct amdgpu_device *adev, int hubid) adev->vm_manager.block_size - 9);/* Send no-retry XNACK on fault to suppress VM fault storm. */ tmp =REG_SET_FIELD (tmp,VML2VC0_VM_CONTEXT1_CNTL , -RETRY_PERMISSION_OR_INVALID_PAGE_FAULT ,0 ); +RETRY_PERMISSION_OR_INVALID_PAGE_FAULT , + !amdgpu_noretry);
Right, this was missed in my previous commit because mmhub_v9_4 was added later.
Regards,
Felix
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c +0
-0WREG32_SOC15_OFFSET (MMHUB ,0 , mmVML2VC0_VM_CONTEXT1_CNTL, hubid *MMHUB_INSTANCE_REGISTER_OFFSET + i, tmp);@@ -905,4 +906,4 @@ static void mmhub_v9_4_query_ras_error_count(struct amdgpu_device *adev,const struct amdgpu_mmhub_funcs mmhub_v9_4_funcs = { .ras_late_init = amdgpu_mmhub_ras_late_init, .query_ras_error_count = mmhub_v9_4_query_ras_error_count, -}; \ Nonewline at end of file
+};
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx