forked from luck/tmp_suning_uos_patched
drm/vmwgfx: Fix framebuffer modesetting
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>
This commit is contained in:
parent
7c4f77801f
commit
991b7b44f8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user