[Intel-gfx] [PATCH 6/6] drm/i915/gvt: decouple check_vgpu() from uncore_init()
Chris Wilson
chris at chris-wilson.co.uk
Tue Jun 18 10:49:50 UTC 2019
Quoting Daniele Ceraolo Spurio (2019-06-17 19:09:35)
> With multiple uncore to initialize (GT vs Display), it makes little
> sense to have the vgpu_check inside uncore_init(). We also have
> a catch-22 scenario where the uncore is required to read the vgpu
> capabilities while the vgpu capabilities are required to decide if
> we need to initialize forcewake support. To remove this circular
> dependency, we can perform the required MMIO access by mmapping just
> the vgtif shared page in mmio space and use raw accessors.
>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> Cc: Zhenyu Wang <zhenyuw at linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 2 ++
> drivers/gpu/drm/i915/i915_pvinfo.h | 5 +++--
> drivers/gpu/drm/i915/i915_vgpu.c | 31 +++++++++++++++++++++++------
> drivers/gpu/drm/i915/intel_uncore.c | 2 --
> 4 files changed, 30 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 95b36fe17f99..c3d9d1a366b0 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1893,6 +1893,8 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> disable_rpm_wakeref_asserts(&dev_priv->runtime_pm);
>
> + i915_check_vgpu(dev_priv);
Bonus points for s/i915_check_vgpu/i915_detect_vgpu/ ?
-Chris
More information about the Intel-gfx
mailing list