Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a73effaf authored by Samuel Pitoiset's avatar Samuel Pitoiset Committed by Alex Deucher
Browse files

drm/amdgpu: use amdgpu_gem_va_check() in amdgpu_gem_va_update_vm()



This removes code duplication.

Reviewed-by: default avatarChunming Zhou <david1.zhou@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarSamuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4ce3bd45
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -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;
	}