Skip to contentSkip to conversation

drm/amdgpu: Skip ring test during ras in recovery

PATCH In review Stanley.Yang 2 participants 2 messages Sep 28, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

---
 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
index fbfe0a1c4b19..9fff58d073a7 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

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 recovery

This is workaround due to ring test failed during ras do gpu recovery for aqua vanjaram.

---
 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
index fbfe0a1c4b19..9fff58d073a7 100644
@@ -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