Skip to contentSkip to conversation

drm/amdgpu: Enable GFXOFF During Compute for GFX11

PATCH In review Ori Messinger 2 participants 2 messages Nov 23, 2023

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

PATCH 1/1 drm/amdgpu: Enable GFXOFF During Compute for GFX11

GFXOFF was previously disabled as a temporary workaround for GFX11 due to issues in some compute applications.
This patch re-enables GFXOFF for GFX version 11.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +2 -8
index 2d22f7d45512..bfd54877b8c0 100644
@@ -684,14 +684,8 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev,
 void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle)
 {
 	enum amd_powergating_state state = idle ? AMD_PG_STATE_GATE : AMD_PG_STATE_UNGATE;
-	/* Temporary workaround to fix issues observed in some
-	 * compute applications when GFXOFF is enabled on GFX11.
-	 */
-	if (IP_VERSION_MAJ(amdgpu_ip_version(adev, GC_HWIP, 0)) == 11) {
-		pr_debug("GFXOFF is %s\n", idle ? "enabled" : "disabled");
-		amdgpu_gfx_off_ctrl(adev, idle);
-	} else if ((IP_VERSION_MAJ(amdgpu_ip_version(adev, GC_HWIP, 0)) == 9) &&
-		(adev->flags & AMD_IS_APU)) {
+	if ((IP_VERSION_MAJ(amdgpu_ip_version(adev, GC_HWIP, 0)) == 9) &&
+	    (adev->flags & AMD_IS_APU)) {
 		/* Disable GFXOFF and PG. Temporary workaround
 		 * to fix some compute applications issue on GFX9.
 		 */
Signature · 1 line
2.25.1
#1 lore raw
Quoted 3 lines · Ori Messinger

GFXOFF was previously disabled as a temporary workaround for GFX11 due to issues in some compute applications.
This patch re-enables GFXOFF for GFX version 11.

Please describe what has changed since it was disabled, that allows us to re-enable it without encountering the same issues.

Quoted 27 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 10 ++--------
  1 file changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +2 -8
index 2d22f7d45512..bfd54877b8c0 100644
@@ -684,14 +684,8 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev,
  void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle)
  {
  	enum amd_powergating_state state = idle ? AMD_PG_STATE_GATE : AMD_PG_STATE_UNGATE;
-	/* Temporary workaround to fix issues observed in some
-	 * compute applications when GFXOFF is enabled on GFX11.
-	 */
-	if (IP_VERSION_MAJ(amdgpu_ip_version(adev, GC_HWIP, 0)) == 11) {
-		pr_debug("GFXOFF is %s\n", idle ? "enabled" : "disabled");
-		amdgpu_gfx_off_ctrl(adev, idle);
-	} else if ((IP_VERSION_MAJ(amdgpu_ip_version(adev, GC_HWIP, 0)) == 9) &&
-		(adev->flags & AMD_IS_APU)) {
+	if ((IP_VERSION_MAJ(amdgpu_ip_version(adev, GC_HWIP, 0)) == 9) &&
+	    (adev->flags & AMD_IS_APU)) {
  		/* Disable GFXOFF and PG. Temporary workaround
  		 * to fix some compute applications issue on GFX9.
  		 */
Signature · 1 line
Hamza