diff options
author | Jim Qu <Jim.Qu@amd.com> | 2017-12-15 02:27:57 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-18 11:51:59 -0500 |
commit | 8daf94e9002dafb8c425eef1f6ff6dbb49a38d90 (patch) | |
tree | 6f4f6b0fdad8c6660c369a8e02bd5a452a4f396d /drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | |
parent | 041d9d93b5dba8fa41134a4e5fc7a432b76fa308 (diff) |
drm/amdgpu: always cancel uvd idle handler in uvd suspend
Signed-off-by: Jim Qu <Jim.Qu@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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index bd6d3a1c1d65..2b47c0de5620 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | |||
@@ -297,6 +297,8 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev) | |||
297 | if (adev->uvd.vcpu_bo == NULL) | 297 | if (adev->uvd.vcpu_bo == NULL) |
298 | return 0; | 298 | return 0; |
299 | 299 | ||
300 | cancel_delayed_work_sync(&adev->uvd.idle_work); | ||
301 | |||
300 | for (i = 0; i < adev->uvd.max_handles; ++i) | 302 | for (i = 0; i < adev->uvd.max_handles; ++i) |
301 | if (atomic_read(&adev->uvd.handles[i])) | 303 | if (atomic_read(&adev->uvd.handles[i])) |
302 | break; | 304 | break; |
@@ -304,8 +306,6 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev) | |||
304 | if (i == AMDGPU_MAX_UVD_HANDLES) | 306 | if (i == AMDGPU_MAX_UVD_HANDLES) |
305 | return 0; | 307 | return 0; |
306 | 308 | ||
307 | cancel_delayed_work_sync(&adev->uvd.idle_work); | ||
308 | |||
309 | size = amdgpu_bo_size(adev->uvd.vcpu_bo); | 309 | size = amdgpu_bo_size(adev->uvd.vcpu_bo); |
310 | ptr = adev->uvd.cpu_addr; | 310 | ptr = adev->uvd.cpu_addr; |
311 | 311 | ||