drm/amdgpu: Skip ring test during ras in recovery
Subsystems (2)
PATCH 1/1 drm/amdgpu: Skip ring test during ras in recovery
This is workaround due to ring test failed during ras do gpu recovery for aqua vanjaram.
Signed-off-by Stanley.Yang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +6 -0
@@ -248,10 +248,16 @@ static int gfx_v9_4_3_ring_test_ring(struct amdgpu_ring *ring) {uint32_t scratch_reg0_offset, xcc_offset;struct amdgpu_device *adev = ring->adev; +struct amdgpu_ras *ras;uint32_t tmp =0 ;unsigned i;int r; +/* This is workaround: ring test failed during ras recovery */ + ras =amdgpu_ras_get_context (adev); +if (ras &&atomic_read (&ras->in_recovery)) +return 0 ; +/* Use register offset which is local to XCC in the packet */ xcc_offset =SOC15_REG_OFFSET (GC ,0 , regSCRATCH_REG0); scratch_reg0_offset =SOC15_REG_OFFSET (GC ,GET_INST (GC , ring->xcc_id), regSCRATCH_REG0);
Signature · 1 line
2.25.1
[AMD Official Use Only - General]
Reviewed-by Tao Zhou <[email protected]>
Quoted 41 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Stanley.Yang
Sent: Thursday, September 28, 2023 11:42 AM
To: [email protected]
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: Skip ring test during ras in recoveryThis is workaround due to ring test failed during ras do gpu recovery for aqua vanjaram.
Signed-off-by Stanley.Yang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +6
-0@@ -248,10 +248,16 @@ static int gfx_v9_4_3_ring_test_ring(struct amdgpu_ring *ring) {uint32_t scratch_reg0_offset, xcc_offset;struct amdgpu_device *adev = ring->adev; +struct amdgpu_ras *ras;uint32_t tmp =0 ;unsigned i;int r; +/* This is workaround: ring test failed during ras recovery */ + ras =amdgpu_ras_get_context (adev); +if (ras &&atomic_read (&ras->in_recovery)) +return 0 ; +/* Use register offset which is local to XCC in the packet */ xcc_offset =SOC15_REG_OFFSET (GC ,0 , regSCRATCH_REG0); scratch_reg0_offset = SOC15_REG_OFFSET(GC, GET_INST(GC, ring-Quoted 1 line
xcc_id),regSCRATCH_REG0);--
2.25.1