Lines Matching full:engine

17 	struct intel_engine_cs *engine =  in __engine_unpark()  local
18 container_of(wf, typeof(*engine), wakeref); in __engine_unpark()
21 GEM_TRACE("%s\n", engine->name); in __engine_unpark()
23 intel_gt_pm_get(engine->gt); in __engine_unpark()
27 if (engine->default_state) in __engine_unpark()
28 map = i915_gem_object_pin_map(engine->default_state, in __engine_unpark()
31 engine->pinned_default_state = map; in __engine_unpark()
33 if (engine->unpark) in __engine_unpark()
34 engine->unpark(engine); in __engine_unpark()
36 intel_engine_init_hangcheck(engine); in __engine_unpark()
73 static bool switch_to_kernel_context(struct intel_engine_cs *engine) in switch_to_kernel_context() argument
80 if (engine->wakeref_serial == engine->serial) in switch_to_kernel_context()
84 if (intel_gt_is_wedged(engine->gt)) in switch_to_kernel_context()
92 * else from creating a request on this engine. This also requires in switch_to_kernel_context()
95 * This should hold true as we can only park the engine after in switch_to_kernel_context()
99 flags = __timeline_mark_lock(engine->kernel_context); in switch_to_kernel_context()
101 rq = __i915_request_create(engine->kernel_context, GFP_NOWAIT); in switch_to_kernel_context()
109 engine->wakeref_serial = engine->serial + 1; in switch_to_kernel_context()
116 /* Release our exclusive hold on the engine */ in switch_to_kernel_context()
117 __intel_wakeref_defer_park(&engine->wakeref); in switch_to_kernel_context()
122 __timeline_mark_unlock(engine->kernel_context, flags); in switch_to_kernel_context()
128 struct intel_engine_cs *engine = in __engine_park() local
129 container_of(wf, typeof(*engine), wakeref); in __engine_park()
131 engine->saturated = 0; in __engine_park()
140 if (!switch_to_kernel_context(engine)) in __engine_park()
143 GEM_TRACE("%s\n", engine->name); in __engine_park()
145 intel_engine_disarm_breadcrumbs(engine); in __engine_park()
146 intel_engine_pool_park(&engine->pool); in __engine_park()
149 GEM_BUG_ON(engine->execlists.queue_priority_hint != INT_MIN); in __engine_park()
151 if (engine->park) in __engine_park()
152 engine->park(engine); in __engine_park()
154 if (engine->pinned_default_state) { in __engine_park()
155 i915_gem_object_unpin_map(engine->default_state); in __engine_park()
156 engine->pinned_default_state = NULL; in __engine_park()
159 engine->execlists.no_priolist = false; in __engine_park()
161 intel_gt_pm_put(engine->gt); in __engine_park()
170 void intel_engine_init__pm(struct intel_engine_cs *engine) in intel_engine_init__pm() argument
172 struct intel_runtime_pm *rpm = &engine->i915->runtime_pm; in intel_engine_init__pm()
174 intel_wakeref_init(&engine->wakeref, rpm, &wf_ops); in intel_engine_init__pm()