Lines Matching refs:gvt

42 	for_each_engine(engine, vgpu->gvt->gt, i) {  in vgpu_has_pending_workload()
68 struct intel_gvt *gvt; member
80 if (!vgpu || vgpu == vgpu->gvt->idle_vgpu) in vgpu_update_timeslice()
132 static void try_to_schedule_next_vgpu(struct intel_gvt *gvt) in try_to_schedule_next_vgpu() argument
134 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; in try_to_schedule_next_vgpu()
155 for_each_engine(engine, gvt->gt, i) { in try_to_schedule_next_vgpu()
172 for_each_engine(engine, gvt->gt, i) in try_to_schedule_next_vgpu()
213 struct intel_gvt *gvt = sched_data->gvt; in tbs_sched_func() local
214 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; in tbs_sched_func()
233 scheduler->next_vgpu = gvt->idle_vgpu; in tbs_sched_func()
237 try_to_schedule_next_vgpu(gvt); in tbs_sched_func()
240 void intel_gvt_schedule(struct intel_gvt *gvt) in intel_gvt_schedule() argument
242 struct gvt_sched_data *sched_data = gvt->scheduler.sched_data; in intel_gvt_schedule()
245 mutex_lock(&gvt->sched_lock); in intel_gvt_schedule()
249 (void *)&gvt->service_request)) { in intel_gvt_schedule()
256 clear_bit(INTEL_GVT_REQUEST_EVENT_SCHED, (void *)&gvt->service_request); in intel_gvt_schedule()
258 vgpu_update_timeslice(gvt->scheduler.current_vgpu, cur_time); in intel_gvt_schedule()
261 mutex_unlock(&gvt->sched_lock); in intel_gvt_schedule()
270 intel_gvt_request_service(data->gvt, INTEL_GVT_REQUEST_SCHED); in tbs_timer_fn()
277 static int tbs_sched_init(struct intel_gvt *gvt) in tbs_sched_init() argument
280 &gvt->scheduler; in tbs_sched_init()
292 data->gvt = gvt; in tbs_sched_init()
299 static void tbs_sched_clean(struct intel_gvt *gvt) in tbs_sched_clean() argument
302 &gvt->scheduler; in tbs_sched_clean()
330 struct intel_gvt *gvt = vgpu->gvt; in tbs_sched_clean_vgpu() local
331 struct gvt_sched_data *sched_data = gvt->scheduler.sched_data; in tbs_sched_clean_vgpu()
337 if (idr_is_empty(&gvt->vgpu_idr)) in tbs_sched_clean_vgpu()
343 struct gvt_sched_data *sched_data = vgpu->gvt->scheduler.sched_data; in tbs_sched_start_schedule()
380 int intel_gvt_init_sched_policy(struct intel_gvt *gvt) in intel_gvt_init_sched_policy() argument
384 mutex_lock(&gvt->sched_lock); in intel_gvt_init_sched_policy()
385 gvt->scheduler.sched_ops = &tbs_schedule_ops; in intel_gvt_init_sched_policy()
386 ret = gvt->scheduler.sched_ops->init(gvt); in intel_gvt_init_sched_policy()
387 mutex_unlock(&gvt->sched_lock); in intel_gvt_init_sched_policy()
392 void intel_gvt_clean_sched_policy(struct intel_gvt *gvt) in intel_gvt_clean_sched_policy() argument
394 mutex_lock(&gvt->sched_lock); in intel_gvt_clean_sched_policy()
395 gvt->scheduler.sched_ops->clean(gvt); in intel_gvt_clean_sched_policy()
396 mutex_unlock(&gvt->sched_lock); in intel_gvt_clean_sched_policy()
410 mutex_lock(&vgpu->gvt->sched_lock); in intel_vgpu_init_sched_policy()
411 ret = vgpu->gvt->scheduler.sched_ops->init_vgpu(vgpu); in intel_vgpu_init_sched_policy()
412 mutex_unlock(&vgpu->gvt->sched_lock); in intel_vgpu_init_sched_policy()
419 mutex_lock(&vgpu->gvt->sched_lock); in intel_vgpu_clean_sched_policy()
420 vgpu->gvt->scheduler.sched_ops->clean_vgpu(vgpu); in intel_vgpu_clean_sched_policy()
421 mutex_unlock(&vgpu->gvt->sched_lock); in intel_vgpu_clean_sched_policy()
428 mutex_lock(&vgpu->gvt->sched_lock); in intel_vgpu_start_schedule()
431 vgpu->gvt->scheduler.sched_ops->start_schedule(vgpu); in intel_vgpu_start_schedule()
433 mutex_unlock(&vgpu->gvt->sched_lock); in intel_vgpu_start_schedule()
436 void intel_gvt_kick_schedule(struct intel_gvt *gvt) in intel_gvt_kick_schedule() argument
438 mutex_lock(&gvt->sched_lock); in intel_gvt_kick_schedule()
439 intel_gvt_request_service(gvt, INTEL_GVT_REQUEST_EVENT_SCHED); in intel_gvt_kick_schedule()
440 mutex_unlock(&gvt->sched_lock); in intel_gvt_kick_schedule()
446 &vgpu->gvt->scheduler; in intel_vgpu_stop_schedule()
448 struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915; in intel_vgpu_stop_schedule()
457 mutex_lock(&vgpu->gvt->sched_lock); in intel_vgpu_stop_schedule()
471 for_each_engine(engine, vgpu->gvt->gt, id) { in intel_vgpu_stop_schedule()
479 mutex_unlock(&vgpu->gvt->sched_lock); in intel_vgpu_stop_schedule()