* Switching TTM over to GEM refcounts v2
@ 2025-07-02 11:00 Christian König
2025-07-02 11:00 ` [PATCH 1/2] drm/ttm: rename ttm_bo_put to _fini Christian König
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Christian König @ 2025-07-02 11:00 UTC (permalink / raw)
To: thomas.hellstrom, matthew.brost, intel-xe, dri-devel, amd-gfx
Hi everyone,
v2 of this patch set. I've either pushed or removed the other
patches from v1, so only two remain.
Pretty straight forward conversation and shouldn't result in any visible
technical difference.
Please review and/or comment.
Regards,
Christian.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/2] drm/ttm: rename ttm_bo_put to _fini
2025-07-02 11:00 Switching TTM over to GEM refcounts v2 Christian König
@ 2025-07-02 11:00 ` Christian König
2025-07-02 22:01 ` Matthew Brost
2025-07-02 11:00 ` [PATCH 2/2] drm/ttm: replace TTMs refcount with the DRM refcount v2 Christian König
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Christian König @ 2025-07-02 11:00 UTC (permalink / raw)
To: thomas.hellstrom, matthew.brost, intel-xe, dri-devel, amd-gfx
Give TTM BOs a separate cleanup function.
The next step in removing the TTM BO reference counting and replacing it
with the GEM object reference counting.
Signed-off-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +-
drivers/gpu/drm/drm_gem_vram_helper.c | 6 +-
drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 4 +-
drivers/gpu/drm/loongson/lsdc_gem.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +-
drivers/gpu/drm/qxl/qxl_gem.c | 2 +-
drivers/gpu/drm/radeon/radeon_gem.c | 2 +-
drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 12 ++--
.../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 64 +++++++++----------
drivers/gpu/drm/ttm/ttm_bo.c | 21 +++---
drivers/gpu/drm/ttm/ttm_bo_internal.h | 2 +
drivers/gpu/drm/vmwgfx/vmwgfx_gem.c | 2 +-
drivers/gpu/drm/xe/xe_bo.c | 2 +-
include/drm/ttm/ttm_bo.h | 2 +-
14 files changed, 64 insertions(+), 61 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index e5e33a68d935..9a2a8496eea3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -198,7 +198,7 @@ static void amdgpu_gem_object_free(struct drm_gem_object *gobj)
struct amdgpu_bo *aobj = gem_to_amdgpu_bo(gobj);
amdgpu_hmm_unregister(aobj);
- ttm_bo_put(&aobj->tbo);
+ ttm_bo_fini(&aobj->tbo);
}
int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
index b04cde4a60e7..90760d0ca071 100644
--- a/drivers/gpu/drm/drm_gem_vram_helper.c
+++ b/drivers/gpu/drm/drm_gem_vram_helper.c
@@ -107,7 +107,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
static void drm_gem_vram_cleanup(struct drm_gem_vram_object *gbo)
{
- /* We got here via ttm_bo_put(), which means that the
+ /* We got here via ttm_bo_fini(), which means that the
* TTM buffer object in 'bo' has already been cleaned
* up; only release the GEM object.
*/
@@ -234,11 +234,11 @@ EXPORT_SYMBOL(drm_gem_vram_create);
* drm_gem_vram_put() - Releases a reference to a VRAM-backed GEM object
* @gbo: the GEM VRAM object
*
- * See ttm_bo_put() for more information.
+ * See ttm_bo_fini() for more information.
*/
void drm_gem_vram_put(struct drm_gem_vram_object *gbo)
{
- ttm_bo_put(&gbo->bo);
+ ttm_bo_fini(&gbo->bo);
}
EXPORT_SYMBOL(drm_gem_vram_put);
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index 1f4814968868..57bb111d65da 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -1029,7 +1029,7 @@ static void i915_ttm_delayed_free(struct drm_i915_gem_object *obj)
{
GEM_BUG_ON(!obj->ttm.created);
- ttm_bo_put(i915_gem_to_ttm(obj));
+ ttm_bo_fini(i915_gem_to_ttm(obj));
}
static vm_fault_t vm_fault_ttm(struct vm_fault *vmf)
@@ -1325,7 +1325,7 @@ int __i915_gem_ttm_object_init(struct intel_memory_region *mem,
* If this function fails, it will call the destructor, but
* our caller still owns the object. So no freeing in the
* destructor until obj->ttm.created is true.
- * Similarly, in delayed_destroy, we can't call ttm_bo_put()
+ * Similarly, in delayed_destroy, we can't call ttm_bo_fini()
* until successful initialization.
*/
ret = ttm_bo_init_reserved(&i915->bdev, i915_gem_to_ttm(obj), bo_type,
diff --git a/drivers/gpu/drm/loongson/lsdc_gem.c b/drivers/gpu/drm/loongson/lsdc_gem.c
index a720d8f53209..22d0eced95da 100644
--- a/drivers/gpu/drm/loongson/lsdc_gem.c
+++ b/drivers/gpu/drm/loongson/lsdc_gem.c
@@ -57,7 +57,7 @@ static void lsdc_gem_object_free(struct drm_gem_object *obj)
struct ttm_buffer_object *tbo = to_ttm_bo(obj);
if (tbo)
- ttm_bo_put(tbo);
+ ttm_bo_fini(tbo);
}
static int lsdc_gem_object_vmap(struct drm_gem_object *obj, struct iosys_map *map)
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 690e10fbf0bd..395d92ab6271 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -87,7 +87,7 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
return;
}
- ttm_bo_put(&nvbo->bo);
+ ttm_bo_fini(&nvbo->bo);
pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev);
diff --git a/drivers/gpu/drm/qxl/qxl_gem.c b/drivers/gpu/drm/qxl/qxl_gem.c
index fc5e3763c359..d26043424e95 100644
--- a/drivers/gpu/drm/qxl/qxl_gem.c
+++ b/drivers/gpu/drm/qxl/qxl_gem.c
@@ -39,7 +39,7 @@ void qxl_gem_object_free(struct drm_gem_object *gobj)
qxl_surface_evict(qdev, qobj, false);
tbo = &qobj->tbo;
- ttm_bo_put(tbo);
+ ttm_bo_fini(tbo);
}
int qxl_gem_object_create(struct qxl_device *qdev, int size,
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
index f86773f3db20..18ca1bcfd2f9 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -86,7 +86,7 @@ static void radeon_gem_object_free(struct drm_gem_object *gobj)
if (robj) {
radeon_mn_unregister(robj);
- ttm_bo_put(&robj->tbo);
+ ttm_bo_fini(&robj->tbo);
}
}
diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
index 6c77550c51af..5426b435f702 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
@@ -379,7 +379,7 @@ static void ttm_bo_unreserve_bulk(struct kunit *test)
dma_resv_fini(resv);
}
-static void ttm_bo_put_basic(struct kunit *test)
+static void ttm_bo_fini_basic(struct kunit *test)
{
struct ttm_test_devices *priv = test->priv;
struct ttm_buffer_object *bo;
@@ -410,7 +410,7 @@ static void ttm_bo_put_basic(struct kunit *test)
dma_resv_unlock(bo->base.resv);
KUNIT_EXPECT_EQ(test, err, 0);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
}
static const char *mock_name(struct dma_fence *f)
@@ -423,7 +423,7 @@ static const struct dma_fence_ops mock_fence_ops = {
.get_timeline_name = mock_name,
};
-static void ttm_bo_put_shared_resv(struct kunit *test)
+static void ttm_bo_fini_shared_resv(struct kunit *test)
{
struct ttm_test_devices *priv = test->priv;
struct ttm_buffer_object *bo;
@@ -463,7 +463,7 @@ static void ttm_bo_put_shared_resv(struct kunit *test)
bo->type = ttm_bo_type_device;
bo->base.resv = external_resv;
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
}
static void ttm_bo_pin_basic(struct kunit *test)
@@ -616,8 +616,8 @@ static struct kunit_case ttm_bo_test_cases[] = {
KUNIT_CASE(ttm_bo_unreserve_basic),
KUNIT_CASE(ttm_bo_unreserve_pinned),
KUNIT_CASE(ttm_bo_unreserve_bulk),
- KUNIT_CASE(ttm_bo_put_basic),
- KUNIT_CASE(ttm_bo_put_shared_resv),
+ KUNIT_CASE(ttm_bo_fini_basic),
+ KUNIT_CASE(ttm_bo_fini_shared_resv),
KUNIT_CASE(ttm_bo_pin_basic),
KUNIT_CASE(ttm_bo_pin_unpin_resource),
KUNIT_CASE(ttm_bo_multiple_pin_one_unpin),
diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
index 3148f5d3dbd6..4553c4e0e0f1 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
@@ -144,7 +144,7 @@ static void ttm_bo_init_reserved_sys_man(struct kunit *test)
drm_mm_node_allocated(&bo->base.vma_node.vm_node));
ttm_resource_free(bo, &bo->resource);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
}
static void ttm_bo_init_reserved_mock_man(struct kunit *test)
@@ -186,7 +186,7 @@ static void ttm_bo_init_reserved_mock_man(struct kunit *test)
drm_mm_node_allocated(&bo->base.vma_node.vm_node));
ttm_resource_free(bo, &bo->resource);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
ttm_mock_manager_fini(priv->ttm_dev, mem_type);
}
@@ -221,7 +221,7 @@ static void ttm_bo_init_reserved_resv(struct kunit *test)
KUNIT_EXPECT_PTR_EQ(test, bo->base.resv, &resv);
ttm_resource_free(bo, &bo->resource);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
}
static void ttm_bo_validate_basic(struct kunit *test)
@@ -265,7 +265,7 @@ static void ttm_bo_validate_basic(struct kunit *test)
KUNIT_EXPECT_EQ(test, bo->resource->placement,
DRM_BUDDY_TOPDOWN_ALLOCATION);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
ttm_mock_manager_fini(priv->ttm_dev, snd_mem);
}
@@ -292,7 +292,7 @@ static void ttm_bo_validate_invalid_placement(struct kunit *test)
KUNIT_EXPECT_EQ(test, err, -ENOMEM);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
}
static void ttm_bo_validate_failed_alloc(struct kunit *test)
@@ -321,7 +321,7 @@ static void ttm_bo_validate_failed_alloc(struct kunit *test)
KUNIT_EXPECT_EQ(test, err, -ENOMEM);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
ttm_bad_manager_fini(priv->ttm_dev, mem_type);
}
@@ -353,7 +353,7 @@ static void ttm_bo_validate_pinned(struct kunit *test)
ttm_bo_unpin(bo);
dma_resv_unlock(bo->base.resv);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
}
static const struct ttm_bo_validate_test_case ttm_mem_type_cases[] = {
@@ -403,7 +403,7 @@ static void ttm_bo_validate_same_placement(struct kunit *test)
KUNIT_EXPECT_EQ(test, err, 0);
KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, 0);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
if (params->mem_type != TTM_PL_SYSTEM)
ttm_mock_manager_fini(priv->ttm_dev, params->mem_type);
@@ -452,7 +452,7 @@ static void ttm_bo_validate_busy_placement(struct kunit *test)
KUNIT_EXPECT_EQ(test, bo->resource->mem_type, snd_mem);
KUNIT_ASSERT_TRUE(test, list_is_singular(&man->lru[bo->priority]));
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
ttm_bad_manager_fini(priv->ttm_dev, fst_mem);
ttm_mock_manager_fini(priv->ttm_dev, snd_mem);
}
@@ -495,7 +495,7 @@ static void ttm_bo_validate_multihop(struct kunit *test)
KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, size * 2);
KUNIT_EXPECT_EQ(test, bo->resource->mem_type, final_mem);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
ttm_mock_manager_fini(priv->ttm_dev, fst_mem);
ttm_mock_manager_fini(priv->ttm_dev, tmp_mem);
@@ -566,7 +566,7 @@ static void ttm_bo_validate_no_placement_signaled(struct kunit *test)
KUNIT_ASSERT_TRUE(test, flags & TTM_TT_FLAG_ZERO_ALLOC);
}
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
}
static int threaded_dma_resv_signal(void *arg)
@@ -634,7 +634,7 @@ static void ttm_bo_validate_no_placement_not_signaled(struct kunit *test)
/* Make sure we have an idle object at this point */
dma_resv_wait_timeout(bo->base.resv, usage, false, MAX_SCHEDULE_TIMEOUT);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
}
static void ttm_bo_validate_move_fence_signaled(struct kunit *test)
@@ -667,7 +667,7 @@ static void ttm_bo_validate_move_fence_signaled(struct kunit *test)
KUNIT_EXPECT_EQ(test, bo->resource->mem_type, mem_type);
KUNIT_EXPECT_EQ(test, ctx.bytes_moved, size);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
dma_fence_put(man->move);
}
@@ -752,7 +752,7 @@ static void ttm_bo_validate_move_fence_not_signaled(struct kunit *test)
else
KUNIT_EXPECT_EQ(test, bo->resource->mem_type, fst_mem);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
ttm_mock_manager_fini(priv->ttm_dev, fst_mem);
ttm_mock_manager_fini(priv->ttm_dev, snd_mem);
}
@@ -801,8 +801,8 @@ static void ttm_bo_validate_swapout(struct kunit *test)
KUNIT_EXPECT_EQ(test, bo_small->resource->mem_type, TTM_PL_SYSTEM);
KUNIT_EXPECT_TRUE(test, bo_small->ttm->page_flags & TTM_TT_FLAG_SWAPPED);
- ttm_bo_put(bo_big);
- ttm_bo_put(bo_small);
+ ttm_bo_fini(bo_big);
+ ttm_bo_fini(bo_small);
ttm_mock_manager_fini(priv->ttm_dev, mem_type);
}
@@ -856,8 +856,8 @@ static void ttm_bo_validate_happy_evict(struct kunit *test)
KUNIT_EXPECT_EQ(test, bos[1].resource->mem_type, mem_type);
for (i = 0; i < bo_no; i++)
- ttm_bo_put(&bos[i]);
- ttm_bo_put(bo_val);
+ ttm_bo_fini(&bos[i]);
+ ttm_bo_fini(bo_val);
ttm_mock_manager_fini(priv->ttm_dev, mem_type);
ttm_mock_manager_fini(priv->ttm_dev, mem_multihop);
@@ -901,12 +901,12 @@ static void ttm_bo_validate_all_pinned_evict(struct kunit *test)
KUNIT_EXPECT_EQ(test, err, -ENOMEM);
- ttm_bo_put(bo_small);
+ ttm_bo_fini(bo_small);
ttm_bo_reserve(bo_big, false, false, NULL);
ttm_bo_unpin(bo_big);
dma_resv_unlock(bo_big->base.resv);
- ttm_bo_put(bo_big);
+ ttm_bo_fini(bo_big);
ttm_mock_manager_fini(priv->ttm_dev, mem_type);
ttm_mock_manager_fini(priv->ttm_dev, mem_multihop);
@@ -965,13 +965,13 @@ static void ttm_bo_validate_allowed_only_evict(struct kunit *test)
KUNIT_EXPECT_EQ(test, bo_evictable->resource->mem_type, mem_type_evict);
KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, size * 2 + BO_SIZE);
- ttm_bo_put(bo);
- ttm_bo_put(bo_evictable);
+ ttm_bo_fini(bo);
+ ttm_bo_fini(bo_evictable);
ttm_bo_reserve(bo_pinned, false, false, NULL);
ttm_bo_unpin(bo_pinned);
dma_resv_unlock(bo_pinned->base.resv);
- ttm_bo_put(bo_pinned);
+ ttm_bo_fini(bo_pinned);
ttm_mock_manager_fini(priv->ttm_dev, mem_type);
ttm_mock_manager_fini(priv->ttm_dev, mem_multihop);
@@ -1022,8 +1022,8 @@ static void ttm_bo_validate_deleted_evict(struct kunit *test)
KUNIT_EXPECT_NULL(test, bo_big->ttm);
KUNIT_EXPECT_NULL(test, bo_big->resource);
- ttm_bo_put(bo_small);
- ttm_bo_put(bo_big);
+ ttm_bo_fini(bo_small);
+ ttm_bo_fini(bo_big);
ttm_mock_manager_fini(priv->ttm_dev, mem_type);
}
@@ -1074,8 +1074,8 @@ static void ttm_bo_validate_busy_domain_evict(struct kunit *test)
KUNIT_EXPECT_EQ(test, bo_init->resource->mem_type, mem_type);
KUNIT_EXPECT_NULL(test, bo_val->resource);
- ttm_bo_put(bo_init);
- ttm_bo_put(bo_val);
+ ttm_bo_fini(bo_init);
+ ttm_bo_fini(bo_val);
ttm_mock_manager_fini(priv->ttm_dev, mem_type);
ttm_bad_manager_fini(priv->ttm_dev, mem_type_evict);
@@ -1119,8 +1119,8 @@ static void ttm_bo_validate_evict_gutting(struct kunit *test)
KUNIT_ASSERT_NULL(test, bo_evict->resource);
KUNIT_ASSERT_TRUE(test, bo_evict->ttm->page_flags & TTM_TT_FLAG_ZERO_ALLOC);
- ttm_bo_put(bo_evict);
- ttm_bo_put(bo);
+ ttm_bo_fini(bo_evict);
+ ttm_bo_fini(bo);
ttm_mock_manager_fini(priv->ttm_dev, mem_type);
}
@@ -1177,9 +1177,9 @@ static void ttm_bo_validate_recrusive_evict(struct kunit *test)
ttm_mock_manager_fini(priv->ttm_dev, mem_type);
ttm_mock_manager_fini(priv->ttm_dev, mem_type_evict);
- ttm_bo_put(bo_val);
- ttm_bo_put(bo_tt);
- ttm_bo_put(bo_mock);
+ ttm_bo_fini(bo_val);
+ ttm_bo_fini(bo_tt);
+ ttm_bo_fini(bo_mock);
}
static struct kunit_case ttm_bo_validate_test_cases[] = {
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index f4d9e68b21e7..3ea27c9707ef 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -49,6 +49,14 @@
#include "ttm_module.h"
#include "ttm_bo_internal.h"
+static void ttm_bo_release(struct kref *kref);
+
+/* TODO: remove! */
+void ttm_bo_put(struct ttm_buffer_object *bo)
+{
+ kref_put(&bo->kref, ttm_bo_release);
+}
+
static void ttm_bo_mem_space_debug(struct ttm_buffer_object *bo,
struct ttm_placement *placement)
{
@@ -318,18 +326,11 @@ static void ttm_bo_release(struct kref *kref)
bo->destroy(bo);
}
-/**
- * ttm_bo_put
- *
- * @bo: The buffer object.
- *
- * Unreference a buffer object.
- */
-void ttm_bo_put(struct ttm_buffer_object *bo)
+void ttm_bo_fini(struct ttm_buffer_object *bo)
{
- kref_put(&bo->kref, ttm_bo_release);
+ ttm_bo_put(bo);
}
-EXPORT_SYMBOL(ttm_bo_put);
+EXPORT_SYMBOL(ttm_bo_fini);
static int ttm_bo_bounce_temp_buffer(struct ttm_buffer_object *bo,
struct ttm_operation_ctx *ctx,
diff --git a/drivers/gpu/drm/ttm/ttm_bo_internal.h b/drivers/gpu/drm/ttm/ttm_bo_internal.h
index 9d8b747a34db..e0d48eac74b0 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_internal.h
+++ b/drivers/gpu/drm/ttm/ttm_bo_internal.h
@@ -55,4 +55,6 @@ ttm_bo_get_unless_zero(struct ttm_buffer_object *bo)
return bo;
}
+void ttm_bo_put(struct ttm_buffer_object *bo);
+
#endif
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c
index 7057d852951b..e564d071f40b 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c
@@ -37,7 +37,7 @@ static void vmw_gem_object_free(struct drm_gem_object *gobj)
{
struct ttm_buffer_object *bo = drm_gem_ttm_of_gem(gobj);
if (bo)
- ttm_bo_put(bo);
+ ttm_bo_fini(bo);
}
static int vmw_gem_object_open(struct drm_gem_object *obj,
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 7aa2c17825da..c4aa3eaba2a2 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -1649,7 +1649,7 @@ static void xe_gem_object_free(struct drm_gem_object *obj)
* refcount directly if needed.
*/
__xe_bo_vunmap(gem_to_xe_bo(obj));
- ttm_bo_put(container_of(obj, struct ttm_buffer_object, base));
+ ttm_bo_fini(container_of(obj, struct ttm_buffer_object, base));
}
static void xe_gem_object_close(struct drm_gem_object *obj,
diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
index 894ff7ccd68e..21dac074b94d 100644
--- a/include/drm/ttm/ttm_bo.h
+++ b/include/drm/ttm/ttm_bo.h
@@ -391,7 +391,7 @@ int ttm_bo_wait_ctx(struct ttm_buffer_object *bo,
int ttm_bo_validate(struct ttm_buffer_object *bo,
struct ttm_placement *placement,
struct ttm_operation_ctx *ctx);
-void ttm_bo_put(struct ttm_buffer_object *bo);
+void ttm_bo_fini(struct ttm_buffer_object *bo);
void ttm_bo_set_bulk_move(struct ttm_buffer_object *bo,
struct ttm_lru_bulk_move *bulk);
bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/2] drm/ttm: replace TTMs refcount with the DRM refcount v2
2025-07-02 11:00 Switching TTM over to GEM refcounts v2 Christian König
2025-07-02 11:00 ` [PATCH 1/2] drm/ttm: rename ttm_bo_put to _fini Christian König
@ 2025-07-02 11:00 ` Christian König
2025-07-02 12:08 ` ✗ CI.checkpatch: warning for series starting with [1/2] drm/ttm: rename ttm_bo_put to _fini Patchwork
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Christian König @ 2025-07-02 11:00 UTC (permalink / raw)
To: thomas.hellstrom, matthew.brost, intel-xe, dri-devel, amd-gfx
Instead of keeping a separate reference count for the TTM object also use
the reference count for DRM GEM objects inside TTM.
Apart from avoiding two reference counts for one object this approach has
the clear advantage of being able to use drm_exec inside TTM.
v2: adjust XE assert as well and re-enable disabled test
Signed-off-by: Christian König <christian.koenig@amd.com>
---
.../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 8 +-
drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c | 2 -
drivers/gpu/drm/ttm/ttm_bo.c | 148 +++++++++---------
drivers/gpu/drm/ttm/ttm_bo_internal.h | 9 +-
drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +-
drivers/gpu/drm/xe/xe_bo.c | 2 +-
include/drm/ttm/ttm_bo.h | 9 --
7 files changed, 87 insertions(+), 93 deletions(-)
diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
index 4553c4e0e0f1..4e475a436e78 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
@@ -127,7 +127,7 @@ static void ttm_bo_init_reserved_sys_man(struct kunit *test)
dma_resv_unlock(bo->base.resv);
KUNIT_EXPECT_EQ(test, err, 0);
- KUNIT_EXPECT_EQ(test, kref_read(&bo->kref), 1);
+ KUNIT_EXPECT_EQ(test, kref_read(&bo->base.refcount), 1);
KUNIT_EXPECT_PTR_EQ(test, bo->bdev, priv->ttm_dev);
KUNIT_EXPECT_EQ(test, bo->type, bo_type);
KUNIT_EXPECT_EQ(test, bo->page_alignment, PAGE_SIZE);
@@ -176,7 +176,7 @@ static void ttm_bo_init_reserved_mock_man(struct kunit *test)
dma_resv_unlock(bo->base.resv);
KUNIT_EXPECT_EQ(test, err, 0);
- KUNIT_EXPECT_EQ(test, kref_read(&bo->kref), 1);
+ KUNIT_EXPECT_EQ(test, kref_read(&bo->base.refcount), 1);
KUNIT_EXPECT_PTR_EQ(test, bo->bdev, priv->ttm_dev);
KUNIT_EXPECT_EQ(test, bo->type, bo_type);
KUNIT_EXPECT_EQ(test, ctx.bytes_moved, size);
@@ -977,6 +977,8 @@ static void ttm_bo_validate_allowed_only_evict(struct kunit *test)
ttm_mock_manager_fini(priv->ttm_dev, mem_multihop);
}
+extern const struct drm_gem_object_funcs ttm_deleted_object_funcs;
+
static void ttm_bo_validate_deleted_evict(struct kunit *test)
{
struct ttm_operation_ctx ctx_init = { }, ctx_val = { };
@@ -1007,7 +1009,7 @@ static void ttm_bo_validate_deleted_evict(struct kunit *test)
KUNIT_EXPECT_EQ(test, ttm_resource_manager_usage(man), big);
dma_resv_unlock(bo_big->base.resv);
- bo_big->deleted = true;
+ bo_big->base.funcs = &ttm_deleted_object_funcs;
bo_small = ttm_bo_kunit_init(test, test->priv, small, NULL);
bo_small->type = bo_type;
diff --git a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
index 7aaf0d1395ff..49016fd43e50 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.c
@@ -193,8 +193,6 @@ struct ttm_buffer_object *ttm_bo_kunit_init(struct kunit *test,
bo->bdev = devs->ttm_dev;
bo->destroy = dummy_ttm_bo_destroy;
- kref_init(&bo->kref);
-
return bo;
}
EXPORT_SYMBOL_GPL(ttm_bo_kunit_init);
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 3ea27c9707ef..d456be1d6e1e 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -31,6 +31,7 @@
#define pr_fmt(fmt) "[TTM] " fmt
+#include <drm/drm_util.h>
#include <drm/ttm/ttm_bo.h>
#include <drm/ttm/ttm_placement.h>
#include <drm/ttm/ttm_tt.h>
@@ -49,14 +50,6 @@
#include "ttm_module.h"
#include "ttm_bo_internal.h"
-static void ttm_bo_release(struct kref *kref);
-
-/* TODO: remove! */
-void ttm_bo_put(struct ttm_buffer_object *bo)
-{
- kref_put(&bo->kref, ttm_bo_release);
-}
-
static void ttm_bo_mem_space_debug(struct ttm_buffer_object *bo,
struct ttm_placement *placement)
{
@@ -253,82 +246,92 @@ static void ttm_bo_delayed_delete(struct work_struct *work)
ttm_bo_put(bo);
}
-static void ttm_bo_release(struct kref *kref)
+static void ttm_bo_free(struct drm_gem_object *gobj)
+{
+ struct ttm_buffer_object *bo = container_of(gobj, typeof(*bo), base);
+
+ atomic_dec(&ttm_glob.bo_count);
+ bo->destroy(bo);
+}
+
+/*
+ * All other callbacks should never ever be called on a deleted TTM object.
+ */
+const struct drm_gem_object_funcs ttm_deleted_object_funcs = {
+ .free = ttm_bo_free
+};
+EXPORT_SYMBOL_FOR_TESTS_ONLY(ttm_deleted_object_funcs);
+
+/* Returns true if the BO is about to get deleted */
+static bool ttm_bo_is_zombie(struct ttm_buffer_object *bo)
+{
+ return bo->base.funcs == &ttm_deleted_object_funcs;
+}
+
+void ttm_bo_fini(struct ttm_buffer_object *bo)
{
- struct ttm_buffer_object *bo =
- container_of(kref, struct ttm_buffer_object, kref);
struct ttm_device *bdev = bo->bdev;
int ret;
WARN_ON_ONCE(bo->pin_count);
WARN_ON_ONCE(bo->bulk_move);
- if (!bo->deleted) {
- ret = ttm_bo_individualize_resv(bo);
- if (ret) {
- /* Last resort, if we fail to allocate memory for the
- * fences block for the BO to become idle
- */
- dma_resv_wait_timeout(bo->base.resv,
- DMA_RESV_USAGE_BOOKKEEP, false,
- 30 * HZ);
- }
+ ret = ttm_bo_individualize_resv(bo);
+ if (ret) {
+ /* Last resort, if we fail to allocate memory for the
+ * fences block for the BO to become idle
+ */
+ dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_BOOKKEEP,
+ false, 30 * HZ);
+ }
- if (bo->bdev->funcs->release_notify)
- bo->bdev->funcs->release_notify(bo);
-
- drm_vma_offset_remove(bdev->vma_manager, &bo->base.vma_node);
- ttm_mem_io_free(bdev, bo->resource);
-
- if (!dma_resv_test_signaled(&bo->base._resv,
- DMA_RESV_USAGE_BOOKKEEP) ||
- (want_init_on_free() && (bo->ttm != NULL)) ||
- bo->type == ttm_bo_type_sg ||
- !dma_resv_trylock(bo->base.resv)) {
- /* The BO is not idle, resurrect it for delayed destroy */
- ttm_bo_flush_all_fences(bo);
- bo->deleted = true;
-
- spin_lock(&bo->bdev->lru_lock);
-
- /*
- * Make pinned bos immediately available to
- * shrinkers, now that they are queued for
- * destruction.
- *
- * FIXME: QXL is triggering this. Can be removed when the
- * driver is fixed.
- */
- if (bo->pin_count) {
- bo->pin_count = 0;
- ttm_resource_move_to_lru_tail(bo->resource);
- }
+ if (bo->bdev->funcs->release_notify)
+ bo->bdev->funcs->release_notify(bo);
+
+ drm_vma_offset_remove(bdev->vma_manager, &bo->base.vma_node);
+ ttm_mem_io_free(bdev, bo->resource);
- kref_init(&bo->kref);
- spin_unlock(&bo->bdev->lru_lock);
+ if (!dma_resv_test_signaled(&bo->base._resv, DMA_RESV_USAGE_BOOKKEEP) ||
+ (want_init_on_free() && (bo->ttm != NULL)) ||
+ bo->type == ttm_bo_type_sg ||
+ !dma_resv_trylock(bo->base.resv)) {
+ /* The BO is not idle, resurrect it for delayed destroy */
+ ttm_bo_flush_all_fences(bo);
- INIT_WORK(&bo->delayed_delete, ttm_bo_delayed_delete);
+ spin_lock(&bo->bdev->lru_lock);
- /* Schedule the worker on the closest NUMA node. This
- * improves performance since system memory might be
- * cleared on free and that is best done on a CPU core
- * close to it.
- */
- queue_work_node(bdev->pool.nid, bdev->wq, &bo->delayed_delete);
- return;
+ /*
+ * Make pinned bos immediately available to
+ * shrinkers, now that they are queued for
+ * destruction.
+ *
+ * FIXME: QXL is triggering this. Can be removed when the
+ * driver is fixed.
+ */
+ if (bo->pin_count) {
+ bo->pin_count = 0;
+ ttm_resource_move_to_lru_tail(bo->resource);
}
+ kref_init(&bo->base.refcount);
+ bo->base.funcs = &ttm_deleted_object_funcs;
+ spin_unlock(&bo->bdev->lru_lock);
+
+ INIT_WORK(&bo->delayed_delete, ttm_bo_delayed_delete);
+
+ /* Schedule the worker on the closest NUMA node. This
+ * improves performance since system memory might be
+ * cleared on free and that is best done on a CPU core
+ * close to it.
+ */
+ queue_work_node(bdev->pool.nid, bdev->wq, &bo->delayed_delete);
+ } else {
ttm_bo_cleanup_memtype_use(bo);
dma_resv_unlock(bo->base.resv);
- }
- atomic_dec(&ttm_glob.bo_count);
- bo->destroy(bo);
-}
-
-void ttm_bo_fini(struct ttm_buffer_object *bo)
-{
- ttm_bo_put(bo);
+ atomic_dec(&ttm_glob.bo_count);
+ bo->destroy(bo);
+ }
}
EXPORT_SYMBOL(ttm_bo_fini);
@@ -472,7 +475,7 @@ int ttm_bo_evict_first(struct ttm_device *bdev, struct ttm_resource_manager *man
if (!bo->resource || bo->resource->mem_type != mem_type)
goto out_bo_moved;
- if (bo->deleted) {
+ if (ttm_bo_is_zombie(bo)) {
ret = ttm_bo_wait_ctx(bo, ctx);
if (!ret)
ttm_bo_cleanup_memtype_use(bo);
@@ -526,7 +529,7 @@ static s64 ttm_bo_evict_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *
if (bo->pin_count || !bo->bdev->funcs->eviction_valuable(bo, evict_walk->place))
return 0;
- if (bo->deleted) {
+ if (ttm_bo_is_zombie(bo)) {
lret = ttm_bo_wait_ctx(bo, walk->arg.ctx);
if (!lret)
ttm_bo_cleanup_memtype_use(bo);
@@ -626,7 +629,6 @@ static int ttm_bo_evict_alloc(struct ttm_device *bdev,
void ttm_bo_pin(struct ttm_buffer_object *bo)
{
dma_resv_assert_held(bo->base.resv);
- WARN_ON_ONCE(!kref_read(&bo->kref));
spin_lock(&bo->bdev->lru_lock);
if (bo->resource)
ttm_resource_del_bulk_move(bo->resource, bo);
@@ -645,7 +647,6 @@ EXPORT_SYMBOL(ttm_bo_pin);
void ttm_bo_unpin(struct ttm_buffer_object *bo)
{
dma_resv_assert_held(bo->base.resv);
- WARN_ON_ONCE(!kref_read(&bo->kref));
if (WARN_ON_ONCE(!bo->pin_count))
return;
@@ -934,7 +935,6 @@ int ttm_bo_init_reserved(struct ttm_device *bdev, struct ttm_buffer_object *bo,
{
int ret;
- kref_init(&bo->kref);
bo->bdev = bdev;
bo->type = type;
bo->page_alignment = alignment;
@@ -1130,7 +1130,7 @@ ttm_bo_swapout_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo)
goto out;
}
- if (bo->deleted) {
+ if (ttm_bo_is_zombie(bo)) {
pgoff_t num_pages = bo->ttm->num_pages;
ret = ttm_bo_wait_ctx(bo, ctx);
diff --git a/drivers/gpu/drm/ttm/ttm_bo_internal.h b/drivers/gpu/drm/ttm/ttm_bo_internal.h
index e0d48eac74b0..81327bc73834 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_internal.h
+++ b/drivers/gpu/drm/ttm/ttm_bo_internal.h
@@ -34,7 +34,7 @@
*/
static inline void ttm_bo_get(struct ttm_buffer_object *bo)
{
- kref_get(&bo->kref);
+ drm_gem_object_get(&bo->base);
}
/**
@@ -50,11 +50,14 @@ static inline void ttm_bo_get(struct ttm_buffer_object *bo)
static inline __must_check struct ttm_buffer_object *
ttm_bo_get_unless_zero(struct ttm_buffer_object *bo)
{
- if (!kref_get_unless_zero(&bo->kref))
+ if (!kref_get_unless_zero(&bo->base.refcount))
return NULL;
return bo;
}
-void ttm_bo_put(struct ttm_buffer_object *bo);
+static inline void ttm_bo_put(struct ttm_buffer_object *bo)
+{
+ drm_gem_object_put(&bo->base);
+}
#endif
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 250675d56b1c..1a1860ffca60 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -247,7 +247,7 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
atomic_inc(&ttm_glob.bo_count);
drm_vma_node_reset(&fbo->base.base.vma_node);
- kref_init(&fbo->base.kref);
+ kref_init(&fbo->base.base.refcount);
fbo->base.destroy = &ttm_transfered_destroy;
fbo->base.pin_count = 0;
if (bo->type != ttm_bo_type_sg)
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index c4aa3eaba2a2..c7e4904639e3 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -1417,7 +1417,7 @@ static bool xe_ttm_bo_lock_in_destructor(struct ttm_buffer_object *ttm_bo)
struct xe_device *xe = ttm_to_xe_device(ttm_bo->bdev);
bool locked;
- xe_assert(xe, !kref_read(&ttm_bo->kref));
+ xe_assert(xe, !kref_read(&ttm_bo->base.refcount));
/*
* We can typically only race with TTM trylocking under the
diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
index 21dac074b94d..644def6c77ae 100644
--- a/include/drm/ttm/ttm_bo.h
+++ b/include/drm/ttm/ttm_bo.h
@@ -78,11 +78,8 @@ enum ttm_bo_type {
* @type: The bo type.
* @page_alignment: Page alignment.
* @destroy: Destruction function. If NULL, kfree is used.
- * @kref: Reference count of this buffer object. When this refcount reaches
- * zero, the object is destroyed or put on the delayed delete list.
* @resource: structure describing current placement.
* @ttm: TTM structure holding system pages.
- * @deleted: True if the object is only a zombie and already deleted.
* @bulk_move: The bulk move object.
* @priority: Priority for LRU, BOs with lower priority are evicted first.
* @pin_count: Pin count.
@@ -109,17 +106,11 @@ struct ttm_buffer_object {
uint32_t page_alignment;
void (*destroy) (struct ttm_buffer_object *);
- /*
- * Members not needing protection.
- */
- struct kref kref;
-
/*
* Members protected by the bo::resv::reserved lock.
*/
struct ttm_resource *resource;
struct ttm_tt *ttm;
- bool deleted;
struct ttm_lru_bulk_move *bulk_move;
unsigned priority;
unsigned pin_count;
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* ✗ CI.checkpatch: warning for series starting with [1/2] drm/ttm: rename ttm_bo_put to _fini
2025-07-02 11:00 Switching TTM over to GEM refcounts v2 Christian König
2025-07-02 11:00 ` [PATCH 1/2] drm/ttm: rename ttm_bo_put to _fini Christian König
2025-07-02 11:00 ` [PATCH 2/2] drm/ttm: replace TTMs refcount with the DRM refcount v2 Christian König
@ 2025-07-02 12:08 ` Patchwork
2025-07-02 12:09 ` ✗ CI.KUnit: failure " Patchwork
2025-07-02 16:15 ` Switching TTM over to GEM refcounts v2 Matthew Brost
4 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2025-07-02 12:08 UTC (permalink / raw)
To: Christian König; +Cc: intel-xe
== Series Details ==
Series: series starting with [1/2] drm/ttm: rename ttm_bo_put to _fini
URL : https://patchwork.freedesktop.org/series/151064/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
f8ff75ae1d2127635239b134695774ed4045d05b
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit f232a56e220e0daf495e8448ec954f4ac297ead9
Author: Christian König <ckoenig.leichtzumerken@gmail.com>
Date: Wed Jul 2 13:00:28 2025 +0200
drm/ttm: replace TTMs refcount with the DRM refcount v2
Instead of keeping a separate reference count for the TTM object also use
the reference count for DRM GEM objects inside TTM.
Apart from avoiding two reference counts for one object this approach has
the clear advantage of being able to use drm_exec inside TTM.
v2: adjust XE assert as well and re-enable disabled test
Signed-off-by: Christian König <christian.koenig@amd.com>
+ /mt/dim checkpatch 94631e6b7f655b1922e3227970cd6180200694af drm-intel
3d9becba9e8e drm/ttm: rename ttm_bo_put to _fini
-:501: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <ckoenig.leichtzumerken@gmail.com>' != 'Signed-off-by: Christian König <christian.koenig@amd.com>'
total: 0 errors, 1 warnings, 0 checks, 388 lines checked
f232a56e220e drm/ttm: replace TTMs refcount with the DRM refcount v2
-:192: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'bo->ttm != NULL'
#192: FILE: drivers/gpu/drm/ttm/ttm_bo.c:294:
+ if (!dma_resv_test_signaled(&bo->base._resv, DMA_RESV_USAGE_BOOKKEEP) ||
+ (want_init_on_free() && (bo->ttm != NULL)) ||
+ bo->type == ttm_bo_type_sg ||
+ !dma_resv_trylock(bo->base.resv)) {
-:193: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "bo->ttm"
#193: FILE: drivers/gpu/drm/ttm/ttm_bo.c:295:
+ (want_init_on_free() && (bo->ttm != NULL)) ||
-:392: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <ckoenig.leichtzumerken@gmail.com>' != 'Signed-off-by: Christian König <christian.koenig@amd.com>'
total: 0 errors, 1 warnings, 2 checks, 326 lines checked
^ permalink raw reply [flat|nested] 11+ messages in thread
* ✗ CI.KUnit: failure for series starting with [1/2] drm/ttm: rename ttm_bo_put to _fini
2025-07-02 11:00 Switching TTM over to GEM refcounts v2 Christian König
` (2 preceding siblings ...)
2025-07-02 12:08 ` ✗ CI.checkpatch: warning for series starting with [1/2] drm/ttm: rename ttm_bo_put to _fini Patchwork
@ 2025-07-02 12:09 ` Patchwork
2025-07-02 16:15 ` Switching TTM over to GEM refcounts v2 Matthew Brost
4 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2025-07-02 12:09 UTC (permalink / raw)
To: Christian König; +Cc: intel-xe
== Series Details ==
Series: series starting with [1/2] drm/ttm: rename ttm_bo_put to _fini
URL : https://patchwork.freedesktop.org/series/151064/
State : failure
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
[12:08:09] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[12:08:14] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[12:08:40] Starting KUnit Kernel (1/1)...
[12:08:40] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[12:08:41] ================== guc_buf (11 subtests) ===================
[12:08:41] [PASSED] test_smallest
[12:08:41] [PASSED] test_largest
[12:08:41] [PASSED] test_granular
[12:08:41] [PASSED] test_unique
[12:08:41] [PASSED] test_overlap
[12:08:41] [PASSED] test_reusable
[12:08:41] [PASSED] test_too_big
[12:08:41] [PASSED] test_flush
[12:08:41] [PASSED] test_lookup
[12:08:41] [PASSED] test_data
[12:08:41] [PASSED] test_class
[12:08:41] ===================== [PASSED] guc_buf =====================
[12:08:41] =================== guc_dbm (7 subtests) ===================
[12:08:41] [PASSED] test_empty
[12:08:41] [PASSED] test_default
[12:08:41] ======================== test_size ========================
[12:08:41] [PASSED] 4
[12:08:41] [PASSED] 8
[12:08:41] [PASSED] 32
[12:08:41] [PASSED] 256
[12:08:41] ==================== [PASSED] test_size ====================
[12:08:41] ======================= test_reuse ========================
[12:08:41] [PASSED] 4
[12:08:41] [PASSED] 8
[12:08:41] [PASSED] 32
[12:08:41] [PASSED] 256
[12:08:41] =================== [PASSED] test_reuse ====================
[12:08:41] =================== test_range_overlap ====================
[12:08:41] [PASSED] 4
[12:08:41] [PASSED] 8
[12:08:41] [PASSED] 32
[12:08:41] [PASSED] 256
[12:08:41] =============== [PASSED] test_range_overlap ================
[12:08:41] =================== test_range_compact ====================
[12:08:41] [PASSED] 4
[12:08:41] [PASSED] 8
[12:08:41] [PASSED] 32
[12:08:41] [PASSED] 256
[12:08:41] =============== [PASSED] test_range_compact ================
[12:08:41] ==================== test_range_spare =====================
[12:08:41] [PASSED] 4
[12:08:41] [PASSED] 8
[12:08:41] [PASSED] 32
[12:08:41] [PASSED] 256
[12:08:41] ================ [PASSED] test_range_spare =================
[12:08:41] ===================== [PASSED] guc_dbm =====================
[12:08:41] =================== guc_idm (6 subtests) ===================
[12:08:41] [PASSED] bad_init
[12:08:41] [PASSED] no_init
[12:08:41] [PASSED] init_fini
[12:08:41] [PASSED] check_used
[12:08:41] [PASSED] check_quota
[12:08:41] [PASSED] check_all
[12:08:41] ===================== [PASSED] guc_idm =====================
[12:08:41] ================== no_relay (3 subtests) ===================
[12:08:41] [PASSED] xe_drops_guc2pf_if_not_ready
[12:08:41] [PASSED] xe_drops_guc2vf_if_not_ready
[12:08:41] [PASSED] xe_rejects_send_if_not_ready
[12:08:41] ==================== [PASSED] no_relay =====================
[12:08:41] ================== pf_relay (14 subtests) ==================
[12:08:41] [PASSED] pf_rejects_guc2pf_too_short
[12:08:41] [PASSED] pf_rejects_guc2pf_too_long
[12:08:41] [PASSED] pf_rejects_guc2pf_no_payload
[12:08:41] [PASSED] pf_fails_no_payload
[12:08:41] [PASSED] pf_fails_bad_origin
[12:08:41] [PASSED] pf_fails_bad_type
[12:08:41] [PASSED] pf_txn_reports_error
[12:08:41] [PASSED] pf_txn_sends_pf2guc
[12:08:41] [PASSED] pf_sends_pf2guc
[12:08:41] [SKIPPED] pf_loopback_nop
[12:08:41] [SKIPPED] pf_loopback_echo
[12:08:41] [SKIPPED] pf_loopback_fail
[12:08:41] [SKIPPED] pf_loopback_busy
[12:08:41] [SKIPPED] pf_loopback_retry
[12:08:41] ==================== [PASSED] pf_relay =====================
[12:08:41] ================== vf_relay (3 subtests) ===================
[12:08:41] [PASSED] vf_rejects_guc2vf_too_short
[12:08:41] [PASSED] vf_rejects_guc2vf_too_long
[12:08:41] [PASSED] vf_rejects_guc2vf_no_payload
[12:08:41] ==================== [PASSED] vf_relay =====================
[12:08:41] ================= pf_service (11 subtests) =================
[12:08:41] [PASSED] pf_negotiate_any
[12:08:41] [PASSED] pf_negotiate_base_match
[12:08:41] [PASSED] pf_negotiate_base_newer
[12:08:41] [PASSED] pf_negotiate_base_next
[12:08:41] [SKIPPED] pf_negotiate_base_older
[12:08:41] [PASSED] pf_negotiate_base_prev
[12:08:41] [PASSED] pf_negotiate_latest_match
[12:08:41] [PASSED] pf_negotiate_latest_newer
[12:08:41] [PASSED] pf_negotiate_latest_next
[12:08:41] [SKIPPED] pf_negotiate_latest_older
[12:08:41] [SKIPPED] pf_negotiate_latest_prev
[12:08:41] =================== [PASSED] pf_service ====================
[12:08:41] ===================== lmtt (1 subtest) =====================
[12:08:41] ======================== test_ops =========================
[12:08:41] [PASSED] 2-level
[12:08:41] [PASSED] multi-level
[12:08:41] ==================== [PASSED] test_ops =====================
[12:08:41] ====================== [PASSED] lmtt =======================
[12:08:41] =================== xe_mocs (2 subtests) ===================
[12:08:41] ================ xe_live_mocs_kernel_kunit ================
[12:08:41] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[12:08:41] ================ xe_live_mocs_reset_kunit =================
[12:08:41] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[12:08:41] ==================== [SKIPPED] xe_mocs =====================
[12:08:41] ================= xe_migrate (2 subtests) ==================
[12:08:41] ================= xe_migrate_sanity_kunit =================
[12:08:41] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[12:08:41] ================== xe_validate_ccs_kunit ==================
[12:08:41] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[12:08:41] =================== [SKIPPED] xe_migrate ===================
[12:08:41] ================== xe_dma_buf (1 subtest) ==================
[12:08:41] ==================== xe_dma_buf_kunit =====================
[12:08:41] ================ [SKIPPED] xe_dma_buf_kunit ================
[12:08:41] =================== [SKIPPED] xe_dma_buf ===================
[12:08:41] ================= xe_bo_shrink (1 subtest) =================
[12:08:41] =================== xe_bo_shrink_kunit ====================
[12:08:41] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[12:08:41] ================== [SKIPPED] xe_bo_shrink ==================
[12:08:41] ==================== xe_bo (2 subtests) ====================
[12:08:41] ================== xe_ccs_migrate_kunit ===================
[12:08:41] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[12:08:41] ==================== xe_bo_evict_kunit ====================
[12:08:41] =============== [SKIPPED] xe_bo_evict_kunit ================
[12:08:41] ===================== [SKIPPED] xe_bo ======================
[12:08:41] ==================== args (11 subtests) ====================
[12:08:41] [PASSED] count_args_test
[12:08:41] [PASSED] call_args_example
[12:08:41] [PASSED] call_args_test
[12:08:41] [PASSED] drop_first_arg_example
[12:08:41] [PASSED] drop_first_arg_test
[12:08:41] [PASSED] first_arg_example
[12:08:41] [PASSED] first_arg_test
[12:08:41] [PASSED] last_arg_example
[12:08:41] [PASSED] last_arg_test
[12:08:41] [PASSED] pick_arg_example
[12:08:41] [PASSED] sep_comma_example
[12:08:41] ====================== [PASSED] args =======================
[12:08:41] =================== xe_pci (2 subtests) ====================
[12:08:41] ==================== check_graphics_ip ====================
[12:08:41] [PASSED] 12.70 Xe_LPG
[12:08:41] [PASSED] 12.71 Xe_LPG
[12:08:41] [PASSED] 12.74 Xe_LPG+
[12:08:41] [PASSED] 20.01 Xe2_HPG
[12:08:41] [PASSED] 20.02 Xe2_HPG
[12:08:41] [PASSED] 20.04 Xe2_LPG
[12:08:41] [PASSED] 30.00 Xe3_LPG
[12:08:41] [PASSED] 30.01 Xe3_LPG
[12:08:41] [PASSED] 30.03 Xe3_LPG
[12:08:41] ================ [PASSED] check_graphics_ip ================
[12:08:41] ===================== check_media_ip ======================
[12:08:41] [PASSED] 13.00 Xe_LPM+
[12:08:41] [PASSED] 13.01 Xe2_HPM
[12:08:41] [PASSED] 20.00 Xe2_LPM
[12:08:41] [PASSED] 30.00 Xe3_LPM
[12:08:41] [PASSED] 30.02 Xe3_LPM
stty: 'standard input': Inappropriate ioctl for device
[12:08:41] ================= [PASSED] check_media_ip ==================
[12:08:41] ===================== [PASSED] xe_pci ======================
[12:08:41] =================== xe_rtp (2 subtests) ====================
[12:08:41] =============== xe_rtp_process_to_sr_tests ================
[12:08:41] [PASSED] coalesce-same-reg
[12:08:41] [PASSED] no-match-no-add
[12:08:41] [PASSED] match-or
[12:08:41] [PASSED] match-or-xfail
[12:08:41] [PASSED] no-match-no-add-multiple-rules
[12:08:41] [PASSED] two-regs-two-entries
[12:08:41] [PASSED] clr-one-set-other
[12:08:41] [PASSED] set-field
[12:08:41] [PASSED] conflict-duplicate
[12:08:41] [PASSED] conflict-not-disjoint
[12:08:41] [PASSED] conflict-reg-type
[12:08:41] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[12:08:41] ================== xe_rtp_process_tests ===================
[12:08:41] [PASSED] active1
[12:08:41] [PASSED] active2
[12:08:41] [PASSED] active-inactive
[12:08:41] [PASSED] inactive-active
[12:08:41] [PASSED] inactive-1st_or_active-inactive
[12:08:41] [PASSED] inactive-2nd_or_active-inactive
[12:08:41] [PASSED] inactive-last_or_active-inactive
[12:08:41] [PASSED] inactive-no_or_active-inactive
[12:08:41] ============== [PASSED] xe_rtp_process_tests ===============
[12:08:41] ===================== [PASSED] xe_rtp ======================
[12:08:41] ==================== xe_wa (1 subtest) =====================
[12:08:41] ======================== xe_wa_gt =========================
[12:08:41] [PASSED] TIGERLAKE (B0)
[12:08:41] [PASSED] DG1 (A0)
[12:08:41] [PASSED] DG1 (B0)
[12:08:41] [PASSED] ALDERLAKE_S (A0)
[12:08:41] [PASSED] ALDERLAKE_S (B0)
[12:08:41] [PASSED] ALDERLAKE_S (C0)
[12:08:41] [PASSED] ALDERLAKE_S (D0)
[12:08:41] [PASSED] ALDERLAKE_P (A0)
[12:08:41] [PASSED] ALDERLAKE_P (B0)
[12:08:41] [PASSED] ALDERLAKE_P (C0)
[12:08:41] [PASSED] ALDERLAKE_S_RPLS (D0)
[12:08:41] [PASSED] ALDERLAKE_P_RPLU (E0)
[12:08:41] [PASSED] DG2_G10 (C0)
[12:08:41] [PASSED] DG2_G11 (B1)
[12:08:41] [PASSED] DG2_G12 (A1)
[12:08:41] [PASSED] METEORLAKE (g:A0, m:A0)
[12:08:41] [PASSED] METEORLAKE (g:A0, m:A0)
[12:08:41] [PASSED] METEORLAKE (g:A0, m:A0)
[12:08:41] [PASSED] LUNARLAKE (g:A0, m:A0)
[12:08:41] [PASSED] LUNARLAKE (g:B0, m:A0)
[12:08:41] [PASSED] BATTLEMAGE (g:A0, m:A1)
[12:08:41] ==================== [PASSED] xe_wa_gt =====================
[12:08:41] ====================== [PASSED] xe_wa ======================
[12:08:41] ============================================================
[12:08:41] Testing complete. Ran 145 tests: passed: 129, skipped: 16
[12:08:41] Elapsed time: 31.349s total, 4.190s configuring, 26.841s building, 0.299s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig
[12:08:41] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[12:08:43] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[12:09:04] Starting KUnit Kernel (1/1)...
[12:09:04] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[12:09:04] == drm_test_atomic_get_connector_for_encoder (1 subtest) ===
[12:09:04] [PASSED] drm_test_drm_atomic_get_connector_for_encoder
[12:09:04] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ====
[12:09:04] =========== drm_validate_clone_mode (2 subtests) ===========
[12:09:04] ============== drm_test_check_in_clone_mode ===============
[12:09:04] [PASSED] in_clone_mode
[12:09:04] [PASSED] not_in_clone_mode
[12:09:04] ========== [PASSED] drm_test_check_in_clone_mode ===========
[12:09:04] =============== drm_test_check_valid_clones ===============
[12:09:04] [PASSED] not_in_clone_mode
[12:09:04] [PASSED] valid_clone
[12:09:04] [PASSED] invalid_clone
[12:09:04] =========== [PASSED] drm_test_check_valid_clones ===========
[12:09:04] ============= [PASSED] drm_validate_clone_mode =============
[12:09:04] ============= drm_validate_modeset (1 subtest) =============
[12:09:04] [PASSED] drm_test_check_connector_changed_modeset
[12:09:04] ============== [PASSED] drm_validate_modeset ===============
[12:09:04] ====== drm_test_bridge_get_current_state (2 subtests) ======
[12:09:04] [PASSED] drm_test_drm_bridge_get_current_state_atomic
[12:09:04] [PASSED] drm_test_drm_bridge_get_current_state_legacy
[12:09:04] ======== [PASSED] drm_test_bridge_get_current_state ========
[12:09:04] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ======
[12:09:04] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic
[12:09:04] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled
[12:09:04] [PASSED] drm_test_drm_bridge_helper_reset_crtc_legacy
[12:09:04] ======== [PASSED] drm_test_bridge_helper_reset_crtc ========
[12:09:04] ============== drm_bridge_alloc (2 subtests) ===============
[12:09:04] [PASSED] drm_test_drm_bridge_alloc_basic
[12:09:04] [PASSED] drm_test_drm_bridge_alloc_get_put
[12:09:04] ================ [PASSED] drm_bridge_alloc =================
[12:09:04] ================== drm_buddy (7 subtests) ==================
[12:09:04] [PASSED] drm_test_buddy_alloc_limit
[12:09:04] [PASSED] drm_test_buddy_alloc_optimistic
[12:09:04] [PASSED] drm_test_buddy_alloc_pessimistic
[12:09:04] [PASSED] drm_test_buddy_alloc_pathological
[12:09:04] [PASSED] drm_test_buddy_alloc_contiguous
[12:09:04] [PASSED] drm_test_buddy_alloc_clear
[12:09:04] [PASSED] drm_test_buddy_alloc_range_bias
[12:09:04] ==================== [PASSED] drm_buddy ====================
[12:09:04] ============= drm_cmdline_parser (40 subtests) =============
[12:09:04] [PASSED] drm_test_cmdline_force_d_only
[12:09:04] [PASSED] drm_test_cmdline_force_D_only_dvi
[12:09:04] [PASSED] drm_test_cmdline_force_D_only_hdmi
[12:09:04] [PASSED] drm_test_cmdline_force_D_only_not_digital
[12:09:04] [PASSED] drm_test_cmdline_force_e_only
[12:09:04] [PASSED] drm_test_cmdline_res
[12:09:04] [PASSED] drm_test_cmdline_res_vesa
[12:09:04] [PASSED] drm_test_cmdline_res_vesa_rblank
[12:09:04] [PASSED] drm_test_cmdline_res_rblank
[12:09:04] [PASSED] drm_test_cmdline_res_bpp
[12:09:04] [PASSED] drm_test_cmdline_res_refresh
[12:09:04] [PASSED] drm_test_cmdline_res_bpp_refresh
[12:09:04] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[12:09:04] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[12:09:04] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[12:09:04] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[12:09:04] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[12:09:04] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[12:09:04] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[12:09:04] [PASSED] drm_test_cmdline_res_margins_force_on
[12:09:04] [PASSED] drm_test_cmdline_res_vesa_margins
[12:09:04] [PASSED] drm_test_cmdline_name
[12:09:04] [PASSED] drm_test_cmdline_name_bpp
[12:09:04] [PASSED] drm_test_cmdline_name_option
[12:09:04] [PASSED] drm_test_cmdline_name_bpp_option
[12:09:04] [PASSED] drm_test_cmdline_rotate_0
[12:09:04] [PASSED] drm_test_cmdline_rotate_90
[12:09:04] [PASSED] drm_test_cmdline_rotate_180
[12:09:04] [PASSED] drm_test_cmdline_rotate_270
[12:09:04] [PASSED] drm_test_cmdline_hmirror
[12:09:04] [PASSED] drm_test_cmdline_vmirror
[12:09:04] [PASSED] drm_test_cmdline_margin_options
[12:09:04] [PASSED] drm_test_cmdline_multiple_options
[12:09:04] [PASSED] drm_test_cmdline_bpp_extra_and_option
[12:09:04] [PASSED] drm_test_cmdline_extra_and_option
[12:09:04] [PASSED] drm_test_cmdline_freestanding_options
[12:09:04] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[12:09:04] [PASSED] drm_test_cmdline_panel_orientation
[12:09:04] ================ drm_test_cmdline_invalid =================
[12:09:04] [PASSED] margin_only
[12:09:04] [PASSED] interlace_only
[12:09:04] [PASSED] res_missing_x
[12:09:04] [PASSED] res_missing_y
[12:09:04] [PASSED] res_bad_y
[12:09:04] [PASSED] res_missing_y_bpp
[12:09:04] [PASSED] res_bad_bpp
[12:09:04] [PASSED] res_bad_refresh
[12:09:04] [PASSED] res_bpp_refresh_force_on_off
[12:09:04] [PASSED] res_invalid_mode
[12:09:04] [PASSED] res_bpp_wrong_place_mode
[12:09:04] [PASSED] name_bpp_refresh
[12:09:04] [PASSED] name_refresh
[12:09:04] [PASSED] name_refresh_wrong_mode
[12:09:04] [PASSED] name_refresh_invalid_mode
[12:09:04] [PASSED] rotate_multiple
[12:09:04] [PASSED] rotate_invalid_val
[12:09:04] [PASSED] rotate_truncated
[12:09:04] [PASSED] invalid_option
[12:09:04] [PASSED] invalid_tv_option
[12:09:04] [PASSED] truncated_tv_option
[12:09:04] ============ [PASSED] drm_test_cmdline_invalid =============
[12:09:04] =============== drm_test_cmdline_tv_options ===============
[12:09:04] [PASSED] NTSC
[12:09:04] [PASSED] NTSC_443
[12:09:04] [PASSED] NTSC_J
[12:09:04] [PASSED] PAL
[12:09:04] [PASSED] PAL_M
[12:09:04] [PASSED] PAL_N
[12:09:04] [PASSED] SECAM
[12:09:04] [PASSED] MONO_525
[12:09:04] [PASSED] MONO_625
[12:09:04] =========== [PASSED] drm_test_cmdline_tv_options ===========
[12:09:04] =============== [PASSED] drm_cmdline_parser ================
[12:09:04] ========== drmm_connector_hdmi_init (20 subtests) ==========
[12:09:04] [PASSED] drm_test_connector_hdmi_init_valid
[12:09:04] [PASSED] drm_test_connector_hdmi_init_bpc_8
[12:09:04] [PASSED] drm_test_connector_hdmi_init_bpc_10
[12:09:04] [PASSED] drm_test_connector_hdmi_init_bpc_12
[12:09:04] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[12:09:04] [PASSED] drm_test_connector_hdmi_init_bpc_null
[12:09:04] [PASSED] drm_test_connector_hdmi_init_formats_empty
[12:09:04] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[12:09:04] === drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[12:09:04] [PASSED] supported_formats=0x9 yuv420_allowed=1
[12:09:04] [PASSED] supported_formats=0x9 yuv420_allowed=0
[12:09:04] [PASSED] supported_formats=0x3 yuv420_allowed=1
[12:09:04] [PASSED] supported_formats=0x3 yuv420_allowed=0
[12:09:04] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[12:09:04] [PASSED] drm_test_connector_hdmi_init_null_ddc
[12:09:04] [PASSED] drm_test_connector_hdmi_init_null_product
[12:09:04] [PASSED] drm_test_connector_hdmi_init_null_vendor
[12:09:04] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[12:09:04] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[12:09:04] [PASSED] drm_test_connector_hdmi_init_product_valid
[12:09:04] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[12:09:04] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[12:09:04] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[12:09:04] ========= drm_test_connector_hdmi_init_type_valid =========
[12:09:04] [PASSED] HDMI-A
[12:09:04] [PASSED] HDMI-B
[12:09:04] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[12:09:04] ======== drm_test_connector_hdmi_init_type_invalid ========
[12:09:04] [PASSED] Unknown
[12:09:04] [PASSED] VGA
[12:09:04] [PASSED] DVI-I
[12:09:04] [PASSED] DVI-D
[12:09:04] [PASSED] DVI-A
[12:09:04] [PASSED] Composite
[12:09:04] [PASSED] SVIDEO
[12:09:04] [PASSED] LVDS
[12:09:04] [PASSED] Component
[12:09:04] [PASSED] DIN
[12:09:04] [PASSED] DP
[12:09:04] [PASSED] TV
[12:09:04] [PASSED] eDP
[12:09:04] [PASSED] Virtual
[12:09:04] [PASSED] DSI
[12:09:04] [PASSED] DPI
[12:09:04] [PASSED] Writeback
[12:09:04] [PASSED] SPI
[12:09:04] [PASSED] USB
[12:09:04] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[12:09:04] ============ [PASSED] drmm_connector_hdmi_init =============
[12:09:04] ============= drmm_connector_init (3 subtests) =============
[12:09:04] [PASSED] drm_test_drmm_connector_init
[12:09:04] [PASSED] drm_test_drmm_connector_init_null_ddc
[12:09:04] ========= drm_test_drmm_connector_init_type_valid =========
[12:09:04] [PASSED] Unknown
[12:09:04] [PASSED] VGA
[12:09:04] [PASSED] DVI-I
[12:09:04] [PASSED] DVI-D
[12:09:04] [PASSED] DVI-A
[12:09:04] [PASSED] Composite
[12:09:04] [PASSED] SVIDEO
[12:09:04] [PASSED] LVDS
[12:09:04] [PASSED] Component
[12:09:04] [PASSED] DIN
[12:09:04] [PASSED] DP
[12:09:04] [PASSED] HDMI-A
[12:09:04] [PASSED] HDMI-B
[12:09:04] [PASSED] TV
[12:09:04] [PASSED] eDP
[12:09:04] [PASSED] Virtual
[12:09:04] [PASSED] DSI
[12:09:04] [PASSED] DPI
[12:09:04] [PASSED] Writeback
[12:09:04] [PASSED] SPI
[12:09:04] [PASSED] USB
[12:09:04] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[12:09:04] =============== [PASSED] drmm_connector_init ===============
[12:09:04] ========= drm_connector_dynamic_init (6 subtests) ==========
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_init
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_init_not_added
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_init_properties
[12:09:04] ===== drm_test_drm_connector_dynamic_init_type_valid ======
[12:09:04] [PASSED] Unknown
[12:09:04] [PASSED] VGA
[12:09:04] [PASSED] DVI-I
[12:09:04] [PASSED] DVI-D
[12:09:04] [PASSED] DVI-A
[12:09:04] [PASSED] Composite
[12:09:04] [PASSED] SVIDEO
[12:09:04] [PASSED] LVDS
[12:09:04] [PASSED] Component
[12:09:04] [PASSED] DIN
[12:09:04] [PASSED] DP
[12:09:04] [PASSED] HDMI-A
[12:09:04] [PASSED] HDMI-B
[12:09:04] [PASSED] TV
[12:09:04] [PASSED] eDP
[12:09:04] [PASSED] Virtual
[12:09:04] [PASSED] DSI
[12:09:04] [PASSED] DPI
[12:09:04] [PASSED] Writeback
[12:09:04] [PASSED] SPI
[12:09:04] [PASSED] USB
[12:09:04] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid ==
[12:09:04] ======== drm_test_drm_connector_dynamic_init_name =========
[12:09:04] [PASSED] Unknown
[12:09:04] [PASSED] VGA
[12:09:04] [PASSED] DVI-I
[12:09:04] [PASSED] DVI-D
[12:09:04] [PASSED] DVI-A
[12:09:04] [PASSED] Composite
[12:09:04] [PASSED] SVIDEO
[12:09:04] [PASSED] LVDS
[12:09:04] [PASSED] Component
[12:09:04] [PASSED] DIN
[12:09:04] [PASSED] DP
[12:09:04] [PASSED] HDMI-A
[12:09:04] [PASSED] HDMI-B
[12:09:04] [PASSED] TV
[12:09:04] [PASSED] eDP
[12:09:04] [PASSED] Virtual
[12:09:04] [PASSED] DSI
[12:09:04] [PASSED] DPI
[12:09:04] [PASSED] Writeback
[12:09:04] [PASSED] SPI
[12:09:04] [PASSED] USB
[12:09:04] ==== [PASSED] drm_test_drm_connector_dynamic_init_name =====
[12:09:04] =========== [PASSED] drm_connector_dynamic_init ============
[12:09:04] ==== drm_connector_dynamic_register_early (4 subtests) =====
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_register_early_defer
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object
[12:09:04] ====== [PASSED] drm_connector_dynamic_register_early =======
[12:09:04] ======= drm_connector_dynamic_register (7 subtests) ========
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_register_on_list
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_register_no_defer
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_register_no_init
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_register_mode_object
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_register_sysfs
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name
[12:09:04] [PASSED] drm_test_drm_connector_dynamic_register_debugfs
[12:09:04] ========= [PASSED] drm_connector_dynamic_register ==========
[12:09:04] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[12:09:04] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[12:09:04] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[12:09:04] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[12:09:04] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[12:09:04] ========== drm_test_get_tv_mode_from_name_valid ===========
[12:09:04] [PASSED] NTSC
[12:09:04] [PASSED] NTSC-443
[12:09:04] [PASSED] NTSC-J
[12:09:04] [PASSED] PAL
[12:09:04] [PASSED] PAL-M
[12:09:04] [PASSED] PAL-N
[12:09:04] [PASSED] SECAM
[12:09:04] [PASSED] Mono
[12:09:04] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[12:09:04] [PASSED] drm_test_get_tv_mode_from_name_truncated
[12:09:04] ============ [PASSED] drm_get_tv_mode_from_name ============
[12:09:04] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[12:09:04] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[12:09:04] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[12:09:04] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[12:09:04] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[12:09:04] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[12:09:04] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[12:09:04] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid =
[12:09:04] [PASSED] VIC 96
[12:09:04] [PASSED] VIC 97
[12:09:04] [PASSED] VIC 101
[12:09:04] [PASSED] VIC 102
[12:09:04] [PASSED] VIC 106
[12:09:04] [PASSED] VIC 107
[12:09:04] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[12:09:04] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[12:09:04] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[12:09:04] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[12:09:04] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[12:09:04] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[12:09:04] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[12:09:04] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[12:09:04] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ====
[12:09:04] [PASSED] Automatic
[12:09:04] [PASSED] Full
[12:09:04] [PASSED] Limited 16:235
[12:09:04] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[12:09:04] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[12:09:04] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[12:09:04] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[12:09:04] === drm_test_drm_hdmi_connector_get_output_format_name ====
[12:09:04] [PASSED] RGB
[12:09:04] [PASSED] YUV 4:2:0
[12:09:04] [PASSED] YUV 4:2:2
[12:09:04] [PASSED] YUV 4:4:4
[12:09:04] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[12:09:04] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[12:09:04] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[12:09:04] ============= drm_damage_helper (21 subtests) ==============
[12:09:04] [PASSED] drm_test_damage_iter_no_damage
[12:09:04] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[12:09:04] [PASSED] drm_test_damage_iter_no_damage_src_moved
[12:09:04] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[12:09:04] [PASSED] drm_test_damage_iter_no_damage_not_visible
[12:09:04] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[12:09:04] [PASSED] drm_test_damage_iter_no_damage_no_fb
[12:09:04] [PASSED] drm_test_damage_iter_simple_damage
[12:09:04] [PASSED] drm_test_damage_iter_single_damage
[12:09:04] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[12:09:04] [PASSED] drm_test_damage_iter_single_damage_outside_src
[12:09:04] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[12:09:04] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[12:09:04] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[12:09:04] [PASSED] drm_test_damage_iter_single_damage_src_moved
[12:09:04] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[12:09:04] [PASSED] drm_test_damage_iter_damage
[12:09:04] [PASSED] drm_test_damage_iter_damage_one_intersect
[12:09:04] [PASSED] drm_test_damage_iter_damage_one_outside
[12:09:04] [PASSED] drm_test_damage_iter_damage_src_moved
[12:09:04] [PASSED] drm_test_damage_iter_damage_not_visible
[12:09:04] ================ [PASSED] drm_damage_helper ================
[12:09:04] ============== drm_dp_mst_helper (3 subtests) ==============
[12:09:04] ============== drm_test_dp_mst_calc_pbn_mode ==============
[12:09:04] [PASSED] Clock 154000 BPP 30 DSC disabled
[12:09:04] [PASSED] Clock 234000 BPP 30 DSC disabled
[12:09:04] [PASSED] Clock 297000 BPP 24 DSC disabled
[12:09:04] [PASSED] Clock 332880 BPP 24 DSC enabled
[12:09:04] [PASSED] Clock 324540 BPP 24 DSC enabled
[12:09:04] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[12:09:04] ============== drm_test_dp_mst_calc_pbn_div ===============
[12:09:04] [PASSED] Link rate 2000000 lane count 4
[12:09:04] [PASSED] Link rate 2000000 lane count 2
[12:09:04] [PASSED] Link rate 2000000 lane count 1
[12:09:04] [PASSED] Link rate 1350000 lane count 4
[12:09:04] [PASSED] Link rate 1350000 lane count 2
[12:09:04] [PASSED] Link rate 1350000 lane count 1
[12:09:04] [PASSED] Link rate 1000000 lane count 4
[12:09:04] [PASSED] Link rate 1000000 lane count 2
[12:09:04] [PASSED] Link rate 1000000 lane count 1
[12:09:04] [PASSED] Link rate 810000 lane count 4
[12:09:04] [PASSED] Link rate 810000 lane count 2
[12:09:04] [PASSED] Link rate 810000 lane count 1
[12:09:04] [PASSED] Link rate 540000 lane count 4
[12:09:04] [PASSED] Link rate 540000 lane count 2
[12:09:04] [PASSED] Link rate 540000 lane count 1
[12:09:04] [PASSED] Link rate 270000 lane count 4
[12:09:04] [PASSED] Link rate 270000 lane count 2
[12:09:04] [PASSED] Link rate 270000 lane count 1
[12:09:04] [PASSED] Link rate 162000 lane count 4
[12:09:04] [PASSED] Link rate 162000 lane count 2
[12:09:04] [PASSED] Link rate 162000 lane count 1
[12:09:04] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[12:09:04] ========= drm_test_dp_mst_sideband_msg_req_decode =========
[12:09:04] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[12:09:04] [PASSED] DP_POWER_UP_PHY with port number
[12:09:04] [PASSED] DP_POWER_DOWN_PHY with port number
[12:09:04] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[12:09:04] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[12:09:04] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[12:09:04] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[12:09:04] [PASSED] DP_QUERY_PAYLOAD with port number
[12:09:04] [PASSED] DP_QUERY_PAYLOAD with VCPI
[12:09:04] [PASSED] DP_REMOTE_DPCD_READ with port number
[12:09:04] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[12:09:04] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[12:09:04] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[12:09:04] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[12:09:04] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[12:09:04] [PASSED] DP_REMOTE_I2C_READ with port number
[12:09:04] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[12:09:04] [PASSED] DP_REMOTE_I2C_READ with transactions array
[12:09:04] [PASSED] DP_REMOTE_I2C_WRITE with port number
[12:09:04] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[12:09:04] [PASSED] DP_REMOTE_I2C_WRITE with data array
[12:09:04] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[12:09:04] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[12:09:04] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[12:09:04] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[12:09:04] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[12:09:04] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[12:09:04] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[12:09:04] ================ [PASSED] drm_dp_mst_helper ================
[12:09:04] ================== drm_exec (7 subtests) ===================
[12:09:04] [PASSED] sanitycheck
[12:09:04] [PASSED] test_lock
[12:09:04] [PASSED] test_lock_unlock
[12:09:04] [PASSED] test_duplicates
[12:09:04] [PASSED] test_prepare
[12:09:04] [PASSED] test_prepare_array
[12:09:04] [PASSED] test_multiple_loops
[12:09:04] ==================== [PASSED] drm_exec =====================
[12:09:04] =========== drm_format_helper_test (17 subtests) ===========
[12:09:04] ============== drm_test_fb_xrgb8888_to_gray8 ==============
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[12:09:04] ============= drm_test_fb_xrgb8888_to_rgb332 ==============
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[12:09:04] ============= drm_test_fb_xrgb8888_to_rgb565 ==============
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[12:09:04] ============ drm_test_fb_xrgb8888_to_xrgb1555 =============
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[12:09:04] ============ drm_test_fb_xrgb8888_to_argb1555 =============
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[12:09:04] ============ drm_test_fb_xrgb8888_to_rgba5551 =============
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[12:09:04] ============= drm_test_fb_xrgb8888_to_rgb888 ==============
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[12:09:04] ============= drm_test_fb_xrgb8888_to_bgr888 ==============
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ==========
[12:09:04] ============ drm_test_fb_xrgb8888_to_argb8888 =============
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[12:09:04] =========== drm_test_fb_xrgb8888_to_xrgb2101010 ===========
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[12:09:04] =========== drm_test_fb_xrgb8888_to_argb2101010 ===========
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[12:09:04] ============== drm_test_fb_xrgb8888_to_mono ===============
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[12:09:04] ==================== drm_test_fb_swab =====================
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ================ [PASSED] drm_test_fb_swab =================
[12:09:04] ============ drm_test_fb_xrgb8888_to_xbgr8888 =============
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[12:09:04] ============ drm_test_fb_xrgb8888_to_abgr8888 =============
[12:09:04] [PASSED] single_pixel_source_buffer
[12:09:04] [PASSED] single_pixel_clip_rectangle
[12:09:04] [PASSED] well_known_colors
[12:09:04] [PASSED] destination_pitch
[12:09:04] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[12:09:04] ================= drm_test_fb_clip_offset =================
[12:09:04] [PASSED] pass through
[12:09:04] [PASSED] horizontal offset
[12:09:04] [PASSED] vertical offset
[12:09:04] [PASSED] horizontal and vertical offset
[12:09:04] [PASSED] horizontal offset (custom pitch)
[12:09:04] [PASSED] vertical offset (custom pitch)
[12:09:04] [PASSED] horizontal and vertical offset (custom pitch)
[12:09:04] ============= [PASSED] drm_test_fb_clip_offset =============
[12:09:04] =================== drm_test_fb_memcpy ====================
[12:09:04] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[12:09:04] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[12:09:04] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[12:09:04] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[12:09:04] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[12:09:04] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[12:09:04] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[12:09:04] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[12:09:04] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[12:09:04] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[12:09:04] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[12:09:04] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[12:09:04] =============== [PASSED] drm_test_fb_memcpy ================
[12:09:04] ============= [PASSED] drm_format_helper_test ==============
[12:09:04] ================= drm_format (18 subtests) =================
[12:09:04] [PASSED] drm_test_format_block_width_invalid
[12:09:04] [PASSED] drm_test_format_block_width_one_plane
[12:09:04] [PASSED] drm_test_format_block_width_two_plane
[12:09:04] [PASSED] drm_test_format_block_width_three_plane
[12:09:04] [PASSED] drm_test_format_block_width_tiled
[12:09:04] [PASSED] drm_test_format_block_height_invalid
[12:09:04] [PASSED] drm_test_format_block_height_one_plane
[12:09:04] [PASSED] drm_test_format_block_height_two_plane
[12:09:04] [PASSED] drm_test_format_block_height_three_plane
[12:09:04] [PASSED] drm_test_format_block_height_tiled
[12:09:04] [PASSED] drm_test_format_min_pitch_invalid
[12:09:04] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[12:09:04] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[12:09:04] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[12:09:04] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[12:09:04] [PASSED] drm_test_format_min_pitch_two_plane
[12:09:04] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[12:09:04] [PASSED] drm_test_format_min_pitch_tiled
[12:09:04] =================== [PASSED] drm_format ====================
[12:09:04] ============== drm_framebuffer (10 subtests) ===============
[12:09:04] ========== drm_test_framebuffer_check_src_coords ==========
[12:09:04] [PASSED] Success: source fits into fb
[12:09:04] [PASSED] Fail: overflowing fb with x-axis coordinate
[12:09:04] [PASSED] Fail: overflowing fb with y-axis coordinate
[12:09:04] [PASSED] Fail: overflowing fb with source width
[12:09:04] [PASSED] Fail: overflowing fb with source height
[12:09:04] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[12:09:04] [PASSED] drm_test_framebuffer_cleanup
[12:09:04] =============== drm_test_framebuffer_create ===============
[12:09:04] [PASSED] ABGR8888 normal sizes
[12:09:04] [PASSED] ABGR8888 max sizes
[12:09:04] [PASSED] ABGR8888 pitch greater than min required
[12:09:04] [PASSED] ABGR8888 pitch less than min required
[12:09:04] [PASSED] ABGR8888 Invalid width
[12:09:04] [PASSED] ABGR8888 Invalid buffer handle
[12:09:04] [PASSED] No pixel format
[12:09:04] [PASSED] ABGR8888 Width 0
[12:09:04] [PASSED] ABGR8888 Height 0
[12:09:04] [PASSED] ABGR8888 Out of bound height * pitch combination
[12:09:04] [PASSED] ABGR8888 Large buffer offset
[12:09:04] [PASSED] ABGR8888 Buffer offset for inexistent plane
[12:09:04] [PASSED] ABGR8888 Invalid flag
[12:09:04] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[12:09:04] [PASSED] ABGR8888 Valid buffer modifier
[12:09:04] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[12:09:04] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[12:09:04] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[12:09:04] [PASSED] NV12 Normal sizes
[12:09:04] [PASSED] NV12 Max sizes
[12:09:04] [PASSED] NV12 Invalid pitch
[12:09:04] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[12:09:04] [PASSED] NV12 different modifier per-plane
[12:09:04] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[12:09:04] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[12:09:04] [PASSED] NV12 Modifier for inexistent plane
[12:09:04] [PASSED] NV12 Handle for inexistent plane
[12:09:04] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[12:09:04] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[12:09:04] [PASSED] YVU420 Normal sizes
[12:09:04] [PASSED] YVU420 Max sizes
[12:09:04] [PASSED] YVU420 Invalid pitch
[12:09:04] [PASSED] YVU420 Different pitches
[12:09:04] [PASSED] YVU420 Different buffer offsets/pitches
[12:09:04] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[12:09:04] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[12:09:04] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[12:09:04] [PASSED] YVU420 Valid modifier
[12:09:04] [PASSED] YVU420 Different modifiers per plane
[12:09:04] [PASSED] YVU420 Modifier for inexistent plane
[12:09:04] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[12:09:04] [PASSED] X0L2 Normal sizes
[12:09:04] [PASSED] X0L2 Max sizes
[12:09:04] [PASSED] X0L2 Invalid pitch
[12:09:04] [PASSED] X0L2 Pitch greater than minimum required
[12:09:04] [PASSED] X0L2 Handle for inexistent plane
[12:09:04] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[12:09:04] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[12:09:04] [PASSED] X0L2 Valid modifier
[12:09:04] [PASSED] X0L2 Modifier for inexistent plane
[12:09:04] =========== [PASSED] drm_test_framebuffer_create ===========
[12:09:04] [PASSED] drm_test_framebuffer_free
[12:09:04] [PASSED] drm_test_framebuffer_init
[12:09:04] [PASSED] drm_test_framebuffer_init_bad_format
[12:09:04] [PASSED] drm_test_framebuffer_init_dev_mismatch
[12:09:04] [PASSED] drm_test_framebuffer_lookup
[12:09:04] [PASSED] drm_test_framebuffer_lookup_inexistent
[12:09:04] [PASSED] drm_test_framebuffer_modifiers_not_supported
[12:09:04] ================= [PASSED] drm_framebuffer =================
[12:09:04] ================ drm_gem_shmem (8 subtests) ================
[12:09:04] [PASSED] drm_gem_shmem_test_obj_create
[12:09:04] [PASSED] drm_gem_shmem_test_obj_create_private
[12:09:04] [PASSED] drm_gem_shmem_test_pin_pages
[12:09:04] [PASSED] drm_gem_shmem_test_vmap
[12:09:04] [PASSED] drm_gem_shmem_test_get_pages_sgt
[12:09:04] [PASSED] drm_gem_shmem_test_get_sg_table
[12:09:04] [PASSED] drm_gem_shmem_test_madvise
[12:09:04] [PASSED] drm_gem_shmem_test_purge
[12:09:04] ================== [PASSED] drm_gem_shmem ==================
[12:09:04] === drm_atomic_helper_connector_hdmi_check (27 subtests) ===
[12:09:04] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[12:09:04] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[12:09:04] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[12:09:04] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[12:09:04] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[12:09:04] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[12:09:04] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420 =======
[12:09:04] [PASSED] Automatic
[12:09:04] [PASSED] Full
[12:09:04] [PASSED] Limited 16:235
[12:09:04] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 ===
[12:09:04] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[12:09:04] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[12:09:04] [PASSED] drm_test_check_disable_connector
[12:09:04] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[12:09:04] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb
[12:09:04] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420
[12:09:04] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422
[12:09:04] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420
[12:09:04] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420
[12:09:04] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[12:09:04] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[12:09:04] [PASSED] drm_test_check_output_bpc_dvi
[12:09:04] [PASSED] drm_test_check_output_bpc_format_vic_1
[12:09:04] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[12:09:04] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[12:09:04] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[12:09:04] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[12:09:04] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[12:09:04] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[12:09:04] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[12:09:04] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[12:09:04] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[12:09:04] [PASSED] drm_test_check_broadcast_rgb_value
[12:09:04] [PASSED] drm_test_check_bpc_8_value
[12:09:04] [PASSED] drm_test_check_bpc_10_value
[12:09:04] [PASSED] drm_test_check_bpc_12_value
[12:09:04] [PASSED] drm_test_check_format_value
[12:09:04] [PASSED] drm_test_check_tmds_char_value
[12:09:04] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[12:09:04] = drm_atomic_helper_connector_hdmi_mode_valid (4 subtests) =
[12:09:04] [PASSED] drm_test_check_mode_valid
[12:09:04] [PASSED] drm_test_check_mode_valid_reject
[12:09:04] [PASSED] drm_test_check_mode_valid_reject_rate
[12:09:04] [PASSED] drm_test_check_mode_valid_reject_max_clock
[12:09:04] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid ===
[12:09:04] ================= drm_managed (2 subtests) =================
[12:09:04] [PASSED] drm_test_managed_release_action
[12:09:04] [PASSED] drm_test_managed_run_action
[12:09:04] =================== [PASSED] drm_managed ===================
[12:09:04] =================== drm_mm (6 subtests) ====================
[12:09:04] [PASSED] drm_test_mm_init
[12:09:04] [PASSED] drm_test_mm_debug
[12:09:04] [PASSED] drm_test_mm_align32
[12:09:04] [PASSED] drm_test_mm_align64
[12:09:04] [PASSED] drm_test_mm_lowest
[12:09:04] [PASSED] drm_test_mm_highest
[12:09:04] ===================== [PASSED] drm_mm ======================
[12:09:04] ============= drm_modes_analog_tv (5 subtests) =============
[12:09:04] [PASSED] drm_test_modes_analog_tv_mono_576i
[12:09:04] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[12:09:04] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[12:09:04] [PASSED] drm_test_modes_analog_tv_pal_576i
[12:09:04] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[12:09:04] =============== [PASSED] drm_modes_analog_tv ===============
[12:09:04] ============== drm_plane_helper (2 subtests) ===============
[12:09:04] =============== drm_test_check_plane_state ================
[12:09:04] [PASSED] clipping_simple
[12:09:04] [PASSED] clipping_rotate_reflect
[12:09:04] [PASSED] positioning_simple
[12:09:04] [PASSED] upscaling
[12:09:04] [PASSED] downscaling
[12:09:04] [PASSED] rounding1
[12:09:04] [PASSED] rounding2
[12:09:04] [PASSED] rounding3
[12:09:04] [PASSED] rounding4
[12:09:04] =========== [PASSED] drm_test_check_plane_state ============
[12:09:04] =========== drm_test_check_invalid_plane_state ============
[12:09:04] [PASSED] positioning_invalid
[12:09:04] [PASSED] upscaling_invalid
[12:09:04] [PASSED] downscaling_invalid
[12:09:04] ======= [PASSED] drm_test_check_invalid_plane_state ========
[12:09:04] ================ [PASSED] drm_plane_helper =================
[12:09:04] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[12:09:04] ====== drm_test_connector_helper_tv_get_modes_check =======
[12:09:04] [PASSED] None
[12:09:04] [PASSED] PAL
[12:09:04] [PASSED] NTSC
[12:09:04] [PASSED] Both, NTSC Default
[12:09:04] [PASSED] Both, PAL Default
[12:09:04] [PASSED] Both, NTSC Default, with PAL on command-line
[12:09:04] [PASSED] Both, PAL Default, with NTSC on command-line
[12:09:04] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[12:09:04] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[12:09:04] ================== drm_rect (9 subtests) ===================
[12:09:04] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[12:09:04] [PASSED] drm_test_rect_clip_scaled_not_clipped
[12:09:04] [PASSED] drm_test_rect_clip_scaled_clipped
[12:09:04] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[12:09:04] ================= drm_test_rect_intersect =================
[12:09:04] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[12:09:04] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[12:09:04] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[12:09:04] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[12:09:04] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[12:09:04] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[12:09:04] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[12:09:04] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[12:09:04] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[12:09:04] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[12:09:04] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[12:09:04] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[12:09:04] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[12:09:04] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[12:09:04] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[12:09:04] ============= [PASSED] drm_test_rect_intersect =============
[12:09:04] ================ drm_test_rect_calc_hscale ================
[12:09:04] [PASSED] normal use
[12:09:04] [PASSED] out of max range
[12:09:04] [PASSED] out of min range
[12:09:04] [PASSED] zero dst
[12:09:04] [PASSED] negative src
[12:09:04] [PASSED] negative dst
[12:09:04] ============ [PASSED] drm_test_rect_calc_hscale ============
[12:09:04] ================ drm_test_rect_calc_vscale ================
[12:09:04] [PASSED] normal use
[12:09:04] [PASSED] out of max range
[12:09:04] [PASSED] out of min range
[12:09:04] [PASSED] zero dst
[12:09:04] [PASSED] negative src
[12:09:04] [PASSED] negative dst
[12:09:04] ============ [PASSED] drm_test_rect_calc_vscale ============
[12:09:04] ================== drm_test_rect_rotate ===================
[12:09:04] [PASSED] reflect-x
[12:09:04] [PASSED] reflect-y
[12:09:04] [PASSED] rotate-0
[12:09:04] [PASSED] rotate-90
[12:09:04] [PASSED] rotate-180
[12:09:04] [PASSED] rotate-270
stty: 'standard input': Inappropriate ioctl for device
[12:09:04] ============== [PASSED] drm_test_rect_rotate ===============
[12:09:04] ================ drm_test_rect_rotate_inv =================
[12:09:04] [PASSED] reflect-x
[12:09:04] [PASSED] reflect-y
[12:09:04] [PASSED] rotate-0
[12:09:04] [PASSED] rotate-90
[12:09:04] [PASSED] rotate-180
[12:09:04] [PASSED] rotate-270
[12:09:04] ============ [PASSED] drm_test_rect_rotate_inv =============
[12:09:04] ==================== [PASSED] drm_rect =====================
[12:09:04] ============ drm_sysfb_modeset_test (1 subtest) ============
[12:09:04] ============ drm_test_sysfb_build_fourcc_list =============
[12:09:04] [PASSED] no native formats
[12:09:04] [PASSED] XRGB8888 as native format
[12:09:04] [PASSED] remove duplicates
[12:09:04] [PASSED] convert alpha formats
[12:09:04] [PASSED] random formats
[12:09:04] ======== [PASSED] drm_test_sysfb_build_fourcc_list =========
[12:09:04] ============= [PASSED] drm_sysfb_modeset_test ==============
[12:09:04] ============================================================
[12:09:04] Testing complete. Ran 616 tests: passed: 616
[12:09:04] Elapsed time: 23.468s total, 1.702s configuring, 21.600s building, 0.139s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig
stty: 'standard input': Inappropriate ioctl for device
[12:09:04] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[12:09:06] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[12:09:14] Starting KUnit Kernel (1/1)...
[12:09:14] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[12:09:14] ================= ttm_device (5 subtests) ==================
[12:09:14] [PASSED] ttm_device_init_basic
[12:09:14] [PASSED] ttm_device_init_multiple
[12:09:14] [PASSED] ttm_device_fini_basic
[12:09:14] [PASSED] ttm_device_init_no_vma_man
[12:09:14] ================== ttm_device_init_pools ==================
[12:09:14] [PASSED] No DMA allocations, no DMA32 required
[12:09:14] [PASSED] DMA allocations, DMA32 required
[12:09:14] [PASSED] No DMA allocations, DMA32 required
[12:09:14] [PASSED] DMA allocations, no DMA32 required
[12:09:14] ============== [PASSED] ttm_device_init_pools ==============
[12:09:14] =================== [PASSED] ttm_device ====================
[12:09:14] ================== ttm_pool (8 subtests) ===================
[12:09:14] ================== ttm_pool_alloc_basic ===================
[12:09:14] [PASSED] One page
[12:09:14] [PASSED] More than one page
[12:09:14] [PASSED] Above the allocation limit
[12:09:14] [PASSED] One page, with coherent DMA mappings enabled
[12:09:14] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[12:09:14] ============== [PASSED] ttm_pool_alloc_basic ===============
[12:09:14] ============== ttm_pool_alloc_basic_dma_addr ==============
[12:09:14] [PASSED] One page
[12:09:14] [PASSED] More than one page
[12:09:14] [PASSED] Above the allocation limit
[12:09:14] [PASSED] One page, with coherent DMA mappings enabled
[12:09:14] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[12:09:14] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[12:09:14] [PASSED] ttm_pool_alloc_order_caching_match
[12:09:14] [PASSED] ttm_pool_alloc_caching_mismatch
[12:09:14] [PASSED] ttm_pool_alloc_order_mismatch
[12:09:14] [PASSED] ttm_pool_free_dma_alloc
[12:09:14] [PASSED] ttm_pool_free_no_dma_alloc
[12:09:14] [PASSED] ttm_pool_fini_basic
[12:09:14] ==================== [PASSED] ttm_pool =====================
[12:09:14] ================ ttm_resource (8 subtests) =================
[12:09:14] ================= ttm_resource_init_basic =================
[12:09:14] [PASSED] Init resource in TTM_PL_SYSTEM
[12:09:14] [PASSED] Init resource in TTM_PL_VRAM
[12:09:14] [PASSED] Init resource in a private placement
[12:09:14] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[12:09:14] ============= [PASSED] ttm_resource_init_basic =============
[12:09:14] [PASSED] ttm_resource_init_pinned
[12:09:14] [PASSED] ttm_resource_fini_basic
[12:09:14] [PASSED] ttm_resource_manager_init_basic
[12:09:14] [PASSED] ttm_resource_manager_usage_basic
[12:09:14] [PASSED] ttm_resource_manager_set_used_basic
[12:09:14] [PASSED] ttm_sys_man_alloc_basic
[12:09:14] [PASSED] ttm_sys_man_free_basic
[12:09:14] ================== [PASSED] ttm_resource ===================
[12:09:14] =================== ttm_tt (15 subtests) ===================
[12:09:14] ==================== ttm_tt_init_basic ====================
[12:09:14] [PASSED] Page-aligned size
[12:09:14] [PASSED] Extra pages requested
[12:09:14] ================ [PASSED] ttm_tt_init_basic ================
[12:09:14] [PASSED] ttm_tt_init_misaligned
[12:09:14] [PASSED] ttm_tt_fini_basic
[12:09:14] [PASSED] ttm_tt_fini_sg
[12:09:14] [PASSED] ttm_tt_fini_shmem
[12:09:14] [PASSED] ttm_tt_create_basic
[12:09:14] [PASSED] ttm_tt_create_invalid_bo_type
[12:09:14] [PASSED] ttm_tt_create_ttm_exists
[12:09:14] [PASSED] ttm_tt_create_failed
[12:09:14] [PASSED] ttm_tt_destroy_basic
[12:09:14] [PASSED] ttm_tt_populate_null_ttm
[12:09:14] [PASSED] ttm_tt_populate_populated_ttm
[12:09:14] [PASSED] ttm_tt_unpopulate_basic
[12:09:14] [PASSED] ttm_tt_unpopulate_empty_ttm
[12:09:14] [PASSED] ttm_tt_swapin_basic
[12:09:14] ===================== [PASSED] ttm_tt ======================
[12:09:14] =================== ttm_bo (14 subtests) ===================
[12:09:14] =========== ttm_bo_reserve_optimistic_no_ticket ===========
[12:09:14] [PASSED] Cannot be interrupted and sleeps
[12:09:14] [PASSED] Cannot be interrupted, locks straight away
[12:09:14] [PASSED] Can be interrupted, sleeps
[12:09:14] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[12:09:14] [PASSED] ttm_bo_reserve_locked_no_sleep
[12:09:14] [PASSED] ttm_bo_reserve_no_wait_ticket
[12:09:14] [PASSED] ttm_bo_reserve_double_resv
[12:09:14] [PASSED] ttm_bo_reserve_interrupted
[12:09:14] [PASSED] ttm_bo_reserve_deadlock
[12:09:14] [PASSED] ttm_bo_unreserve_basic
[12:09:14] [PASSED] ttm_bo_unreserve_pinned
[12:09:14] [PASSED] ttm_bo_unreserve_bulk
[12:09:14] [PASSED] ttm_bo_fini_basic
[12:09:14] [PASSED] ttm_bo_fini_shared_resv
[12:09:14] [PASSED] ttm_bo_pin_basic
[12:09:14] [PASSED] ttm_bo_pin_unpin_resource
[12:09:14] [PASSED] ttm_bo_multiple_pin_one_unpin
[12:09:14] ===================== [PASSED] ttm_bo ======================
[12:09:14] ============== ttm_bo_validate (22 subtests) ===============
[12:09:14] ============== ttm_bo_init_reserved_sys_man ===============
[12:09:14] [PASSED] Buffer object for userspace
[12:09:14] [PASSED] Kernel buffer object
[12:09:14] [PASSED] Shared buffer object
[12:09:14] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[12:09:14] ============== ttm_bo_init_reserved_mock_man ==============
[12:09:14] [PASSED] Buffer object for userspace
[12:09:14] [PASSED] Kernel buffer object
[12:09:14] [PASSED] Shared buffer object
[12:09:14] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[12:09:14] [PASSED] ttm_bo_init_reserved_resv
[12:09:14] ================== ttm_bo_validate_basic ==================
[12:09:14] [PASSED] Buffer object for userspace
[12:09:14] [PASSED] Kernel buffer object
[12:09:14] [PASSED] Shared buffer object
[12:09:14] ============== [PASSED] ttm_bo_validate_basic ==============
[12:09:14] [PASSED] ttm_bo_validate_invalid_placement
[12:09:14] ============= ttm_bo_validate_same_placement ==============
[12:09:14] [PASSED] System manager
[12:09:14] [PASSED] VRAM manager
[12:09:14] ========= [PASSED] ttm_bo_validate_same_placement ==========
[12:09:14] [PASSED] ttm_bo_validate_failed_alloc
[12:09:14] [PASSED] ttm_bo_validate_pinned
[12:09:14] [PASSED] ttm_bo_validate_busy_placement
[12:09:14] ================ ttm_bo_validate_multihop =================
[12:09:14] [PASSED] Buffer object for userspace
[12:09:14] [PASSED] Kernel buffer object
[12:09:14] [PASSED] Shared buffer object
[12:09:14] ============ [PASSED] ttm_bo_validate_multihop =============
[12:09:14] ========== ttm_bo_validate_no_placement_signaled ==========
[12:09:14] [PASSED] Buffer object in system domain, no page vector
[12:09:14] [PASSED] Buffer object in system domain with an existing page vector
[12:09:14] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[12:09:14] ======== ttm_bo_validate_no_placement_not_signaled ========
[12:09:14] [ERROR] Test: ttm_bo_validate_no_placement_not_signaled: missing subtest result line!
[12:09:14]
[12:09:14] Pid: 326, comm: kunit_try_catch Tainted: G W N 6.16.0-rc4-gf232a56e220e
[12:09:14] RIP: 0033:drm_gem_object_free+0xb/0x40
[12:09:14] RSP: 00000000b92b3dd8 EFLAGS: 00010246
[12:09:14] RAX: 0000000000000000 RBX: 0000000079746000 RCX: 00000000605af068
[12:09:14] RDX: 0000000000000000 RSI: 00000000601326a0 RDI: 0000000079746400
[12:09:14] RBP: 0000000079746400 R08: 0000000000000001 R09: 0000000000000000
[12:09:14] R10: 00000000796d83e0 R11: 000000006046db10 R12: 0000000079736600
[12:09:14] R13: 00000000797464f8 R14: 000000006036ec20 R15: 000000006036fa50
[12:09:14] Kernel panic - not syncing: Segfault with no mm
[12:09:14] [ERROR] Test: ttm_bo_validate_no_placement_not_signaled: 0 tests run!
[12:09:14] = [NO TESTS RUN] ttm_bo_validate_no_placement_not_signaled =
[12:09:14] [ERROR] Test: ttm_bo_validate: missing expected subtest!
[12:09:14] [CRASHED]
[12:09:14] [ERROR] Test: ttm_bo_validate: missing expected subtest!
[12:09:14] [CRASHED]
[12:09:14] [ERROR] Test: ttm_bo_validate: missing expected subtest!
[12:09:14] [CRASHED]
[12:09:14] [ERROR] Test: ttm_bo_validate: missing expected subtest!
[12:09:14] [CRASHED]
[12:09:14] [ERROR] Test: ttm_bo_validate: missing expected subtest!
[12:09:14] [CRASHED]
[12:09:14] [ERROR] Test: ttm_bo_validate: missing expected subtest!
[12:09:14] [CRASHED]
[12:09:14] [ERROR] Test: ttm_bo_validate: missing expected subtest!
[12:09:14] [CRASHED]
[12:09:14] [ERROR] Test: ttm_bo_validate: missing expected subtest!
[12:09:14] [CRASHED]
[12:09:14] [ERROR] Test: ttm_bo_validate: missing expected subtest!
[12:09:14] [CRASHED]
[12:09:14] [ERROR] Test: ttm_bo_validate: missing expected subtest!
[12:09:14] [CRASHED]
[12:09:14] [ERROR] Test: ttm_bo_validate: missing subtest result line!
[12:09:14] # module: ttm_bo_validate_test
[12:09:14] ================ [CRASHED] ttm_bo_validate =================
[12:09:14] ============================================================
[12:09:14] Testing complete. Ran 98 tests: passed: 88, crashed: 10, errors: 13
The kernel seems to have crashed; you can decode the stack traces with:
$ scripts/decode_stacktrace.sh .kunit/vmlinux .kunit < .kunit/test.log | tee .kunit/decoded.log | /kernel/tools/testing/kunit/kunit.py parse
[12:09:14] Elapsed time: 9.745s total, 1.707s configuring, 7.771s building, 0.267s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Switching TTM over to GEM refcounts v2
2025-07-02 11:00 Switching TTM over to GEM refcounts v2 Christian König
` (3 preceding siblings ...)
2025-07-02 12:09 ` ✗ CI.KUnit: failure " Patchwork
@ 2025-07-02 16:15 ` Matthew Brost
2025-07-07 10:59 ` Christian König
4 siblings, 1 reply; 11+ messages in thread
From: Matthew Brost @ 2025-07-02 16:15 UTC (permalink / raw)
To: Christian König; +Cc: thomas.hellstrom, intel-xe, dri-devel, amd-gfx
On Wed, Jul 02, 2025 at 01:00:26PM +0200, Christian König wrote:
> Hi everyone,
>
> v2 of this patch set. I've either pushed or removed the other
> patches from v1, so only two remain.
>
> Pretty straight forward conversation and shouldn't result in any visible
> technical difference.
>
> Please review and/or comment.
>
I'll take a look but heads up Thomas is out until 7/21. I know he did
some concerns on v1, so might need to wait for him to get back?
Matt
> Regards,
> Christian.
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] drm/ttm: rename ttm_bo_put to _fini
2025-07-02 11:00 ` [PATCH 1/2] drm/ttm: rename ttm_bo_put to _fini Christian König
@ 2025-07-02 22:01 ` Matthew Brost
2025-07-07 12:38 ` Christian König
0 siblings, 1 reply; 11+ messages in thread
From: Matthew Brost @ 2025-07-02 22:01 UTC (permalink / raw)
To: Christian König; +Cc: thomas.hellstrom, intel-xe, dri-devel, amd-gfx
On Wed, Jul 02, 2025 at 01:00:27PM +0200, Christian König wrote:
> Give TTM BOs a separate cleanup function.
>
> The next step in removing the TTM BO reference counting and replacing it
> with the GEM object reference counting.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +-
> drivers/gpu/drm/drm_gem_vram_helper.c | 6 +-
> drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 4 +-
> drivers/gpu/drm/loongson/lsdc_gem.c | 2 +-
> drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +-
> drivers/gpu/drm/qxl/qxl_gem.c | 2 +-
> drivers/gpu/drm/radeon/radeon_gem.c | 2 +-
> drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 12 ++--
> .../gpu/drm/ttm/tests/ttm_bo_validate_test.c | 64 +++++++++----------
> drivers/gpu/drm/ttm/ttm_bo.c | 21 +++---
> drivers/gpu/drm/ttm/ttm_bo_internal.h | 2 +
> drivers/gpu/drm/vmwgfx/vmwgfx_gem.c | 2 +-
> drivers/gpu/drm/xe/xe_bo.c | 2 +-
> include/drm/ttm/ttm_bo.h | 2 +-
> 14 files changed, 64 insertions(+), 61 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index e5e33a68d935..9a2a8496eea3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -198,7 +198,7 @@ static void amdgpu_gem_object_free(struct drm_gem_object *gobj)
> struct amdgpu_bo *aobj = gem_to_amdgpu_bo(gobj);
>
> amdgpu_hmm_unregister(aobj);
> - ttm_bo_put(&aobj->tbo);
> + ttm_bo_fini(&aobj->tbo);
> }
>
> int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> index b04cde4a60e7..90760d0ca071 100644
> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> @@ -107,7 +107,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs;
>
> static void drm_gem_vram_cleanup(struct drm_gem_vram_object *gbo)
> {
> - /* We got here via ttm_bo_put(), which means that the
> + /* We got here via ttm_bo_fini(), which means that the
> * TTM buffer object in 'bo' has already been cleaned
> * up; only release the GEM object.
> */
> @@ -234,11 +234,11 @@ EXPORT_SYMBOL(drm_gem_vram_create);
> * drm_gem_vram_put() - Releases a reference to a VRAM-backed GEM object
> * @gbo: the GEM VRAM object
> *
> - * See ttm_bo_put() for more information.
> + * See ttm_bo_fini() for more information.
> */
> void drm_gem_vram_put(struct drm_gem_vram_object *gbo)
> {
> - ttm_bo_put(&gbo->bo);
> + ttm_bo_fini(&gbo->bo);
> }
> EXPORT_SYMBOL(drm_gem_vram_put);
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> index 1f4814968868..57bb111d65da 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
> @@ -1029,7 +1029,7 @@ static void i915_ttm_delayed_free(struct drm_i915_gem_object *obj)
> {
> GEM_BUG_ON(!obj->ttm.created);
>
> - ttm_bo_put(i915_gem_to_ttm(obj));
> + ttm_bo_fini(i915_gem_to_ttm(obj));
> }
>
> static vm_fault_t vm_fault_ttm(struct vm_fault *vmf)
> @@ -1325,7 +1325,7 @@ int __i915_gem_ttm_object_init(struct intel_memory_region *mem,
> * If this function fails, it will call the destructor, but
> * our caller still owns the object. So no freeing in the
> * destructor until obj->ttm.created is true.
> - * Similarly, in delayed_destroy, we can't call ttm_bo_put()
> + * Similarly, in delayed_destroy, we can't call ttm_bo_fini()
> * until successful initialization.
> */
> ret = ttm_bo_init_reserved(&i915->bdev, i915_gem_to_ttm(obj), bo_type,
> diff --git a/drivers/gpu/drm/loongson/lsdc_gem.c b/drivers/gpu/drm/loongson/lsdc_gem.c
> index a720d8f53209..22d0eced95da 100644
> --- a/drivers/gpu/drm/loongson/lsdc_gem.c
> +++ b/drivers/gpu/drm/loongson/lsdc_gem.c
> @@ -57,7 +57,7 @@ static void lsdc_gem_object_free(struct drm_gem_object *obj)
> struct ttm_buffer_object *tbo = to_ttm_bo(obj);
>
> if (tbo)
> - ttm_bo_put(tbo);
> + ttm_bo_fini(tbo);
> }
>
> static int lsdc_gem_object_vmap(struct drm_gem_object *obj, struct iosys_map *map)
> diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
> index 690e10fbf0bd..395d92ab6271 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_gem.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
> @@ -87,7 +87,7 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
> return;
> }
>
> - ttm_bo_put(&nvbo->bo);
> + ttm_bo_fini(&nvbo->bo);
>
> pm_runtime_mark_last_busy(dev);
> pm_runtime_put_autosuspend(dev);
> diff --git a/drivers/gpu/drm/qxl/qxl_gem.c b/drivers/gpu/drm/qxl/qxl_gem.c
> index fc5e3763c359..d26043424e95 100644
> --- a/drivers/gpu/drm/qxl/qxl_gem.c
> +++ b/drivers/gpu/drm/qxl/qxl_gem.c
> @@ -39,7 +39,7 @@ void qxl_gem_object_free(struct drm_gem_object *gobj)
> qxl_surface_evict(qdev, qobj, false);
>
> tbo = &qobj->tbo;
> - ttm_bo_put(tbo);
> + ttm_bo_fini(tbo);
> }
>
> int qxl_gem_object_create(struct qxl_device *qdev, int size,
> diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
> index f86773f3db20..18ca1bcfd2f9 100644
> --- a/drivers/gpu/drm/radeon/radeon_gem.c
> +++ b/drivers/gpu/drm/radeon/radeon_gem.c
> @@ -86,7 +86,7 @@ static void radeon_gem_object_free(struct drm_gem_object *gobj)
>
> if (robj) {
> radeon_mn_unregister(robj);
> - ttm_bo_put(&robj->tbo);
> + ttm_bo_fini(&robj->tbo);
> }
> }
>
> diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
> index 6c77550c51af..5426b435f702 100644
> --- a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
> +++ b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
> @@ -379,7 +379,7 @@ static void ttm_bo_unreserve_bulk(struct kunit *test)
> dma_resv_fini(resv);
> }
>
> -static void ttm_bo_put_basic(struct kunit *test)
> +static void ttm_bo_fini_basic(struct kunit *test)
> {
> struct ttm_test_devices *priv = test->priv;
> struct ttm_buffer_object *bo;
> @@ -410,7 +410,7 @@ static void ttm_bo_put_basic(struct kunit *test)
> dma_resv_unlock(bo->base.resv);
> KUNIT_EXPECT_EQ(test, err, 0);
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
Intel's CI [1], see Kunit tab, is indicating an issue with the
selftests. Unsure if this suggestion would fix the kunit failure, but
would it not be better to just ref count gem BOs in the kunit tests and
create a mock drm_gem_object_funcs ops in in which free calls
ttm_bo_fini? Then in selftests replace ttm_bo_fini with
drm_gem_object_put?
Matt
[1] https://patchwork.freedesktop.org/series/151064/
> }
>
> static const char *mock_name(struct dma_fence *f)
> @@ -423,7 +423,7 @@ static const struct dma_fence_ops mock_fence_ops = {
> .get_timeline_name = mock_name,
> };
>
> -static void ttm_bo_put_shared_resv(struct kunit *test)
> +static void ttm_bo_fini_shared_resv(struct kunit *test)
> {
> struct ttm_test_devices *priv = test->priv;
> struct ttm_buffer_object *bo;
> @@ -463,7 +463,7 @@ static void ttm_bo_put_shared_resv(struct kunit *test)
> bo->type = ttm_bo_type_device;
> bo->base.resv = external_resv;
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> }
>
> static void ttm_bo_pin_basic(struct kunit *test)
> @@ -616,8 +616,8 @@ static struct kunit_case ttm_bo_test_cases[] = {
> KUNIT_CASE(ttm_bo_unreserve_basic),
> KUNIT_CASE(ttm_bo_unreserve_pinned),
> KUNIT_CASE(ttm_bo_unreserve_bulk),
> - KUNIT_CASE(ttm_bo_put_basic),
> - KUNIT_CASE(ttm_bo_put_shared_resv),
> + KUNIT_CASE(ttm_bo_fini_basic),
> + KUNIT_CASE(ttm_bo_fini_shared_resv),
> KUNIT_CASE(ttm_bo_pin_basic),
> KUNIT_CASE(ttm_bo_pin_unpin_resource),
> KUNIT_CASE(ttm_bo_multiple_pin_one_unpin),
> diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
> index 3148f5d3dbd6..4553c4e0e0f1 100644
> --- a/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
> +++ b/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
> @@ -144,7 +144,7 @@ static void ttm_bo_init_reserved_sys_man(struct kunit *test)
> drm_mm_node_allocated(&bo->base.vma_node.vm_node));
>
> ttm_resource_free(bo, &bo->resource);
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> }
>
> static void ttm_bo_init_reserved_mock_man(struct kunit *test)
> @@ -186,7 +186,7 @@ static void ttm_bo_init_reserved_mock_man(struct kunit *test)
> drm_mm_node_allocated(&bo->base.vma_node.vm_node));
>
> ttm_resource_free(bo, &bo->resource);
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> ttm_mock_manager_fini(priv->ttm_dev, mem_type);
> }
>
> @@ -221,7 +221,7 @@ static void ttm_bo_init_reserved_resv(struct kunit *test)
> KUNIT_EXPECT_PTR_EQ(test, bo->base.resv, &resv);
>
> ttm_resource_free(bo, &bo->resource);
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> }
>
> static void ttm_bo_validate_basic(struct kunit *test)
> @@ -265,7 +265,7 @@ static void ttm_bo_validate_basic(struct kunit *test)
> KUNIT_EXPECT_EQ(test, bo->resource->placement,
> DRM_BUDDY_TOPDOWN_ALLOCATION);
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> ttm_mock_manager_fini(priv->ttm_dev, snd_mem);
> }
>
> @@ -292,7 +292,7 @@ static void ttm_bo_validate_invalid_placement(struct kunit *test)
>
> KUNIT_EXPECT_EQ(test, err, -ENOMEM);
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> }
>
> static void ttm_bo_validate_failed_alloc(struct kunit *test)
> @@ -321,7 +321,7 @@ static void ttm_bo_validate_failed_alloc(struct kunit *test)
>
> KUNIT_EXPECT_EQ(test, err, -ENOMEM);
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> ttm_bad_manager_fini(priv->ttm_dev, mem_type);
> }
>
> @@ -353,7 +353,7 @@ static void ttm_bo_validate_pinned(struct kunit *test)
> ttm_bo_unpin(bo);
> dma_resv_unlock(bo->base.resv);
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> }
>
> static const struct ttm_bo_validate_test_case ttm_mem_type_cases[] = {
> @@ -403,7 +403,7 @@ static void ttm_bo_validate_same_placement(struct kunit *test)
> KUNIT_EXPECT_EQ(test, err, 0);
> KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, 0);
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
>
> if (params->mem_type != TTM_PL_SYSTEM)
> ttm_mock_manager_fini(priv->ttm_dev, params->mem_type);
> @@ -452,7 +452,7 @@ static void ttm_bo_validate_busy_placement(struct kunit *test)
> KUNIT_EXPECT_EQ(test, bo->resource->mem_type, snd_mem);
> KUNIT_ASSERT_TRUE(test, list_is_singular(&man->lru[bo->priority]));
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> ttm_bad_manager_fini(priv->ttm_dev, fst_mem);
> ttm_mock_manager_fini(priv->ttm_dev, snd_mem);
> }
> @@ -495,7 +495,7 @@ static void ttm_bo_validate_multihop(struct kunit *test)
> KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, size * 2);
> KUNIT_EXPECT_EQ(test, bo->resource->mem_type, final_mem);
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
>
> ttm_mock_manager_fini(priv->ttm_dev, fst_mem);
> ttm_mock_manager_fini(priv->ttm_dev, tmp_mem);
> @@ -566,7 +566,7 @@ static void ttm_bo_validate_no_placement_signaled(struct kunit *test)
> KUNIT_ASSERT_TRUE(test, flags & TTM_TT_FLAG_ZERO_ALLOC);
> }
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> }
>
> static int threaded_dma_resv_signal(void *arg)
> @@ -634,7 +634,7 @@ static void ttm_bo_validate_no_placement_not_signaled(struct kunit *test)
> /* Make sure we have an idle object at this point */
> dma_resv_wait_timeout(bo->base.resv, usage, false, MAX_SCHEDULE_TIMEOUT);
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> }
>
> static void ttm_bo_validate_move_fence_signaled(struct kunit *test)
> @@ -667,7 +667,7 @@ static void ttm_bo_validate_move_fence_signaled(struct kunit *test)
> KUNIT_EXPECT_EQ(test, bo->resource->mem_type, mem_type);
> KUNIT_EXPECT_EQ(test, ctx.bytes_moved, size);
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> dma_fence_put(man->move);
> }
>
> @@ -752,7 +752,7 @@ static void ttm_bo_validate_move_fence_not_signaled(struct kunit *test)
> else
> KUNIT_EXPECT_EQ(test, bo->resource->mem_type, fst_mem);
>
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> ttm_mock_manager_fini(priv->ttm_dev, fst_mem);
> ttm_mock_manager_fini(priv->ttm_dev, snd_mem);
> }
> @@ -801,8 +801,8 @@ static void ttm_bo_validate_swapout(struct kunit *test)
> KUNIT_EXPECT_EQ(test, bo_small->resource->mem_type, TTM_PL_SYSTEM);
> KUNIT_EXPECT_TRUE(test, bo_small->ttm->page_flags & TTM_TT_FLAG_SWAPPED);
>
> - ttm_bo_put(bo_big);
> - ttm_bo_put(bo_small);
> + ttm_bo_fini(bo_big);
> + ttm_bo_fini(bo_small);
>
> ttm_mock_manager_fini(priv->ttm_dev, mem_type);
> }
> @@ -856,8 +856,8 @@ static void ttm_bo_validate_happy_evict(struct kunit *test)
> KUNIT_EXPECT_EQ(test, bos[1].resource->mem_type, mem_type);
>
> for (i = 0; i < bo_no; i++)
> - ttm_bo_put(&bos[i]);
> - ttm_bo_put(bo_val);
> + ttm_bo_fini(&bos[i]);
> + ttm_bo_fini(bo_val);
>
> ttm_mock_manager_fini(priv->ttm_dev, mem_type);
> ttm_mock_manager_fini(priv->ttm_dev, mem_multihop);
> @@ -901,12 +901,12 @@ static void ttm_bo_validate_all_pinned_evict(struct kunit *test)
>
> KUNIT_EXPECT_EQ(test, err, -ENOMEM);
>
> - ttm_bo_put(bo_small);
> + ttm_bo_fini(bo_small);
>
> ttm_bo_reserve(bo_big, false, false, NULL);
> ttm_bo_unpin(bo_big);
> dma_resv_unlock(bo_big->base.resv);
> - ttm_bo_put(bo_big);
> + ttm_bo_fini(bo_big);
>
> ttm_mock_manager_fini(priv->ttm_dev, mem_type);
> ttm_mock_manager_fini(priv->ttm_dev, mem_multihop);
> @@ -965,13 +965,13 @@ static void ttm_bo_validate_allowed_only_evict(struct kunit *test)
> KUNIT_EXPECT_EQ(test, bo_evictable->resource->mem_type, mem_type_evict);
> KUNIT_EXPECT_EQ(test, ctx_val.bytes_moved, size * 2 + BO_SIZE);
>
> - ttm_bo_put(bo);
> - ttm_bo_put(bo_evictable);
> + ttm_bo_fini(bo);
> + ttm_bo_fini(bo_evictable);
>
> ttm_bo_reserve(bo_pinned, false, false, NULL);
> ttm_bo_unpin(bo_pinned);
> dma_resv_unlock(bo_pinned->base.resv);
> - ttm_bo_put(bo_pinned);
> + ttm_bo_fini(bo_pinned);
>
> ttm_mock_manager_fini(priv->ttm_dev, mem_type);
> ttm_mock_manager_fini(priv->ttm_dev, mem_multihop);
> @@ -1022,8 +1022,8 @@ static void ttm_bo_validate_deleted_evict(struct kunit *test)
> KUNIT_EXPECT_NULL(test, bo_big->ttm);
> KUNIT_EXPECT_NULL(test, bo_big->resource);
>
> - ttm_bo_put(bo_small);
> - ttm_bo_put(bo_big);
> + ttm_bo_fini(bo_small);
> + ttm_bo_fini(bo_big);
> ttm_mock_manager_fini(priv->ttm_dev, mem_type);
> }
>
> @@ -1074,8 +1074,8 @@ static void ttm_bo_validate_busy_domain_evict(struct kunit *test)
> KUNIT_EXPECT_EQ(test, bo_init->resource->mem_type, mem_type);
> KUNIT_EXPECT_NULL(test, bo_val->resource);
>
> - ttm_bo_put(bo_init);
> - ttm_bo_put(bo_val);
> + ttm_bo_fini(bo_init);
> + ttm_bo_fini(bo_val);
>
> ttm_mock_manager_fini(priv->ttm_dev, mem_type);
> ttm_bad_manager_fini(priv->ttm_dev, mem_type_evict);
> @@ -1119,8 +1119,8 @@ static void ttm_bo_validate_evict_gutting(struct kunit *test)
> KUNIT_ASSERT_NULL(test, bo_evict->resource);
> KUNIT_ASSERT_TRUE(test, bo_evict->ttm->page_flags & TTM_TT_FLAG_ZERO_ALLOC);
>
> - ttm_bo_put(bo_evict);
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo_evict);
> + ttm_bo_fini(bo);
>
> ttm_mock_manager_fini(priv->ttm_dev, mem_type);
> }
> @@ -1177,9 +1177,9 @@ static void ttm_bo_validate_recrusive_evict(struct kunit *test)
> ttm_mock_manager_fini(priv->ttm_dev, mem_type);
> ttm_mock_manager_fini(priv->ttm_dev, mem_type_evict);
>
> - ttm_bo_put(bo_val);
> - ttm_bo_put(bo_tt);
> - ttm_bo_put(bo_mock);
> + ttm_bo_fini(bo_val);
> + ttm_bo_fini(bo_tt);
> + ttm_bo_fini(bo_mock);
> }
>
> static struct kunit_case ttm_bo_validate_test_cases[] = {
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index f4d9e68b21e7..3ea27c9707ef 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -49,6 +49,14 @@
> #include "ttm_module.h"
> #include "ttm_bo_internal.h"
>
> +static void ttm_bo_release(struct kref *kref);
> +
> +/* TODO: remove! */
> +void ttm_bo_put(struct ttm_buffer_object *bo)
> +{
> + kref_put(&bo->kref, ttm_bo_release);
> +}
> +
> static void ttm_bo_mem_space_debug(struct ttm_buffer_object *bo,
> struct ttm_placement *placement)
> {
> @@ -318,18 +326,11 @@ static void ttm_bo_release(struct kref *kref)
> bo->destroy(bo);
> }
>
> -/**
> - * ttm_bo_put
> - *
> - * @bo: The buffer object.
> - *
> - * Unreference a buffer object.
> - */
> -void ttm_bo_put(struct ttm_buffer_object *bo)
> +void ttm_bo_fini(struct ttm_buffer_object *bo)
> {
> - kref_put(&bo->kref, ttm_bo_release);
> + ttm_bo_put(bo);
> }
> -EXPORT_SYMBOL(ttm_bo_put);
> +EXPORT_SYMBOL(ttm_bo_fini);
>
> static int ttm_bo_bounce_temp_buffer(struct ttm_buffer_object *bo,
> struct ttm_operation_ctx *ctx,
> diff --git a/drivers/gpu/drm/ttm/ttm_bo_internal.h b/drivers/gpu/drm/ttm/ttm_bo_internal.h
> index 9d8b747a34db..e0d48eac74b0 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo_internal.h
> +++ b/drivers/gpu/drm/ttm/ttm_bo_internal.h
> @@ -55,4 +55,6 @@ ttm_bo_get_unless_zero(struct ttm_buffer_object *bo)
> return bo;
> }
>
> +void ttm_bo_put(struct ttm_buffer_object *bo);
> +
> #endif
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c
> index 7057d852951b..e564d071f40b 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gem.c
> @@ -37,7 +37,7 @@ static void vmw_gem_object_free(struct drm_gem_object *gobj)
> {
> struct ttm_buffer_object *bo = drm_gem_ttm_of_gem(gobj);
> if (bo)
> - ttm_bo_put(bo);
> + ttm_bo_fini(bo);
> }
>
> static int vmw_gem_object_open(struct drm_gem_object *obj,
> diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
> index 7aa2c17825da..c4aa3eaba2a2 100644
> --- a/drivers/gpu/drm/xe/xe_bo.c
> +++ b/drivers/gpu/drm/xe/xe_bo.c
> @@ -1649,7 +1649,7 @@ static void xe_gem_object_free(struct drm_gem_object *obj)
> * refcount directly if needed.
> */
> __xe_bo_vunmap(gem_to_xe_bo(obj));
> - ttm_bo_put(container_of(obj, struct ttm_buffer_object, base));
> + ttm_bo_fini(container_of(obj, struct ttm_buffer_object, base));
> }
>
> static void xe_gem_object_close(struct drm_gem_object *obj,
> diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h
> index 894ff7ccd68e..21dac074b94d 100644
> --- a/include/drm/ttm/ttm_bo.h
> +++ b/include/drm/ttm/ttm_bo.h
> @@ -391,7 +391,7 @@ int ttm_bo_wait_ctx(struct ttm_buffer_object *bo,
> int ttm_bo_validate(struct ttm_buffer_object *bo,
> struct ttm_placement *placement,
> struct ttm_operation_ctx *ctx);
> -void ttm_bo_put(struct ttm_buffer_object *bo);
> +void ttm_bo_fini(struct ttm_buffer_object *bo);
> void ttm_bo_set_bulk_move(struct ttm_buffer_object *bo,
> struct ttm_lru_bulk_move *bulk);
> bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Switching TTM over to GEM refcounts v2
2025-07-02 16:15 ` Switching TTM over to GEM refcounts v2 Matthew Brost
@ 2025-07-07 10:59 ` Christian König
0 siblings, 0 replies; 11+ messages in thread
From: Christian König @ 2025-07-07 10:59 UTC (permalink / raw)
To: Matthew Brost; +Cc: thomas.hellstrom, intel-xe, dri-devel, amd-gfx
On 02.07.25 18:15, Matthew Brost wrote:
> On Wed, Jul 02, 2025 at 01:00:26PM +0200, Christian König wrote:
>> Hi everyone,
>>
>> v2 of this patch set. I've either pushed or removed the other
>> patches from v1, so only two remain.
>>
>> Pretty straight forward conversation and shouldn't result in any visible
>> technical difference.
>>
>> Please review and/or comment.
>>
>
> I'll take a look but heads up Thomas is out until 7/21. I know he did
> some concerns on v1, so might need to wait for him to get back?
Yeah, that works for me.
But I would rather like to get the first patch in if possible since that is just a simple rename.
Christian.
>
> Matt
>
>> Regards,
>> Christian.
>>
>>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] drm/ttm: rename ttm_bo_put to _fini
2025-07-02 22:01 ` Matthew Brost
@ 2025-07-07 12:38 ` Christian König
2025-07-07 16:25 ` Matthew Brost
0 siblings, 1 reply; 11+ messages in thread
From: Christian König @ 2025-07-07 12:38 UTC (permalink / raw)
To: Matthew Brost; +Cc: thomas.hellstrom, intel-xe, dri-devel, amd-gfx
On 03.07.25 00:01, Matthew Brost wrote:
>> diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
>> index 6c77550c51af..5426b435f702 100644
>> --- a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
>> +++ b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
>> @@ -379,7 +379,7 @@ static void ttm_bo_unreserve_bulk(struct kunit *test)
>> dma_resv_fini(resv);
>> }
>>
>> -static void ttm_bo_put_basic(struct kunit *test)
>> +static void ttm_bo_fini_basic(struct kunit *test)
>> {
>> struct ttm_test_devices *priv = test->priv;
>> struct ttm_buffer_object *bo;
>> @@ -410,7 +410,7 @@ static void ttm_bo_put_basic(struct kunit *test)
>> dma_resv_unlock(bo->base.resv);
>> KUNIT_EXPECT_EQ(test, err, 0);
>>
>> - ttm_bo_put(bo);
>> + ttm_bo_fini(bo);
>
> Intel's CI [1], see Kunit tab, is indicating an issue with the
> selftests.
Even without any change the ttm_bo_validate subtest is crashing for me and I was about to disable those crashing tests.
My guess is that the test never worked 100% reliable and relies on some incorrect assumptions.
> Unsure if this suggestion would fix the kunit failure, but
> would it not be better to just ref count gem BOs in the kunit tests and
> create a mock drm_gem_object_funcs ops in in which free calls
> ttm_bo_fini? Then in selftests replace ttm_bo_fini with
> drm_gem_object_put?
Yeah that is one possible solution I had in mind as well, but I thought about disabling the failed test first and then discussion with Thomas what to do about it.
Christian.
>
> Matt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] drm/ttm: rename ttm_bo_put to _fini
2025-07-07 12:38 ` Christian König
@ 2025-07-07 16:25 ` Matthew Brost
2025-07-07 18:16 ` Christian König
0 siblings, 1 reply; 11+ messages in thread
From: Matthew Brost @ 2025-07-07 16:25 UTC (permalink / raw)
To: Christian König; +Cc: thomas.hellstrom, intel-xe, dri-devel, amd-gfx
On Mon, Jul 07, 2025 at 02:38:07PM +0200, Christian König wrote:
> On 03.07.25 00:01, Matthew Brost wrote:
> >> diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
> >> index 6c77550c51af..5426b435f702 100644
> >> --- a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
> >> +++ b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
> >> @@ -379,7 +379,7 @@ static void ttm_bo_unreserve_bulk(struct kunit *test)
> >> dma_resv_fini(resv);
> >> }
> >>
> >> -static void ttm_bo_put_basic(struct kunit *test)
> >> +static void ttm_bo_fini_basic(struct kunit *test)
> >> {
> >> struct ttm_test_devices *priv = test->priv;
> >> struct ttm_buffer_object *bo;
> >> @@ -410,7 +410,7 @@ static void ttm_bo_put_basic(struct kunit *test)
> >> dma_resv_unlock(bo->base.resv);
> >> KUNIT_EXPECT_EQ(test, err, 0);
> >>
> >> - ttm_bo_put(bo);
> >> + ttm_bo_fini(bo);
> >
> > Intel's CI [1], see Kunit tab, is indicating an issue with the
> > selftests.
>
> Even without any change the ttm_bo_validate subtest is crashing for me and I was about to disable those crashing tests.
>
> My guess is that the test never worked 100% reliable and relies on some incorrect assumptions.
>
Hmm, this seems to work in our CI pretty reliably but in general I am
not a fan of selftests, particularly ones so fragile that any small
change of behavior breaks the tests. If this is indeed one of cases
(testing really specific behavior), fine with disabling it.
> > Unsure if this suggestion would fix the kunit failure, but
> > would it not be better to just ref count gem BOs in the kunit tests and
> > create a mock drm_gem_object_funcs ops in in which free calls
> > ttm_bo_fini? Then in selftests replace ttm_bo_fini with
> > drm_gem_object_put?
>
> Yeah that is one possible solution I had in mind as well, but I thought about disabling the failed test first and then discussion with Thomas what to do about it.
>
See above. Yea it Intel's main (IGTs) CI work, I'd say there is about
99% confidence that the changes you are making haven't broke anything.
Matt
> Christian.
>
> >
> > Matt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] drm/ttm: rename ttm_bo_put to _fini
2025-07-07 16:25 ` Matthew Brost
@ 2025-07-07 18:16 ` Christian König
0 siblings, 0 replies; 11+ messages in thread
From: Christian König @ 2025-07-07 18:16 UTC (permalink / raw)
To: Matthew Brost; +Cc: thomas.hellstrom, intel-xe, dri-devel, amd-gfx
On 07.07.25 18:25, Matthew Brost wrote:
> On Mon, Jul 07, 2025 at 02:38:07PM +0200, Christian König wrote:
>> On 03.07.25 00:01, Matthew Brost wrote:
>>>> diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
>>>> index 6c77550c51af..5426b435f702 100644
>>>> --- a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
>>>> +++ b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
>>>> @@ -379,7 +379,7 @@ static void ttm_bo_unreserve_bulk(struct kunit *test)
>>>> dma_resv_fini(resv);
>>>> }
>>>>
>>>> -static void ttm_bo_put_basic(struct kunit *test)
>>>> +static void ttm_bo_fini_basic(struct kunit *test)
>>>> {
>>>> struct ttm_test_devices *priv = test->priv;
>>>> struct ttm_buffer_object *bo;
>>>> @@ -410,7 +410,7 @@ static void ttm_bo_put_basic(struct kunit *test)
>>>> dma_resv_unlock(bo->base.resv);
>>>> KUNIT_EXPECT_EQ(test, err, 0);
>>>>
>>>> - ttm_bo_put(bo);
>>>> + ttm_bo_fini(bo);
>>>
>>> Intel's CI [1], see Kunit tab, is indicating an issue with the
>>> selftests.
>>
>> Even without any change the ttm_bo_validate subtest is crashing for me and I was about to disable those crashing tests.
>>
>> My guess is that the test never worked 100% reliable and relies on some incorrect assumptions.
>>
>
> Hmm, this seems to work in our CI pretty reliably but in general I am
> not a fan of selftests, particularly ones so fragile that any small
> change of behavior breaks the tests. If this is indeed one of cases
> (testing really specific behavior), fine with disabling it.
The ttm_bo_validate_test is crashing 100% reliable on my build box.
Skimming over the code I've found at least one incorrect use of locks, but that doesn't seem to fix it.
Going to take a closer look tomorrow.
Regards,
Christian.
>
>>> Unsure if this suggestion would fix the kunit failure, but
>>> would it not be better to just ref count gem BOs in the kunit tests and
>>> create a mock drm_gem_object_funcs ops in in which free calls
>>> ttm_bo_fini? Then in selftests replace ttm_bo_fini with
>>> drm_gem_object_put?
>>
>> Yeah that is one possible solution I had in mind as well, but I thought about disabling the failed test first and then discussion with Thomas what to do about it.
>>
>
> See above. Yea it Intel's main (IGTs) CI work, I'd say there is about
> 99% confidence that the changes you are making haven't broke anything.
>
> Matt
>
>> Christian.
>>
>>>
>>> Matt
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-07-07 18:16 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 11:00 Switching TTM over to GEM refcounts v2 Christian König
2025-07-02 11:00 ` [PATCH 1/2] drm/ttm: rename ttm_bo_put to _fini Christian König
2025-07-02 22:01 ` Matthew Brost
2025-07-07 12:38 ` Christian König
2025-07-07 16:25 ` Matthew Brost
2025-07-07 18:16 ` Christian König
2025-07-02 11:00 ` [PATCH 2/2] drm/ttm: replace TTMs refcount with the DRM refcount v2 Christian König
2025-07-02 12:08 ` ✗ CI.checkpatch: warning for series starting with [1/2] drm/ttm: rename ttm_bo_put to _fini Patchwork
2025-07-02 12:09 ` ✗ CI.KUnit: failure " Patchwork
2025-07-02 16:15 ` Switching TTM over to GEM refcounts v2 Matthew Brost
2025-07-07 10:59 ` Christian König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox