Lines Matching full:engine
39 void intel_engine_add_user(struct intel_engine_cs *engine) in intel_engine_add_user() argument
41 llist_add(&engine->uabi_llist, &engine->i915->uabi_engines_llist); in intel_engine_add_user()
87 struct intel_engine_cs *engine = in sort_engines() local
88 container_of(pos, typeof(*engine), uabi_llist); in sort_engines()
89 list_add(&engine->uabi_list, engines); in sort_engines()
97 u8 engine; in set_scheduler_caps() member
106 struct intel_engine_cs *engine; in set_scheduler_caps() local
111 for_each_uabi_engine(engine, i915) { /* all engines must agree! */ in set_scheduler_caps()
114 if (engine->sched_engine->schedule) in set_scheduler_caps()
121 if (intel_uc_uses_guc_submission(&engine->gt->uc)) in set_scheduler_caps()
125 if (engine->flags & BIT(map[i].engine)) in set_scheduler_caps()
182 struct intel_engine_cs *engine) in add_legacy_ring() argument
184 if (engine->gt != ring->gt || engine->class != ring->class) { in add_legacy_ring()
185 ring->gt = engine->gt; in add_legacy_ring()
186 ring->class = engine->class; in add_legacy_ring()
190 engine->legacy_idx = legacy_ring_idx(ring); in add_legacy_ring()
191 if (engine->legacy_idx != INVALID_ENGINE) in add_legacy_ring()
195 static void engine_rename(struct intel_engine_cs *engine, const char *name, u16 instance) in engine_rename() argument
197 char old[sizeof(engine->name)]; in engine_rename()
199 memcpy(old, engine->name, sizeof(engine->name)); in engine_rename()
200 scnprintf(engine->name, sizeof(engine->name), "%s%u", name, instance); in engine_rename()
201 drm_dbg(&engine->i915->drm, "renamed %s to %s\n", old, engine->name); in engine_rename()
217 struct intel_engine_cs *engine = in intel_engines_driver_register() local
218 container_of(it, typeof(*engine), uabi_list); in intel_engines_driver_register()
220 if (intel_gt_has_unrecoverable_error(engine->gt)) in intel_engines_driver_register()
223 GEM_BUG_ON(engine->class >= ARRAY_SIZE(uabi_classes)); in intel_engines_driver_register()
224 engine->uabi_class = uabi_classes[engine->class]; in intel_engines_driver_register()
225 if (engine->uabi_class == I915_NO_UABI_CLASS) { in intel_engines_driver_register()
228 GEM_BUG_ON(engine->uabi_class >= in intel_engines_driver_register()
231 i915->engine_uabi_class_count[engine->uabi_class]++; in intel_engines_driver_register()
233 engine->uabi_instance = name_instance; in intel_engines_driver_register()
239 engine_rename(engine, in intel_engines_driver_register()
240 intel_engine_class_repr(engine->class), in intel_engines_driver_register()
243 if (engine->uabi_class == I915_NO_UABI_CLASS) in intel_engines_driver_register()
246 rb_link_node(&engine->uabi_node, prev, p); in intel_engines_driver_register()
247 rb_insert_color(&engine->uabi_node, &i915->uabi_engines); in intel_engines_driver_register()
250 engine->uabi_class, in intel_engines_driver_register()
251 engine->uabi_instance) != engine); in intel_engines_driver_register()
254 add_legacy_ring(&ring, engine); in intel_engines_driver_register()
256 prev = &engine->uabi_node; in intel_engines_driver_register()
262 struct intel_engine_cs *engine; in intel_engines_driver_register() local
269 engine = intel_engine_lookup_user(i915, in intel_engines_driver_register()
271 if (!engine) { in intel_engines_driver_register()
272 pr_err("UABI engine not found for { class:%d, instance:%d }\n", in intel_engines_driver_register()
278 if (engine->uabi_class != class || in intel_engines_driver_register()
279 engine->uabi_instance != inst) { in intel_engines_driver_register()
280 pr_err("Wrong UABI engine:%s { class:%d, instance:%d } found for { class:%d, instance:%d }\n", in intel_engines_driver_register()
281 engine->name, in intel_engines_driver_register()
282 engine->uabi_class, in intel_engines_driver_register()
283 engine->uabi_instance, in intel_engines_driver_register()
292 * Make sure that classes with multiple engine instances all in intel_engines_driver_register()
296 for_each_uabi_engine(engine, i915) { in intel_engines_driver_register()
297 unsigned int bit = BIT(engine->uabi_class); in intel_engines_driver_register()
298 unsigned int expected = engine->default_state ? bit : 0; in intel_engines_driver_register()
301 pr_err("mismatching default context state for class %d on engine %s\n", in intel_engines_driver_register()
302 engine->uabi_class, engine->name); in intel_engines_driver_register()
308 "Invalid UABI engine mapping found")) in intel_engines_driver_register()
317 struct intel_engine_cs *engine; in intel_engines_has_context_isolation() local
321 for_each_uabi_engine(engine, i915) in intel_engines_has_context_isolation()
322 if (engine->default_state) in intel_engines_has_context_isolation()
323 which |= BIT(engine->uabi_class); in intel_engines_has_context_isolation()