Skip to content

Commit

Permalink
drm/i915/gvt: Fix gvt scheduler interval time
Browse files Browse the repository at this point in the history
Fix to correctly assign 1ms for gvt scheduler interval time,
as previous code using HZ is pretty broken. And use no delay
for start gvt scheduler function.

Fixes: 4b63960 ("drm/i915/gvt: vGPU schedule policy framework")
Cc: Zhi Wang <zhi.a.wang@intel.com>
Cc: stable@vger.kernel.org # v4.10+
Acked-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
  • Loading branch information
Zhenyu Wang committed Mar 17, 2017
1 parent 3cd23b8 commit 2958b90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/gvt/sched_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ struct tbs_sched_data {
struct list_head runq_head;
};

#define GVT_DEFAULT_TIME_SLICE (1 * HZ / 1000)
#define GVT_DEFAULT_TIME_SLICE (msecs_to_jiffies(1))

static void tbs_sched_func(struct work_struct *work)
{
Expand Down Expand Up @@ -223,7 +223,7 @@ static void tbs_sched_start_schedule(struct intel_vgpu *vgpu)
return;

list_add_tail(&vgpu_data->list, &sched_data->runq_head);
schedule_delayed_work(&sched_data->work, sched_data->period);
schedule_delayed_work(&sched_data->work, 0);
}

static void tbs_sched_stop_schedule(struct intel_vgpu *vgpu)
Expand Down

0 comments on commit 2958b90

Please sign in to comment.