aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
diff options
context:
space:
mode:
authorJim Qu <[email protected]>2017-12-15 07:27:57 +0000
committerAlex Deucher <[email protected]>2017-12-18 16:51:59 +0000
commit8daf94e9002dafb8c425eef1f6ff6dbb49a38d90 (patch)
tree6f4f6b0fdad8c6660c369a8e02bd5a452a4f396d /drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
parentdrm/amdgpu: rename amdgpu_get_pcie_info (diff)
downloadkernel-8daf94e9002dafb8c425eef1f6ff6dbb49a38d90.tar.gz
kernel-8daf94e9002dafb8c425eef1f6ff6dbb49a38d90.zip
drm/amdgpu: always cancel uvd idle handler in uvd suspend
Signed-off-by: Jim Qu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c4
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)
if (adev->uvd.vcpu_bo == NULL)
return 0;
+ cancel_delayed_work_sync(&adev->uvd.idle_work);
+
for (i = 0; i < adev->uvd.max_handles; ++i)
if (atomic_read(&adev->uvd.handles[i]))
break;
@@ -304,8 +306,6 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
if (i == AMDGPU_MAX_UVD_HANDLES)
return 0;
- cancel_delayed_work_sync(&adev->uvd.idle_work);
-
size = amdgpu_bo_size(adev->uvd.vcpu_bo);
ptr = adev->uvd.cpu_addr;