Skip to contentSkip to conversation

drm/amdgpu: disable GFXOFF during compute for GFX11

PATCH In review Graham Sider 3 participants 3 messages Oct 26, 2022 – Oct 27, 2022

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

PATCH 1/1 drm/amdgpu: disable GFXOFF during compute for GFX11

Temporary workaround to fix issues observed in some compute applications when GFXOFF is enabled on GFX11.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +7 -0
index 37db39ba8718..0d764c15f6bf 100644
@@ -706,6 +706,13 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev,
 
 void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle)
 {
+	/* Temporary workaround to fix issues observed in some
+	 * compute applications when GFXOFF is enabled on GFX11.
+	 */
+	if (IP_VERSION_MAJ(adev->ip_versions[GC_HWIP][0]) == 11) {
+		pr_debug("GFXOFF is %s\n", idle ? "enabled" : "disabled");
+		amdgpu_gfx_off_ctrl(adev, idle);
+	}
 	amdgpu_dpm_switch_power_profile(adev,
 					PP_SMC_POWER_PROFILE_COMPUTE,
 					!idle);
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw

[Public]

________________________________
From: amd-gfx <[email protected]> on behalf of Graham Sider <[email protected]>
Sent: Wednesday, October 26, 2022 4:10 PM
To: [email protected] <[email protected]>
Cc: Kasiviswanathan, Harish <[email protected]>; Sider, Graham <[email protected]>
Subject: [PATCH] drm/amdgpu: disable GFXOFF during compute for GFX11

Temporary workaround to fix issues observed in some compute applications when GFXOFF is enabled on GFX11.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +7 -0
index 37db39ba8718..0d764c15f6bf 100644
@@ -706,6 +706,13 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev,
 
 void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle)
 {
+       /* Temporary workaround to fix issues observed in some
+        * compute applications when GFXOFF is enabled on GFX11.
+        */
+       if (IP_VERSION_MAJ(adev->ip_versions[GC_HWIP][0]) == 11) {
+               pr_debug("GFXOFF is %s\n", idle ? "enabled" : "disabled");
+               amdgpu_gfx_off_ctrl(adev, idle);
+       }
         amdgpu_dpm_switch_power_profile(adev,
                                         PP_SMC_POWER_PROFILE_COMPUTE,
                                         !idle);

--
2.25.1

Reviewed-by Acked-by Alex Deucher
#2 lore raw

[Public]

From: Deucher, Alexander <[email protected]>
Sent: Thursday, October 27, 2022 9:56 AM
To: Sider, Graham <[email protected]>; [email protected]
Cc: Kasiviswanathan, Harish <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: disable GFXOFF during compute for GFX11

[Public]

________________________________
From: amd-gfx <[email protected]<mailto:[email protected]>> on behalf of Graham Sider <[email protected]<mailto:[email protected]>>
Sent: Wednesday, October 26, 2022 4:10 PM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Kasiviswanathan, Harish <[email protected]<mailto:[email protected]>>; Sider, Graham <[email protected]<mailto:[email protected]>>
Subject: [PATCH] drm/amdgpu: disable GFXOFF during compute for GFX11

Temporary workaround to fix issues observed in some compute applications when GFXOFF is enabled on GFX11.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +7 -0
index 37db39ba8718..0d764c15f6bf 100644
@@ -706,6 +706,13 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev,
 
 void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle)
 {
+       /* Temporary workaround to fix issues observed in some
+        * compute applications when GFXOFF is enabled on GFX11.
+        */
+       if (IP_VERSION_MAJ(adev->ip_versions[GC_HWIP][0]) == 11) {
+               pr_debug("GFXOFF is %s\n", idle ? "enabled" : "disabled");
+               amdgpu_gfx_off_ctrl(adev, idle);
+       }
         amdgpu_dpm_switch_power_profile(adev,
                                         PP_SMC_POWER_PROFILE_COMPUTE,
                                         !idle);

--
2.25.1