summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/ttm/ttm_pool_internal.h
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>2025-10-20 12:54:07 +0100
committerTvrtko Ursulin <tursulin@ursulin.net>2025-10-31 09:01:08 +0000
commit0af5b6a8f8dd41fd801bb0f2af3295d69ba8b7fe (patch)
tree916000b46e1064b84a3c6d062e230126a93d353b /drivers/gpu/drm/ttm/ttm_pool_internal.h
parentd53adc244fbf965d7efeefb278ff8f2664bbe20e (diff)
drm/ttm: Replace multiple booleans with flags in pool init
Multiple consecutive boolean function arguments are usually not very readable. Replace the ones in ttm_pool_init() with flags with the additional benefit of soon being able to pass in more data with just this one code base churning cost. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net> Link: https://lore.kernel.org/r/20251020115411.36818-3-tvrtko.ursulin@igalia.com
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_pool_internal.h')
-rw-r--r--drivers/gpu/drm/ttm/ttm_pool_internal.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_pool_internal.h b/drivers/gpu/drm/ttm/ttm_pool_internal.h
index 3e50d30bd95a..96b7f21514fb 100644
--- a/drivers/gpu/drm/ttm/ttm_pool_internal.h
+++ b/drivers/gpu/drm/ttm/ttm_pool_internal.h
@@ -4,16 +4,17 @@
#ifndef _TTM_POOL_INTERNAL_H_
#define _TTM_POOL_INTERNAL_H_
+#include <drm/ttm/ttm_allocation.h>
#include <drm/ttm/ttm_pool.h>
static inline bool ttm_pool_uses_dma_alloc(struct ttm_pool *pool)
{
- return pool->use_dma_alloc;
+ return pool->alloc_flags & TTM_ALLOCATION_POOL_USE_DMA_ALLOC;
}
static inline bool ttm_pool_uses_dma32(struct ttm_pool *pool)
{
- return pool->use_dma32;
+ return pool->alloc_flags & TTM_ALLOCATION_POOL_USE_DMA32;
}
#endif