Lines Matching refs:engine
20 static void intel_gsc_idle_msg_enable(struct intel_engine_cs *engine) in intel_gsc_idle_msg_enable() argument
22 struct drm_i915_private *i915 = engine->i915; in intel_gsc_idle_msg_enable()
24 if (IS_METEORLAKE(i915) && engine->id == GSC0) { in intel_gsc_idle_msg_enable()
25 intel_uncore_write(engine->gt->uncore, in intel_gsc_idle_msg_enable()
29 intel_uncore_write(engine->gt->uncore, in intel_gsc_idle_msg_enable()
42 int type = intel_gt_coherent_map_type(ce->engine->gt, obj, true); in dbg_poison_ce()
60 struct intel_engine_cs *engine = in __engine_unpark() local
61 container_of(wf, typeof(*engine), wakeref); in __engine_unpark()
64 ENGINE_TRACE(engine, "\n"); in __engine_unpark()
66 intel_gt_pm_get(engine->gt); in __engine_unpark()
69 ce = engine->kernel_context; in __engine_unpark()
75 intel_engine_flush_submission(engine); in __engine_unpark()
91 if (engine->unpark) in __engine_unpark()
92 engine->unpark(engine); in __engine_unpark()
94 intel_breadcrumbs_unpark(engine->breadcrumbs); in __engine_unpark()
95 intel_engine_unpark_heartbeat(engine); in __engine_unpark()
103 ewma__engine_latency_add(&rq->engine->latency, in duration()
111 struct intel_engine_cs *engine) in __queue_and_release_pm() argument
113 struct intel_gt_timelines *timelines = &engine->gt->timelines; in __queue_and_release_pm()
115 ENGINE_TRACE(engine, "parking\n"); in __queue_and_release_pm()
124 __intel_gt_pm_get(engine->gt); in __queue_and_release_pm()
145 __intel_wakeref_defer_park(&engine->wakeref); in __queue_and_release_pm()
150 static bool switch_to_kernel_context(struct intel_engine_cs *engine) in switch_to_kernel_context() argument
152 struct intel_context *ce = engine->kernel_context; in switch_to_kernel_context()
166 if (intel_engine_uses_guc(engine)) in switch_to_kernel_context()
170 if (intel_gt_is_wedged(engine->gt)) in switch_to_kernel_context()
174 GEM_BUG_ON(ce->timeline->hwsp_ggtt != engine->status_page.vma); in switch_to_kernel_context()
177 if (engine->wakeref_serial == engine->serial) in switch_to_kernel_context()
217 engine->wakeref_serial = engine->serial + 1; in switch_to_kernel_context()
236 __queue_and_release_pm(rq, ce->timeline, engine); in switch_to_kernel_context()
244 static void call_idle_barriers(struct intel_engine_cs *engine) in call_idle_barriers() argument
248 llist_for_each_safe(node, next, llist_del_all(&engine->barrier_tasks)) { in call_idle_barriers()
259 struct intel_engine_cs *engine = in __engine_park() local
260 container_of(wf, typeof(*engine), wakeref); in __engine_park()
262 engine->saturated = 0; in __engine_park()
271 if (!switch_to_kernel_context(engine)) in __engine_park()
274 ENGINE_TRACE(engine, "parked\n"); in __engine_park()
276 call_idle_barriers(engine); /* cleanup after wedging */ in __engine_park()
278 intel_engine_park_heartbeat(engine); in __engine_park()
279 intel_breadcrumbs_park(engine->breadcrumbs); in __engine_park()
282 GEM_BUG_ON(engine->sched_engine->queue_priority_hint != INT_MIN); in __engine_park()
284 if (engine->park) in __engine_park()
285 engine->park(engine); in __engine_park()
288 intel_gt_pm_put_async(engine->gt); in __engine_park()
297 void intel_engine_init__pm(struct intel_engine_cs *engine) in intel_engine_init__pm() argument
299 intel_wakeref_init(&engine->wakeref, engine->i915, &wf_ops); in intel_engine_init__pm()
300 intel_engine_init_heartbeat(engine); in intel_engine_init__pm()
302 intel_gsc_idle_msg_enable(engine); in intel_engine_init__pm()
313 void intel_engine_reset_pinned_contexts(struct intel_engine_cs *engine) in intel_engine_reset_pinned_contexts() argument
317 list_for_each_entry(ce, &engine->pinned_contexts_list, in intel_engine_reset_pinned_contexts()
320 if (ce == engine->kernel_context) in intel_engine_reset_pinned_contexts()