diff options
author | Karolina Stolarek <karolina.stolarek@intel.com> | 2023-11-29 13:02:28 +0100 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2023-12-14 11:12:29 +0100 |
commit | e6f7c641fae339cd5df28186677de1741e0c40c7 (patch) | |
tree | 01a58ab9cd93998a9e6674e1393d4334615657f1 /drivers/gpu/drm/ttm/ttm_tt.c | |
parent | 9afc1e0aa4851ef48482b03f6304047cf9b550ca (diff) | |
download | lwn-e6f7c641fae339cd5df28186677de1741e0c40c7.tar.gz lwn-e6f7c641fae339cd5df28186677de1741e0c40c7.zip |
drm/ttm/tests: Add tests for ttm_tt
Test initialization, creation and destruction of ttm_tt instances.
Export ttm_tt_destroy and ttm_tt_create symbols for testing purposes.
Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Tested-by: Amaranath Somalapuram <Amaranath.Somalapuram@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/4459cb89c666bfa377753ae18d0c8917131638e8.1701257386.git.karolina.stolarek@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_tt.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_tt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index e0a77671edd6..d978dc539a9b 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c @@ -36,6 +36,7 @@ #include <linux/file.h> #include <linux/module.h> #include <drm/drm_cache.h> +#include <drm/drm_util.h> #include <drm/ttm/ttm_bo.h> #include <drm/ttm/ttm_tt.h> @@ -91,6 +92,7 @@ int ttm_tt_create(struct ttm_buffer_object *bo, bool zero_alloc) return 0; } +EXPORT_SYMBOL_FOR_TESTS_ONLY(ttm_tt_create); /* * Allocates storage for pointers to the pages that back the ttm. @@ -129,6 +131,7 @@ void ttm_tt_destroy(struct ttm_device *bdev, struct ttm_tt *ttm) { bdev->funcs->ttm_tt_destroy(bdev, ttm); } +EXPORT_SYMBOL_FOR_TESTS_ONLY(ttm_tt_destroy); static void ttm_tt_init_fields(struct ttm_tt *ttm, struct ttm_buffer_object *bo, |