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
84 tt = ttm_tt_kunit_init(test, order, caching, size); in ttm_pool_pre_populated()
85 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_pre_populated()
92 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_pre_populated()
95 ttm_pool_free(pool, tt); in ttm_pool_pre_populated()
96 ttm_tt_fini(tt); in ttm_pool_pre_populated()
140 struct ttm_tt *tt; in ttm_pool_alloc_basic() local
148 tt = ttm_tt_kunit_init(test, 0, caching, size); in ttm_pool_alloc_basic()
149 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_alloc_basic()
161 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_alloc_basic()
163 KUNIT_ASSERT_EQ(test, tt->num_pages, expected_num_pages); in ttm_pool_alloc_basic()
165 fst_page = tt->pages[0]; in ttm_pool_alloc_basic()
166 last_page = tt->pages[tt->num_pages - 1]; in ttm_pool_alloc_basic()
191 ttm_pool_free(pool, tt); in ttm_pool_alloc_basic()
192 ttm_tt_fini(tt); in ttm_pool_alloc_basic()
201 struct ttm_tt *tt; in ttm_pool_alloc_basic_dma_addr() local
210 tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL); in ttm_pool_alloc_basic_dma_addr()
211 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_alloc_basic_dma_addr()
216 err = ttm_sg_tt_init(tt, bo, 0, caching); in ttm_pool_alloc_basic_dma_addr()
224 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_alloc_basic_dma_addr()
226 KUNIT_ASSERT_EQ(test, tt->num_pages, expected_num_pages); in ttm_pool_alloc_basic_dma_addr()
228 dma1 = tt->dma_address[0]; in ttm_pool_alloc_basic_dma_addr()
229 dma2 = tt->dma_address[tt->num_pages - 1]; in ttm_pool_alloc_basic_dma_addr()
234 ttm_pool_free(pool, tt); in ttm_pool_alloc_basic_dma_addr()
235 ttm_tt_fini(tt); in ttm_pool_alloc_basic_dma_addr()
241 struct ttm_tt *tt; in ttm_pool_alloc_order_caching_match() local
254 tt = ttm_tt_kunit_init(test, 0, caching, size); in ttm_pool_alloc_order_caching_match()
255 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_alloc_order_caching_match()
257 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_alloc_order_caching_match()
262 ttm_pool_free(pool, tt); in ttm_pool_alloc_order_caching_match()
263 ttm_tt_fini(tt); in ttm_pool_alloc_order_caching_match()
269 struct ttm_tt *tt; in ttm_pool_alloc_caching_mismatch() local
283 tt = ttm_tt_kunit_init(test, 0, tt_caching, size); in ttm_pool_alloc_caching_mismatch()
284 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_alloc_caching_mismatch()
289 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_alloc_caching_mismatch()
292 ttm_pool_free(pool, tt); in ttm_pool_alloc_caching_mismatch()
293 ttm_tt_fini(tt); in ttm_pool_alloc_caching_mismatch()
303 struct ttm_tt *tt; in ttm_pool_alloc_order_mismatch() local
317 tt = ttm_tt_kunit_init(test, 0, caching, snd_size); in ttm_pool_alloc_order_mismatch()
318 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_alloc_order_mismatch()
323 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_alloc_order_mismatch()
326 ttm_pool_free(pool, tt); in ttm_pool_alloc_order_mismatch()
327 ttm_tt_fini(tt); in ttm_pool_alloc_order_mismatch()
339 struct ttm_tt *tt; in ttm_pool_free_dma_alloc() local
346 tt = ttm_tt_kunit_init(test, 0, caching, size); in ttm_pool_free_dma_alloc()
347 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_free_dma_alloc()
353 ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_free_dma_alloc()
358 ttm_pool_free(pool, tt); in ttm_pool_free_dma_alloc()
359 ttm_tt_fini(tt); in ttm_pool_free_dma_alloc()
370 struct ttm_tt *tt; in ttm_pool_free_no_dma_alloc() local
377 tt = ttm_tt_kunit_init(test, 0, caching, size); in ttm_pool_free_no_dma_alloc()
378 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_pool_free_no_dma_alloc()
384 ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_free_no_dma_alloc()
389 ttm_pool_free(pool, tt); in ttm_pool_free_no_dma_alloc()
390 ttm_tt_fini(tt); in ttm_pool_free_no_dma_alloc()