Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196562
b: refs/heads/master
c: e865275
h: refs/heads/master
v: v3
  • Loading branch information
Jerome Glisse authored and Dave Airlie committed May 21, 2010
1 parent f4dd0e9 commit b396d4a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 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: 365048ff7f977c5983d67b63c47502c5964840e9
refs/heads/master: e86527533586259875f08fccb173e3347046cc3f
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/radeon/radeon.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ struct radeon_bo_list {
unsigned rdomain;
unsigned wdomain;
u32 tiling_flags;
bool reserved;
};

/*
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/gpu/drm/radeon/radeon_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ int radeon_bo_list_reserve(struct list_head *head)
r = radeon_bo_reserve(lobj->bo, false);
if (unlikely(r != 0))
return r;
lobj->reserved = true;
}
return 0;
}
Expand All @@ -311,7 +312,7 @@ void radeon_bo_list_unreserve(struct list_head *head)

list_for_each_entry(lobj, head, list) {
/* only unreserve object we successfully reserved */
if (radeon_bo_is_reserved(lobj->bo))
if (lobj->reserved && radeon_bo_is_reserved(lobj->bo))
radeon_bo_unreserve(lobj->bo);
}
}
Expand All @@ -322,6 +323,9 @@ int radeon_bo_list_validate(struct list_head *head)
struct radeon_bo *bo;
int r;

list_for_each_entry(lobj, head, list) {
lobj->reserved = false;
}
r = radeon_bo_list_reserve(head);
if (unlikely(r != 0)) {
return r;
Expand Down

0 comments on commit b396d4a

Please sign in to comment.