Lines Matching refs:ttm
150 struct ttm_tt *ttm = bo->ttm; in ttm_bo_move_memcpy() local
165 if (ttm && ((ttm->page_flags & TTM_TT_FLAG_SWAPPED) || in ttm_bo_move_memcpy()
167 ret = ttm_tt_populate(bdev, ttm, ctx); in ttm_bo_move_memcpy()
174 dst_iter = ttm_kmap_iter_tt_init(&_dst_iter.tt, bo->ttm); in ttm_bo_move_memcpy()
180 src_iter = ttm_kmap_iter_tt_init(&_src_iter.tt, bo->ttm); in ttm_bo_move_memcpy()
186 clear = src_iter->ops->maps_tt && (!ttm || !ttm_tt_is_populated(ttm)); in ttm_bo_move_memcpy()
187 if (!(clear && ttm && !(ttm->page_flags & TTM_TT_FLAG_ZERO_ALLOC))) in ttm_bo_move_memcpy()
300 caching = bo->ttm->caching; in ttm_io_prot()
301 if (bo->ttm->page_flags & TTM_TT_FLAG_DECRYPTED) in ttm_io_prot()
356 struct ttm_tt *ttm = bo->ttm; in ttm_bo_kmap_ttm() local
362 BUG_ON(!ttm); in ttm_bo_kmap_ttm()
364 ret = ttm_tt_populate(bo->bdev, ttm, &ctx); in ttm_bo_kmap_ttm()
368 if (num_pages == 1 && ttm->caching == ttm_cached && in ttm_bo_kmap_ttm()
369 !(man->use_tt && (ttm->page_flags & TTM_TT_FLAG_DECRYPTED))) { in ttm_bo_kmap_ttm()
376 map->page = ttm->pages[start_page]; in ttm_bo_kmap_ttm()
385 map->virtual = vmap(ttm->pages + start_page, num_pages, in ttm_bo_kmap_ttm()
528 struct ttm_tt *ttm = bo->ttm; in ttm_bo_vmap() local
532 ret = ttm_tt_populate(bo->bdev, ttm, &ctx); in ttm_bo_vmap()
541 vaddr = vmap(ttm->pages, ttm->num_pages, 0, prot); in ttm_bo_vmap()
628 ghost_obj->ttm = NULL; in ttm_bo_move_to_ghost()
630 bo->ttm = NULL; in ttm_bo_move_to_ghost()
741 struct ttm_tt *ttm; in ttm_bo_pipeline_gutting() local
746 if (!bo->ttm) { in ttm_bo_pipeline_gutting()
752 ttm_tt_unpopulate(bo->bdev, bo->ttm); in ttm_bo_pipeline_gutting()
754 ttm_tt_mark_for_clear(bo->ttm); in ttm_bo_pipeline_gutting()
768 ttm = bo->ttm; in ttm_bo_pipeline_gutting()
769 bo->ttm = NULL; in ttm_bo_pipeline_gutting()
771 swap(bo->ttm, ttm); in ttm_bo_pipeline_gutting()
788 bo->ttm = ttm; in ttm_bo_pipeline_gutting()
792 ttm_tt_destroy(bo->bdev, ttm); in ttm_bo_pipeline_gutting()