drm/ttm: inline ttm_bo_reserve and related calls
Makes lockdep a lot more useful.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
index 7392da5..6c91178 100644
--- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
+++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
@@ -44,12 +44,10 @@
entry->reserved = false;
if (entry->removed) {
- ttm_bo_unreserve_ticket_locked(bo, ticket);
+ ttm_bo_add_to_lru(bo);
entry->removed = false;
-
- } else {
- ww_mutex_unlock(&bo->resv->lock);
}
+ ww_mutex_unlock(&bo->resv->lock);
}
}
@@ -220,7 +218,8 @@
bo = entry->bo;
entry->old_sync_obj = bo->sync_obj;
bo->sync_obj = driver->sync_obj_ref(sync_obj);
- ttm_bo_unreserve_ticket_locked(bo, ticket);
+ ttm_bo_add_to_lru(bo);
+ ww_mutex_unlock(&bo->resv->lock);
entry->reserved = false;
}
spin_unlock(&bdev->fence_lock);