diff options
author | Christian König <christian.koenig@amd.com> | 2016-05-18 14:00:38 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 21:50:50 +0300 |
commit | 7392c329ee1e49663fc7c7e47e32ab0dcc79b4d2 (patch) | |
tree | c10f7d7b5834bfa0c8926d150559b72070be9118 /drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | |
parent | 16a7133f35b310838ba934b6a29f8af73a88f093 (diff) | |
download | linux-7392c329ee1e49663fc7c7e47e32ab0dcc79b4d2.tar.xz |
drm/amdgpu: remove begin_job/finish_job
Completely pointless and confusing to use a callback
to call into the same code file.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Monk.Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler/gpu_scheduler.c')
-rw-r--r-- | drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c index f5ac01db287b..821bc89bd057 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c @@ -329,7 +329,7 @@ static void amd_sched_free_job(struct fence *f, struct fence_cb *cb) { /* job_finish is called after hw fence signaled, and * the job had already been deleted from ring_mirror_list */ -void amd_sched_job_finish(struct amd_sched_job *s_job) +static void amd_sched_job_finish(struct amd_sched_job *s_job) { struct amd_sched_job *next; struct amd_gpu_scheduler *sched = s_job->sched; @@ -351,7 +351,7 @@ void amd_sched_job_finish(struct amd_sched_job *s_job) } } -void amd_sched_job_begin(struct amd_sched_job *s_job) +static void amd_sched_job_begin(struct amd_sched_job *s_job) { struct amd_gpu_scheduler *sched = s_job->sched; @@ -461,7 +461,7 @@ static void amd_sched_process_job(struct fence *f, struct fence_cb *cb) /* remove job from ring_mirror_list */ spin_lock_irqsave(&sched->job_list_lock, flags); list_del_init(&s_fence->s_job->node); - sched->ops->finish_job(s_fence->s_job); + amd_sched_job_finish(s_fence->s_job); spin_unlock_irqrestore(&sched->job_list_lock, flags); amd_sched_fence_signal(s_fence); @@ -475,6 +475,7 @@ static int amd_sched_main(void *param) { struct sched_param sparam = {.sched_priority = 1}; struct amd_gpu_scheduler *sched = (struct amd_gpu_scheduler *)param; + unsigned long flags; int r, count; sched_setscheduler(current, SCHED_FIFO, &sparam); @@ -499,7 +500,11 @@ static int amd_sched_main(void *param) s_fence = sched_job->s_fence; atomic_inc(&sched->hw_rq_count); - amd_sched_job_pre_schedule(sched, sched_job); + spin_lock_irqsave(&sched->job_list_lock, flags); + list_add_tail(&sched_job->node, &sched->ring_mirror_list); + amd_sched_job_begin(sched_job); + spin_unlock_irqrestore(&sched->job_list_lock, flags); + fence = sched->ops->run_job(sched_job); amd_sched_fence_scheduled(s_fence); if (fence) { |