Skip to contentSkip to conversation

drm/amdgpu: skip GPRs init for some CU settings on ALDEBARAN

PATCH In review Tao Zhou 2 participants 3 messages Oct 25, 2021

Subsystems (2)
lore
Share & tools
lore

Tao Zhou

author
#0 lore raw

PATCH 1/1 drm/amdgpu: skip GPRs init for some CU settings on ALDEBARAN

Skip GPRs init in specific condition since current GPRs init algorithm only works for some CU settings.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c +4 -0
index 00a2b36a24b3..a1f424e2ff5f 100644
@@ -706,6 +706,10 @@ int gfx_v9_4_2_do_edc_gpr_workarounds(struct amdgpu_device *adev)
 	if (!amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__GFX))
 		return 0;
 
+	/* workaround for some CU settings, skip GPRs init */
+	if (adev->gfx.cu_info.bitmap[1][1] == 0x3f7f)
+		return 0;
+
 	gfx_v9_4_2_do_sgprs_init(adev);
 
 	gfx_v9_4_2_do_vgprs_init(adev);
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only]

Please add inline comment to remind us remove this workaround later. Other than the patch is

Regards,
Hawking

-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Monday, October 25, 2021 16:56
To: [email protected]; Zhang, Hawking <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: skip GPRs init for some CU settings on ALDEBARAN

Skip GPRs init in specific condition since current GPRs init algorithm only works for some CU settings.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c +4 -0
index 00a2b36a24b3..a1f424e2ff5f 100644
@@ -706,6 +706,10 @@ int gfx_v9_4_2_do_edc_gpr_workarounds(struct amdgpu_device *adev)
 	if (!amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__GFX))
 		return 0;
 
+	/* workaround for some CU settings, skip GPRs init */
+	if (adev->gfx.cu_info.bitmap[1][1] == 0x3f7f)
+		return 0;
+
 	gfx_v9_4_2_do_sgprs_init(adev);
 
 	gfx_v9_4_2_do_vgprs_init(adev);
Signature · 1 line
2.17.1
author Reviewed-by Hawking Zhang
#2 lore raw

[AMD Official Use Only]

Thanks, will and comment as you suggested.

Regards,
Tao
________________________________
From: Zhang, Hawking <[email protected]>
Sent: Monday, October 25, 2021 5:29 PM
To: Zhou1, Tao <[email protected]>; [email protected] <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: skip GPRs init for some CU settings on ALDEBARAN

[AMD Official Use Only]

Please add inline comment to remind us remove this workaround later. Other than the patch is

Regards,
Hawking

-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Monday, October 25, 2021 16:56
To: [email protected]; Zhang, Hawking <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: skip GPRs init for some CU settings on ALDEBARAN

Skip GPRs init in specific condition since current GPRs init algorithm only works for some CU settings.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c +4 -0
index 00a2b36a24b3..a1f424e2ff5f 100644
@@ -706,6 +706,10 @@ int gfx_v9_4_2_do_edc_gpr_workarounds(struct amdgpu_device *adev)
         if (!amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__GFX))
                 return 0;
 
+       /* workaround for some CU settings, skip GPRs init */
+       if (adev->gfx.cu_info.bitmap[1][1] == 0x3f7f)
+               return 0;
+
         gfx_v9_4_2_do_sgprs_init(adev);
 
         gfx_v9_4_2_do_vgprs_init(adev);

--
2.17.1