Skip to contentSkip to conversation

drm/amdgpu: Resolve RAS GFX error count issue v2

PATCH In review Candice Li 2 participants 4 messages Jun 1, 2022

Subsystems (2)
lore
Share & tools
lore

Candice Li

author
#0 lore raw

PATCH v2 1/1 drm/amdgpu: Resolve RAS GFX error count issue v2

Fix misleading indentation and add ras unsupported checking for gfx ras late init.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +5 -3
index 99c1a2d3dae84d..16699158e00d8c 100644
@@ -599,13 +599,15 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *r
 		if (!amdgpu_persistent_edc_harvesting_supported(adev))
 			amdgpu_ras_reset_error_status(adev, AMDGPU_RAS_BLOCK__GFX);
 
-	r = amdgpu_ras_block_late_init(adev, ras_block);
-	if (r)
-		return r;
+		r = amdgpu_ras_block_late_init(adev, ras_block);
+		if (r)
+			return r;
 
 		r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0);
 		if (r)
 			goto late_fini;
+	} else {
+		amdgpu_ras_feature_enable_on_boot(adev, ras_block, 0);
 	}
 
 	return 0;
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 5 lines · Candice Li

Fix misleading indentation and add ras unsupported checking for gfx ras late init.

Quoted 30 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +5 -4
index 99c1a2d3dae84d..16699158e00d8c 100644
@@ -599,13 +599,15 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *r
                if (!amdgpu_persistent_edc_harvesting_supported(adev))
                        amdgpu_ras_reset_error_status(adev, AMDGPU_RAS_BLOCK__GFX);
 
-       r = amdgpu_ras_block_late_init(adev, ras_block);
-       if (r)
-               return r;
+               r = amdgpu_ras_block_late_init(adev, ras_block);
+               if (r)
+                       return r;
 
                r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0);
                if (r)
                        goto late_fini;
+       } else {
+               amdgpu_ras_feature_enable_on_boot(adev, ras_block, 0);
        }
 
        return 0;
--

2.17.1

#2 lore raw
Quoted 9 lines · Alex Deucher
Quoted 5 lines · Candice Li

Fix misleading indentation and add ras unsupported checking for gfx ras late init.

Also, if this was a recent change, a Fixes: tag would be nice.

Alex

Quoted 31 lines
Quoted 31 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +5 -4
index 99c1a2d3dae84d..16699158e00d8c 100644
@@ -599,13 +599,15 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *r
                if (!amdgpu_persistent_edc_harvesting_supported(adev))
                        amdgpu_ras_reset_error_status(adev, AMDGPU_RAS_BLOCK__GFX);
 
-       r = amdgpu_ras_block_late_init(adev, ras_block);
-       if (r)
-               return r;
+               r = amdgpu_ras_block_late_init(adev, ras_block);
+               if (r)
+                       return r;
 
                r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0);
                if (r)
                        goto late_fini;
+       } else {
+               amdgpu_ras_feature_enable_on_boot(adev, ras_block, 0);
        }
 
        return 0;
--

2.17.1

#3 lore raw

[AMD Official Use Only - General]

Thanks, added the tag before pushing.

Thanks,
Candice

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, June 2, 2022 2:02 AM
To: Li, Candice <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH v2] drm/amdgpu: Resolve RAS GFX error count issue v2

Quoted 9 lines · Alex Deucher
Quoted 5 lines · Candice Li

Fix misleading indentation and add ras unsupported checking for gfx ras late init.

Also, if this was a recent change, a Fixes: tag would be nice.

Alex

Quoted 31 lines
Quoted 31 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +5 -4
index 99c1a2d3dae84d..16699158e00d8c 100644
@@ -599,13 +599,15 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *r
                if (!amdgpu_persistent_edc_harvesting_supported(adev))
                        amdgpu_ras_reset_error_status(adev, AMDGPU_RAS_BLOCK__GFX);
 
-       r = amdgpu_ras_block_late_init(adev, ras_block);
-       if (r)
-               return r;
+               r = amdgpu_ras_block_late_init(adev, ras_block);
+               if (r)
+                       return r;
 
                r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0);
                if (r)
                        goto late_fini;
+       } else {
+               amdgpu_ras_feature_enable_on_boot(adev, ras_block, 0);
        }
 
        return 0;
--

2.17.1