Lines Matching full:engine

39 void intel_engine_add_user(struct intel_engine_cs *engine)  in intel_engine_add_user()  argument
41 llist_add((struct llist_node *)&engine->uabi_node, in intel_engine_add_user()
42 (struct llist_head *)&engine->i915->uabi_engines); in intel_engine_add_user()
88 struct intel_engine_cs *engine = in sort_engines() local
89 container_of((struct rb_node *)pos, typeof(*engine), in sort_engines()
91 list_add((struct list_head *)&engine->uabi_node, engines); in sort_engines()
99 u8 engine; in set_scheduler_caps() member
108 struct intel_engine_cs *engine; in set_scheduler_caps() local
113 for_each_uabi_engine(engine, i915) { /* all engines must agree! */ in set_scheduler_caps()
116 if (engine->sched_engine->schedule) in set_scheduler_caps()
123 if (intel_uc_uses_guc_submission(&engine->gt->uc)) in set_scheduler_caps()
127 if (engine->flags & BIT(map[i].engine)) in set_scheduler_caps()
184 struct intel_engine_cs *engine) in add_legacy_ring() argument
186 if (engine->gt != ring->gt || engine->class != ring->class) { in add_legacy_ring()
187 ring->gt = engine->gt; in add_legacy_ring()
188 ring->class = engine->class; in add_legacy_ring()
192 engine->legacy_idx = legacy_ring_idx(ring); in add_legacy_ring()
193 if (engine->legacy_idx != INVALID_ENGINE) in add_legacy_ring()
197 static void engine_rename(struct intel_engine_cs *engine, const char *name, u16 instance) in engine_rename() argument
199 char old[sizeof(engine->name)]; in engine_rename()
201 memcpy(old, engine->name, sizeof(engine->name)); in engine_rename()
202 scnprintf(engine->name, sizeof(engine->name), "%s%u", name, instance); in engine_rename()
203 drm_dbg(&engine->i915->drm, "renamed %s to %s\n", old, engine->name); in engine_rename()
219 struct intel_engine_cs *engine = in intel_engines_driver_register() local
220 container_of((struct rb_node *)it, typeof(*engine), in intel_engines_driver_register()
223 if (intel_gt_has_unrecoverable_error(engine->gt)) in intel_engines_driver_register()
226 GEM_BUG_ON(engine->class >= ARRAY_SIZE(uabi_classes)); in intel_engines_driver_register()
227 engine->uabi_class = uabi_classes[engine->class]; in intel_engines_driver_register()
228 if (engine->uabi_class == I915_NO_UABI_CLASS) { in intel_engines_driver_register()
231 GEM_BUG_ON(engine->uabi_class >= in intel_engines_driver_register()
234 i915->engine_uabi_class_count[engine->uabi_class]++; in intel_engines_driver_register()
236 engine->uabi_instance = name_instance; in intel_engines_driver_register()
242 engine_rename(engine, in intel_engines_driver_register()
243 intel_engine_class_repr(engine->class), in intel_engines_driver_register()
246 if (engine->uabi_class == I915_NO_UABI_CLASS) in intel_engines_driver_register()
249 rb_link_node(&engine->uabi_node, prev, p); in intel_engines_driver_register()
250 rb_insert_color(&engine->uabi_node, &i915->uabi_engines); in intel_engines_driver_register()
253 engine->uabi_class, in intel_engines_driver_register()
254 engine->uabi_instance) != engine); in intel_engines_driver_register()
257 add_legacy_ring(&ring, engine); in intel_engines_driver_register()
259 prev = &engine->uabi_node; in intel_engines_driver_register()
265 struct intel_engine_cs *engine; in intel_engines_driver_register() local
272 engine = intel_engine_lookup_user(i915, in intel_engines_driver_register()
274 if (!engine) { in intel_engines_driver_register()
275 pr_err("UABI engine not found for { class:%d, instance:%d }\n", in intel_engines_driver_register()
281 if (engine->uabi_class != class || in intel_engines_driver_register()
282 engine->uabi_instance != inst) { in intel_engines_driver_register()
283 pr_err("Wrong UABI engine:%s { class:%d, instance:%d } found for { class:%d, instance:%d }\n", in intel_engines_driver_register()
284 engine->name, in intel_engines_driver_register()
285 engine->uabi_class, in intel_engines_driver_register()
286 engine->uabi_instance, in intel_engines_driver_register()
295 * Make sure that classes with multiple engine instances all in intel_engines_driver_register()
299 for_each_uabi_engine(engine, i915) { in intel_engines_driver_register()
300 unsigned int bit = BIT(engine->uabi_class); in intel_engines_driver_register()
301 unsigned int expected = engine->default_state ? bit : 0; in intel_engines_driver_register()
304 pr_err("mismatching default context state for class %d on engine %s\n", in intel_engines_driver_register()
305 engine->uabi_class, engine->name); in intel_engines_driver_register()
311 "Invalid UABI engine mapping found")) in intel_engines_driver_register()
320 struct intel_engine_cs *engine; in intel_engines_has_context_isolation() local
324 for_each_uabi_engine(engine, i915) in intel_engines_has_context_isolation()
325 if (engine->default_state) in intel_engines_has_context_isolation()
326 which |= BIT(engine->uabi_class); in intel_engines_has_context_isolation()