Lines Matching refs:tt

57 	struct ttm_tt *tt;  in ttm_tt_kunit_init()  local
64 tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL); in ttm_tt_kunit_init()
65 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_tt_kunit_init()
67 err = ttm_tt_init(tt, priv->mock_bo, page_flags, caching, 0); in ttm_tt_kunit_init()
70 return tt; in ttm_tt_kunit_init()
80 struct ttm_tt *tt; in ttm_pool_pre_populated() local
83 tt = ttm_tt_kunit_init(test, 0, caching, size); in ttm_pool_pre_populated()
84 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_pre_populated()
91 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_pre_populated()
94 ttm_pool_free(pool, tt); in ttm_pool_pre_populated()
95 ttm_tt_fini(tt); in ttm_pool_pre_populated()
139 struct ttm_tt *tt; in ttm_pool_alloc_basic() local
147 tt = ttm_tt_kunit_init(test, 0, caching, size); in ttm_pool_alloc_basic()
148 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_alloc_basic()
160 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_alloc_basic()
162 KUNIT_ASSERT_EQ(test, tt->num_pages, expected_num_pages); in ttm_pool_alloc_basic()
164 fst_page = tt->pages[0]; in ttm_pool_alloc_basic()
165 last_page = tt->pages[tt->num_pages - 1]; in ttm_pool_alloc_basic()
190 ttm_pool_free(pool, tt); in ttm_pool_alloc_basic()
191 ttm_tt_fini(tt); in ttm_pool_alloc_basic()
200 struct ttm_tt *tt; in ttm_pool_alloc_basic_dma_addr() local
209 tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL); in ttm_pool_alloc_basic_dma_addr()
210 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_alloc_basic_dma_addr()
215 err = ttm_sg_tt_init(tt, bo, 0, caching); in ttm_pool_alloc_basic_dma_addr()
223 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_alloc_basic_dma_addr()
225 KUNIT_ASSERT_EQ(test, tt->num_pages, expected_num_pages); in ttm_pool_alloc_basic_dma_addr()
227 dma1 = tt->dma_address[0]; in ttm_pool_alloc_basic_dma_addr()
228 dma2 = tt->dma_address[tt->num_pages - 1]; in ttm_pool_alloc_basic_dma_addr()
233 ttm_pool_free(pool, tt); in ttm_pool_alloc_basic_dma_addr()
234 ttm_tt_fini(tt); in ttm_pool_alloc_basic_dma_addr()
240 struct ttm_tt *tt; in ttm_pool_alloc_order_caching_match() local
253 tt = ttm_tt_kunit_init(test, 0, caching, size); in ttm_pool_alloc_order_caching_match()
254 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_alloc_order_caching_match()
256 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_alloc_order_caching_match()
261 ttm_pool_free(pool, tt); in ttm_pool_alloc_order_caching_match()
262 ttm_tt_fini(tt); in ttm_pool_alloc_order_caching_match()
268 struct ttm_tt *tt; in ttm_pool_alloc_caching_mismatch() local
282 tt = ttm_tt_kunit_init(test, 0, tt_caching, size); in ttm_pool_alloc_caching_mismatch()
283 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_alloc_caching_mismatch()
288 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_alloc_caching_mismatch()
291 ttm_pool_free(pool, tt); in ttm_pool_alloc_caching_mismatch()
292 ttm_tt_fini(tt); in ttm_pool_alloc_caching_mismatch()
302 struct ttm_tt *tt; in ttm_pool_alloc_order_mismatch() local
316 tt = ttm_tt_kunit_init(test, 0, caching, snd_size); in ttm_pool_alloc_order_mismatch()
317 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_alloc_order_mismatch()
322 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_alloc_order_mismatch()
325 ttm_pool_free(pool, tt); in ttm_pool_alloc_order_mismatch()
326 ttm_tt_fini(tt); in ttm_pool_alloc_order_mismatch()
338 struct ttm_tt *tt; in ttm_pool_free_dma_alloc() local
345 tt = ttm_tt_kunit_init(test, 0, caching, size); in ttm_pool_free_dma_alloc()
346 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_free_dma_alloc()
352 ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_free_dma_alloc()
357 ttm_pool_free(pool, tt); in ttm_pool_free_dma_alloc()
358 ttm_tt_fini(tt); in ttm_pool_free_dma_alloc()
369 struct ttm_tt *tt; in ttm_pool_free_no_dma_alloc() local
376 tt = ttm_tt_kunit_init(test, 0, caching, size); in ttm_pool_free_no_dma_alloc()
377 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_free_no_dma_alloc()
383 ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_free_no_dma_alloc()
388 ttm_pool_free(pool, tt); in ttm_pool_free_no_dma_alloc()
389 ttm_tt_fini(tt); in ttm_pool_free_no_dma_alloc()