From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Hellstrom Subject: [PATCH 14/15] vmwgfx: Save at least one screen layout Date: Mon, 27 Sep 2010 15:20:31 +0200 Message-ID: <1285593632-10585-15-git-send-email-thellstrom@vmware.com> References: <1285593632-10585-1-git-send-email-thellstrom@vmware.com> <1285593632-10585-2-git-send-email-thellstrom@vmware.com> <1285593632-10585-3-git-send-email-thellstrom@vmware.com> <1285593632-10585-4-git-send-email-thellstrom@vmware.com> <1285593632-10585-5-git-send-email-thellstrom@vmware.com> <1285593632-10585-6-git-send-email-thellstrom@vmware.com> <1285593632-10585-7-git-send-email-thellstrom@vmware.com> <1285593632-10585-8-git-send-email-thellstrom@vmware.com> <1285593632-10585-9-git-send-email-thellstrom@vmware.com> <1285593632-10585-10-git-send-email-thellstrom@vmware.com> <1285593632-10585-11-git-send-email-thellstrom@vmware.com> <1285593632-10585-12-git-send-email-thellstrom@vmware.com> <1285593632-10585-13-git-send-email-thellstrom@vmware.com> <1285593632-10585-14-git-send-email-thellstrom@vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-outbound-2.vmware.com (smtp-outbound-2.vmware.com [65.115.85.73]) by gabe.freedesktop.org (Postfix) with ESMTP id 28F37A0280 for ; Mon, 27 Sep 2010 06:31:37 -0700 (PDT) In-Reply-To: <1285593632-10585-14-git-send-email-thellstrom@vmware.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: airlied@redhat.com Cc: Thomas Hellstrom , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Save at least one screen layout during vga save to avoid odd things happening during restore. Signed-off-by: Thomas Hellstrom --- 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); -- 1.6.2.5