drm/i915/gvt: Fix the vblank timer close issue after shutdown VMs in reverse
PATCH 1/1 drm/i915/gvt: Fix the vblank timer close issue after shutdown VMs in reverse
Once the Windows guest is shutdown, the display pipe will be disabled and intel_gvt_check_vblank_emulation will be called to check if the vblank timer is turned off. Given the scenario of creating VM1 ,VM2, destoying VM2 in current code, VM1 has pipe enabled and continues to check VM2, the flag have_enabled_pipe is always false since all the VM2 pipes are disabled, so the vblank timer will be canceled and TDR happens in Windows VM1 guest due to the vsync timeout.
In this patch the vblank timer will be never canceled once one pipe is enabled.
--- drivers/gpu/drm/i915/gvt/display.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gvt/display.c +5 -3
@@ -329,21 +329,23 @@ void intel_gvt_check_vblank_emulation(struct intel_gvt *gvt)if (WARN_ON (!mutex_is_locked (&gvt->lock)))return ; -hrtimer_cancel (&irq->vblank_timer.timer); -for_each_active_vgpu (gvt, vgpu, id) {for (pipe =0 ; pipe <I915_MAX_PIPES ; pipe++) { have_enabled_pipe =pipe_is_enabled (vgpu, pipe);if (have_enabled_pipe) -break ; + goto out; } } +out:if (have_enabled_pipe)hrtimer_start (&irq->vblank_timer.timer,ktime_add_ns (ktime_get (), irq->vblank_timer.period),HRTIMER_MODE_ABS ); +else +hrtimer_cancel (&irq->vblank_timer.timer); + }static void emulate_vblank_on_pipe (struct intel_vgpu *vgpu,int pipe)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for drm/i915/gvt: Fix the vblank timer close issue after shutdown VMs in reverse
== Series Details ==
== Series Details ==
Series: drm/i915/gvt: Fix the vblank timer close issue after shutdown VMs in reverse
URL : https://patchwork.freedesktop.org/series/27215/
State : warning
== Summary ==
Series 27215v1 drm/i915/gvt: Fix the vblank timer close issue after shutdown VMs in reverse
https://patchwork.freedesktop.org/api/1.0/series/27215/revisions/1/mbox/
Test gem_exec_suspend:
Subgroup basic-s4-devices:
pass -> DMESG-WARN (fi-kbl-7560u) fdo#100125
Test kms_flip:
Subgroup basic-flip-vs-modeset:
pass -> SKIP (fi-skl-x1585l)
Test kms_pipe_crc_basic:
Subgroup hang-read-crc-pipe-b:
dmesg-warn -> PASS (fi-pnv-d510) fdo#101597fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125
fdo#101597 https://bugs.freedesktop.org/show_bug.cgi?id=101597
fi-bdw-5557u total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:439s fi-bdw-gvtdvm total:279 pass:265 dwarn:0 dfail:0 fail:0 skip:14 time:431s fi-blb-e6850 total:279 pass:224 dwarn:1 dfail:0 fail:0 skip:54 time:359s fi-bsw-n3050 total:279 pass:243 dwarn:0 dfail:0 fail:0 skip:36 time:521s fi-bxt-j4205 total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:506s fi-byt-j1900 total:279 pass:254 dwarn:1 dfail:0 fail:0 skip:24 time:486s fi-byt-n2820 total:279 pass:250 dwarn:1 dfail:0 fail:0 skip:28 time:480s fi-glk-2a total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:600s fi-hsw-4770 total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:434s fi-hsw-4770r total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:408s fi-ilk-650 total:279 pass:229 dwarn:0 dfail:0 fail:0 skip:50 time:415s fi-ivb-3520m total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:500s fi-ivb-3770 total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:490s fi-kbl-7500u total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:460s fi-kbl-7560u total:279 pass:268 dwarn:1 dfail:0 fail:0 skip:10 time:699s fi-kbl-r total:279 pass:260 dwarn:1 dfail:0 fail:0 skip:18 time:589s fi-pnv-d510 total:279 pass:223 dwarn:1 dfail:0 fail:0 skip:55 time:569s fi-skl-6260u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:458s fi-skl-6700hq total:279 pass:262 dwarn:0 dfail:0 fail:0 skip:17 time:588s fi-skl-6700k total:279 pass:257 dwarn:4 dfail:0 fail:0 skip:18 time:471s fi-skl-6770hq total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:486s fi-skl-gvtdvm total:279 pass:266 dwarn:0 dfail:0 fail:0 skip:13 time:445s fi-skl-x1585l total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:472s fi-snb-2520m total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:550s fi-snb-2600 total:279 pass:250 dwarn:0 dfail:0 fail:0 skip:29 time:403s
8ad9e19aafea47c272163c2cbf554e06ff7f9857 drm-tip: 2017y-07m-11d-19h-08m-20s UTC integration manifest ae2616d drm/i915/gvt: Fix the vblank timer close issue after shutdown VMs in reverse
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_5179/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx