Lines Matching refs:execlist

64 static void switch_virtual_execlist_slot(struct intel_vgpu_execlist *execlist)  in switch_virtual_execlist_slot()  argument
67 execlist->running_slot ? in switch_virtual_execlist_slot()
68 execlist->running_slot->index : -1, in switch_virtual_execlist_slot()
69 execlist->running_context ? in switch_virtual_execlist_slot()
70 execlist->running_context->context_id : 0, in switch_virtual_execlist_slot()
71 execlist->pending_slot ? in switch_virtual_execlist_slot()
72 execlist->pending_slot->index : -1); in switch_virtual_execlist_slot()
74 execlist->running_slot = execlist->pending_slot; in switch_virtual_execlist_slot()
75 execlist->pending_slot = NULL; in switch_virtual_execlist_slot()
76 execlist->running_context = execlist->running_context ? in switch_virtual_execlist_slot()
77 &execlist->running_slot->ctx[0] : NULL; in switch_virtual_execlist_slot()
80 execlist->running_slot ? in switch_virtual_execlist_slot()
81 execlist->running_slot->index : -1, in switch_virtual_execlist_slot()
82 execlist->running_context ? in switch_virtual_execlist_slot()
83 execlist->running_context->context_id : 0, in switch_virtual_execlist_slot()
84 execlist->pending_slot ? in switch_virtual_execlist_slot()
85 execlist->pending_slot->index : -1); in switch_virtual_execlist_slot()
88 static void emulate_execlist_status(struct intel_vgpu_execlist *execlist) in emulate_execlist_status() argument
90 struct intel_vgpu_execlist_slot *running = execlist->running_slot; in emulate_execlist_status()
91 struct intel_vgpu_execlist_slot *pending = execlist->pending_slot; in emulate_execlist_status()
92 struct execlist_ctx_descriptor_format *desc = execlist->running_context; in emulate_execlist_status()
93 struct intel_vgpu *vgpu = execlist->vgpu; in emulate_execlist_status()
96 execlist_ring_mmio(execlist->engine, _EL_OFFSET_STATUS); in emulate_execlist_status()
124 static void emulate_csb_update(struct intel_vgpu_execlist *execlist, in emulate_csb_update() argument
128 struct intel_vgpu *vgpu = execlist->vgpu; in emulate_csb_update()
135 execlist_ring_mmio(execlist->engine, _EL_OFFSET_STATUS_PTR); in emulate_csb_update()
137 execlist_ring_mmio(execlist->engine, _EL_OFFSET_STATUS_BUF); in emulate_csb_update()
160 vgpu->hws_pga[execlist->engine->id]); in emulate_csb_update()
166 hwsp_gpa + INTEL_HWS_CSB_WRITE_INDEX(execlist->engine->i915) * 4, in emulate_csb_update()
177 to_context_switch_event(execlist->engine)); in emulate_csb_update()
181 struct intel_vgpu_execlist *execlist, in emulate_execlist_ctx_schedule_out() argument
184 struct intel_vgpu *vgpu = execlist->vgpu; in emulate_execlist_ctx_schedule_out()
185 struct intel_vgpu_execlist_slot *running = execlist->running_slot; in emulate_execlist_ctx_schedule_out()
186 struct intel_vgpu_execlist_slot *pending = execlist->pending_slot; in emulate_execlist_ctx_schedule_out()
195 if (WARN_ON(!same_context(ctx, execlist->running_context))) { in emulate_execlist_ctx_schedule_out()
199 execlist->running_context->context_id); in emulate_execlist_ctx_schedule_out()
207 execlist->running_context = ctx1; in emulate_execlist_ctx_schedule_out()
209 emulate_execlist_status(execlist); in emulate_execlist_ctx_schedule_out()
214 emulate_csb_update(execlist, &status, false); in emulate_execlist_ctx_schedule_out()
227 switch_virtual_execlist_slot(execlist); in emulate_execlist_ctx_schedule_out()
229 emulate_execlist_status(execlist); in emulate_execlist_ctx_schedule_out()
235 emulate_csb_update(execlist, &status, false); in emulate_execlist_ctx_schedule_out()
237 emulate_csb_update(execlist, &status, true); in emulate_execlist_ctx_schedule_out()
244 emulate_csb_update(execlist, &status, false); in emulate_execlist_ctx_schedule_out()
255 struct intel_vgpu_execlist *execlist) in get_next_execlist_slot() argument
257 struct intel_vgpu *vgpu = execlist->vgpu; in get_next_execlist_slot()
259 execlist_ring_mmio(execlist->engine, _EL_OFFSET_STATUS); in get_next_execlist_slot()
270 return &execlist->slot[status.execlist_write_pointer]; in get_next_execlist_slot()
273 static int emulate_execlist_schedule_in(struct intel_vgpu_execlist *execlist, in emulate_execlist_schedule_in() argument
276 struct intel_vgpu_execlist_slot *running = execlist->running_slot; in emulate_execlist_schedule_in()
278 get_next_execlist_slot(execlist); in emulate_execlist_schedule_in()
282 struct intel_vgpu *vgpu = execlist->vgpu; in emulate_execlist_schedule_in()
308 execlist->running_slot = slot; in emulate_execlist_schedule_in()
309 execlist->pending_slot = NULL; in emulate_execlist_schedule_in()
310 execlist->running_context = &slot->ctx[0]; in emulate_execlist_schedule_in()
313 execlist->running_slot->index, in emulate_execlist_schedule_in()
314 execlist->running_context->context_id); in emulate_execlist_schedule_in()
316 emulate_execlist_status(execlist); in emulate_execlist_schedule_in()
321 emulate_csb_update(execlist, &status, false); in emulate_execlist_schedule_in()
341 (!same_context(ctx0, execlist->running_context))) || in emulate_execlist_schedule_in()
346 execlist->pending_slot = slot; in emulate_execlist_schedule_in()
347 switch_virtual_execlist_slot(execlist); in emulate_execlist_schedule_in()
349 emulate_execlist_status(execlist); in emulate_execlist_schedule_in()
354 emulate_csb_update(execlist, &status, false); in emulate_execlist_schedule_in()
361 execlist->pending_slot = slot; in emulate_execlist_schedule_in()
362 emulate_execlist_status(execlist); in emulate_execlist_schedule_in()
383 ret = emulate_execlist_schedule_in(&s->execlist[workload->engine->id], in prepare_execlist_workload()
396 struct intel_vgpu_execlist *execlist = in complete_execlist_workload() local
397 &s->execlist[workload->engine->id]; in complete_execlist_workload()
425 ret = emulate_execlist_ctx_schedule_out(execlist, &workload->ctx_desc); in complete_execlist_workload()
447 workload->elsp_dwords = s->execlist[engine->id].elsp_dwords; in submit_context()
460 struct intel_vgpu_execlist *execlist = &s->execlist[engine->id]; in intel_vgpu_submit_execlist() local
464 desc[0] = get_desc_from_elsp_dwords(&execlist->elsp_dwords, 0); in intel_vgpu_submit_execlist()
465 desc[1] = get_desc_from_elsp_dwords(&execlist->elsp_dwords, 1); in intel_vgpu_submit_execlist()
504 struct intel_vgpu_execlist *execlist = &s->execlist[engine->id]; in init_vgpu_execlist() local
508 memset(execlist, 0, sizeof(*execlist)); in init_vgpu_execlist()
510 execlist->vgpu = vgpu; in init_vgpu_execlist()
511 execlist->engine = engine; in init_vgpu_execlist()
512 execlist->slot[0].index = 0; in init_vgpu_execlist()
513 execlist->slot[1].index = 1; in init_vgpu_execlist()