Improvde S0ix stability
Subsystems (2)
Alex Deucher
maintainercover Improvde S0ix stability
This series improves S0ix stability by avoiding touching registers that should be handled as part of gfxoff.
Alex Deucher (7):
drm/amdgpu/gmc9: don't touch gfxhub registers during S0ix drm/amdgpu/gmc10: don't touch gfxhub registers during S0ix drm/amdgpu/gmc11: don't touch gfxhub registers during S0ix drm/amdgpu: don't mess with SDMA clock or powergating in S0ix drm/amdgpu: for S0ix, skip SMDA 5.x+ suspend/resume
Revert "drm/amdgpu: disallow gfxoff until GC IP blocks complete s2idle
resume"
Revert "drm/amdgpu: force exit gfxoff on sdma resume for rmb s0ix"
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 32 ++++++++-------------- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 26 ++++++++++++------ drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 6 ++-- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 26 ++++++++++++++---- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 8 ------ 5 files changed, 53 insertions(+), 45 deletions(-)
Signature · 1 line
2.38.1
Alex Deucher
maintainerPATCH 1/7 drm/amdgpu/gmc9: don't touch gfxhub registers during S0ix
gfxhub registers are part of gfx IP and should not need to be changed. Doing so without disabling gfxoff can hang the gfx IP.
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +20 -6
@@ -484,6 +484,9 @@ static int gmc_v9_0_vm_fault_interrupt_state(struct amdgpu_device *adev,for (i =0 ; i <16 ; i++) { reg = hub->vm_context0_cntl + i; +if (adev->in_s0ix && (j ==AMDGPU_GFXHUB_0 )) +continue ; +if (j ==AMDGPU_GFXHUB_0 ) tmp =RREG32_SOC15_IP (GC , reg);else
@@ -504,6 +507,9 @@ static int gmc_v9_0_vm_fault_interrupt_state(struct amdgpu_device *adev,for (i =0 ; i <16 ; i++) { reg = hub->vm_context0_cntl + i; +if (adev->in_s0ix && (j ==AMDGPU_GFXHUB_0 )) +continue ; +if (j ==AMDGPU_GFXHUB_0 ) tmp =RREG32_SOC15_IP (GC , reg);else
@@ -1862,9 +1868,12 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev) }amdgpu_gtt_mgr_recover (&adev->mman.gtt_mgr); - r = adev->gfxhub.funcs->gart_enable (adev); -if (r) -return r; + +if (!adev->in_s0ix) { + r = adev->gfxhub.funcs->gart_enable (adev); +if (r) +return r; + } r = adev->mmhub.funcs->gart_enable (adev);if (r)
@@ -1911,11 +1920,15 @@ static int gmc_v9_0_hw_init(void *handle) value = true;if (!amdgpu_sriov_vf (adev)) { - adev->gfxhub.funcs->set_fault_enable_default (adev, value); +if (!adev->in_s0ix) + adev->gfxhub.funcs->set_fault_enable_default (adev, value); adev->mmhub.funcs->set_fault_enable_default (adev, value); } -for (i =0 ; i < adev->num_vmhubs; ++i) +for (i =0 ; i < adev->num_vmhubs; ++i) { +if (adev->in_s0ix && (i ==AMDGPU_GFXHUB_0 )) +continue ;gmc_v9_0_flush_gpu_tlb (adev,0 , i,0 ); + }if (adev->umc.funcs && adev->umc.funcs->init_registers) adev->umc.funcs->init_registers (adev);
@@ -1939,7 +1952,8 @@ static int gmc_v9_0_hw_init(void *handle)*/ static void gmc_v9_0_gart_disable (struct amdgpu_device *adev) { - adev->gfxhub.funcs->gart_disable (adev); +if (!adev->in_s0ix) + adev->gfxhub.funcs->gart_disable (adev); adev->mmhub.funcs->gart_disable (adev); }
Signature · 1 line
2.38.1
Re: [PATCH 1/7] drm/amdgpu/gmc9: don't touch gfxhub registers during S0ix
Am 14.12.22 um 23:16 schrieb Alex Deucher:
Quoted 13 lines
gfxhub registers are part of gfx IP and should not need to be changed. Doing so without disabling gfxoff can hang the gfx IP.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-)drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_vm_fault_interrupt_state(struct amdgpu_device *adev, · line 489
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +3
-0@@ -484,6 +484,9 @@ static int gmc_v9_0_vm_fault_interrupt_state(struct amdgpu_device *adev,for (i =0 ; i <16 ; i++) { reg = hub->vm_context0_cntl + i; +if (adev->in_s0ix && (j ==AMDGPU_GFXHUB_0 )) +continue ; +
I'm not sure we can do this because the higher layer will then have an incorrect impression of the interrupt state here.
Christian.
Quoted 57 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +17
-6if (j ==AMDGPU_GFXHUB_0 ) tmp =RREG32_SOC15_IP (GC , reg);else @@ -504,6 +507,9 @@ static int gmc_v9_0_vm_fault_interrupt_state(struct amdgpu_device *adev,for (i =0 ; i <16 ; i++) { reg = hub->vm_context0_cntl + i; +if (adev->in_s0ix && (j ==AMDGPU_GFXHUB_0 )) +continue ; +if (j ==AMDGPU_GFXHUB_0 ) tmp =RREG32_SOC15_IP (GC , reg);else @@ -1862,9 +1868,12 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev) }amdgpu_gtt_mgr_recover (&adev->mman.gtt_mgr); - r = adev->gfxhub.funcs->gart_enable (adev); -if (r) -return r; + +if (!adev->in_s0ix) { + r = adev->gfxhub.funcs->gart_enable (adev); +if (r) +return r; + } r = adev->mmhub.funcs->gart_enable (adev);if (r)@@ -1911,11 +1920,15 @@ static int gmc_v9_0_hw_init(void *handle) value = true;if (!amdgpu_sriov_vf (adev)) { - adev->gfxhub.funcs->set_fault_enable_default (adev, value); +if (!adev->in_s0ix) + adev->gfxhub.funcs->set_fault_enable_default (adev, value); adev->mmhub.funcs->set_fault_enable_default (adev, value); } -for (i =0 ; i < adev->num_vmhubs; ++i) +for (i =0 ; i < adev->num_vmhubs; ++i) { +if (adev->in_s0ix && (i ==AMDGPU_GFXHUB_0 )) +continue ;gmc_v9_0_flush_gpu_tlb (adev,0 , i,0 ); + }if (adev->umc.funcs && adev->umc.funcs->init_registers) adev->umc.funcs->init_registers (adev);@@ -1939,7 +1952,8 @@ static int gmc_v9_0_hw_init(void *handle)*/ static void gmc_v9_0_gart_disable (struct amdgpu_device *adev) { - adev->gfxhub.funcs->gart_disable (adev); +if (!adev->in_s0ix) + adev->gfxhub.funcs->gart_disable (adev); adev->mmhub.funcs->gart_disable (adev); }
Re: [PATCH 1/7] drm/amdgpu/gmc9: don't touch gfxhub registers during S0ix
Quoted 18 lines · Christian König
Am 14.12.22 um 23:16 schrieb Alex Deucher:
Quoted 16 lines
gfxhub registers are part of gfx IP and should not need to be changed. Doing so without disabling gfxoff can hang the gfx IP.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-)drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0@@ -484,6 +484,9 @@ static int gmc_v9_0_vm_fault_interrupt_state(struct amdgpu_device *adev,for (i =0 ; i <16 ; i++) { reg = hub->vm_context0_cntl + i;
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_vm_fault_interrupt_state(struct amdgpu_device *adev, · line 489
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +3
-0+if (adev->in_s0ix && (j ==AMDGPU_GFXHUB_0 )) +continue ; +I'm not sure we can do this because the higher layer will then have an incorrect impression of the interrupt state here.
In this particular case it works because we only touch this interrupt on init/resume and fini/suspend. So over the course of a s0i3 cycle the state would end up being the same, we just don't touch the registers.
Alex
Quoted 61 lines
Christian.
Quoted 57 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +17
-6if (j ==AMDGPU_GFXHUB_0 ) tmp =RREG32_SOC15_IP (GC , reg);else @@ -504,6 +507,9 @@ static int gmc_v9_0_vm_fault_interrupt_state(struct amdgpu_device *adev,for (i =0 ; i <16 ; i++) { reg = hub->vm_context0_cntl + i; +if (adev->in_s0ix && (j ==AMDGPU_GFXHUB_0 )) +continue ; +if (j ==AMDGPU_GFXHUB_0 ) tmp =RREG32_SOC15_IP (GC , reg);else @@ -1862,9 +1868,12 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev) }amdgpu_gtt_mgr_recover (&adev->mman.gtt_mgr); - r = adev->gfxhub.funcs->gart_enable (adev); -if (r) -return r; + +if (!adev->in_s0ix) { + r = adev->gfxhub.funcs->gart_enable (adev); +if (r) +return r; + } r = adev->mmhub.funcs->gart_enable (adev);if (r)@@ -1911,11 +1920,15 @@ static int gmc_v9_0_hw_init(void *handle) value = true;if (!amdgpu_sriov_vf (adev)) { - adev->gfxhub.funcs->set_fault_enable_default (adev, value); +if (!adev->in_s0ix) + adev->gfxhub.funcs->set_fault_enable_default (adev, value); adev->mmhub.funcs->set_fault_enable_default (adev, value); } -for (i =0 ; i < adev->num_vmhubs; ++i) +for (i =0 ; i < adev->num_vmhubs; ++i) { +if (adev->in_s0ix && (i ==AMDGPU_GFXHUB_0 )) +continue ;gmc_v9_0_flush_gpu_tlb (adev,0 , i,0 ); + }if (adev->umc.funcs && adev->umc.funcs->init_registers) adev->umc.funcs->init_registers (adev);@@ -1939,7 +1952,8 @@ static int gmc_v9_0_hw_init(void *handle)*/ static void gmc_v9_0_gart_disable (struct amdgpu_device *adev) { - adev->gfxhub.funcs->gart_disable (adev); +if (!adev->in_s0ix) + adev->gfxhub.funcs->gart_disable (adev); adev->mmhub.funcs->gart_disable (adev); }
Alex Deucher
maintainerPATCH 2/7 drm/amdgpu/gmc10: don't touch gfxhub registers during S0ix
In reply to Alex Deuchergfxhub registers are part of gfx IP and should not need to be changed. Doing so without disabling gfxoff can hang the gfx IP.
--- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +17 -9
@@ -78,13 +78,15 @@ gmc_v10_0_vm_fault_interrupt_state(struct amdgpu_device *adev,/* MM HUB */ amdgpu_gmc_set_vm_fault_masks (adev,AMDGPU_MMHUB_0 , false);/* GFX HUB */ -amdgpu_gmc_set_vm_fault_masks (adev,AMDGPU_GFXHUB_0 , false); +if (!adev->in_s0ix) +amdgpu_gmc_set_vm_fault_masks (adev,AMDGPU_GFXHUB_0 , false);break ;case AMDGPU_IRQ_STATE_ENABLE :/* MM HUB */ amdgpu_gmc_set_vm_fault_masks (adev,AMDGPU_MMHUB_0 , true);/* GFX HUB */ -amdgpu_gmc_set_vm_fault_masks (adev,AMDGPU_GFXHUB_0 , true); +if (!adev->in_s0ix) +amdgpu_gmc_set_vm_fault_masks (adev,AMDGPU_GFXHUB_0 , true);break ;default :break ;
@@ -1061,9 +1063,12 @@ static int gmc_v10_0_gart_enable(struct amdgpu_device *adev) }amdgpu_gtt_mgr_recover (&adev->mman.gtt_mgr); - r = adev->gfxhub.funcs->gart_enable (adev); -if (r) -return r; + +if (!adev->in_s0ix) { + r = adev->gfxhub.funcs->gart_enable (adev); +if (r) +return r; + } r = adev->mmhub.funcs->gart_enable (adev);if (r)
@@ -1077,10 +1082,12 @@ static int gmc_v10_0_gart_enable(struct amdgpu_device *adev) value = (amdgpu_vm_fault_stop ==AMDGPU_VM_FAULT_STOP_ALWAYS ) ? false : true; - adev->gfxhub.funcs->set_fault_enable_default (adev, value); +if (!adev->in_s0ix) + adev->gfxhub.funcs->set_fault_enable_default (adev, value); adev->mmhub.funcs->set_fault_enable_default (adev, value);gmc_v10_0_flush_gpu_tlb (adev,0 ,AMDGPU_MMHUB_0 ,0 ); -gmc_v10_0_flush_gpu_tlb (adev,0 ,AMDGPU_GFXHUB_0 ,0 ); +if (!adev->in_s0ix) +gmc_v10_0_flush_gpu_tlb (adev,0 ,AMDGPU_GFXHUB_0 ,0 ); DRM_INFO("PCIE GART of %uM enabled (table at 0x%016llX).\n", (unsigned)(adev->gmc.gart_size >> 20),
@@ -1101,7 +1108,7 @@ static int gmc_v10_0_hw_init(void *handle)* harvestable groups in gc_utcl2 need to be programmed before any GFX block * register setup within GMC, or else system hang when harvesting SA. */ -if (adev->gfxhub.funcs && adev->gfxhub.funcs->utcl2_harvest) +if (!adev->in_s0ix && adev->gfxhub.funcs && adev->gfxhub.funcs->utcl2_harvest) adev->gfxhub.funcs->utcl2_harvest (adev); r =gmc_v10_0_gart_enable (adev);
@@ -1129,7 +1136,8 @@ static int gmc_v10_0_hw_init(void *handle)*/ static void gmc_v10_0_gart_disable (struct amdgpu_device *adev) { - adev->gfxhub.funcs->gart_disable (adev); +if (!adev->in_s0ix) + adev->gfxhub.funcs->gart_disable (adev); adev->mmhub.funcs->gart_disable (adev); }
Signature · 1 line
2.38.1
Alex Deucher
maintainerPATCH 3/7 drm/amdgpu/gmc11: don't touch gfxhub registers during S0ix
In reply to Alex Deuchergfxhub registers are part of gfx IP and should not need to be changed. Doing so without disabling gfxoff can hang the gfx IP.
--- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +4 -2
@@ -64,13 +64,15 @@ gmc_v11_0_vm_fault_interrupt_state(struct amdgpu_device *adev,/* MM HUB */ amdgpu_gmc_set_vm_fault_masks (adev,AMDGPU_MMHUB_0 , false);/* GFX HUB */ -amdgpu_gmc_set_vm_fault_masks (adev,AMDGPU_GFXHUB_0 , false); +if (!adev->in_s0ix) +amdgpu_gmc_set_vm_fault_masks (adev,AMDGPU_GFXHUB_0 , false);break ;case AMDGPU_IRQ_STATE_ENABLE :/* MM HUB */ amdgpu_gmc_set_vm_fault_masks (adev,AMDGPU_MMHUB_0 , true);/* GFX HUB */ -amdgpu_gmc_set_vm_fault_masks (adev,AMDGPU_GFXHUB_0 , true); +if (!adev->in_s0ix) +amdgpu_gmc_set_vm_fault_masks (adev,AMDGPU_GFXHUB_0 , true);break ;default :break ;
Signature · 1 line
2.38.1
Alex Deucher
maintainerPATCH 4/7 drm/amdgpu: don't mess with SDMA clock or powergating in S0ix
In reply to Alex DeucherIt's handled by GFXOFF for SDMA 5.x and SMU saves the state on SDMA 4.x.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -4
@@ -2581,9 +2581,10 @@ int amdgpu_device_set_cg_state(struct amdgpu_device *adev, i = state ==AMD_CG_STATE_GATE ? j : adev->num_ip_blocks - j -1 ;if (!adev->ip_blocks[i].status.late_initialized)continue ; -/* skip CG for GFX on S0ix */ +/* skip CG for GFX, SDMA on S0ix */ if (adev->in_s0ix && - adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_GFX ) + (adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_GFX || + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_SDMA ))continue ;/* skip CG for VCE/UVD, it's handled specially */ if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
@@ -2617,9 +2618,10 @@ int amdgpu_device_set_pg_state(struct amdgpu_device *adev, i = state ==AMD_PG_STATE_GATE ? j : adev->num_ip_blocks - j -1 ;if (!adev->ip_blocks[i].status.late_initialized)continue ; -/* skip PG for GFX on S0ix */ +/* skip PG for GFX, SDMA on S0ix */ if (adev->in_s0ix && - adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_GFX ) + (adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_GFX || + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_SDMA ))continue ;/* skip CG for VCE/UVD, it's handled specially */ if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
Signature · 1 line
2.38.1
Alex Deucher
maintainerPATCH 5/7 drm/amdgpu: for S0ix, skip SMDA 5.x+ suspend/resume
In reply to Alex DeucherSDMA 5.x is part of the GFX block so it's controlled via GFXOFF. Skip suspend as it should be handled the same as GFX.
v2: drop SDMA 4.x. That requires special handling.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -0
@@ -3028,6 +3028,12 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev) adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX))continue ; +/* SDMA 5.x+ is part of GFX power domain so it's covered by GFXOFF */ +if (adev->in_s0ix && + (adev->ip_versions[SDMA0_HWIP ][0 ] >=IP_VERSION (5 ,0 ,0 )) && + (adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_SDMA )) +continue ; +/* XXX handle errors */ r = adev->ip_blocks[i].version->funcs->suspend (adev);/* XXX handle errors */
Signature · 1 line
2.38.1
Re: [PATCH 5/7] drm/amdgpu: for S0ix, skip SMDA 5.x+ suspend/resume
Don't we need a similar check on resume_phase2?
Other than that, looks good to me.
Quoted 28 lines · Alex Deucher
SDMA 5.x is part of the GFX block so it's controlled via GFXOFF. Skip suspend as it should be handled the same as GFX.
v2: drop SDMA 4.x. That requires special handling.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6
-0@@ -3028,6 +3028,12 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev) adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX))continue ; +/* SDMA 5.x+ is part of GFX power domain so it's covered by GFXOFF */ +if (adev->in_s0ix && + (adev->ip_versions[SDMA0_HWIP ][0 ] >=IP_VERSION (5 ,0 ,0 )) && + (adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_SDMA )) +continue ; +/* XXX handle errors */ r = adev->ip_blocks[i].version->funcs->suspend (adev);/* XXX handle errors */
Re: [PATCH 5/7] drm/amdgpu: for S0ix, skip SMDA 5.x+ suspend/resume
Quoted 2 lines · Rajneesh
Don't we need a similar check on
resume_phase2?
The resume code looks to see if the IP was suspended in the first place before trying to resume it so no need.
Alex
Quoted 34 lines
Other than that, looks good to me.
Quoted 28 lines · Alex Deucher
SDMA 5.x is part of the GFX block so it's controlled via GFXOFF. Skip suspend as it should be handled the same as GFX.
v2: drop SDMA 4.x. That requires special handling.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6
-0@@ -3028,6 +3028,12 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev) adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX))continue ; +/* SDMA 5.x+ is part of GFX power domain so it's covered by GFXOFF */ +if (adev->in_s0ix && + (adev->ip_versions[SDMA0_HWIP ][0 ] >=IP_VERSION (5 ,0 ,0 )) && + (adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_SDMA )) +continue ; +/* XXX handle errors */ r = adev->ip_blocks[i].version->funcs->suspend (adev);/* XXX handle errors */
Alex Deucher
maintainerPATCH 6/7 Revert "drm/amdgpu: disallow gfxoff until GC IP blocks complete s2idle resume"
In reply to Alex DeucherThis reverts commit f543d28687480fad06b708bc6e0b0b6ec953b078.
This is no longer needed since we no longer touch SDMA 5.x for s0i3.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 ---------------- 1 file changed, 16 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -16
@@ -3234,15 +3234,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)return r; } adev->ip_blocks[i].status.hw = true; - -if (adev->in_s0ix && adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_SMC ) { -/* disable gfxoff for IP resume. The gfxoff will be re-enabled in -* amdgpu_device_resume() after IP resume. -*/ -amdgpu_gfx_off_ctrl (adev, false); -DRM_DEBUG ("will disable gfxoff for re-initializing other blocks\n" ); - } - }return 0 ;
@@ -4230,13 +4221,6 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)/* Make sure IB tests flushed */ flush_delayed_work (&adev->delayed_init_work); -if (adev->in_s0ix) { -/* re-enable gfxoff after IP resume. This re-enables gfxoff after -* it was disabled for IP resume in amdgpu_device_ip_resume_phase2(). -*/ -amdgpu_gfx_off_ctrl (adev, true); -DRM_DEBUG ("will enable gfxoff for the mission mode\n" ); - }if (fbcon)drm_fb_helper_set_suspend_unlocked (adev_to_drm (adev)->fb_helper, false);
Signature · 1 line
2.38.1
Alex Deucher
maintainerPATCH 7/7 Revert "drm/amdgpu: force exit gfxoff on sdma resume for rmb s0ix"
In reply to Alex DeucherThis reverts commit e5d59cfa330523e47cba62a496864acc3948fc27.
This is no longer needed since we no longer suspend SDMA during S0ix.
--- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +0 -8
@@ -809,12 +809,6 @@ static int sdma_v5_2_start(struct amdgpu_device *adev)msleep (1000 ); } -/* TODO: check whether can submit a doorbell request to raise -* a doorbell fence to exit gfxoff. -*/ -if (adev->in_s0ix) -amdgpu_gfx_off_ctrl (adev, false); -sdma_v5_2_soft_reset (adev);/* unhalt the MEs */ sdma_v5_2_enable (adev, true);
@@ -823,8 +817,6 @@ static int sdma_v5_2_start(struct amdgpu_device *adev)/* start the gfx rings and rlc compute queues */ r =sdma_v5_2_gfx_resume (adev); -if (adev->in_s0ix) -amdgpu_gfx_off_ctrl (adev, true);if (r)return r; r =sdma_v5_2_rlc_resume (adev);
Signature · 1 line
2.38.1