drm/amdgpu/gfx11: program some additional registers for resets
Subsystems (2)
Alex Deucher
maintainerPATCH 1/2 drm/amdgpu/gfx11: program some additional registers for resets
The first change prevents the hw from overwriting the ring with NOOPs after a reset. This is helpful for debugging user queues since the contents will be retained. The second change disables conversion of XNACK to XACK during a queue reset.
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +11 -1
@@ -3616,14 +3616,24 @@ static int gfx_v11_0_cp_gfx_start(struct amdgpu_device *adev)struct amdgpu_ring *ring;const struct cs_section_def *sect =NULL ;const struct cs_extent_def *ext =NULL ; -int r, i;int ctx_reg_offset; +int r, i; +u32 val;/* init the CP */ WREG32_SOC15 (GC ,0 , regCP_MAX_CONTEXT, adev->gfx.config.max_hw_contexts -1 );WREG32_SOC15 (GC ,0 , regCP_DEVICE_ID,1 ); +if (!amdgpu_sriov_vf (adev)) { + val =RREG32_SOC15 (GC ,0 , regCP_DEBUG_2); + val =REG_SET_FIELD (val,CP_DEBUG_2 ,RB_PACKET_INJECTOR_DISABLE ,1 ); +WREG32_SOC15 (GC ,0 , regCP_DEBUG_2, val); + val =RREG32_SOC15 (GC ,0 , regCPF_UTCL1_CNTL); + val =REG_SET_FIELD (val,CPF_UTCL1_CNTL ,VMID_RESET_MODE ,1 ); +WREG32_SOC15 (GC ,0 , regCPF_UTCL1_CNTL, val); + } +if (!amdgpu_async_gfx_ring)gfx_v11_0_cp_gfx_enable (adev, true);
Signature · 1 line
2.52.0
Alex Deucher
maintainerPATCH 2/2 drm/amdgpu/gfx12: program some additional registers for resets
The first change prevents the hw from overwriting the ring with NOOPs after a reset. This is helpful for debugging user queues since the contents will be retained. The second change disables conversion of XNACK to XACK during a queue reset.
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +11 -0
@@ -2666,11 +2666,22 @@ static int gfx_v12_0_cp_gfx_load_microcode(struct amdgpu_device *adev)static int gfx_v12_0_cp_gfx_start (struct amdgpu_device *adev) { +u32 val; +/* init the CP */ WREG32_SOC15 (GC ,0 , regCP_MAX_CONTEXT, adev->gfx.config.max_hw_contexts -1 );WREG32_SOC15 (GC ,0 , regCP_DEVICE_ID,1 ); +if (!amdgpu_sriov_vf (adev)) { + val =RREG32_SOC15 (GC ,0 , regCP_DEBUG_2); + val =REG_SET_FIELD (val,CP_DEBUG_2 ,RB_PACKET_INJECTOR_DISABLE ,1 ); +WREG32_SOC15 (GC ,0 , regCP_DEBUG_2, val); + val =RREG32_SOC15 (GC ,0 , regCPF_UTCL1_CNTL); + val =REG_SET_FIELD (val,CPF_UTCL1_CNTL ,VMID_RESET_MODE ,1 ); +WREG32_SOC15 (GC ,0 , regCPF_UTCL1_CNTL, val); + } +if (!amdgpu_async_gfx_ring)gfx_v12_0_cp_gfx_enable (adev, true);
Signature · 1 line
2.52.0
Ping on this series.
Alex
Quoted 44 lines · Alex Deucher
The first change prevents the hw from overwriting the ring with NOOPs after a reset. This is helpful for debugging user queues since the contents will be retained. The second change disables conversion of XNACK to XACK during a queue reset.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +11
-2@@ -3616,14 +3616,24 @@ static int gfx_v11_0_cp_gfx_start(struct amdgpu_device *adev)struct amdgpu_ring *ring;const struct cs_section_def *sect =NULL ;const struct cs_extent_def *ext =NULL ; -int r, i;int ctx_reg_offset; +int r, i; +u32 val;/* init the CP */ WREG32_SOC15 (GC ,0 , regCP_MAX_CONTEXT, adev->gfx.config.max_hw_contexts -1 );WREG32_SOC15 (GC ,0 , regCP_DEVICE_ID,1 ); +if (!amdgpu_sriov_vf (adev)) { + val =RREG32_SOC15 (GC ,0 , regCP_DEBUG_2); + val =REG_SET_FIELD (val,CP_DEBUG_2 ,RB_PACKET_INJECTOR_DISABLE ,1 ); +WREG32_SOC15 (GC ,0 , regCP_DEBUG_2, val); + val =RREG32_SOC15 (GC ,0 , regCPF_UTCL1_CNTL); + val =REG_SET_FIELD (val,CPF_UTCL1_CNTL ,VMID_RESET_MODE ,1 ); +WREG32_SOC15 (GC ,0 , regCPF_UTCL1_CNTL, val); + } +if (!amdgpu_async_gfx_ring)gfx_v11_0_cp_gfx_enable (adev, true); --2.52.0