drm/amd/scheduler: add WARN_ON for s_fence->parent
authorChunming Zhou <david1.zhou@amd.com>
Tue, 7 Nov 2017 02:27:43 +0000 (10:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Dec 2017 17:47:18 +0000 (12:47 -0500)
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c

index 9e3748a5b398f6917e2abd7b4570917577bddcae..dcb987e6d94ab6c7136cc8df80640e6f32c92e05 100644 (file)
@@ -241,6 +241,7 @@ void amd_sched_entity_fini(struct amd_gpu_scheduler *sched,
                        amd_sched_fence_scheduled(s_fence);
                        dma_fence_set_error(&s_fence->finished, -ESRCH);
                        amd_sched_fence_finished(s_fence);
+                       WARN_ON(s_fence->parent);
                        dma_fence_put(&s_fence->finished);
                        sched->ops->free_job(job);
                }