Otherwise there could be page protection. Change-Id: I1f6c81002fb2ba21c17cdc14fdde86579b28374e Signed-off-by: Chunming Zhou <david1.zhou at amd.com> --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c index 310904042dfc..e38d55961a9f 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c @@ -243,6 +243,12 @@ void amd_sched_entity_fini(struct amd_gpu_scheduler *sched, amd_sched_fence_scheduled(s_fence); kcl_dma_fence_set_error(&s_fence->finished, -ESRCH); amd_sched_fence_finished(s_fence); + if (s_fence->parent) { + dma_fence_remove_callback(s_fence->parent, + &s_fence->cb); + dma_fence_put(s_fence->parent); + s_fence->parent = NULL; + } dma_fence_put(&s_fence->finished); sched->ops->free_job(job); } -- 2.14.1