Skip to contentSkip to conversation

drm/amdgpu: complete gfxoff allow signal during suspend without delay

PATCH Superseded Harsh Jain 1 participant 1 message Nov 7, 2022

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Harsh Jain

author
#0 lore raw

PATCH v2 1/1 drm/amdgpu: complete gfxoff allow signal during suspend without delay

change guarantees that gfxoff is allowed before moving further in s2idle sequence to add more reliablity about gfxoff in amdgpu IP's suspend flow

---

v2: replaced flush_work with direct call to amdgpu_dpm_set_powergating_by_smu and edited title
---

drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +5 -2
index 9546adc8a76f..a843804a94e0 100644
@@ -584,8 +584,11 @@ void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable)
 		    !adev->gfx.gfx_off_state) {
 			/* If going to s2idle, no need to wait */
 			if (adev->in_s0ix)
-				delay = GFX_OFF_NO_DELAY;
-			schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
+				if (!amdgpu_dpm_set_powergating_by_smu(adev,
+						AMD_IP_BLOCK_TYPE_GFX, true))
+					adev->gfx.gfx_off_state = true;
+			else
+				schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
 					      delay);
 		}
 	} else {
Signature · 1 line
2.25.1