Dave Airlie
444e2a19d7
ttm/pool: port to list_lru. (v2)
...
This is an initial port of the TTM pools for
write combined and uncached pages to use the list_lru.
This makes the pool's more NUMA aware and avoids
needing separate NUMA pools (later commit enables this).
Cc: Christian Koenig <christian.koenig@amd.com >
Cc: Johannes Weiner <hannes@cmpxchg.org >
Cc: Dave Chinner <david@fromorbit.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2026-04-08 06:52:47 +10:00
Tvrtko Ursulin
77e19f8d32
drm/ttm: Replace multiple booleans with flags in device init
...
Multiple consecutive boolean function arguments are usually not very
readable.
Replace the ones in ttm_device_init() with flags with the additional
benefit of soon being able to pass in more data with just a one off
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: Danilo Krummrich <dakr@kernel.org >
Cc: Dave Airlie <airlied@redhat.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: Lyude Paul <lyude@redhat.com >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Sui Jingfeng <suijingfeng@loongson.cn >
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Zack Rusin <zack.rusin@broadcom.com >
Acked-by: Christian König <christian.koenig@amd.com >
Acked-by: Zack Rusin <zack.rusin@broadcom.com >
Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com > # For xe
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-4-tvrtko.ursulin@igalia.com
[tursulin: fixup checkpatch while applying]
2025-10-31 09:14:35 +00:00
Tvrtko Ursulin
0af5b6a8f8
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
2025-10-31 09:01:08 +00:00
Jeff Johnson
26149e6fe1
drm/ttm/tests: add missing MODULE_DESCRIPTION() macros
...
make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_device_test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_pool_test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_resource_test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_tt_test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_bo_test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_mock_manager.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.o
Add the missing invocations of the MODULE_DESCRIPTION() macro.
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com >
Acked-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240624-md-drivers-gpu-drm-ttm-tests-v2-1-76bb765e19c9@quicinc.com
Signed-off-by: Christian König <christian.koenig@amd.com >
2024-06-25 09:53:13 +02:00
Karolina Stolarek
be487a2989
drm/ttm/tests: Correct modules' licenses
...
The test files are GPL and MIT, so update the definitions accordingly.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/54cd7289db67ec396b67ef48dbb45521d56ec03c.1718192625.git.karolina.stolarek@intel.com
2024-06-24 16:01:25 +05:30
Kirill A. Shutemov
fd37721803
mm, treewide: introduce NR_PAGE_ORDERS
...
NR_PAGE_ORDERS defines the number of page orders supported by the page
allocator, ranging from 0 to MAX_ORDER, MAX_ORDER + 1 in total.
NR_PAGE_ORDERS assists in defining arrays of page orders and allows for
more natural iteration over them.
[kirill.shutemov@linux.intel.com: fixup for kerneldoc warning]
Link: https://lkml.kernel.org/r/20240101111512.7empzyifq7kxtzk3@box
Link: https://lkml.kernel.org/r/20231228144704.14033-1-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com >
Reviewed-by: Zi Yan <ziy@nvidia.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
2024-01-08 15:27:15 -08:00
Karolina Stolarek
24ac009ec3
drm/ttm/tests: Add tests for ttm_device
...
Test initialization and cleanup of the ttm_device struct, including
some error paths. Verify the creation of page pools if use_dma_alloc
param is true.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/2abb0e53e7d56b0a24d0255f9075e2123b991278.1691487006.git.karolina.stolarek@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com >
2023-08-09 18:04:23 +02:00
Karolina Stolarek
e3912d09bf
drm/ttm: Introduce KUnit test
...
Add the initial version of unit tests for ttm_device struct, together
with helper functions.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/3d1cc45c8a0cf536b92a850e0025f6c555de0169.1691487006.git.karolina.stolarek@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com >
2023-08-09 18:04:22 +02:00