Skip to contentSkip to conversation

drm/amdgpu: Fixed ras warning when uninstalling amdgpu

PATCH In review YiPeng Chai 2 participants 3 messages Sep 20, 2022 – Sep 22, 2022

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

PATCH 1/1 drm/amdgpu: Fixed ras warning when uninstalling amdgpu

For the asic using smu v13_0_2, there is the following
warning when uninstalling amdgpu:
amdgpu: ras disable gfx failed poison:1 ret:-22.

[Why]:
For the asic using smu v13_0_2, the psp .suspend and mode1reset is called before amdgpu_ras_pre_fini during amdgpu uninstall, it has disabled all ras features and reset the psp. Since the psp is reset, calling amdgpu_ras_disable_all_features in amdgpu_ras_pre_fini to disable ras features will fail.

[How]:
If all ras features are disabled, amdgpu_ras_disable_all_features will not be called to disable all ras features again.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -1
index e55f106621ef..3deb716710e6 100644
@@ -2720,7 +2720,8 @@ int amdgpu_ras_pre_fini(struct amdgpu_device *adev)
 
 
 	/* Need disable ras on all IPs here before ip [hw/sw]fini */
-	amdgpu_ras_disable_all_features(adev, 0);
+	if (con->features)
+		amdgpu_ras_disable_all_features(adev, 0);
 	amdgpu_ras_recovery_fini(adev);
 	return 0;
 }
Signature · 1 line
2.25.1
#1 lore raw

[AMD Official Use Only - General]

Ping ...

-----------------
Best Regards,
Thomas

-----Original Message-----
From: Chai, Thomas <[email protected]>
Sent: Tuesday, September 20, 2022 10:07 AM
To: [email protected]
Cc: Chai, Thomas <[email protected]>; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Clements, John <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>
Subject: [PATCH] drm/amdgpu: Fixed ras warning when uninstalling amdgpu

For the asic using smu v13_0_2, there is the following warning when uninstalling amdgpu:
amdgpu: ras disable gfx failed poison:1 ret:-22.

[Why]:
For the asic using smu v13_0_2, the psp .suspend and mode1reset is called before amdgpu_ras_pre_fini during amdgpu uninstall, it has disabled all ras features and reset the psp. Since the psp is reset, calling amdgpu_ras_disable_all_features in amdgpu_ras_pre_fini to disable ras features will fail.

[How]:
If all ras features are disabled, amdgpu_ras_disable_all_features will not be called to disable all ras features again.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -1
index e55f106621ef..3deb716710e6 100644
@@ -2720,7 +2720,8 @@ int amdgpu_ras_pre_fini(struct amdgpu_device *adev)
 
 
 	/* Need disable ras on all IPs here before ip [hw/sw]fini */
-	amdgpu_ras_disable_all_features(adev, 0);
+	if (con->features)
+		amdgpu_ras_disable_all_features(adev, 0);
 	amdgpu_ras_recovery_fini(adev);
 	return 0;
 }

--
2.25.1

Reviewed-by
#2 lore raw

[AMD Official Use Only - General]

Regards,
Hawking
-----Original Message-----
From: Chai, Thomas <[email protected]>
Sent: Thursday, September 22, 2022 09:37
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Clements, John <[email protected]>; Yang, Stanley <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: Fixed ras warning when uninstalling amdgpu

[AMD Official Use Only - General]

Ping ...

-----------------
Best Regards,
Thomas

-----Original Message-----
From: Chai, Thomas <[email protected]>
Sent: Tuesday, September 20, 2022 10:07 AM
To: [email protected]
Cc: Chai, Thomas <[email protected]>; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Clements, John <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>
Subject: [PATCH] drm/amdgpu: Fixed ras warning when uninstalling amdgpu

For the asic using smu v13_0_2, there is the following warning when uninstalling amdgpu:
amdgpu: ras disable gfx failed poison:1 ret:-22.

[Why]:
For the asic using smu v13_0_2, the psp .suspend and mode1reset is called before amdgpu_ras_pre_fini during amdgpu uninstall, it has disabled all ras features and reset the psp. Since the psp is reset, calling amdgpu_ras_disable_all_features in amdgpu_ras_pre_fini to disable ras features will fail.

[How]:
If all ras features are disabled, amdgpu_ras_disable_all_features will not be called to disable all ras features again.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -1
index e55f106621ef..3deb716710e6 100644
@@ -2720,7 +2720,8 @@ int amdgpu_ras_pre_fini(struct amdgpu_device *adev)
 
 
 	/* Need disable ras on all IPs here before ip [hw/sw]fini */
-	amdgpu_ras_disable_all_features(adev, 0);
+	if (con->features)
+		amdgpu_ras_disable_all_features(adev, 0);
 	amdgpu_ras_recovery_fini(adev);
 	return 0;
 }

--
2.25.1