drm/amdgpu: ignore scheduler fences from the same entity
authorChristian König <christian.koenig@amd.com>
Tue, 27 Oct 2015 16:00:17 +0000 (17:00 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 28 Oct 2015 21:04:18 +0000 (17:04 -0400)
We are going to submit them before the job anyway.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c

index 7fa1d7a..8dd7316 100644 (file)
@@ -222,6 +222,12 @@ amd_sched_entity_pop_job(struct amd_sched_entity *entity)
 
        while ((entity->dependency = sched->ops->dependency(sched_job))) {
 
+               if (entity->dependency->context == entity->fence_context) {
+                       /* We can ignore fences from ourself */
+                       fence_put(entity->dependency);
+                       continue;
+               }
+
                if (fence_add_callback(entity->dependency, &entity->cb,
                                       amd_sched_entity_wakeup))
                        fence_put(entity->dependency);