Commit d451f62a authored by Jakob Bornecrantz's avatar Jakob Bornecrantz Committed by Dave Airlie

drm/vmwgfx: Don't use SVGA_REG_ENABLE in modesetting code.

We should not use SVGA_REG_ENABLE anywhere but in the fifo setup code,
since it controls whether the device is active.
Signed-off-by: default avatarJakob Bornecrantz <jakob@vmware.com>
Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent bbfad336
...@@ -153,7 +153,6 @@ static int vmw_fb_set_par(struct fb_info *info) ...@@ -153,7 +153,6 @@ static int vmw_fb_set_par(struct fb_info *info)
struct vmw_private *vmw_priv = par->vmw_priv; struct vmw_private *vmw_priv = par->vmw_priv;
if (vmw_priv->capabilities & SVGA_CAP_DISPLAY_TOPOLOGY) { if (vmw_priv->capabilities & SVGA_CAP_DISPLAY_TOPOLOGY) {
vmw_write(vmw_priv, SVGA_REG_ENABLE, 0);
vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, 0); 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_IS_PRIMARY, true);
vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_X, 0); vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_X, 0);
...@@ -175,13 +174,10 @@ static int vmw_fb_set_par(struct fb_info *info) ...@@ -175,13 +174,10 @@ static int vmw_fb_set_par(struct fb_info *info)
vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres); 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_DISPLAY_ID, SVGA_ID_INVALID);
vmw_write(vmw_priv, SVGA_REG_NUM_GUEST_DISPLAYS, 1); vmw_write(vmw_priv, SVGA_REG_NUM_GUEST_DISPLAYS, 1);
vmw_write(vmw_priv, SVGA_REG_ENABLE, 1);
} else { } else {
vmw_write(vmw_priv, SVGA_REG_ENABLE, 0);
vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres, vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres,
info->fix.line_length, info->fix.line_length,
par->bpp, par->depth); par->bpp, par->depth);
vmw_write(vmw_priv, SVGA_REG_ENABLE, 1);
} }
......
...@@ -107,16 +107,12 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv) ...@@ -107,16 +107,12 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
return 0; return 0;
fb = entry->base.crtc.fb; fb = entry->base.crtc.fb;
vmw_write(dev_priv, SVGA_REG_ENABLE, 0);
vmw_kms_write_svga(dev_priv, w, h, fb->pitch, vmw_kms_write_svga(dev_priv, w, h, fb->pitch,
fb->bits_per_pixel, fb->depth); fb->bits_per_pixel, fb->depth);
vmw_write(dev_priv, SVGA_REG_ENABLE, 1);
return 0; return 0;
} }
vmw_write(dev_priv, SVGA_REG_ENABLE, 0);
for (i = 0; i < lds->last_num_active; i++) { for (i = 0; i < lds->last_num_active; i++) {
vmw_write(dev_priv, SVGA_REG_DISPLAY_ID, i); vmw_write(dev_priv, SVGA_REG_DISPLAY_ID, i);
vmw_write(dev_priv, SVGA_REG_DISPLAY_IS_PRIMARY, !i); vmw_write(dev_priv, SVGA_REG_DISPLAY_IS_PRIMARY, !i);
...@@ -152,7 +148,6 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv) ...@@ -152,7 +148,6 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
/* Make sure we always show something. */ /* Make sure we always show something. */
vmw_write(dev_priv, SVGA_REG_NUM_GUEST_DISPLAYS, i ? i : 1); vmw_write(dev_priv, SVGA_REG_NUM_GUEST_DISPLAYS, i ? i : 1);
vmw_write(dev_priv, SVGA_REG_ENABLE, 1);
BUG_ON(i != lds->num_active); BUG_ON(i != lds->num_active);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment