summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-03-10 10:19:28 +0100
committerIngo Molnar <mingo@kernel.org>2018-03-10 10:19:28 +0100
commitd88f1f1fdb9f8f60602b406c89342e113a19df7f (patch)
tree16da02010b66f7f54fde737c5c54e43980789f79 /drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
parent04860d48a8aba5b21ae5ba1f86b0d4e3bc628fff (diff)
parentcdb06e9d8f520c969676e7d6778cffe5894f079f (diff)
downloadlinux-d88f1f1fdb9f8f60602b406c89342e113a19df7f.tar.gz
linux-d88f1f1fdb9f8f60602b406c89342e113a19df7f.tar.bz2
linux-d88f1f1fdb9f8f60602b406c89342e113a19df7f.zip
Merge branch 'linus' into locking/core, to pick up fixes and dependencies
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index b2eae86bf906..5c26a8e806b9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -299,12 +299,15 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
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;
+ /* only valid for physical mode */
+ if (adev->asic_type < CHIP_POLARIS10) {
+ for (i = 0; i < adev->uvd.max_handles; ++i)
+ if (atomic_read(&adev->uvd.handles[i]))
+ break;
- if (i == AMDGPU_MAX_UVD_HANDLES)
- return 0;
+ if (i == adev->uvd.max_handles)
+ return 0;
+ }
size = amdgpu_bo_size(adev->uvd.vcpu_bo);
ptr = adev->uvd.cpu_addr;