mirror of
https://github.com/torvalds/linux.git
synced 2026-04-20 07:43:57 -04:00
drm/ttm/tests: Add tests for ttm_bo functions
Test reservation and release of TTM buffer objects. Add tests to check pin and unpin operations. Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com> Tested-by: Amaranath Somalapuram <Amaranath.Somalapuram@amd.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/fcd53970f55ae4be8c738e03f9fcf45366d20b47.1701257386.git.karolina.stolarek@intel.com Signed-off-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
committed by
Christian König
parent
e6f7c641fa
commit
995279d280
@@ -22,6 +22,10 @@ static void ttm_tt_simple_destroy(struct ttm_device *bdev, struct ttm_tt *ttm)
|
||||
kfree(ttm);
|
||||
}
|
||||
|
||||
static void dummy_ttm_bo_destroy(struct ttm_buffer_object *bo)
|
||||
{
|
||||
}
|
||||
|
||||
struct ttm_device_funcs ttm_dev_funcs = {
|
||||
.ttm_tt_create = ttm_tt_simple_create,
|
||||
.ttm_tt_destroy = ttm_tt_simple_destroy,
|
||||
@@ -61,6 +65,8 @@ struct ttm_buffer_object *ttm_bo_kunit_init(struct kunit *test,
|
||||
KUNIT_ASSERT_EQ(test, err, 0);
|
||||
|
||||
bo->bdev = devs->ttm_dev;
|
||||
bo->destroy = dummy_ttm_bo_destroy;
|
||||
|
||||
kref_init(&bo->kref);
|
||||
|
||||
return bo;
|
||||
|
||||
Reference in New Issue
Block a user