summaryrefslogtreecommitdiff
path: root/vmwgfx_ldu.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2010-04-20 12:42:20 +0100
committerJakob Bornecrantz <jakob@vmware.com>2010-04-20 12:42:20 +0100
commit53a1abfd208be40df2f39523de8f0b826686ff7b (patch)
tree5a05c9985cf10f099f691dbd5ae7042e9d1f915a /vmwgfx_ldu.c
parentda4915422e1071d566a8e774f9827f49371c8aa7 (diff)
vmwgfx: Clean up and fix mode setting
Diffstat (limited to 'vmwgfx_ldu.c')
-rw-r--r--vmwgfx_ldu.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/vmwgfx_ldu.c b/vmwgfx_ldu.c
index eba7922..8807c9f 100644
--- a/vmwgfx_ldu.c
+++ b/vmwgfx_ldu.c
@@ -113,16 +113,6 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
return 0;
}
- 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_IS_PRIMARY, !i);
- vmw_write(dev_priv, SVGA_REG_DISPLAY_POSITION_X, 0);
- vmw_write(dev_priv, SVGA_REG_DISPLAY_POSITION_Y, 0);
- vmw_write(dev_priv, SVGA_REG_DISPLAY_WIDTH, 0);
- vmw_write(dev_priv, SVGA_REG_DISPLAY_HEIGHT, 0);
- vmw_write(dev_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
- }
-
if (!list_empty(&lds->active)) {
entry = list_entry(lds->active.next, typeof(*entry), active);
fb = entry->base.crtc.fb;
@@ -131,6 +121,9 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
fb->bits_per_pixel, fb->depth);
}
+ /* Make sure we always show something */
+ vmw_write(dev_priv, SVGA_REG_NUM_GUEST_DISPLAYS, lds->num_active ? lds->num_active : 1);
+
i = 0;
list_for_each_entry(entry, &lds->active, active) {
crtc = &entry->base.crtc;
@@ -146,9 +139,6 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
i++;
}
- /* Make sure we always show something */
- vmw_write(dev_priv, SVGA_REG_NUM_GUEST_DISPLAYS, i ? i : 1);
-
BUG_ON(i != lds->num_active);
lds->last_num_active = lds->num_active;