Commit 4a562283 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: cleanup scheduler fence get/put dance

The code was correct, but getting two references when the ownership
is linearly moved on is a bit awkward and just overhead.

Signed: Christian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7034decf
......@@ -64,7 +64,6 @@ static struct fence *amdgpu_sched_run_job(struct amd_sched_job *sched_job)
job->free_job(job);
mutex_unlock(&job->job_lock);
fence_put(&job->base.s_fence->base);
kfree(job);
return fence ? &fence->base : NULL;
}
......
......@@ -285,7 +285,6 @@ int amd_sched_entity_push_job(struct amd_sched_job *sched_job)
if (!fence)
return -ENOMEM;
fence_get(&fence->base);
sched_job->s_fence = fence;
wait_event(entity->sched->job_scheduled,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment