aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-12-24 08:08:47 +1000
committerDave Airlie <airlied@redhat.com>2015-12-24 08:08:47 +1000
commit20f8e032e6dc7053ab803f488e2a8839cd2f69a6 (patch)
tree406b662934bffa205d90e9435bf96af7dc1a0cb0 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentMerge tag 'drm-intel-next-2015-12-18' of git://anongit.freedesktop.org/drm-intel into drm-next (diff)
parentMerge tag 'drm-intel-fixes-2015-12-23' of git://anongit.freedesktop.org/drm-intel (diff)
downloadlinux-dev-20f8e032e6dc7053ab803f488e2a8839cd2f69a6.tar.xz
linux-dev-20f8e032e6dc7053ab803f488e2a8839cd2f69a6.zip
Backmerge drm-fixes merge into Linus's tree into drm-next.
This merges '5b726e06d6e8309e5c9ef4109a32caf27c71dfc8' into drm-next Just to resolve some merges to make Daniel's life easier. Signed-off-by: DAve Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 6d136b260bb3..7380f782cd14 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -476,6 +476,14 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev,
if (domain == AMDGPU_GEM_DOMAIN_CPU)
goto error_unreserve;
}
+ list_for_each_entry(entry, &duplicates, head) {
+ domain = amdgpu_mem_type_to_domain(entry->bo->mem.mem_type);
+ /* if anything is swapped out don't swap it in here,
+ just abort and wait for the next CS */
+ if (domain == AMDGPU_GEM_DOMAIN_CPU)
+ goto error_unreserve;
+ }
+
r = amdgpu_vm_update_page_directory(adev, bo_va->vm);
if (r)
goto error_unreserve;