aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2010-05-28 05:22:03 -0400
committerDave Airlie <airlied@redhat.com>2010-05-31 19:37:36 -0400
commit259600d593181b8a3b1d7fe99d93233b1b113fd0 (patch)
tree79c15f383e0d2dfb4ba6f1bb2e4e85292dbf4d06 /drivers/gpu/drm/vmwgfx
parentd451f62a7c567654f74018be9ab8da8089660d3b (diff)
drm/vmwgfx: Some modesetting cleanups and fixes.
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/drm/vmwgfx')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index d98b1b1a870..f7094dde18f 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@ -113,16 +113,6 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
113 return 0; 113 return 0;
114 } 114 }
115 115
116 for (i = 0; i < lds->last_num_active; i++) {
117 vmw_write(dev_priv, SVGA_REG_DISPLAY_ID, i);
118 vmw_write(dev_priv, SVGA_REG_DISPLAY_IS_PRIMARY, !i);
119 vmw_write(dev_priv, SVGA_REG_DISPLAY_POSITION_X, 0);
120 vmw_write(dev_priv, SVGA_REG_DISPLAY_POSITION_Y, 0);
121 vmw_write(dev_priv, SVGA_REG_DISPLAY_WIDTH, 0);
122 vmw_write(dev_priv, SVGA_REG_DISPLAY_HEIGHT, 0);
123 vmw_write(dev_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
124 }
125
126 if (!list_empty(&lds->active)) { 116 if (!list_empty(&lds->active)) {
127 entry = list_entry(lds->active.next, typeof(*entry), active); 117 entry = list_entry(lds->active.next, typeof(*entry), active);
128 fb = entry->base.crtc.fb; 118 fb = entry->base.crtc.fb;
@@ -131,6 +121,10 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
131 fb->bits_per_pixel, fb->depth); 121 fb->bits_per_pixel, fb->depth);
132 } 122 }
133 123
124 /* Make sure we always show something. */
125 vmw_write(dev_priv, SVGA_REG_NUM_GUEST_DISPLAYS,
126 lds->num_active ? lds->num_active : 1);
127
134 i = 0; 128 i = 0;
135 list_for_each_entry(entry, &lds->active, active) { 129 list_for_each_entry(entry, &lds->active, active) {
136 crtc = &entry->base.crtc; 130 crtc = &entry->base.crtc;
@@ -146,9 +140,6 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
146 i++; 140 i++;
147 } 141 }
148 142
149 /* Make sure we always show something. */
150 vmw_write(dev_priv, SVGA_REG_NUM_GUEST_DISPLAYS, i ? i : 1);
151
152 BUG_ON(i != lds->num_active); 143 BUG_ON(i != lds->num_active);
153 144
154 lds->last_num_active = lds->num_active; 145 lds->last_num_active = lds->num_active;