Commit 259600d5 authored by Jakob Bornecrantz's avatar Jakob Bornecrantz Committed by Dave Airlie

drm/vmwgfx: Some modesetting cleanups and fixes.

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 d451f62a
...@@ -113,16 +113,6 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv) ...@@ -113,16 +113,6 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
return 0; 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)) { if (!list_empty(&lds->active)) {
entry = list_entry(lds->active.next, typeof(*entry), active); entry = list_entry(lds->active.next, typeof(*entry), active);
fb = entry->base.crtc.fb; fb = entry->base.crtc.fb;
...@@ -131,6 +121,10 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv) ...@@ -131,6 +121,10 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
fb->bits_per_pixel, fb->depth); 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; i = 0;
list_for_each_entry(entry, &lds->active, active) { list_for_each_entry(entry, &lds->active, active) {
crtc = &entry->base.crtc; crtc = &entry->base.crtc;
...@@ -146,9 +140,6 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv) ...@@ -146,9 +140,6 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
i++; 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); BUG_ON(i != lds->num_active);
lds->last_num_active = lds->num_active; lds->last_num_active = 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