Lines Matching refs:bo
210 struct ttm_buffer_object *bo,
381 void(*evict_flags) (struct ttm_buffer_object *bo,
396 int (*move) (struct ttm_buffer_object *bo,
413 int (*verify_access) (struct ttm_buffer_object *bo,
418 void (*move_notify)(struct ttm_buffer_object *bo,
422 int (*fault_reserve_notify)(struct ttm_buffer_object *bo);
427 void (*swap_notify) (struct ttm_buffer_object *bo);
694 extern int ttm_bo_mem_space(struct ttm_buffer_object *bo,
700 extern void ttm_bo_mem_put(struct ttm_buffer_object *bo,
702 extern void ttm_bo_mem_put_locked(struct ttm_buffer_object *bo,
736 extern void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo);
745 extern void ttm_bo_unmap_virtual_locked(struct ttm_buffer_object *bo);
747 extern int ttm_mem_io_reserve_vm(struct ttm_buffer_object *bo);
748 extern void ttm_mem_io_free_vm(struct ttm_buffer_object *bo);
753 extern void ttm_bo_del_sub_from_lru(struct ttm_buffer_object *bo);
754 extern void ttm_bo_add_to_lru(struct ttm_buffer_object *bo);
778 static inline int __ttm_bo_reserve(struct ttm_buffer_object *bo, in __ttm_bo_reserve() argument
790 success = ww_mutex_trylock(&bo->resv->lock); in __ttm_bo_reserve()
795 ret = ww_mutex_lock_interruptible(&bo->resv->lock, ticket); in __ttm_bo_reserve()
797 ret = ww_mutex_lock(&bo->resv->lock, ticket); in __ttm_bo_reserve()
848 static inline int ttm_bo_reserve(struct ttm_buffer_object *bo, in ttm_bo_reserve() argument
855 WARN_ON(!atomic_read(&bo->kref.refcount)); in ttm_bo_reserve()
857 ret = __ttm_bo_reserve(bo, interruptible, no_wait, use_ticket, ticket); in ttm_bo_reserve()
859 ttm_bo_del_sub_from_lru(bo); in ttm_bo_reserve()
874 static inline int ttm_bo_reserve_slowpath(struct ttm_buffer_object *bo, in ttm_bo_reserve_slowpath() argument
880 WARN_ON(!atomic_read(&bo->kref.refcount)); in ttm_bo_reserve_slowpath()
883 ret = ww_mutex_lock_slow_interruptible(&bo->resv->lock, in ttm_bo_reserve_slowpath()
886 ww_mutex_lock_slow(&bo->resv->lock, ticket); in ttm_bo_reserve_slowpath()
889 ttm_bo_del_sub_from_lru(bo); in ttm_bo_reserve_slowpath()
903 static inline void __ttm_bo_unreserve(struct ttm_buffer_object *bo) in __ttm_bo_unreserve() argument
905 ww_mutex_unlock(&bo->resv->lock); in __ttm_bo_unreserve()
915 static inline void ttm_bo_unreserve(struct ttm_buffer_object *bo) in ttm_bo_unreserve() argument
917 if (!(bo->mem.placement & TTM_PL_FLAG_NO_EVICT)) { in ttm_bo_unreserve()
918 spin_lock(&bo->glob->lru_lock); in ttm_bo_unreserve()
919 ttm_bo_add_to_lru(bo); in ttm_bo_unreserve()
920 spin_unlock(&bo->glob->lru_lock); in ttm_bo_unreserve()
922 __ttm_bo_unreserve(bo); in ttm_bo_unreserve()
932 static inline void ttm_bo_unreserve_ticket(struct ttm_buffer_object *bo, in ttm_bo_unreserve_ticket() argument
935 ttm_bo_unreserve(bo); in ttm_bo_unreserve_ticket()
964 extern int ttm_bo_move_ttm(struct ttm_buffer_object *bo,
986 extern int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
997 extern void ttm_bo_free_old_node(struct ttm_buffer_object *bo);
1016 extern int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,