diff options
author | Christian König <christian.koenig@amd.com> | 2016-02-01 13:56:35 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-02-10 22:17:21 +0300 |
commit | ec72b8006c1e69f633e3def3e3b3c7c6318d271c (patch) | |
tree | 2be40bec1e855f1486bdec058c8099510e7ba9d0 /drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | |
parent | b07c60c0652c497af0c42c1278941f7c5a187fe9 (diff) | |
download | linux-ec72b8006c1e69f633e3def3e3b3c7c6318d271c.tar.xz |
drm/amdgpu: directly return fence from ib_schedule
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c index 84453c1c4b07..cabb0fc28610 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c @@ -88,7 +88,7 @@ static struct fence *amdgpu_sched_dependency(struct amd_sched_job *sched_job) static struct fence *amdgpu_sched_run_job(struct amd_sched_job *sched_job) { - struct amdgpu_fence *fence = NULL; + struct fence *fence = NULL; struct amdgpu_job *job; int r; @@ -98,21 +98,19 @@ static struct fence *amdgpu_sched_run_job(struct amd_sched_job *sched_job) } job = to_amdgpu_job(sched_job); trace_amdgpu_sched_run_job(job); - r = amdgpu_ib_schedule(job->ring, job->num_ibs, job->ibs, job->owner); + r = amdgpu_ib_schedule(job->ring, job->num_ibs, job->ibs, + job->owner, &fence); if (r) { DRM_ERROR("Error scheduling IBs (%d)\n", r); goto err; } - fence = job->ibs[job->num_ibs - 1].fence; - fence_get(&fence->base); - err: if (job->free_job) job->free_job(job); kfree(job); - return fence ? &fence->base : NULL; + return fence; } struct amd_sched_backend_ops amdgpu_sched_ops = { |