drm/ttm/tests: Add tests for ttm_pool
authorKarolina Stolarek <karolina.stolarek@intel.com>
Tue, 8 Aug 2023 09:51:14 +0000 (11:51 +0200)
committerChristian König <christian.koenig@amd.com>
Wed, 9 Aug 2023 16:04:23 +0000 (18:04 +0200)
commit204042049a941d2a9a7d49bdcda768578b5f88ec
treee9e5a22eb8b21a393178749aceb1bca2d5e82c72
parent24ac009ec39751f40dcd84a222ad088e9529b811
drm/ttm/tests: Add tests for ttm_pool

Add KUnit tests that exercise page allocation using page pools
and freeing pages, either by returning them to the pool or
freeing them. Add a basic test for ttm_pool cleanup. Introduce
helpers to create a dummy ttm_buffer_object.

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/427ea373357d0b6cb376c9d7ebc33c930bf1d28a.1691487006.git.karolina.stolarek@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/ttm/tests/Makefile
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h
drivers/gpu/drm/ttm/tests/ttm_pool_test.c [new file with mode: 0644]