xref: /linux/drivers/gpu/drm/ttm/ttm_pool_internal.h (revision 815e260a18a3af4dab59025ee99a7156c0e8b5e0)
1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
2 /* Copyright (c) 2025 Valve Corporation */
3 
4 #ifndef _TTM_POOL_INTERNAL_H_
5 #define _TTM_POOL_INTERNAL_H_
6 
7 #include <drm/ttm/ttm_allocation.h>
8 #include <drm/ttm/ttm_pool.h>
9 
10 static inline bool ttm_pool_uses_dma_alloc(struct ttm_pool *pool)
11 {
12 	return pool->alloc_flags & TTM_ALLOCATION_POOL_USE_DMA_ALLOC;
13 }
14 
15 static inline bool ttm_pool_uses_dma32(struct ttm_pool *pool)
16 {
17 	return pool->alloc_flags & TTM_ALLOCATION_POOL_USE_DMA32;
18 }
19 
20 static inline bool ttm_pool_beneficial_order(struct ttm_pool *pool)
21 {
22 	return pool->alloc_flags & 0xff;
23 }
24 
25 #endif
26