Commit ec813f38 authored by Alex Deucher's avatar Alex Deucher
Browse files

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: default avatarDavid (Ming Qiang) Wu <David.Wu3@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 061a09b4
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -436,6 +436,8 @@ static int vpe_hw_fini(struct amdgpu_ip_block *ip_block)
	struct amdgpu_device *adev = ip_block->adev;
	struct amdgpu_vpe *vpe = &adev->vpe;

	cancel_delayed_work_sync(&adev->vpe.idle_work);

	vpe_ring_stop(vpe);

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

static int vpe_suspend(struct amdgpu_ip_block *ip_block)
{
	struct amdgpu_device *adev = ip_block->adev;

	cancel_delayed_work_sync(&adev->vpe.idle_work);

	return vpe_hw_fini(ip_block);
}