From: Jani Nikula Date: Mon, 15 May 2017 10:03:30 +0000 (+0300) Subject: Merge tag 'gvt-fixes-2017-05-11' of https://github.com/01org/gvt-linux into drm-intel... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d72e27a3af88b6f939aa87070c36304f713aa28;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge tag 'gvt-fixes-2017-05-11' of https://github.com/01org/gvt-linux into drm-intel-fixes gvt-fixes-2017-05-11 - vGPU scheduler performance regression fix (Ping) - bypass in-context mmio restore (Chuanxiao) - one typo fix (Colin) Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20170511054736.swpcmnzdoqi75cnl@zhen-hp.sh.intel.com --- 3d72e27a3af88b6f939aa87070c36304f713aa28 diff --cc drivers/gpu/drm/i915/gvt/sched_policy.c index 79ba4b3440aa,6ac77f8cc405..f25ff133865f --- a/drivers/gpu/drm/i915/gvt/sched_policy.c +++ b/drivers/gpu/drm/i915/gvt/sched_policy.c @@@ -126,13 -52,18 +126,17 @@@ static void try_to_schedule_next_vgpu(s struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; enum intel_engine_id i; struct intel_engine_cs *engine; + struct vgpu_sched_data *vgpu_data; + ktime_t cur_time; - /* no target to schedule */ - if (!scheduler->next_vgpu) + /* no need to schedule if next_vgpu is the same with current_vgpu, + * let scheduler chose next_vgpu again by setting it to NULL. + */ + if (scheduler->next_vgpu == scheduler->current_vgpu) { + scheduler->next_vgpu = NULL; return; + } - gvt_dbg_sched("try to schedule next vgpu %d\n", - scheduler->next_vgpu->id); - /* * after the flag is set, workload dispatch thread will * stop dispatching workload for current vgpu