Lines Matching full:engine
14 static void reset_heartbeat(struct intel_engine_cs *engine) in reset_heartbeat() argument
16 intel_engine_set_heartbeat(engine, in reset_heartbeat()
17 engine->defaults.heartbeat_interval_ms); in reset_heartbeat()
37 static int engine_sync_barrier(struct intel_engine_cs *engine) in engine_sync_barrier() argument
39 return timeline_sync(engine->kernel_context->timeline); in engine_sync_barrier()
90 static int __live_idle_pulse(struct intel_engine_cs *engine, in __live_idle_pulse() argument
96 GEM_BUG_ON(!intel_engine_pm_is_awake(engine)); in __live_idle_pulse()
106 err = i915_active_acquire_preallocate_barrier(&p->active, engine); in __live_idle_pulse()
116 GEM_BUG_ON(llist_empty(&engine->barrier_tasks)); in __live_idle_pulse()
118 err = fn(engine); in __live_idle_pulse()
122 GEM_BUG_ON(!llist_empty(&engine->barrier_tasks)); in __live_idle_pulse()
124 if (engine_sync_barrier(engine)) { in __live_idle_pulse()
125 struct drm_printer m = drm_err_printer(&engine->i915->drm, "pulse"); in __live_idle_pulse()
127 drm_printf(&m, "%s: no heartbeat pulse?\n", engine->name); in __live_idle_pulse()
128 intel_engine_dump(engine, &m, "%s", engine->name); in __live_idle_pulse()
134 GEM_BUG_ON(READ_ONCE(engine->serial) != engine->wakeref_serial); in __live_idle_pulse()
139 struct drm_printer m = drm_err_printer(&engine->i915->drm, "pulse"); in __live_idle_pulse()
142 engine->name); in __live_idle_pulse()
157 struct intel_engine_cs *engine; in live_idle_flush() local
163 for_each_engine(engine, gt, id) { in live_idle_flush()
164 st_engine_heartbeat_disable(engine); in live_idle_flush()
165 err = __live_idle_pulse(engine, intel_engine_flush_barriers); in live_idle_flush()
166 st_engine_heartbeat_enable(engine); in live_idle_flush()
177 struct intel_engine_cs *engine; in live_idle_pulse() local
183 for_each_engine(engine, gt, id) { in live_idle_pulse()
184 st_engine_heartbeat_disable(engine); in live_idle_pulse()
185 err = __live_idle_pulse(engine, intel_engine_pulse); in live_idle_pulse()
186 st_engine_heartbeat_enable(engine); in live_idle_pulse()
196 static int __live_heartbeat_off(struct intel_engine_cs *engine) in __live_heartbeat_off() argument
200 intel_engine_pm_get(engine); in __live_heartbeat_off()
202 engine->serial++; in __live_heartbeat_off()
203 flush_delayed_work(&engine->heartbeat.work); in __live_heartbeat_off()
204 if (!delayed_work_pending(&engine->heartbeat.work)) { in __live_heartbeat_off()
206 engine->name); in __live_heartbeat_off()
211 err = intel_engine_set_heartbeat(engine, 0); in __live_heartbeat_off()
215 engine->serial++; in __live_heartbeat_off()
216 flush_delayed_work(&engine->heartbeat.work); in __live_heartbeat_off()
217 if (delayed_work_pending(&engine->heartbeat.work)) { in __live_heartbeat_off()
219 engine->name); in __live_heartbeat_off()
224 if (READ_ONCE(engine->heartbeat.systole)) { in __live_heartbeat_off()
226 engine->name); in __live_heartbeat_off()
232 reset_heartbeat(engine); in __live_heartbeat_off()
234 intel_engine_pm_put(engine); in __live_heartbeat_off()
241 struct intel_engine_cs *engine; in live_heartbeat_off() local
249 for_each_engine(engine, gt, id) { in live_heartbeat_off()
250 if (!intel_engine_has_preemption(engine)) in live_heartbeat_off()
253 err = __live_heartbeat_off(engine); in live_heartbeat_off()
283 void st_engine_heartbeat_disable(struct intel_engine_cs *engine) in st_engine_heartbeat_disable() argument
285 engine->props.heartbeat_interval_ms = 0; in st_engine_heartbeat_disable()
287 intel_engine_pm_get(engine); in st_engine_heartbeat_disable()
288 intel_engine_park_heartbeat(engine); in st_engine_heartbeat_disable()
291 void st_engine_heartbeat_enable(struct intel_engine_cs *engine) in st_engine_heartbeat_enable() argument
293 intel_engine_pm_put(engine); in st_engine_heartbeat_enable()
295 engine->props.heartbeat_interval_ms = in st_engine_heartbeat_enable()
296 engine->defaults.heartbeat_interval_ms; in st_engine_heartbeat_enable()
299 void st_engine_heartbeat_disable_no_pm(struct intel_engine_cs *engine) in st_engine_heartbeat_disable_no_pm() argument
301 engine->props.heartbeat_interval_ms = 0; in st_engine_heartbeat_disable_no_pm()
309 if (intel_engine_pm_get_if_awake(engine)) { in st_engine_heartbeat_disable_no_pm()
310 intel_engine_park_heartbeat(engine); in st_engine_heartbeat_disable_no_pm()
311 intel_engine_pm_put(engine); in st_engine_heartbeat_disable_no_pm()
315 void st_engine_heartbeat_enable_no_pm(struct intel_engine_cs *engine) in st_engine_heartbeat_enable_no_pm() argument
317 engine->props.heartbeat_interval_ms = in st_engine_heartbeat_enable_no_pm()
318 engine->defaults.heartbeat_interval_ms; in st_engine_heartbeat_enable_no_pm()