Lines Matching full:engine
38 void intel_engine_add_user(struct intel_engine_cs *engine) in intel_engine_add_user() argument
40 llist_add((struct llist_node *)&engine->uabi_node, in intel_engine_add_user()
41 (struct llist_head *)&engine->i915->uabi_engines); in intel_engine_add_user()
82 struct intel_engine_cs *engine = in sort_engines() local
83 container_of((struct rb_node *)pos, typeof(*engine), in sort_engines()
85 list_add((struct list_head *)&engine->uabi_node, engines); in sort_engines()
93 u8 engine; in set_scheduler_caps() member
102 struct intel_engine_cs *engine; in set_scheduler_caps() local
107 for_each_uabi_engine(engine, i915) { /* all engines must agree! */ in set_scheduler_caps()
110 if (engine->schedule) in set_scheduler_caps()
118 if (engine->flags & BIT(map[i].engine)) in set_scheduler_caps()
172 struct intel_engine_cs *engine) in add_legacy_ring() argument
176 if (engine->gt != ring->gt || engine->class != ring->class) { in add_legacy_ring()
177 ring->gt = engine->gt; in add_legacy_ring()
178 ring->class = engine->class; in add_legacy_ring()
186 GEM_BUG_ON(idx >= ARRAY_SIZE(ring->gt->engine)); in add_legacy_ring()
187 ring->gt->engine[idx] = engine; in add_legacy_ring()
190 engine->legacy_idx = idx; in add_legacy_ring()
206 struct intel_engine_cs *engine = in intel_engines_driver_register() local
207 container_of((struct rb_node *)it, typeof(*engine), in intel_engines_driver_register()
209 char old[sizeof(engine->name)]; in intel_engines_driver_register()
211 GEM_BUG_ON(engine->class >= ARRAY_SIZE(uabi_classes)); in intel_engines_driver_register()
212 engine->uabi_class = uabi_classes[engine->class]; in intel_engines_driver_register()
214 GEM_BUG_ON(engine->uabi_class >= ARRAY_SIZE(uabi_instances)); in intel_engines_driver_register()
215 engine->uabi_instance = uabi_instances[engine->uabi_class]++; in intel_engines_driver_register()
218 memcpy(old, engine->name, sizeof(engine->name)); in intel_engines_driver_register()
219 scnprintf(engine->name, sizeof(engine->name), "%s%u", in intel_engines_driver_register()
220 intel_engine_class_repr(engine->class), in intel_engines_driver_register()
221 engine->uabi_instance); in intel_engines_driver_register()
222 DRM_DEBUG_DRIVER("renamed %s to %s\n", old, engine->name); in intel_engines_driver_register()
224 rb_link_node(&engine->uabi_node, prev, p); in intel_engines_driver_register()
225 rb_insert_color(&engine->uabi_node, &i915->uabi_engines); in intel_engines_driver_register()
228 engine->uabi_class, in intel_engines_driver_register()
229 engine->uabi_instance) != engine); in intel_engines_driver_register()
232 add_legacy_ring(&ring, engine); in intel_engines_driver_register()
234 prev = &engine->uabi_node; in intel_engines_driver_register()
240 struct intel_engine_cs *engine; in intel_engines_driver_register() local
247 engine = intel_engine_lookup_user(i915, in intel_engines_driver_register()
249 if (!engine) { in intel_engines_driver_register()
250 pr_err("UABI engine not found for { class:%d, instance:%d }\n", in intel_engines_driver_register()
256 if (engine->uabi_class != class || in intel_engines_driver_register()
257 engine->uabi_instance != inst) { in intel_engines_driver_register()
258 pr_err("Wrong UABI engine:%s { class:%d, instance:%d } found for { class:%d, instance:%d }\n", in intel_engines_driver_register()
259 engine->name, in intel_engines_driver_register()
260 engine->uabi_class, in intel_engines_driver_register()
261 engine->uabi_instance, in intel_engines_driver_register()
270 * Make sure that classes with multiple engine instances all in intel_engines_driver_register()
274 for_each_uabi_engine(engine, i915) { in intel_engines_driver_register()
275 unsigned int bit = BIT(engine->uabi_class); in intel_engines_driver_register()
276 unsigned int expected = engine->default_state ? bit : 0; in intel_engines_driver_register()
279 pr_err("mismatching default context state for class %d on engine %s\n", in intel_engines_driver_register()
280 engine->uabi_class, engine->name); in intel_engines_driver_register()
285 if (WARN(errors, "Invalid UABI engine mapping found")) in intel_engines_driver_register()
294 struct intel_engine_cs *engine; in intel_engines_has_context_isolation() local
298 for_each_uabi_engine(engine, i915) in intel_engines_has_context_isolation()
299 if (engine->default_state) in intel_engines_has_context_isolation()
300 which |= BIT(engine->uabi_class); in intel_engines_has_context_isolation()