Commit 9fb01062 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Dave Airlie
Browse files

drm/ttm/tests: Remove checks from ttm_pool_free_no_dma_alloc



On !x86, the pool type is never initialised, and the pages are freed
back to the system.

The test broke on the list_lru rewrite, but I'm not sure how that it was
supposed to work previously. In the meantime CI is broken so reverting
for now.

Fixes: 444e2a19 ("ttm/pool: port to list_lru. (v2)")
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: default avatarMaarten Lankhorst <dev@lankhorst.se>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Link: https://patch.msgid.link/20260409142658.1511941-2-dev@lankhorst.se
parent 3b053cd7
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -368,7 +368,6 @@ static void ttm_pool_free_no_dma_alloc(struct kunit *test)
	struct ttm_test_devices *devs = priv->devs;
	struct ttm_tt *tt;
	struct ttm_pool *pool;
	struct ttm_pool_type *pt;
	enum ttm_caching caching = ttm_uncached;
	unsigned int order = 2;
	size_t size = (1 << order) * PAGE_SIZE;
@@ -382,14 +381,9 @@ static void ttm_pool_free_no_dma_alloc(struct kunit *test)
	ttm_pool_init(pool, devs->dev, NUMA_NO_NODE, 0);
	ttm_pool_alloc(pool, tt, &simple_ctx);

	pt = &pool->caching[caching].orders[order];
	KUNIT_ASSERT_TRUE(test, list_lru_count(&pt->pages) == 1);

	ttm_pool_free(pool, tt);
	ttm_tt_fini(tt);

	KUNIT_ASSERT_TRUE(test, list_lru_count(&pt->pages) == 1);

	ttm_pool_fini(pool);
}