Skip to contentSkip to conversation

drm/amdgpu: Fix ras mode2 reset failure in ras aca mode

PATCH Superseded YiPeng Chai 2 participants 3 messages Apr 23, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix ras mode2 reset failure in ras aca mode

Fix ras mode2 reset failure in ras aca mode for
sdma v4_4_2 and gfx v9_4_3.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c  | 4 ++++
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 4 ++++
 2 files changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +4 -0
index 0e429b7ed036..c8bc34aafdd7 100644
@@ -4324,6 +4324,10 @@ static int gfx_v9_4_3_ras_late_init(struct amdgpu_device *adev, struct ras_commo
 	if (r)
 		return r;
 
+	/* in resume phase, no need to create aca fs node */
+	if (adev->in_suspend || amdgpu_in_reset(adev))
+		return 0;
+
 	r = amdgpu_ras_bind_aca(adev, AMDGPU_RAS_BLOCK__GFX,
 				&gfx_v9_4_3_aca_info,
 				NULL);
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +4 -0
index 7ea209b68154..77ae943745fb 100644
@@ -2249,6 +2249,10 @@ static int sdma_v4_4_2_ras_late_init(struct amdgpu_device *adev, struct ras_comm
 	if (r)
 		return r;
 
+	/* in resume phase, no need to create aca fs node */
+	if (adev->in_suspend || amdgpu_in_reset(adev))
+		return 0;
+
 	return amdgpu_ras_bind_aca(adev, AMDGPU_RAS_BLOCK__SDMA,
 				   &sdma_v4_4_2_aca_info, NULL);
 }
Signature · 1 line
2.34.1
#1 lore raw

[AMD Official Use Only - General]

Shall we move the check to the aca helper function?

Regards,
Hawking

-----Original Message-----
From: Chai, Thomas <[email protected]>
Sent: Tuesday, April 23, 2024 11:14
To: [email protected]
Cc: Chai, Thomas <[email protected]>; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Li, Candice <[email protected]>; Wang, Yang(Kevin) <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix ras mode2 reset failure in ras aca mode

Fix ras mode2 reset failure in ras aca mode for sdma v4_4_2 and gfx v9_4_3.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c  | 4 ++++  drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 4 ++++
 2 files changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +4 -0
index 0e429b7ed036..c8bc34aafdd7 100644
@@ -4324,6 +4324,10 @@ static int gfx_v9_4_3_ras_late_init(struct amdgpu_device *adev, struct ras_commo
        if (r)
                return r;
 
+       /* in resume phase, no need to create aca fs node */
+       if (adev->in_suspend || amdgpu_in_reset(adev))
+               return 0;
+
        r = amdgpu_ras_bind_aca(adev, AMDGPU_RAS_BLOCK__GFX,
                                &gfx_v9_4_3_aca_info,
                                NULL);
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +4 -0
index 7ea209b68154..77ae943745fb 100644
@@ -2249,6 +2249,10 @@ static int sdma_v4_4_2_ras_late_init(struct amdgpu_device *adev, struct ras_comm
        if (r)
                return r;
 
+       /* in resume phase, no need to create aca fs node */
+       if (adev->in_suspend || amdgpu_in_reset(adev))
+               return 0;
+
        return amdgpu_ras_bind_aca(adev, AMDGPU_RAS_BLOCK__SDMA,
                                   &sdma_v4_4_2_aca_info, NULL);
 }

--
2.34.1

#2 lore raw

[AMD Official Use Only - General]

OK

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

-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Tuesday, April 23, 2024 11:27 AM
To: Chai, Thomas <[email protected]>; [email protected]
Cc: Zhou1, Tao <[email protected]>; Li, Candice <[email protected]>; Wang, Yang(Kevin) <[email protected]>; Yang, Stanley <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: Fix ras mode2 reset failure in ras aca mode

[AMD Official Use Only - General]

Shall we move the check to the aca helper function?

Regards,
Hawking

-----Original Message-----
From: Chai, Thomas <[email protected]>
Sent: Tuesday, April 23, 2024 11:14
To: [email protected]
Cc: Chai, Thomas <[email protected]>; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Li, Candice <[email protected]>; Wang, Yang(Kevin) <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix ras mode2 reset failure in ras aca mode

Fix ras mode2 reset failure in ras aca mode for sdma v4_4_2 and gfx v9_4_3.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c  | 4 ++++  drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 4 ++++
 2 files changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +4 -0
index 0e429b7ed036..c8bc34aafdd7 100644
@@ -4324,6 +4324,10 @@ static int gfx_v9_4_3_ras_late_init(struct amdgpu_device *adev, struct ras_commo
        if (r)
                return r;
 
+       /* in resume phase, no need to create aca fs node */
+       if (adev->in_suspend || amdgpu_in_reset(adev))
+               return 0;
+
        r = amdgpu_ras_bind_aca(adev, AMDGPU_RAS_BLOCK__GFX,
                                &gfx_v9_4_3_aca_info,
                                NULL);
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +4 -1
index 7ea209b68154..77ae943745fb 100644
@@ -2249,6 +2249,10 @@ static int sdma_v4_4_2_ras_late_init(struct amdgpu_device *adev, struct ras_comm
        if (r)
                return r;
 
+       /* in resume phase, no need to create aca fs node */
+       if (adev->in_suspend || amdgpu_in_reset(adev))
+               return 0;
+
        return amdgpu_ras_bind_aca(adev, AMDGPU_RAS_BLOCK__SDMA,
                                   &sdma_v4_4_2_aca_info, NULL);  }
--

2.34.1