diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2025-08-25 16:35:07 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2025-08-27 20:57:51 +0300 |
commit | ec813f384b1a9df332e86ff46c422e5d2d00217f (patch) | |
tree | 58b2ef9e772bd4102800dff2bea27d953a949a6b /drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | |
parent | 061a09b4dcc4ebbc8ab8b648f7da697962aae68a (diff) | |
download | linux-ec813f384b1a9df332e86ff46c422e5d2d00217f.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c index 86573c8d9b91..474bfe36c0c2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c @@ -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); } |