diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2017-02-09 17:28:24 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-02-10 12:07:33 -0500 |
commit | a73effaf583f3e246b3e784b16443154a6105080 (patch) | |
tree | 5861863a7916c67256e350a685209947ba35742d /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 4ce3bd45b351633f2a0512c587f7fcba2ce044e8 (diff) |
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/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 |
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, | |||
504 | list_for_each_entry(entry, list, head) { | 504 | list_for_each_entry(entry, list, head) { |
505 | struct amdgpu_bo *bo = | 505 | struct amdgpu_bo *bo = |
506 | container_of(entry->bo, struct amdgpu_bo, tbo); | 506 | container_of(entry->bo, struct amdgpu_bo, tbo); |
507 | 507 | if (amdgpu_gem_va_check(NULL, bo)) | |
508 | /* if anything is swapped out don't swap it in here, | ||
509 | just abort and wait for the next CS */ | ||
510 | if (!amdgpu_bo_gpu_accessible(bo)) | ||
511 | goto error; | ||
512 | |||
513 | if (bo->shadow && !amdgpu_bo_gpu_accessible(bo->shadow)) | ||
514 | goto error; | 508 | goto error; |
515 | } | 509 | } |
516 | 510 | ||