[PATCH] drm/amdgpu: wait till Gfxoff allow signal completes during suspend
Harsh Jain
harsh.jain at amd.com
Fri Nov 4 04:16:34 UTC 2022
change guarantees that gfxoff is allowed before moving further in
s2idle sequence to add more reliablity about gfxoff in amdgpu IP's
suspend flow
Signed-off-by: Harsh Jain <harsh.jain at amd.com>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index 222d3d7ea076..5b2afe348c23 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -581,11 +581,11 @@ void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable)
if (adev->gfx.gfx_off_req_count == 0 &&
!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,
delay);
+ /* If going to s2idle, no need to wait */
+ if (adev->in_s0ix)
+ flush_delayed_work(&adev->gfx.gfx_off_delay_work);
}
} else {
if (adev->gfx.gfx_off_req_count == 0) {
--
2.25.1
More information about the amd-gfx
mailing list