summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/gvt.c
diff options
context:
space:
mode:
authorZhi Wang <zhi.a.wang@intel.com>2016-06-30 19:45:34 +0300
committerZhenyu Wang <zhenyuw@linux.intel.com>2016-10-14 13:11:46 +0300
commit579cea5f30f2c70215492e987bb439a3e50c6371 (patch)
treec01b1e3d3e0a1734b9b43b9fcd1809d27b9efa18 /drivers/gpu/drm/i915/gvt/gvt.c
parent12d14cc43b34706283246917329b2182163ba9aa (diff)
downloadlinux-579cea5f30f2c70215492e987bb439a3e50c6371.tar.xz
drm/i915/gvt: golden virtual HW state management
Each vGPU expects a golden virtual HW state, which is just the state after system is freshly powered on. GVT-g will try to load the golden virtual HW state via kernel firmware interface. 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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
index 9f5c9bd83bc9..2c03dad28718 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.c
+++ b/drivers/gpu/drm/i915/gvt/gvt.c
@@ -98,6 +98,8 @@ static void init_device_info(struct intel_gvt *gvt)
if (IS_BROADWELL(gvt->dev_priv) || IS_SKYLAKE(gvt->dev_priv)) {
info->max_support_vgpus = 8;
info->mmio_size = 2 * 1024 * 1024;
+ info->cfg_space_size = 256;
+ info->mmio_bar = 0;
}
}
@@ -117,6 +119,7 @@ void intel_gvt_clean_device(struct drm_i915_private *dev_priv)
return;
intel_gvt_clean_mmio_info(gvt);
+ intel_gvt_free_firmware(gvt);
gvt->initialized = false;
}
@@ -158,7 +161,15 @@ int intel_gvt_init_device(struct drm_i915_private *dev_priv)
if (ret)
return ret;
+ ret = intel_gvt_load_firmware(gvt);
+ if (ret)
+ goto out_clean_mmio_info;
+
gvt_dbg_core("gvt device creation is done\n");
gvt->initialized = true;
return 0;
+
+out_clean_mmio_info:
+ intel_gvt_clean_mmio_info(gvt);
+ return ret;
}