drm/i915: Add GVT resume routine to i915
authorColin Xu <colin.xu@intel.com>
Tue, 27 Oct 2020 04:54:06 +0000 (12:54 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 10 Nov 2020 06:38:24 +0000 (14:38 +0800)
This patch add gvt resume wrapper into i915_drm_resume().
GVT relies on i915 so resume gvt at last.

V2:
- Direct call into gvt suspend/resume wrapper in intel_gvt.h/intel_gvt.c.
The wrapper and implementation will check and call gvt routine. (zhenyu)

V3:
Refresh.

V4:
Rebase.

V5:
Fail intel_gvt_suspend() if fail to save GGTT.

V6:
Save host entry to per-vGPU gtt.ggtt_mm on each host_entry update so
only need the resume routine.

V7:
Refresh.

Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
Signed-off-by: Colin Xu <colin.xu@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20201027045406.159566-1-colin.xu@intel.com
drivers/gpu/drm/i915/i915_drv.c

index e1e056ffff29dff711115ff74736c31a3eb27dcf..751e258d210380828f3e9aca6e989cfcdecbc71a 100644 (file)
@@ -1271,6 +1271,8 @@ static int i915_drm_resume(struct drm_device *dev)
 
        intel_power_domains_enable(dev_priv);
 
+       intel_gvt_resume(dev_priv);
+
        enable_rpm_wakeref_asserts(&dev_priv->runtime_pm);
 
        return 0;