Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 029e50bf authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Dave Airlie
Browse files

drm/vmwgfx: Save at least one screen layout



Save at least one screen layout during vga save to avoid odd things
happening during restore.

Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 73558ead
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1025,6 +1025,9 @@ int vmw_kms_save_vga(struct vmw_private *vmw_priv)
	vmw_priv->num_displays = vmw_read(vmw_priv,
					  SVGA_REG_NUM_GUEST_DISPLAYS);

	if (vmw_priv->num_displays == 0)
		vmw_priv->num_displays = 1;

	for (i = 0; i < vmw_priv->num_displays; ++i) {
		save = &vmw_priv->vga_save[i];
		vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, i);