aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
diff options
context:
space:
mode:
authorJesse Zhang <zhexi.zhang@amd.com>2019-11-08 18:06:07 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-11-11 17:38:13 -0500
commit9f87516764a9f2a6a6a9552844efb41d9748afec (patch)
tree0cd178c92f20a7f067d78bc372a0d44941eec286 /drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
parentdrm/radeon: Clean up code in radeon_pci_shutdown() (diff)
downloadlinux-dev-9f87516764a9f2a6a6a9552844efb41d9748afec.tar.xz
linux-dev-9f87516764a9f2a6a6a9552844efb41d9748afec.zip
drm/amd/amdgpu: finish delay works before release resources
flush/cancel delayed works before doing finalization to avoid concurrently requests. Signed-off-by: Jesse Zhang <zhexi.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index b4dd89af6f09..e324bfe6c58f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -299,6 +299,7 @@ int amdgpu_uvd_sw_fini(struct amdgpu_device *adev)
{
int i, j;
+ cancel_delayed_work_sync(&adev->uvd.idle_work);
drm_sched_entity_destroy(&adev->uvd.entity);
for (j = 0; j < adev->uvd.num_uvd_inst; ++j) {