diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2010-10-05 10:43:08 (GMT) |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-10-06 01:30:05 (GMT) |
commit | 029e50bfc231741c533128e7e806850557f8e97f (patch) | |
tree | d7f007b35c54952afc9addd1684128a69af3da7c | |
parent | 73558ead6467f0590fe58a03a16a94d2a934178b (diff) | |
download | linux-029e50bfc231741c533128e7e806850557f8e97f.tar.xz |
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>
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 5fb68f3..87c6e61 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -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); |