Skip to content

Commit 25000b4

Browse files
superm1smb49
authored andcommitted
Revert "drm/amd: flush any delayed gfxoff on suspend entry"
BugLink: https://bugs.launchpad.net/bugs/2061814 commit 9163616 upstream. 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Portia Stephens <[email protected]> Signed-off-by: Roxana Nicolescu <[email protected]>
1 parent c43ab67 commit 25000b4

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
@@ -4370,7 +4370,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
43704370
drm_fb_helper_set_suspend_unlocked(adev_to_drm(adev)->fb_helper, true);
43714371

43724372
cancel_delayed_work_sync(&adev->delayed_init_work);
4373-
flush_delayed_work(&adev->gfx.gfx_off_delay_work);
43744373

43754374
amdgpu_ras_suspend(adev);
43764375

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

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

695695
if (adev->gfx.gfx_off_req_count == 0 &&
696696
!adev->gfx.gfx_off_state) {
697-
schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
697+
/* If going to s2idle, no need to wait */
698+
if (adev->in_s0ix) {
699+
if (!amdgpu_dpm_set_powergating_by_smu(adev,
700+
AMD_IP_BLOCK_TYPE_GFX, true))
701+
adev->gfx.gfx_off_state = true;
702+
} else {
703+
schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
698704
delay);
705+
}
699706
}
700707
} else {
701708
if (adev->gfx.gfx_off_req_count == 0) {

0 commit comments

Comments
 (0)