Lines Matching defs:tt
382 * @tt: The struct ttm_tt holding the page pointers.
392 static void ttm_pool_free_range(struct ttm_pool *pool, struct ttm_tt *tt,
396 struct page **pages = &tt->pages[start_page];
405 if (tt->dma_address)
406 ttm_pool_unmap(pool, tt->dma_address[i], nr);
420 * @tt: ttm_tt object to fill
428 int ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
431 pgoff_t num_pages = tt->num_pages;
432 dma_addr_t *dma_addr = tt->dma_address;
433 struct page **caching = tt->pages;
434 struct page **pages = tt->pages;
442 WARN_ON(!num_pages || ttm_tt_is_populated(tt));
445 if (tt->page_flags & TTM_TT_FLAG_ZERO_ALLOC)
461 page_caching = tt->caching;
462 pt = ttm_pool_select_type(pool, tt->caching, order);
466 tt->caching);
493 tt->caching);
516 r = ttm_pool_apply_caching(caching, pages, tt->caching);
526 num_pages = tt->num_pages - num_pages;
527 caching_divide = caching - tt->pages;
528 ttm_pool_free_range(pool, tt, tt->caching, 0, caching_divide);
529 ttm_pool_free_range(pool, tt, ttm_cached, caching_divide, num_pages);
539 * @tt: ttm_tt object to unpopulate
543 void ttm_pool_free(struct ttm_pool *pool, struct ttm_tt *tt)
545 ttm_pool_free_range(pool, tt, tt->caching, 0, tt->num_pages);