aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_bo_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo_util.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_util.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 3106d5bcce3..4b75133d660 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -337,7 +337,6 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
337 * TODO: Explicit member copy would probably be better here. 337 * TODO: Explicit member copy would probably be better here.
338 */ 338 */
339 339
340 spin_lock_init(&fbo->lock);
341 init_waitqueue_head(&fbo->event_queue); 340 init_waitqueue_head(&fbo->event_queue);
342 INIT_LIST_HEAD(&fbo->ddestroy); 341 INIT_LIST_HEAD(&fbo->ddestroy);
343 INIT_LIST_HEAD(&fbo->lru); 342 INIT_LIST_HEAD(&fbo->lru);
@@ -520,7 +519,7 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
520 struct ttm_buffer_object *ghost_obj; 519 struct ttm_buffer_object *ghost_obj;
521 void *tmp_obj = NULL; 520 void *tmp_obj = NULL;
522 521
523 spin_lock(&bo->lock); 522 spin_lock(&bdev->fence_lock);
524 if (bo->sync_obj) { 523 if (bo->sync_obj) {
525 tmp_obj = bo->sync_obj; 524 tmp_obj = bo->sync_obj;
526 bo->sync_obj = NULL; 525 bo->sync_obj = NULL;
@@ -529,7 +528,7 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
529 bo->sync_obj_arg = sync_obj_arg; 528 bo->sync_obj_arg = sync_obj_arg;
530 if (evict) { 529 if (evict) {
531 ret = ttm_bo_wait(bo, false, false, false); 530 ret = ttm_bo_wait(bo, false, false, false);
532 spin_unlock(&bo->lock); 531 spin_unlock(&bdev->fence_lock);
533 if (tmp_obj) 532 if (tmp_obj)
534 driver->sync_obj_unref(&tmp_obj); 533 driver->sync_obj_unref(&tmp_obj);
535 if (ret) 534 if (ret)
@@ -552,7 +551,7 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
552 */ 551 */
553 552
554 set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); 553 set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags);
555 spin_unlock(&bo->lock); 554 spin_unlock(&bdev->fence_lock);
556 if (tmp_obj) 555 if (tmp_obj)
557 driver->sync_obj_unref(&tmp_obj); 556 driver->sync_obj_unref(&tmp_obj);
558 557