Skip to content

Commit 4b31b92

Browse files
Harsh Jainalexdeucher
authored andcommitted
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 Signed-off-by: Harsh Jain <[email protected]> Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 3b8164f commit 4b31b92

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,10 +583,14 @@ void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable)
583583
if (adev->gfx.gfx_off_req_count == 0 &&
584584
!adev->gfx.gfx_off_state) {
585585
/* If going to s2idle, no need to wait */
586-
if (adev->in_s0ix)
587-
delay = GFX_OFF_NO_DELAY;
588-
schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
586+
if (adev->in_s0ix) {
587+
if (!amdgpu_dpm_set_powergating_by_smu(adev,
588+
AMD_IP_BLOCK_TYPE_GFX, true))
589+
adev->gfx.gfx_off_state = true;
590+
} else {
591+
schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
589592
delay);
593+
}
590594
}
591595
} else {
592596
if (adev->gfx.gfx_off_req_count == 0) {

0 commit comments

Comments
 (0)