drm/amdgpu: Remove the while loop from amdgpu_job_prepare_job
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Tue, 24 Sep 2024 09:51:45 +0000 (10:51 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Oct 2024 13:43:43 +0000 (09:43 -0400)
commit89cfa73b612a711ad19c6323814f4d28535a0fca
tree157743462fdbaf64e90cedaef994a71d13b43419
parent871f44b4ba74a676ef2f0528a3efc591346fa92a
drm/amdgpu: Remove the while loop from amdgpu_job_prepare_job

While loop makes it sound like amdgpu_vmid_grab() potentially needs to be
called multiple times to produce a fence, while in reality all code paths
either return an error, assign a valid job->vmid or assign a vmid which
will be valid once the returned fence signals.

Therefore we can remove the loop to make it clear the call does not need
to be repeated.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c