Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199665
b: refs/heads/master
c: 04e9e94
h: refs/heads/master
i:
  199663: 70678f5
v: v3
  • Loading branch information
Jakob Bornecrantz authored and Dave Airlie committed May 31, 2010
1 parent 3357ac0 commit 4a6a85b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6a591a96d7315fbe81acc33e20bab4956d1f02a3
refs/heads/master: 04e9e94dba3e564ce810cedab88e957dfd681b4a
17 changes: 11 additions & 6 deletions trunk/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ static int vmw_ldu_add_active(struct vmw_private *vmw_priv,
struct vmw_legacy_display_unit *entry;
struct list_head *at;

BUG_ON(!ld->num_active && ld->fb);
if (vfb != ld->fb) {
if (ld->fb && ld->fb->unpin)
ld->fb->unpin(ld->fb);
if (vfb->pin)
vfb->pin(vfb);
ld->fb = vfb;
}

if (!list_empty(&ldu->active))
return 0;

Expand All @@ -162,12 +171,8 @@ static int vmw_ldu_add_active(struct vmw_private *vmw_priv,
}

list_add(&ldu->active, at);
if (ld->num_active++ == 0) {
BUG_ON(ld->fb);
if (vfb->pin)
vfb->pin(vfb);
ld->fb = vfb;
}

ld->num_active++;

return 0;
}
Expand Down

0 comments on commit 4a6a85b

Please sign in to comment.