drm/i915/gvt: add missing display part reset for vGPU reset
authorChangbin Du <changbin.du@intel.com>
Tue, 14 Feb 2017 06:50:18 +0000 (14:50 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 14 Feb 2017 09:09:02 +0000 (17:09 +0800)
We also need reset vGPU virtual display emulation. Since all vreg has
been cleared, we need reset display related vreg to reflect our display
setting.

Signed-off-by: Changbin Du <changbin.du@intel.com>
Cc: Ping Gao <ping.a.gao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/display.c
drivers/gpu/drm/i915/gvt/display.h
drivers/gpu/drm/i915/gvt/vgpu.c

index 1a4430724069f44f89a5e1eab0a00d1955f592d2..6d8fde880c39936f816eae411320c38dac87662c 100644 (file)
@@ -333,3 +333,15 @@ int intel_vgpu_init_display(struct intel_vgpu *vgpu)
        else
                return setup_virtual_dp_monitor(vgpu, PORT_B, GVT_DP_B);
 }
+
+/**
+ * intel_vgpu_reset_display- reset vGPU virtual display emulation
+ * @vgpu: a vGPU
+ *
+ * This function is used to reset vGPU virtual display emulation stuffs
+ *
+ */
+void intel_vgpu_reset_display(struct intel_vgpu *vgpu)
+{
+       emulate_monitor_status_change(vgpu);
+}
index 7a60cb8482687b92513f958b23eeaf8b46a1cb23..8b234ea961f67b96a185e3cd8bfd35728360a05d 100644 (file)
@@ -158,6 +158,7 @@ void intel_gvt_emulate_vblank(struct intel_gvt *gvt);
 void intel_gvt_check_vblank_emulation(struct intel_gvt *gvt);
 
 int intel_vgpu_init_display(struct intel_vgpu *vgpu);
+void intel_vgpu_reset_display(struct intel_vgpu *vgpu);
 void intel_vgpu_clean_display(struct intel_vgpu *vgpu);
 
 #endif
index 67d471cee79ebdd6ce12b492e894ef9600689649..95a97aa0051e787430fff4266be7ac559973b78f 100644 (file)
@@ -385,6 +385,7 @@ void intel_gvt_reset_vgpu_locked(struct intel_vgpu *vgpu, bool dmlr,
                intel_vgpu_reset_resource(vgpu);
                intel_vgpu_reset_mmio(vgpu);
                populate_pvinfo_page(vgpu);
+               intel_vgpu_reset_display(vgpu);
 
                if (dmlr)
                        intel_vgpu_reset_cfg_space(vgpu);