From a73effaf583f3e246b3e784b16443154a6105080 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 9 Feb 2017 23:28:24 +0100 Subject: drm/amdgpu: use amdgpu_gem_va_check() in amdgpu_gem_va_update_vm() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This removes code duplication. Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Samuel Pitoiset Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 +------- 1 file changed, 1 insertion(+), 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; } -- cgit v1.2.3