[Intel-gfx] [PATCH 34/37] drm/ttm: fix fence locking in ttm_buffer_object_transfer

Daniel Vetter daniel.vetter at ffwll.ch
Wed Dec 12 14:07:14 CET 2012


Noticed while reviewing the fence locking in the radone pageflip
handler.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/ttm/ttm_bo_util.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index b9c4e51..5c8b207 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -441,7 +441,9 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
 	fbo->vm_node = NULL;
 	atomic_set(&fbo->cpu_writers, 0);
 
+	spin_lock(&bdev->fence_lock);
 	fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj);
+	spin_unlock(&bdev->fence_lock);
 	kref_init(&fbo->list_kref);
 	kref_init(&fbo->kref);
 	fbo->destroy = &ttm_transfered_destroy;
-- 
1.7.10.4




More information about the Intel-gfx mailing list