summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_drv.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2020-02-27 17:44:06 +0300
committerJani Nikula <jani.nikula@intel.com>2020-03-03 18:46:54 +0300
commit9e859eb9d0f5e3ca553b53c4de149f0988814ad7 (patch)
tree67e9d22643324b2d2455c29a13209adc5025cf83 /drivers/gpu/drm/i915/i915_drv.c
parent3a4a32d6d2c6e3bc28eab144dfb13438fac4f29a (diff)
downloadlinux-9e859eb9d0f5e3ca553b53c4de149f0988814ad7.tar.xz
drm/i915/vgpu: improve vgpu abstractions
Add intel_vgpu_register() abstraction, rename i915_detect_vgpu() to intel_vgpu_detect() to match other function naming, un-inline intel_vgpu_active(), intel_vgpu_has_full_ppgtt() and intel_vgpu_has_huge_gtt() to reduce header interdependencies. The i915_vgpu.[ch] filename and intel_vgpu_ prefix discrepancy remains. Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200227144408.24345-1-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 068a449a343c..d05801c59566 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -759,13 +759,7 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
i915_gem_driver_register(dev_priv);
i915_pmu_register(dev_priv);
- /*
- * Notify a valid surface after modesetting,
- * when running inside a VM.
- */
- if (intel_vgpu_active(dev_priv))
- intel_uncore_write(&dev_priv->uncore, vgtif_reg(display_ready),
- VGT_DRV_DISPLAY_READY);
+ intel_vgpu_register(dev_priv);
/* Reveal our presence to userspace */
if (drm_dev_register(dev, 0) == 0) {
@@ -972,7 +966,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
disable_rpm_wakeref_asserts(&i915->runtime_pm);
- i915_detect_vgpu(i915);
+ intel_vgpu_detect(i915);
ret = i915_driver_mmio_probe(i915);
if (ret < 0)