Skip to content

Commit 9163616

Browse files
superm1alexdeucher
authored andcommitted
Revert "drm/amd: flush any delayed gfxoff on suspend entry"
commit ab47503 ("drm/amdgpu/sdma5.2: add begin/end_use ring callbacks") caused GFXOFF control to be used more heavily and the codepath that was removed from commit 0dee726 ("drm/amd: flush any delayed gfxoff on suspend entry") now can be exercised at suspend again. Users report that by using GNOME to suspend the lockscreen trigger will cause SDMA traffic and the system can deadlock. This reverts commit 0dee726. Acked-by: Alex Deucher <[email protected]> Fixes: ab47503 ("drm/amdgpu/sdma5.2: add begin/end_use ring callbacks") Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 3a9626c commit 9163616

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4576,7 +4576,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
45764576
drm_fb_helper_set_suspend_unlocked(adev_to_drm(adev)->fb_helper, true);
45774577

45784578
cancel_delayed_work_sync(&adev->delayed_init_work);
4579-
flush_delayed_work(&adev->gfx.gfx_off_delay_work);
45804579

45814580
amdgpu_ras_suspend(adev);
45824581

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,15 @@ void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable)
723723

724724
if (adev->gfx.gfx_off_req_count == 0 &&
725725
!adev->gfx.gfx_off_state) {
726-
schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
726+
/* If going to s2idle, no need to wait */
727+
if (adev->in_s0ix) {
728+
if (!amdgpu_dpm_set_powergating_by_smu(adev,
729+
AMD_IP_BLOCK_TYPE_GFX, true))
730+
adev->gfx.gfx_off_state = true;
731+
} else {
732+
schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
727733
delay);
734+
}
728735
}
729736
} else {
730737
if (adev->gfx.gfx_off_req_count == 0) {

0 commit comments

Comments
 (0)