ttm_pool_internal.h 600 B

12345678910111213141516171819202122232425
  1. /* SPDX-License-Identifier: GPL-2.0 OR MIT */
  2. /* Copyright (c) 2025 Valve Corporation */
  3. #ifndef _TTM_POOL_INTERNAL_H_
  4. #define _TTM_POOL_INTERNAL_H_
  5. #include <drm/ttm/ttm_allocation.h>
  6. #include <drm/ttm/ttm_pool.h>
  7. static inline bool ttm_pool_uses_dma_alloc(struct ttm_pool *pool)
  8. {
  9. return pool->alloc_flags & TTM_ALLOCATION_POOL_USE_DMA_ALLOC;
  10. }
  11. static inline bool ttm_pool_uses_dma32(struct ttm_pool *pool)
  12. {
  13. return pool->alloc_flags & TTM_ALLOCATION_POOL_USE_DMA32;
  14. }
  15. static inline unsigned int ttm_pool_beneficial_order(struct ttm_pool *pool)
  16. {
  17. return pool->alloc_flags & 0xff;
  18. }
  19. #endif