Skip to content

Commit

Permalink
drm/vmwgfx: Some modesetting cleanups and fixes.
Browse files Browse the repository at this point in the history
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Jakob Bornecrantz authored and Dave Airlie committed May 31, 2010
1 parent d451f62 commit 259600d
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -131,6 +121,10 @@ 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;
Expand All @@ -146,9 +140,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;
Expand Down

0 comments on commit 259600d

Please sign in to comment.