]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/vmwgfx: Fix framebuffer modesetting
authorJakob Bornecrantz <jakob@vmware.com>
Tue, 1 Jun 2010 09:38:16 +0000 (11:38 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 3 Jun 2010 03:13:36 +0000 (13:13 +1000)
Must set SVGA_NUM_REG_GUEST_DISPLAY before setting up the display information.

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c

index 181f472225801754f663af2cbb8db946c2ff7db6..b0866f04ec7613133a6e4ebc7ab3546906af8258 100644 (file)
@@ -152,20 +152,12 @@ static int vmw_fb_set_par(struct fb_info *info)
        struct vmw_fb_par *par = info->par;
        struct vmw_private *vmw_priv = par->vmw_priv;
 
+       vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres,
+                          info->fix.line_length,
+                          par->bpp, par->depth);
        if (vmw_priv->capabilities & SVGA_CAP_DISPLAY_TOPOLOGY) {
-               vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, 0);
-               vmw_write(vmw_priv, SVGA_REG_DISPLAY_IS_PRIMARY, true);
-               vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_X, 0);
-               vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y, 0);
-               vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, 0);
-               vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, 0);
-               vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
-
-               vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres,
-                                  info->fix.line_length,
-                                  par->bpp, par->depth);
-
                /* TODO check if pitch and offset changes */
+               vmw_write(vmw_priv, SVGA_REG_NUM_GUEST_DISPLAYS, 1);
                vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, 0);
                vmw_write(vmw_priv, SVGA_REG_DISPLAY_IS_PRIMARY, true);
                vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_X, info->var.xoffset);
@@ -173,12 +165,6 @@ static int vmw_fb_set_par(struct fb_info *info)
                vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, info->var.xres);
                vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres);
                vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
-               vmw_write(vmw_priv, SVGA_REG_NUM_GUEST_DISPLAYS, 1);
-       } else {
-               vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres,
-                                  info->fix.line_length,
-                                  par->bpp, par->depth);
-
        }
 
        /* This is really helpful since if this fails the user