]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu/vpe: cancel delayed work in hw_fini
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 25 Aug 2025 13:35:07 +0000 (09:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:08 +0000 (15:37 -0500)
[ Upstream commit ec813f384b1a9df332e86ff46c422e5d2d00217f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c

index 7538c4738af34015cd6aaf0ec18848f9b4e77c7c..118fbe38b33abf4e579a09f0200194f415851c9f 100644 (file)
@@ -461,6 +461,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 */
@@ -471,10 +473,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);
 }