aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2010-05-28 05:22:02 -0400
committerDave Airlie <airlied@redhat.com>2010-05-31 19:37:32 -0400
commitd451f62a7c567654f74018be9ab8da8089660d3b (patch)
tree5af844b669caa22f831f7685e619d1315df5d3ad
parentbbfad33663fe8de1cce84ac776664292c46fe7ae (diff)
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: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_fb.c4
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c5
2 files changed, 0 insertions, 9 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
index fb66e62b8e2c..06f431442e92 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
@@ -153,7 +153,6 @@ static int vmw_fb_set_par(struct fb_info *info)
153 struct vmw_private *vmw_priv = par->vmw_priv; 153 struct vmw_private *vmw_priv = par->vmw_priv;
154 154
155 if (vmw_priv->capabilities & SVGA_CAP_DISPLAY_TOPOLOGY) { 155 if (vmw_priv->capabilities & SVGA_CAP_DISPLAY_TOPOLOGY) {
156 vmw_write(vmw_priv, SVGA_REG_ENABLE, 0);
157 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, 0); 156 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, 0);
158 vmw_write(vmw_priv, SVGA_REG_DISPLAY_IS_PRIMARY, true); 157 vmw_write(vmw_priv, SVGA_REG_DISPLAY_IS_PRIMARY, true);
159 vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_X, 0); 158 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 vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres); 174 vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres);
176 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID); 175 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
177 vmw_write(vmw_priv, SVGA_REG_NUM_GUEST_DISPLAYS, 1); 176 vmw_write(vmw_priv, SVGA_REG_NUM_GUEST_DISPLAYS, 1);
178 vmw_write(vmw_priv, SVGA_REG_ENABLE, 1);
179 } else { 177 } else {
180 vmw_write(vmw_priv, SVGA_REG_ENABLE, 0);
181 vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres, 178 vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres,
182 info->fix.line_length, 179 info->fix.line_length,
183 par->bpp, par->depth); 180 par->bpp, par->depth);
184 vmw_write(vmw_priv, SVGA_REG_ENABLE, 1);
185 181
186 } 182 }
187 183
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index b35d7b0fd48d..d98b1b1a8705 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@ -107,16 +107,12 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
107 return 0; 107 return 0;
108 fb = entry->base.crtc.fb; 108 fb = entry->base.crtc.fb;
109 109
110 vmw_write(dev_priv, SVGA_REG_ENABLE, 0);
111 vmw_kms_write_svga(dev_priv, w, h, fb->pitch, 110 vmw_kms_write_svga(dev_priv, w, h, fb->pitch,
112 fb->bits_per_pixel, fb->depth); 111 fb->bits_per_pixel, fb->depth);
113 vmw_write(dev_priv, SVGA_REG_ENABLE, 1);
114 112
115 return 0; 113 return 0;
116 } 114 }
117 115
118 vmw_write(dev_priv, SVGA_REG_ENABLE, 0);
119
120 for (i = 0; i < lds->last_num_active; i++) { 116 for (i = 0; i < lds->last_num_active; i++) {
121 vmw_write(dev_priv, SVGA_REG_DISPLAY_ID, i); 117 vmw_write(dev_priv, SVGA_REG_DISPLAY_ID, i);
122 vmw_write(dev_priv, SVGA_REG_DISPLAY_IS_PRIMARY, !i); 118 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 148
153 /* Make sure we always show something. */ 149 /* Make sure we always show something. */
154 vmw_write(dev_priv, SVGA_REG_NUM_GUEST_DISPLAYS, i ? i : 1); 150 vmw_write(dev_priv, SVGA_REG_NUM_GUEST_DISPLAYS, i ? i : 1);
155 vmw_write(dev_priv, SVGA_REG_ENABLE, 1);
156 151
157 BUG_ON(i != lds->num_active); 152 BUG_ON(i != lds->num_active);
158 153