patch-ttm_bo.c

vadaszi, 02/21/2014 03:59 PM

Download (422 Bytes)

 
1
diff --git a/sys/dev/drm/ttm/ttm_bo.c b/sys/dev/drm/ttm/ttm_bo.c
2
index 0d38876..7a3c6af 100644
3
--- a/sys/dev/drm/ttm/ttm_bo.c
4
+++ b/sys/dev/drm/ttm/ttm_bo.c
5
@@ -203,7 +203,7 @@ int ttm_bo_reserve_nolru(struct ttm_buffer_object *bo,
6
 {
7
         int ret;
8
 
9
-        while (unlikely(atomic_read(&bo->reserved) != 0)) {
10
+        while (unlikely(atomic_xchg(&bo->reserved, 1) != 0)) {
11
                 /**
12
                  * Deadlock avoidance for multi-bo reserving.
13
                  */