Skip to content

Commit ec813f3

Browse files
committed
drm/amdgpu/vpe: cancel delayed work in hw_fini
We need to cancel any outstanding work at both suspend and driver teardown. Move the cancel to hw_fini which gets called in both cases. Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 061a09b commit ec813f3

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ static int vpe_hw_fini(struct amdgpu_ip_block *ip_block)
436436
struct amdgpu_device *adev = ip_block->adev;
437437
struct amdgpu_vpe *vpe = &adev->vpe;
438438

439+
cancel_delayed_work_sync(&adev->vpe.idle_work);
440+
439441
vpe_ring_stop(vpe);
440442

441443
/* Power off VPE */
@@ -446,10 +448,6 @@ static int vpe_hw_fini(struct amdgpu_ip_block *ip_block)
446448

447449
static int vpe_suspend(struct amdgpu_ip_block *ip_block)
448450
{
449-
struct amdgpu_device *adev = ip_block->adev;
450-
451-
cancel_delayed_work_sync(&adev->vpe.idle_work);
452-
453451
return vpe_hw_fini(ip_block);
454452
}
455453

0 commit comments

Comments
 (0)