diff options
author | Christian König <christian.koenig@amd.com> | 2016-06-30 04:52:03 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 15:06:11 -0400 |
commit | 595a9cd68c132e474ee5daf97067d4d15c618739 (patch) | |
tree | bd49bec6ea57e468e347020f9884ae36f1dacea6 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
parent | a5fb4ec29c74a16ce1c269e52bc85ca86ee41e81 (diff) |
drm/amdgpu: remove fence parameter from amd_sched_job_init
We return the fence as part of the job structur anyway,
no need to do this twice.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 0db32e3b13c0..0307ff5887c5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -836,15 +836,13 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, | |||
836 | { | 836 | { |
837 | struct amdgpu_ring *ring = p->job->ring; | 837 | struct amdgpu_ring *ring = p->job->ring; |
838 | struct amd_sched_entity *entity = &p->ctx->rings[ring->idx].entity; | 838 | struct amd_sched_entity *entity = &p->ctx->rings[ring->idx].entity; |
839 | struct fence *fence; | ||
840 | struct amdgpu_job *job; | 839 | struct amdgpu_job *job; |
841 | int r; | 840 | int r; |
842 | 841 | ||
843 | job = p->job; | 842 | job = p->job; |
844 | p->job = NULL; | 843 | p->job = NULL; |
845 | 844 | ||
846 | r = amd_sched_job_init(&job->base, &ring->sched, | 845 | r = amd_sched_job_init(&job->base, &ring->sched, entity, p->filp); |
847 | entity, p->filp, &fence); | ||
848 | if (r) { | 846 | if (r) { |
849 | amdgpu_job_free(job); | 847 | amdgpu_job_free(job); |
850 | return r; | 848 | return r; |
@@ -852,8 +850,8 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, | |||
852 | 850 | ||
853 | job->owner = p->filp; | 851 | job->owner = p->filp; |
854 | job->ctx = entity->fence_context; | 852 | job->ctx = entity->fence_context; |
855 | p->fence = fence_get(fence); | 853 | p->fence = fence_get(&job->base.s_fence->finished); |
856 | cs->out.handle = amdgpu_ctx_add_fence(p->ctx, ring, fence); | 854 | cs->out.handle = amdgpu_ctx_add_fence(p->ctx, ring, p->fence); |
857 | job->uf_sequence = cs->out.handle; | 855 | job->uf_sequence = cs->out.handle; |
858 | amdgpu_job_free_resources(job); | 856 | amdgpu_job_free_resources(job); |
859 | 857 | ||