Merge tag 'gvt-next-2019-02-01' of https://github.com/intel/gvt-linux into drm-intel...
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Fri, 1 Feb 2019 17:03:23 +0000 (09:03 -0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Fri, 1 Feb 2019 17:03:24 +0000 (09:03 -0800)
gvt-next-2019-02-01

- new VFIO EDID region support (Henry)

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
From: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190201061523.GE5588@zhen-hp.sh.intel.com
1  2 
drivers/gpu/drm/i915/gvt/gvt.h
drivers/gpu/drm/i915/gvt/vgpu.c

index fb9cc980e120507bfb52d5626049d0ccf5d265bc,0ba4b42e3bb01b83bf5a6188dbf64122bb6f715d..8bce09de4b822354a68c57c10caef5fc01266757
@@@ -536,6 -536,8 +536,8 @@@ int intel_vgpu_emulate_cfg_read(struct 
  int intel_vgpu_emulate_cfg_write(struct intel_vgpu *vgpu, unsigned int offset,
                void *p_data, unsigned int bytes);
  
+ void intel_vgpu_emulate_hotplug(struct intel_vgpu *vgpu, bool connected);
  static inline u64 intel_vgpu_get_bar_gpa(struct intel_vgpu *vgpu, int bar)
  {
        /* We are 64bit bar. */
@@@ -577,6 -579,7 +579,7 @@@ struct intel_gvt_ops 
        int (*vgpu_get_dmabuf)(struct intel_vgpu *vgpu, unsigned int);
        int (*write_protect_handler)(struct intel_vgpu *, u64, void *,
                                     unsigned int);
+       void (*emulate_hotplug)(struct intel_vgpu *vgpu, bool connected);
  };
  
  
@@@ -593,7 -596,7 +596,7 @@@ static inline void mmio_hw_access_pre(s
  
  static inline void mmio_hw_access_post(struct drm_i915_private *dev_priv)
  {
 -      intel_runtime_pm_put(dev_priv);
 +      intel_runtime_pm_put_unchecked(dev_priv);
  }
  
  /**
index e1c860f80eb0593dbe1948f897f7c55cfe0d6c99,39682b065a71a1bd214262c4d2ddc69f3963fca2..720e2b10adaa10f8ccc4c7472da4e300eb4b296f
@@@ -148,10 -148,10 +148,10 @@@ int intel_gvt_init_vgpu_types(struct in
                gvt->types[i].avail_instance = min(low_avail / vgpu_types[i].low_mm,
                                                   high_avail / vgpu_types[i].high_mm);
  
 -              if (IS_GEN8(gvt->dev_priv))
 +              if (IS_GEN(gvt->dev_priv, 8))
                        sprintf(gvt->types[i].name, "GVTg_V4_%s",
                                                vgpu_types[i].name);
 -              else if (IS_GEN9(gvt->dev_priv))
 +              else if (IS_GEN(gvt->dev_priv, 9))
                        sprintf(gvt->types[i].name, "GVTg_V5_%s",
                                                vgpu_types[i].name);
  
@@@ -428,6 -428,12 +428,12 @@@ static struct intel_vgpu *__intel_gvt_c
        if (ret)
                goto out_clean_sched_policy;
  
+       /*TODO: add more platforms support */
+       if (IS_SKYLAKE(gvt->dev_priv) || IS_KABYLAKE(gvt->dev_priv))
+               ret = intel_gvt_hypervisor_set_edid(vgpu, PORT_D);
+       if (ret)
+               goto out_clean_sched_policy;
        return vgpu;
  
  out_clean_sched_policy: