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()
249 struct ttm_device *bdev = bo->bdev; in ttm_bo_release() local
266 if (bo->bdev->funcs->release_notify) in ttm_bo_release()
267 bo->bdev->funcs->release_notify(bo); in ttm_bo_release()
269 drm_vma_offset_remove(bdev->vma_manager, &bo->base.vma_node); in ttm_bo_release()
270 ttm_mem_io_free(bdev, bo->resource); in ttm_bo_release()
281 spin_lock(&bo->bdev->lru_lock); in ttm_bo_release()
297 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_release()
306 queue_work_node(bdev->pool.nid, bdev->wq, &bo->delayed_delete); in ttm_bo_release()
358 struct ttm_device *bdev = bo->bdev; in ttm_bo_evict() local
369 bdev->funcs->evict_flags(bo, &placement); in ttm_bo_evict()
422 struct ttm_device *bdev = bo->bdev; in ttm_bo_eviction_valuable() local
431 return ttm_resource_intersects(bdev, res, place, bo->base.size); in ttm_bo_eviction_valuable()
443 int ttm_bo_evict_first(struct ttm_device *bdev, struct ttm_resource_manager *man, in ttm_bo_evict_first() argument
452 spin_lock(&bdev->lru_lock); in ttm_bo_evict_first()
463 spin_unlock(&bdev->lru_lock); in ttm_bo_evict_first()
484 spin_unlock(&bdev->lru_lock); in ttm_bo_evict_first()
510 if (bo->pin_count || !bo->bdev->funcs->eviction_valuable(bo, evict_walk->place)) in ttm_bo_evict_cb()
542 static int ttm_bo_evict_alloc(struct ttm_device *bdev, in ttm_bo_evict_alloc() argument
563 lret = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man, 1); in ttm_bo_evict_alloc()
573 lret = ttm_lru_walk_for_evict(&evict_walk.walk, bdev, man, 1); in ttm_bo_evict_alloc()
594 spin_lock(&bo->bdev->lru_lock); in ttm_bo_pin()
598 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_pin()
615 spin_lock(&bo->bdev->lru_lock); in ttm_bo_unpin()
619 spin_unlock(&bo->bdev->lru_lock); in ttm_bo_unpin()
679 struct ttm_device *bdev = bo->bdev; in ttm_bo_alloc_resource() local
693 man = ttm_manager_type(bdev, place->mem_type); in ttm_bo_alloc_resource()
709 ret = ttm_bo_evict_alloc(bdev, man, place, bo, ctx, in ttm_bo_alloc_resource()
885 int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo, in ttm_bo_init_reserved() argument
894 bo->bdev = bdev; in ttm_bo_init_reserved()
912 ret = drm_vma_offset_add(bdev->vma_manager, &bo->base.vma_node, in ttm_bo_init_reserved()
978 int ttm_bo_init_validate(struct ttm_device *bdev, struct ttm_buffer_object *bo, in ttm_bo_init_validate() argument
987 ret = ttm_bo_init_reserved(bdev, bo, type, placement, alignment, &ctx, in ttm_bo_init_validate()
1010 struct ttm_device *bdev = bo->bdev; in ttm_bo_unmap_virtual() local
1012 drm_vma_node_unmap(&bo->base.vma_node, bdev->dev_mapping); in ttm_bo_unmap_virtual()
1013 ttm_mem_io_free(bdev, bo->resource); in ttm_bo_unmap_virtual()
1074 if (bo->pin_count || !bo->bdev->funcs->eviction_valuable(bo, &place)) { in ttm_bo_swapout_cb()
1128 if (bo->bdev->funcs->swap_notify) in ttm_bo_swapout_cb()
1129 bo->bdev->funcs->swap_notify(bo); in ttm_bo_swapout_cb()
1132 ret = ttm_tt_swapout(bo->bdev, bo->ttm, swapout_walk->gfp_flags); in ttm_bo_swapout_cb()
1158 s64 ttm_bo_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx, in ttm_bo_swapout() argument
1171 return ttm_lru_walk_for_evict(&swapout_walk.walk, bdev, man, target); in ttm_bo_swapout()
1179 ttm_tt_unpopulate(bo->bdev, bo->ttm); in ttm_bo_tt_destroy()
1180 ttm_tt_destroy(bo->bdev, bo->ttm); in ttm_bo_tt_destroy()