summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/gvt.c
diff options
context:
space:
mode:
authorPing Gao <ping.a.gao@intel.com>2017-03-29 19:36:34 +0300
committerZhenyu Wang <zhenyuw@linux.intel.com>2017-03-30 08:32:24 +0300
commit91d0101ad30bd1bd7f7f805f4fa314c6b70bb602 (patch)
tree1309d69ef2f1262f7d9c55eafe2db960a424e446 /drivers/gpu/drm/i915/gvt/gvt.c
parent865f03d42ed0c90c9faf3301775176834ba13eba (diff)
downloadlinux-91d0101ad30bd1bd7f7f805f4fa314c6b70bb602.tar.xz
drm/i915/gvt: use hrtimer replace delayed_work in scheduler
Currently the scheduler is triggered by delayed_work, which doesn't provide precision at microsecond level. Move to hrtimer instead for more accurate control. Signed-off-by: Ping Gao <ping.a.gao@intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/gvt.c')
-rw-r--r--drivers/gpu/drm/i915/gvt/gvt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
index b84b7ca3f66f..894735c77f63 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.c
+++ b/drivers/gpu/drm/i915/gvt/gvt.c
@@ -144,6 +144,11 @@ static int gvt_service_thread(void *data)
intel_gvt_emulate_vblank(gvt);
mutex_unlock(&gvt->lock);
}
+
+ if (test_and_clear_bit(INTEL_GVT_REQUEST_SCHED,
+ (void *)&gvt->service_request)) {
+ intel_gvt_schedule(gvt);
+ }
}
return 0;