Lines Matching refs:entity
90 struct drm_sched_entity *entity) in drm_sched_rq_add_entity() argument
92 if (!list_empty(&entity->list)) in drm_sched_rq_add_entity()
96 list_add_tail(&entity->list, &rq->entities); in drm_sched_rq_add_entity()
109 struct drm_sched_entity *entity) in drm_sched_rq_remove_entity() argument
111 if (list_empty(&entity->list)) in drm_sched_rq_remove_entity()
115 list_del_init(&entity->list); in drm_sched_rq_remove_entity()
116 if (rq->current_entity == entity) in drm_sched_rq_remove_entity()
131 struct drm_sched_entity *entity; in drm_sched_rq_select_entity() local
135 entity = rq->current_entity; in drm_sched_rq_select_entity()
136 if (entity) { in drm_sched_rq_select_entity()
137 list_for_each_entry_continue(entity, &rq->entities, list) { in drm_sched_rq_select_entity()
138 if (drm_sched_entity_is_ready(entity)) { in drm_sched_rq_select_entity()
139 rq->current_entity = entity; in drm_sched_rq_select_entity()
140 reinit_completion(&entity->entity_idle); in drm_sched_rq_select_entity()
142 return entity; in drm_sched_rq_select_entity()
147 list_for_each_entry(entity, &rq->entities, list) { in drm_sched_rq_select_entity()
149 if (drm_sched_entity_is_ready(entity)) { in drm_sched_rq_select_entity()
150 rq->current_entity = entity; in drm_sched_rq_select_entity()
151 reinit_completion(&entity->entity_idle); in drm_sched_rq_select_entity()
153 return entity; in drm_sched_rq_select_entity()
156 if (entity == rq->current_entity) in drm_sched_rq_select_entity()
174 struct drm_sched_entity *entity) in drm_sched_dependency_optimized() argument
176 struct drm_gpu_scheduler *sched = entity->rq->sched; in drm_sched_dependency_optimized()
181 if (fence->context == entity->fence_context) in drm_sched_dependency_optimized()
333 struct drm_sched_entity *entity; in drm_sched_increase_karma() local
347 list_for_each_entry_safe(entity, tmp, &rq->entities, list) { in drm_sched_increase_karma()
349 entity->fence_context) { in drm_sched_increase_karma()
352 if (entity->guilty) in drm_sched_increase_karma()
353 atomic_set(entity->guilty, 1); in drm_sched_increase_karma()
358 if (&entity->list != &rq->entities) in drm_sched_increase_karma()
549 struct drm_sched_entity *entity, in drm_sched_job_init() argument
554 drm_sched_entity_select_rq(entity); in drm_sched_job_init()
555 if (!entity->rq) in drm_sched_job_init()
558 sched = entity->rq->sched; in drm_sched_job_init()
561 job->entity = entity; in drm_sched_job_init()
562 job->s_priority = entity->rq - sched->sched_rq; in drm_sched_job_init()
563 job->s_fence = drm_sched_fence_create(entity, owner); in drm_sched_job_init()
621 struct drm_sched_entity *entity; in drm_sched_select_entity() local
629 entity = drm_sched_rq_select_entity(&sched->sched_rq[i]); in drm_sched_select_entity()
630 if (entity) in drm_sched_select_entity()
634 return entity; in drm_sched_select_entity()
771 struct drm_sched_entity *entity = NULL; in drm_sched_main() local
780 (entity = drm_sched_select_entity(sched))) || in drm_sched_main()
789 if (!entity) in drm_sched_main()
792 sched_job = drm_sched_entity_pop_job(entity); in drm_sched_main()
794 complete(&entity->entity_idle); in drm_sched_main()
804 trace_drm_run_job(sched_job, entity); in drm_sched_main()