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 (rev2)
== Series Details ==
== Series Details ==
Series: drm/i915/gvt: Fix the vblank timer close issue after shutdown VMs in reverse (rev2)
URL : https://patchwork.freedesktop.org/series/27215/
State : warning
== Summary ==
Series 27215v2 drm/i915/gvt: Fix the vblank timer close issue after shutdown VMs in reverse
https://patchwork.freedesktop.org/api/1.0/series/27215/revisions/2/mbox/
Test kms_flip:
Subgroup basic-flip-vs-modeset:
pass -> SKIP (fi-skl-x1585l)
Test kms_pipe_crc_basic:
Subgroup hang-read-crc-pipe-a:
pass -> DMESG-WARN (fi-pnv-d510) fdo#101597 +1
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> PASS (fi-byt-n2820) fdo#101705fdo#101597 https://bugs.freedesktop.org/show_bug.cgi?id=101597
fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705
fi-bdw-5557u total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:448s fi-bdw-gvtdvm total:279 pass:265 dwarn:0 dfail:0 fail:0 skip:14 time:427s fi-blb-e6850 total:279 pass:224 dwarn:1 dfail:0 fail:0 skip:54 time:357s fi-bsw-n3050 total:279 pass:243 dwarn:0 dfail:0 fail:0 skip:36 time:526s fi-bxt-j4205 total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:508s fi-byt-j1900 total:279 pass:254 dwarn:1 dfail:0 fail:0 skip:24 time:487s fi-byt-n2820 total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:481s fi-glk-2a total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:592s fi-hsw-4770 total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:437s fi-hsw-4770r total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:414s fi-ilk-650 total:279 pass:229 dwarn:0 dfail:0 fail:0 skip:50 time:421s fi-ivb-3520m total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:503s fi-ivb-3770 total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:468s fi-kbl-7500u total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:470s fi-kbl-7560u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:572s fi-kbl-r total:279 pass:260 dwarn:1 dfail:0 fail:0 skip:18 time:590s fi-pnv-d510 total:279 pass:222 dwarn:2 dfail:0 fail:0 skip:55 time:563s fi-skl-6260u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:457s fi-skl-6700hq total:279 pass:262 dwarn:0 dfail:0 fail:0 skip:17 time:586s fi-skl-6700k total:279 pass:257 dwarn:4 dfail:0 fail:0 skip:18 time:463s fi-skl-6770hq total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:484s fi-skl-gvtdvm total:279 pass:266 dwarn:0 dfail:0 fail:0 skip:13 time:434s fi-skl-x1585l total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:476s fi-snb-2520m total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:542s fi-snb-2600 total:279 pass:250 dwarn:0 dfail:0 fail:0 skip:29 time:398s
8ad9e19aafea47c272163c2cbf554e06ff7f9857 drm-tip: 2017y-07m-11d-19h-08m-20s UTC integration manifest 4c9ce1a 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_5180/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx