mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 00:59:55 -04:00
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: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
committed by
Dave Airlie
parent
73558ead64
commit
029e50bfc2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user