winsys/radeon: use os_wait_until_zero in radeon_bo_set_tiling
authorMarek Olšák <marek.olsak@amd.com>
Fri, 26 Jun 2015 17:01:04 +0000 (19:01 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sun, 5 Jul 2015 13:08:59 +0000 (15:08 +0200)
src/gallium/winsys/radeon/drm/radeon_drm_bo.c

index 1f0caf60197003bf86ed0274041d6fc6116afb86..314d0ef8df85595f7c5d4f2eb49b50d7a574c7fc 100644 (file)
@@ -778,9 +778,7 @@ static void radeon_bo_set_tiling(struct pb_buffer *_buf,
         cs->flush_cs(cs->flush_data, 0, NULL);
     }
 
-    while (p_atomic_read(&bo->num_active_ioctls)) {
-        sched_yield();
-    }
+    os_wait_until_zero(&bo->num_active_ioctls, PIPE_TIMEOUT_INFINITE);
 
     if (microtiled == RADEON_LAYOUT_TILED)
         args.tiling_flags |= RADEON_TILING_MICRO;