Skip to content

Commit 6c1fd99

Browse files
Rex Zhualexdeucher
authored andcommitted
drm/amdgpu: Cancel gfx off delay work when driver fini/suspend
there may be gfx off delay work pending when suspend/driver unload, need to cancel them first. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent ec2e082 commit 6c1fd99

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,6 +1829,7 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)
18291829
return r;
18301830
}
18311831
amdgpu_gfx_off_ctrl(adev, false);
1832+
cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work);
18321833
r = adev->ip_blocks[i].version->funcs->hw_fini((void *)adev);
18331834
/* XXX handle errors */
18341835
if (r) {
@@ -2012,6 +2013,7 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev)
20122013

20132014
/* call smu to disable gfx off feature first when suspend */
20142015
amdgpu_gfx_off_ctrl(adev, false);
2016+
cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work);
20152017

20162018
for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
20172019
if (!adev->ip_blocks[i].status.valid)

0 commit comments

Comments
 (0)