aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2010-06-01 05:38:16 -0400
committerDave Airlie <airlied@redhat.com>2010-06-02 23:13:36 -0400
commit991b7b44f8cfa1b9beff8c4c2f2ec888b925c2a7 (patch)
tree76b87b2979ccc8de8534b7577292120e3477511a /drivers/gpu
parent7c4f77801f103c9eb0465bf42313d5e1721d2991 (diff)
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_fb.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
index 181f47222580..b0866f04ec76 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
@@ -152,20 +152,12 @@ static int vmw_fb_set_par(struct fb_info *info)
152 struct vmw_fb_par *par = info->par; 152 struct vmw_fb_par *par = info->par;
153 struct vmw_private *vmw_priv = par->vmw_priv; 153 struct vmw_private *vmw_priv = par->vmw_priv;
154 154
155 vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres,
156 info->fix.line_length,
157 par->bpp, par->depth);
155 if (vmw_priv->capabilities & SVGA_CAP_DISPLAY_TOPOLOGY) { 158 if (vmw_priv->capabilities & SVGA_CAP_DISPLAY_TOPOLOGY) {
156 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, 0);
157 vmw_write(vmw_priv, SVGA_REG_DISPLAY_IS_PRIMARY, true);
158 vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_X, 0);
159 vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y, 0);
160 vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, 0);
161 vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, 0);
162 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
163
164 vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres,
165 info->fix.line_length,
166 par->bpp, par->depth);
167
168 /* TODO check if pitch and offset changes */ 159 /* TODO check if pitch and offset changes */
160 vmw_write(vmw_priv, SVGA_REG_NUM_GUEST_DISPLAYS, 1);
169 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, 0); 161 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, 0);
170 vmw_write(vmw_priv, SVGA_REG_DISPLAY_IS_PRIMARY, true); 162 vmw_write(vmw_priv, SVGA_REG_DISPLAY_IS_PRIMARY, true);
171 vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_X, info->var.xoffset); 163 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)
173 vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, info->var.xres); 165 vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, info->var.xres);
174 vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres); 166 vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres);
175 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID); 167 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
176 vmw_write(vmw_priv, SVGA_REG_NUM_GUEST_DISPLAYS, 1);
177 } else {
178 vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres,
179 info->fix.line_length,
180 par->bpp, par->depth);
181
182 } 168 }
183 169
184 /* This is really helpful since if this fails the user 170 /* This is really helpful since if this fails the user