From c9b73ef6daff75df27d17260a9fc84e68f1b21b4 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Sun, 13 Apr 2008 14:49:14 +0200 Subject: Unlock the BO mutex while waiting for idle, unmapped, unfenced. Move unfenced checking into idle checking. Never time out while waiting for software events like unmapped or unfenced. --- linux-core/drm_bo_move.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'linux-core/drm_bo_move.c') diff --git a/linux-core/drm_bo_move.c b/linux-core/drm_bo_move.c index 21673daa..bf0e1b74 100644 --- a/linux-core/drm_bo_move.c +++ b/linux-core/drm_bo_move.c @@ -356,10 +356,11 @@ int drm_bo_move_accel_cleanup(struct drm_buffer_object *bo, bo->mem.mm_node != NULL)) #endif { - ret = drm_bo_wait(bo, 0, 1, 0); - if (ret) - return ret; - + if (bo->fence) { + (void) drm_fence_object_wait(bo->fence, 0, 1, + bo->fence_type); + drm_fence_usage_deref_unlocked(&bo->fence); + } drm_bo_free_old_node(bo); if ((man->flags & _DRM_FLAG_MEMTYPE_FIXED) && (bo->ttm != NULL)) { -- cgit v1.2.3