summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tests
diff options
context:
space:
mode:
authorMichał Winiarski <michal.winiarski@intel.com>2024-01-16 18:46:02 +0100
committerMaxime Ripard <mripard@kernel.org>2024-01-17 10:27:51 +0100
commit3eb791c891aa91603a5fbbfea940f8acf5f17d45 (patch)
tree37d25405ee45763c60e34ac636da758d7f263712 /drivers/gpu/drm/tests
parentdrm/ttm: allocate dummy_read_page without DMA32 on fail (diff)
downloadlinux-3eb791c891aa91603a5fbbfea940f8acf5f17d45.tar.xz
linux-3eb791c891aa91603a5fbbfea940f8acf5f17d45.zip
drm/tests: mm: Call drm_mm_print in drm_test_mm_debug
The original intent behind the test was to sanity check whether calling the debug iterator (drm_mm_print) doesn't cause any problems. Unfortunately - this call got accidentally removed during KUnit transition. Restore it. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240116174602.1019512-1-michal.winiarski@intel.com
Diffstat (limited to 'drivers/gpu/drm/tests')
-rw-r--r--drivers/gpu/drm/tests/drm_mm_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tests/drm_mm_test.c b/drivers/gpu/drm/tests/drm_mm_test.c
index 05d5e7af6d25..6803cb2eb8fd 100644
--- a/drivers/gpu/drm/tests/drm_mm_test.c
+++ b/drivers/gpu/drm/tests/drm_mm_test.c
@@ -247,13 +247,13 @@ out:
static void drm_test_mm_debug(struct kunit *test)
{
+ struct drm_printer p = drm_debug_printer(test->name);
struct drm_mm mm;
struct drm_mm_node nodes[2];
/* Create a small drm_mm with a couple of nodes and a few holes, and
* check that the debug iterator doesn't explode over a trivial drm_mm.
*/
-
drm_mm_init(&mm, 0, 4096);
memset(nodes, 0, sizeof(nodes));
@@ -268,6 +268,9 @@ static void drm_test_mm_debug(struct kunit *test)
KUNIT_ASSERT_FALSE_MSG(test, drm_mm_reserve_node(&mm, &nodes[1]),
"failed to reserve node[0] {start=%lld, size=%lld)\n",
nodes[0].start, nodes[0].size);
+
+ drm_mm_print(&mm, &p);
+ KUNIT_SUCCEED(test);
}
static struct drm_mm_node *set_node(struct drm_mm_node *node,