summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gvt/gvt.c
diff options
context:
space:
mode:
authorZhi Wang <zhi.a.wang@intel.com>2016-05-01 07:42:16 -0400
committerZhenyu Wang <zhenyuw@linux.intel.com>2016-10-14 18:14:50 +0800
commite473405783c064a9d859d108010581bae8e9af40 (patch)
tree8c16c8763dbd90cd994ad530d02f64f98aa61718 /drivers/gpu/drm/i915/gvt/gvt.c
parent28c4c6ca7f794b2d5ac8773d43311e95f6518415 (diff)
downloadlinux-e473405783c064a9d859d108010581bae8e9af40.tar.bz2
drm/i915/gvt: vGPU workload scheduler
This patch introduces the vGPU workload scheduler routines. GVT workload scheduler is responsible for picking and executing GVT workload from current scheduled vGPU. Before the workload is submitted to host i915, the guest execlist context will be shadowed in the host GVT shadow context. the instructions in guest ring buffer will be copied into GVT shadow ring buffer. Then GVT-g workload scheduler will scan the instructions in guest ring buffer and submit it to host i915. Signed-off-by: Zhi Wang <zhi.a.wang@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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
index 27e1dd9a2570..5bf8488beaef 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.c
+++ b/drivers/gpu/drm/i915/gvt/gvt.c
@@ -177,6 +177,7 @@ void intel_gvt_clean_device(struct drm_i915_private *dev_priv)
return;
clean_service_thread(gvt);
+ intel_gvt_clean_workload_scheduler(gvt);
intel_gvt_clean_opregion(gvt);
intel_gvt_clean_gtt(gvt);
intel_gvt_clean_irq(gvt);
@@ -239,14 +240,20 @@ int intel_gvt_init_device(struct drm_i915_private *dev_priv)
if (ret)
goto out_clean_gtt;
- ret = init_service_thread(gvt);
+ ret = intel_gvt_init_workload_scheduler(gvt);
if (ret)
goto out_clean_opregion;
+ ret = init_service_thread(gvt);
+ if (ret)
+ goto out_clean_workload_scheduler;
+
gvt_dbg_core("gvt device creation is done\n");
gvt->initialized = true;
return 0;
+out_clean_workload_scheduler:
+ intel_gvt_clean_workload_scheduler(gvt);
out_clean_opregion:
intel_gvt_clean_opregion(gvt);
out_clean_gtt: