no need to manually cleanup job and fence after sched_fence_finish(), they are auto handled by the callback Change-Id: I9da26064c9e73c178949663bed1e490539e95e41 Signed-off-by: Monk Liu <Monk.Liu at amd.com> --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c index 39b6205..f9f3daa 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c @@ -230,11 +230,10 @@ void amd_sched_entity_fini(struct amd_gpu_scheduler *sched, kthread_unpark(sched->thread); while (kfifo_out(&entity->job_queue, &job, sizeof(job))) { struct amd_sched_fence *s_fence = job->s_fence; + amd_sched_fence_scheduled(s_fence); dma_fence_set_error(&s_fence->finished, -ESRCH); amd_sched_fence_finished(s_fence); - dma_fence_put(&s_fence->finished); - sched->ops->free_job(job); } } -- 2.7.4