diff options
author | Zhenyu Wang <zhenyuw@linux.intel.com> | 2017-01-13 10:46:09 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyuw@linux.intel.com> | 2017-02-07 17:21:06 +0800 |
commit | 26f837e8e1ec9748b55be3af6d7f54b9ad5a43b1 (patch) | |
tree | b077ef85365a216ec5f28df51a3cf91f8fbfbd89 /drivers/gpu/drm/i915/intel_gvt.c | |
parent | 2c88313650f3fb9f04221101901a943bb92059b2 (diff) | |
download | op-kernel-dev-26f837e8e1ec9748b55be3af6d7f54b9ad5a43b1.zip op-kernel-dev-26f837e8e1ec9748b55be3af6d7f54b9ad5a43b1.tar.gz |
drm/i915: make intel_gvt_init() later instead of too early
Previously intel_gvt_init() was called very early even before
MMIO initialization which had several drawbacks:
- Have to handle MMIO access for initial MMIO state dump if golden
state firmware is not available
- Hypervisor detection should depend on pvinfo only instead of detecting
hypervisor status.
- Don't know hw resource size e.g aperture, ggtt size to determine
for vGPU type, etc.
This trys to move intel_gvt_init() call late after required info
has already been initialized for GVT host.
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_gvt.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_gvt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_gvt.c b/drivers/gpu/drm/i915/intel_gvt.c index 290384e..d23c0fc 100644 --- a/drivers/gpu/drm/i915/intel_gvt.c +++ b/drivers/gpu/drm/i915/intel_gvt.c @@ -67,6 +67,11 @@ int intel_gvt_init(struct drm_i915_private *dev_priv) return 0; } + if (intel_vgpu_active(dev_priv)) { + DRM_DEBUG_DRIVER("GVT-g is disabled for guest\n"); + goto bail; + } + if (!is_supported_device(dev_priv)) { DRM_DEBUG_DRIVER("Unsupported device. GVT-g is disabled\n"); goto bail; |