Lines Matching full:pool
79 struct ttm_pool *pool; in ttm_pool_pre_populated() local
86 pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL); in ttm_pool_pre_populated()
87 KUNIT_ASSERT_NOT_NULL(test, pool); in ttm_pool_pre_populated()
89 ttm_pool_init(pool, devs->dev, NUMA_NO_NODE, true, false); 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()
97 return pool; in ttm_pool_pre_populated()
140 struct ttm_pool *pool; in ttm_pool_alloc_basic() local
150 pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL); in ttm_pool_alloc_basic()
151 KUNIT_ASSERT_NOT_NULL(test, pool); in ttm_pool_alloc_basic()
153 ttm_pool_init(pool, devs->dev, NUMA_NO_NODE, params->use_dma_alloc, in ttm_pool_alloc_basic()
156 KUNIT_ASSERT_PTR_EQ(test, pool->dev, devs->dev); in ttm_pool_alloc_basic()
157 KUNIT_ASSERT_EQ(test, pool->nid, NUMA_NO_NODE); in ttm_pool_alloc_basic()
158 KUNIT_ASSERT_EQ(test, pool->use_dma_alloc, params->use_dma_alloc); in ttm_pool_alloc_basic()
160 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_alloc_basic()
190 ttm_pool_free(pool, tt); in ttm_pool_alloc_basic()
192 ttm_pool_fini(pool); in ttm_pool_alloc_basic()
201 struct ttm_pool *pool; in ttm_pool_alloc_basic_dma_addr() local
218 pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL); in ttm_pool_alloc_basic_dma_addr()
219 KUNIT_ASSERT_NOT_NULL(test, pool); in ttm_pool_alloc_basic_dma_addr()
221 ttm_pool_init(pool, devs->dev, NUMA_NO_NODE, true, false); in ttm_pool_alloc_basic_dma_addr()
223 err = ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_alloc_basic_dma_addr()
233 ttm_pool_free(pool, tt); in ttm_pool_alloc_basic_dma_addr()
235 ttm_pool_fini(pool); in ttm_pool_alloc_basic_dma_addr()
241 struct ttm_pool *pool; in ttm_pool_alloc_order_caching_match() local
248 pool = ttm_pool_pre_populated(test, size, caching); in ttm_pool_alloc_order_caching_match()
250 pt = &pool->caching[caching].orders[order]; 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()
263 ttm_pool_fini(pool); in ttm_pool_alloc_order_caching_match()
269 struct ttm_pool *pool; in ttm_pool_alloc_caching_mismatch() local
277 pool = ttm_pool_pre_populated(test, size, pool_caching); in ttm_pool_alloc_caching_mismatch()
279 pt_pool = &pool->caching[pool_caching].orders[order]; in ttm_pool_alloc_caching_mismatch()
280 pt_tt = &pool->caching[tt_caching].orders[order]; 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()
297 ttm_pool_fini(pool); in ttm_pool_alloc_caching_mismatch()
303 struct ttm_pool *pool; in ttm_pool_alloc_order_mismatch() local
311 pool = ttm_pool_pre_populated(test, fst_size, caching); in ttm_pool_alloc_order_mismatch()
313 pt_pool = &pool->caching[caching].orders[order]; in ttm_pool_alloc_order_mismatch()
314 pt_tt = &pool->caching[caching].orders[0]; 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()
331 ttm_pool_fini(pool); in ttm_pool_alloc_order_mismatch()
339 struct ttm_pool *pool; in ttm_pool_free_dma_alloc() local
348 pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL); in ttm_pool_free_dma_alloc()
349 KUNIT_ASSERT_NOT_NULL(test, pool); in ttm_pool_free_dma_alloc()
351 ttm_pool_init(pool, devs->dev, NUMA_NO_NODE, true, false); in ttm_pool_free_dma_alloc()
352 ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_free_dma_alloc()
354 pt = &pool->caching[caching].orders[order]; in ttm_pool_free_dma_alloc()
357 ttm_pool_free(pool, tt); in ttm_pool_free_dma_alloc()
362 ttm_pool_fini(pool); in ttm_pool_free_dma_alloc()
370 struct ttm_pool *pool; in ttm_pool_free_no_dma_alloc() local
379 pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL); in ttm_pool_free_no_dma_alloc()
380 KUNIT_ASSERT_NOT_NULL(test, pool); in ttm_pool_free_no_dma_alloc()
382 ttm_pool_init(pool, devs->dev, NUMA_NO_NODE, false, false); in ttm_pool_free_no_dma_alloc()
383 ttm_pool_alloc(pool, tt, &simple_ctx); in ttm_pool_free_no_dma_alloc()
385 pt = &pool->caching[caching].orders[order]; in ttm_pool_free_no_dma_alloc()
388 ttm_pool_free(pool, tt); in ttm_pool_free_no_dma_alloc()
393 ttm_pool_fini(pool); in ttm_pool_free_no_dma_alloc()
398 struct ttm_pool *pool; in ttm_pool_fini_basic() local
404 pool = ttm_pool_pre_populated(test, size, caching); in ttm_pool_fini_basic()
405 pt = &pool->caching[caching].orders[order]; in ttm_pool_fini_basic()
409 ttm_pool_fini(pool); in ttm_pool_fini_basic()