Skip to content

Commit 9e7c0ef

Browse files
coxuintelzhenyw
authored andcommitted
drm/i915/gvt: Do not reset pv_notified when vGPU transit from D3->D0
Unlike full initialization like normal boot, guest driver won't pv_notified GVT when vGPU transit from D3->D0. If pv_notified is reset, later vGPU operations will trigger enter into failsafe mode. Considering the fact that vGPU will at least notify GVT pv_notified once before D3/D0 transition, it's safe to skip reset pv_notified in D3->D0. To test this feature, make sure S3 is enabled in QEMU parameters: i440fx: PIIX4_PM.disable_s3=0 q35: ICH9-LPC.disable_s3=0 Also need enable sleep option in guest OS if it's disabled. v2: - Revise commit message to more accurate description. (Kevin) - Split patch by logic. (Zhenyu) Reviewed-by: Zhenyu Wang <[email protected]> Signed-off-by: Hang Yuan <[email protected]> Signed-off-by: Colin Xu <[email protected]> Signed-off-by: Zhenyu Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent ba25d97 commit 9e7c0ef

File tree

1 file changed

+2
-1
lines changed
  • drivers/gpu/drm/i915/gvt

1 file changed

+2
-1
lines changed

drivers/gpu/drm/i915/gvt/vgpu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,13 +579,14 @@ void intel_gvt_reset_vgpu_locked(struct intel_vgpu *vgpu, bool dmlr,
579579
intel_vgpu_reset_cfg_space(vgpu);
580580
/* only reset the failsafe mode when dmlr reset */
581581
vgpu->failsafe = false;
582-
vgpu->pv_notified = false;
583582
/*
584583
* PCI_D0 is set before dmlr, so reset d3_entered here
585584
* after done using.
586585
*/
587586
if(vgpu->d3_entered)
588587
vgpu->d3_entered = false;
588+
else
589+
vgpu->pv_notified = false;
589590
}
590591
}
591592

0 commit comments

Comments
 (0)