diff options
-rw-r--r-- | sys/dev/drm2/ttm/ttm_bo.c | 7 | ||||
-rw-r--r-- | sys/dev/drm2/ttm/ttm_bo_util.c | 3 | ||||
-rw-r--r-- | sys/dev/drm2/ttm/ttm_bo_vm.c | 3 |
3 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/drm2/ttm/ttm_bo.c b/sys/dev/drm2/ttm/ttm_bo.c index f598748..3b13540 100644 --- a/sys/dev/drm2/ttm/ttm_bo.c +++ b/sys/dev/drm2/ttm/ttm_bo.c @@ -1723,8 +1723,7 @@ int ttm_bo_wait(struct ttm_buffer_object *bo, if (driver->sync_obj_signaled(bo->sync_obj)) { void *tmp_obj = bo->sync_obj; bo->sync_obj = NULL; - atomic_clear_long(&bo->priv_flags, - 1UL << TTM_BO_PRIV_FLAG_MOVING); + clear_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); mtx_unlock(&bdev->fence_lock); driver->sync_obj_unref(&tmp_obj); mtx_lock(&bdev->fence_lock); @@ -1747,8 +1746,8 @@ int ttm_bo_wait(struct ttm_buffer_object *bo, if (likely(bo->sync_obj == sync_obj)) { void *tmp_obj = bo->sync_obj; bo->sync_obj = NULL; - atomic_clear_long(&bo->priv_flags, - 1UL << TTM_BO_PRIV_FLAG_MOVING); + clear_bit(TTM_BO_PRIV_FLAG_MOVING, + &bo->priv_flags); mtx_unlock(&bdev->fence_lock); driver->sync_obj_unref(&sync_obj); driver->sync_obj_unref(&tmp_obj); diff --git a/sys/dev/drm2/ttm/ttm_bo_util.c b/sys/dev/drm2/ttm/ttm_bo_util.c index 15b4d48..aed8e0e 100644 --- a/sys/dev/drm2/ttm/ttm_bo_util.c +++ b/sys/dev/drm2/ttm/ttm_bo_util.c @@ -637,8 +637,7 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, * operation has completed. */ - atomic_set_long(&bo->priv_flags, - 1UL << TTM_BO_PRIV_FLAG_MOVING); + set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); mtx_unlock(&bdev->fence_lock); if (tmp_obj) driver->sync_obj_unref(&tmp_obj); diff --git a/sys/dev/drm2/ttm/ttm_bo_vm.c b/sys/dev/drm2/ttm/ttm_bo_vm.c index 8c64181..b87380c 100644 --- a/sys/dev/drm2/ttm/ttm_bo_vm.c +++ b/sys/dev/drm2/ttm/ttm_bo_vm.c @@ -153,8 +153,7 @@ reserve: */ mtx_lock(&bdev->fence_lock); - if ((atomic_load_acq_long(&bo->priv_flags) & - (1UL << TTM_BO_PRIV_FLAG_MOVING)) != 0) { + if (test_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags)) { /* * Here, the behavior differs between Linux and FreeBSD. * |