summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-02-09 23:28:24 +0100
committerAlex Deucher <alexander.deucher@amd.com>2017-02-10 12:07:33 -0500
commita73effaf583f3e246b3e784b16443154a6105080 (patch)
tree5861863a7916c67256e350a685209947ba35742d /drivers/gpu/drm/amd
parent4ce3bd45b351633f2a0512c587f7fcba2ce044e8 (diff)
downloadlinux-a73effaf583f3e246b3e784b16443154a6105080.tar.bz2
drm/amdgpu: use amdgpu_gem_va_check() in amdgpu_gem_va_update_vm()
This removes code duplication. Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index ec7037a48b6e..51d759463384 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -504,13 +504,7 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev,
list_for_each_entry(entry, list, head) {
struct amdgpu_bo *bo =
container_of(entry->bo, struct amdgpu_bo, tbo);
-
- /* if anything is swapped out don't swap it in here,
- just abort and wait for the next CS */
- if (!amdgpu_bo_gpu_accessible(bo))
- goto error;
-
- if (bo->shadow && !amdgpu_bo_gpu_accessible(bo->shadow))
+ if (amdgpu_gem_va_check(NULL, bo))
goto error;
}