Lines Matching refs:bdev

60 		man = ttm_manager_type(bo->bdev, mem_type);  in ttm_bo_mem_space_debug()
105 spin_lock(&bo->bdev->lru_lock); in ttm_bo_set_bulk_move()
111 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_set_bulk_move()
120 struct ttm_device *bdev = bo->bdev; in ttm_bo_handle_move_mem() local
124 old_use_tt = !bo->resource || ttm_manager_type(bdev, bo->resource->mem_type)->use_tt; in ttm_bo_handle_move_mem()
125 new_use_tt = ttm_manager_type(bdev, mem->mem_type)->use_tt; in ttm_bo_handle_move_mem()
142 ret = ttm_tt_populate(bo->bdev, bo->ttm, ctx); in ttm_bo_handle_move_mem()
152 ret = bdev->funcs->move(bo, evict, ctx, mem, hop); in ttm_bo_handle_move_mem()
179 if (bo->bdev->funcs->delete_mem_notify) in ttm_bo_cleanup_memtype_use()
180 bo->bdev->funcs->delete_mem_notify(bo); in ttm_bo_cleanup_memtype_use()
205 spin_lock(&bo->bdev->lru_lock); in ttm_bo_individualize_resv()
207 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_individualize_resv()
258 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_cleanup_refs()
269 spin_lock(&bo->bdev->lru_lock); in ttm_bo_cleanup_refs()
279 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_cleanup_refs()
288 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_cleanup_refs()
292 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_cleanup_refs()
323 struct ttm_device *bdev = bo->bdev; in ttm_bo_release() local
340 if (bo->bdev->funcs->release_notify) in ttm_bo_release()
341 bo->bdev->funcs->release_notify(bo); in ttm_bo_release()
343 drm_vma_offset_remove(bdev->vma_manager, &bo->base.vma_node); in ttm_bo_release()
344 ttm_mem_io_free(bdev, bo->resource); in ttm_bo_release()
354 spin_lock(&bo->bdev->lru_lock); in ttm_bo_release()
370 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_release()
373 queue_work(bdev->wq, &bo->delayed_delete); in ttm_bo_release()
426 struct ttm_device *bdev = bo->bdev; in ttm_bo_evict() local
438 bdev->funcs->evict_flags(bo, &placement); in ttm_bo_evict()
491 struct ttm_device *bdev = bo->bdev; in ttm_bo_eviction_valuable() local
500 return ttm_resource_intersects(bdev, res, place, bo->base.size); in ttm_bo_eviction_valuable()
543 !bo->bdev->funcs->eviction_valuable(bo, place))) { in ttm_bo_evict_swapout_allowable()
589 int ttm_mem_evict_first(struct ttm_device *bdev, in ttm_mem_evict_first() argument
601 spin_lock(&bdev->lru_lock); in ttm_mem_evict_first()
624 spin_unlock(&bdev->lru_lock); in ttm_mem_evict_first()
638 spin_unlock(&bdev->lru_lock); in ttm_mem_evict_first()
661 spin_lock(&bo->bdev->lru_lock); in ttm_bo_pin()
665 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_pin()
682 spin_lock(&bo->bdev->lru_lock); in ttm_bo_unpin()
686 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_unpin()
731 struct ttm_device *bdev = bo->bdev; in ttm_bo_mem_force_space() local
736 man = ttm_manager_type(bdev, place->mem_type); in ttm_bo_mem_force_space()
744 ret = ttm_mem_evict_first(bdev, man, place, ctx, in ttm_bo_mem_force_space()
776 struct ttm_device *bdev = bo->bdev; in ttm_bo_mem_space() local
788 man = ttm_manager_type(bdev, place->mem_type); in ttm_bo_mem_space()
814 man = ttm_manager_type(bdev, place->mem_type); in ttm_bo_mem_space()
964 int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo, in ttm_bo_init_reserved() argument
973 bo->bdev = bdev; in ttm_bo_init_reserved()
991 ret = drm_vma_offset_add(bdev->vma_manager, &bo->base.vma_node, in ttm_bo_init_reserved()
1057 int ttm_bo_init_validate(struct ttm_device *bdev, struct ttm_buffer_object *bo, in ttm_bo_init_validate() argument
1066 ret = ttm_bo_init_reserved(bdev, bo, type, placement, alignment, &ctx, in ttm_bo_init_validate()
1089 struct ttm_device *bdev = bo->bdev; in ttm_bo_unmap_virtual() local
1091 drm_vma_node_unmap(&bo->base.vma_node, bdev->dev_mapping); in ttm_bo_unmap_virtual()
1092 ttm_mem_io_free(bdev, bo->resource); in ttm_bo_unmap_virtual()
1162 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_swapout()
1198 if (bo->bdev->funcs->swap_notify) in ttm_bo_swapout()
1199 bo->bdev->funcs->swap_notify(bo); in ttm_bo_swapout()
1202 ret = ttm_tt_swapout(bo->bdev, bo->ttm, gfp_flags); in ttm_bo_swapout()
1220 ttm_tt_unpopulate(bo->bdev, bo->ttm); in ttm_bo_tt_destroy()
1221 ttm_tt_destroy(bo->bdev, bo->ttm); in ttm_bo_tt_destroy()