drm/ttm/tests: Test simple BO creation and validation

Add tests for ttm_bo_init_reserved() and ttm_bo_validate() that use
sys manager. Define a simple move function in ttm_device_funcs. Expose
destroy callback of the buffer object to make testing of
ttm_bo_init_reserved() behaviour easier.

Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Somalapuram, Amaranath <asomalap@amd.com>
Tested-by: Somalapuram, Amaranath <asomalap@amd.com>
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ffba0d62eb98b2cbc61ae7ca90fee7dc0855719c.1718192625.git.karolina.stolarek@intel.com
This commit is contained in:
Karolina Stolarek
2024-06-12 14:02:59 +02:00
committed by Arunpravin Paneer Selvam
parent f7ed0a7e42
commit 8bd1ff5ddc
4 changed files with 228 additions and 1 deletions

View File

@@ -32,6 +32,7 @@ struct ttm_buffer_object *ttm_bo_kunit_init(struct kunit *test,
struct dma_resv *obj);
struct ttm_place *ttm_place_kunit_init(struct kunit *test,
uint32_t mem_type, uint32_t flags);
void dummy_ttm_bo_destroy(struct ttm_buffer_object *bo);
struct ttm_test_devices *ttm_test_devices_basic(struct kunit *test);
struct ttm_test_devices *ttm_test_devices_all(struct kunit *test);