Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345345
b: refs/heads/master
c: 6c1e963
h: refs/heads/master
i:
  345343: b8d0a94
v: v3
  • Loading branch information
Thomas Hellstrom authored and Dave Airlie committed Nov 20, 2012
1 parent bf3ceb6 commit 3edf2b1
Show file tree
Hide file tree
Showing 2 changed files with 3 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: cdad05216c2b2edfe92a9f87d6ae51aab277f3b2
refs/heads/master: 6c1e963cc5771c93d4ed7aa8bdd4322a7c918e9b
3 changes: 2 additions & 1 deletion trunk/drivers/gpu/drm/ttm/ttm_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ int ttm_bo_reserve_locked(struct ttm_buffer_object *bo,
struct ttm_bo_global *glob = bo->glob;
int ret;

while (unlikely(atomic_cmpxchg(&bo->reserved, 0, 1) != 0)) {
while (unlikely(atomic_read(&bo->reserved) != 0)) {
/**
* Deadlock avoidance for multi-bo reserving.
*/
Expand Down Expand Up @@ -249,6 +249,7 @@ int ttm_bo_reserve_locked(struct ttm_buffer_object *bo,
return ret;
}

atomic_set(&bo->reserved, 1);
if (use_sequence) {
/**
* Wake up waiters that may need to recheck for deadlock,
Expand Down

0 comments on commit 3edf2b1

Please sign in to comment.