Skip to content

Commit 35a5440

Browse files
committed
drm/amdgpu: cancel gfx idle work in device suspend for s0ix
This is normally handled in the gfx IP suspend callbacks, but for S0ix, those are skipped because we don't want to touch gfx. So handle it in device suspend. Fixes: b946798 ("drm/amdgpu: add dynamic workload profile switching for gfx10") Fixes: 963537c ("drm/amdgpu: add dynamic workload profile switching for gfx11") Fixes: 5f95a15 ("drm/amdgpu: add dynamic workload profile switching for gfx12") Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 906ad45) Cc: stable@vger.kernel.org
1 parent 50f29ea commit 35a5440

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3643,6 +3643,13 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev)
36433643
adev, adev->ip_blocks[i].version->type))
36443644
continue;
36453645

3646+
/* Since we skip suspend for S0i3, we need to cancel the delayed
3647+
* idle work here as the suspend callback never gets called.
3648+
*/
3649+
if (adev->in_s0ix &&
3650+
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX &&
3651+
amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(10, 0, 0))
3652+
cancel_delayed_work_sync(&adev->gfx.idle_work);
36463653
/* skip suspend of gfx/mes and psp for S0ix
36473654
* gfx is in gfxoff state, so on resume it will exit gfxoff just
36483655
* like at runtime. PSP is also part of the always on hardware

0 commit comments

Comments
 (0)