Lines Matching refs:tt
373 * @tt: The struct ttm_tt holding the page pointers.
383 static void ttm_pool_free_range(struct ttm_pool *pool, struct ttm_tt *tt,
387 struct page **pages = &tt->pages[start_page];
396 if (tt->dma_address)
397 ttm_pool_unmap(pool, tt->dma_address[i], nr);
411 * @tt: ttm_tt object to fill
419 int ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
422 pgoff_t num_pages = tt->num_pages;
423 dma_addr_t *dma_addr = tt->dma_address;
424 struct page **caching = tt->pages;
425 struct page **pages = tt->pages;
433 WARN_ON(!num_pages || ttm_tt_is_populated(tt));
436 if (tt->page_flags & TTM_TT_FLAG_ZERO_ALLOC)
452 page_caching = tt->caching;
453 pt = ttm_pool_select_type(pool, tt->caching, order);
457 tt->caching);
484 tt->caching);
507 r = ttm_pool_apply_caching(caching, pages, tt->caching);
517 num_pages = tt->num_pages - num_pages;
518 caching_divide = caching - tt->pages;
519 ttm_pool_free_range(pool, tt, tt->caching, 0, caching_divide);
520 ttm_pool_free_range(pool, tt, ttm_cached, caching_divide, num_pages);
530 * @tt: ttm_tt object to unpopulate
534 void ttm_pool_free(struct ttm_pool *pool, struct ttm_tt *tt)
536 ttm_pool_free_range(pool, tt, tt->caching, 0, tt->num_pages);