[PATCH RESEND v9 1/8] drm/ttm/tests: Fix argument in ttm_tt_kunit_init()

Somalapuram, Amaranath asomalap at amd.com
Mon Jan 15 11:56:39 UTC 2024


On 1/11/2024 8:29 PM, Christian König wrote:
> I've gone ahead and pushed this one to drm-misc-next.
>
> Going to take a look at the rest as well.
>
> @Amar could you run another test round with those? And maybe ping 
> Kenny if we can integrate them into the CI.
>
> Thanks,
> Christian.
>
Look's good:

Regards,
S.Amarnath

rtg at rtg-Artic:~/amar/git/drm-misc$ ./tools/testing/kunit/kunit.py run 
--kunitconfig=drivers/gpu/drm/ttm/tests
[17:21:52] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[17:21:55] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=16
[17:22:23] Starting KUnit Kernel (1/1)...
[17:22:23] ============================================================
[17:22:23] ======================= ttm_device ========================
[17:22:23] [PASSED] ttm_device_init_basic
[17:22:23] [PASSED] ttm_device_init_multiple
[17:22:23] [PASSED] ttm_device_fini_basic
[17:22:23] [PASSED] ttm_device_init_no_vma_man
[17:22:23] ================== ttm_device_init_pools ==================
[17:22:23] [PASSED] No DMA allocations, no DMA32 required
[17:22:23] [PASSED] DMA allocations, DMA32 required
[17:22:23] [PASSED] No DMA allocations, DMA32 required
[17:22:23] [PASSED] DMA allocations, no DMA32 required
[17:22:23] ============== [PASSED] ttm_device_init_pools ==============
[17:22:23] =================== [PASSED] ttm_device ====================
[17:22:23] ======================== ttm_pool =========================
[17:22:23] ================== ttm_pool_alloc_basic ===================
[17:22:23] [PASSED] One page
[17:22:23] [PASSED] More than one page
[17:22:23] [PASSED] Above the allocation limit
[17:22:23] [PASSED] One page, with coherent DMA mappings enabled
[17:22:23] [PASSED] Above the allocation limit, with coherent DMA 
mappings enabled
[17:22:23] ============== [PASSED] ttm_pool_alloc_basic ===============
[17:22:23] ============== ttm_pool_alloc_basic_dma_addr ==============
[17:22:23] [PASSED] One page
[17:22:23] [PASSED] More than one page
[17:22:23] [PASSED] Above the allocation limit
[17:22:23] [PASSED] One page, with coherent DMA mappings enabled
[17:22:23] [PASSED] Above the allocation limit, with coherent DMA 
mappings enabled
[17:22:23] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[17:22:23] [PASSED] ttm_pool_alloc_order_caching_match
[17:22:23] [PASSED] ttm_pool_alloc_caching_mismatch
[17:22:23] [PASSED] ttm_pool_alloc_order_mismatch
[17:22:23] [PASSED] ttm_pool_free_dma_alloc
[17:22:23] [PASSED] ttm_pool_free_no_dma_alloc
[17:22:23] [PASSED] ttm_pool_fini_basic
[17:22:23] ==================== [PASSED] ttm_pool =====================
[17:22:23] ====================== ttm_resource =======================
[17:22:23] ================= ttm_resource_init_basic =================
[17:22:23] [PASSED] Init resource in TTM_PL_SYSTEM
[17:22:23] [PASSED] Init resource in TTM_PL_VRAM
[17:22:23] [PASSED] Init resource in a private placement
[17:22:23] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[17:22:23] ============= [PASSED] ttm_resource_init_basic =============
[17:22:23] [PASSED] ttm_resource_init_pinned
[17:22:23] [PASSED] ttm_resource_fini_basic
[17:22:23] [PASSED] ttm_resource_manager_init_basic
[17:22:23] [PASSED] ttm_resource_manager_usage_basic
[17:22:23] [PASSED] ttm_resource_manager_set_used_basic
[17:22:23] [PASSED] ttm_sys_man_alloc_basic
[17:22:23] [PASSED] ttm_sys_man_free_basic
[17:22:23] ================== [PASSED] ttm_resource ===================
[17:22:23] ========================= ttm_tt ==========================
[17:22:23] ==================== ttm_tt_init_basic ====================
[17:22:23] [PASSED] Page-aligned size
[17:22:23] [PASSED] Extra pages requested
[17:22:23] ================ [PASSED] ttm_tt_init_basic ================
[17:22:23] [PASSED] ttm_tt_init_misaligned
[17:22:23] [PASSED] ttm_tt_fini_basic
[17:22:23] [PASSED] ttm_tt_fini_sg
[17:22:23] [PASSED] ttm_tt_fini_shmem
[17:22:23] [PASSED] ttm_tt_create_basic
[17:22:23] [PASSED] ttm_tt_create_invalid_bo_type
[17:22:23] [PASSED] ttm_tt_create_ttm_exists
[17:22:23] [PASSED] ttm_tt_create_failed
[17:22:23] [PASSED] ttm_tt_destroy_basic
[17:22:23] [PASSED] ttm_tt_populate_null_ttm
[17:22:23] [PASSED] ttm_tt_populate_populated_ttm
[17:22:23] [PASSED] ttm_tt_unpopulate_basic
[17:22:23] [PASSED] ttm_tt_unpopulate_empty_ttm
[17:22:23] [PASSED] ttm_tt_swapin_basic
[17:22:23] ===================== [PASSED] ttm_tt ======================
[17:22:23] ========================= ttm_bo ==========================
[17:22:23] =========== ttm_bo_reserve_optimistic_no_ticket ===========
[17:22:23] [PASSED] Cannot be interrupted and sleeps
[17:22:23] [PASSED] Cannot be interrupted, locks straight away
[17:22:23] [PASSED] Can be interrupted, sleeps
[17:22:23] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[17:22:23] [PASSED] ttm_bo_reserve_locked_no_sleep
[17:22:23] [PASSED] ttm_bo_reserve_no_wait_ticket
[17:22:23] [PASSED] ttm_bo_reserve_double_resv
[17:22:23] [PASSED] ttm_bo_reserve_interrupted
[17:22:23] [PASSED] ttm_bo_reserve_deadlock
[17:22:23] [PASSED] ttm_bo_unreserve_basic
[17:22:23] [PASSED] ttm_bo_unreserve_pinned
[17:22:23] [PASSED] ttm_bo_unreserve_bulk
[17:22:23] [PASSED] ttm_bo_put_basic
[17:22:23] [PASSED] ttm_bo_put_shared_resv
[17:22:23] [PASSED] ttm_bo_pin_basic
[17:22:23] [PASSED] ttm_bo_pin_unpin_resource
[17:22:23] [PASSED] ttm_bo_multiple_pin_one_unpin
[17:22:23] ===================== [PASSED] ttm_bo ======================
[17:22:23] ===================== ttm_bo_validate =====================
[17:22:23] ============== ttm_bo_init_reserved_sys_man ===============
[17:22:23] [PASSED] Buffer object for userspace
[17:22:23] [PASSED] Kernel buffer object
[17:22:23] [PASSED] Shared buffer object
[17:22:23] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[17:22:23] ============== ttm_bo_init_reserved_mock_man ==============
[17:22:23] [PASSED] Buffer object for userspace
[17:22:23] [PASSED] Kernel buffer object
[17:22:23] [PASSED] Shared buffer object
[17:22:23] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[17:22:23] [PASSED] ttm_bo_init_reserved_resv
[17:22:23] ================== ttm_bo_validate_basic ==================
[17:22:23] [PASSED] Buffer object for userspace
[17:22:23] [PASSED] Kernel buffer object
[17:22:23] [PASSED] Shared buffer object
[17:22:23] ============== [PASSED] ttm_bo_validate_basic ==============
[17:22:23] [PASSED] ttm_bo_validate_invalid_placement
[17:22:23] ============= ttm_bo_validate_same_placement ==============
[17:22:23] [PASSED] System manager
[17:22:23] [PASSED] VRAM manager
[17:22:23] ========= [PASSED] ttm_bo_validate_same_placement ==========
[17:22:23] [PASSED] ttm_bo_validate_failed_alloc
[17:22:23] [PASSED] ttm_bo_validate_pinned
[17:22:23] [PASSED] ttm_bo_validate_busy_placement
[17:22:23] ================ ttm_bo_validate_multihop =================
[17:22:23] [PASSED] Buffer object for userspace
[17:22:23] [PASSED] Kernel buffer object
[17:22:23] [PASSED] Shared buffer object
[17:22:23] ============ [PASSED] ttm_bo_validate_multihop =============
[17:22:23] ========== ttm_bo_validate_no_placement_signaled ==========
[17:22:23] [PASSED] Buffer object in system domain, no page vector
[17:22:23] [PASSED] Buffer object in system domain with an existing page 
vector
[17:22:23] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[17:22:23] ======== ttm_bo_validate_no_placement_not_signaled ========
[17:22:23] [PASSED] Buffer object for userspace
[17:22:23] [PASSED] Kernel buffer object
[17:22:23] [PASSED] Shared buffer object
[17:22:23] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[17:22:23] [PASSED] ttm_bo_validate_move_fence_signaled
[17:22:24] ========= ttm_bo_validate_move_fence_not_signaled =========
[17:22:24] [PASSED] Waits for GPU
[17:22:24] [PASSED] Tries to lock straight away
[17:22:24] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[17:22:24] [PASSED] ttm_bo_validate_swapout
[17:22:24] [PASSED] ttm_bo_validate_happy_evict
[17:22:24] [PASSED] ttm_bo_validate_all_pinned_evict
[17:22:24] [PASSED] ttm_bo_validate_allowed_only_evict
[17:22:24] [PASSED] ttm_bo_validate_deleted_evict
[17:22:24] [PASSED] ttm_bo_validate_busy_domain_evict
[17:22:24] [PASSED] ttm_bo_validate_evict_gutting
[17:22:24] [PASSED] ttm_bo_validate_recrusive_evict
[17:22:24] ================= [PASSED] ttm_bo_validate =================
[17:22:24] ============================================================
[17:22:24] Testing complete. Ran 102 tests: passed: 102
[17:22:24] Elapsed time: 31.810s total, 2.810s configuring, 28.277s 
building, 0.563s running

> Am 11.01.24 um 11:28 schrieb Karolina Stolarek:
>> Remove a leftover definition of page order and pass an empty flag value
>> in ttm_pool_pre_populated().
>>
>> Signed-off-by: Karolina Stolarek <karolina.stolarek at intel.com>
>> Tested-by: Amaranath Somalapuram <Amaranath.Somalapuram at amd.com>
>> Reviewed-by: Dominik Karol Piątkowski 
>> <dominik.karol.piatkowski at intel.com>
>> Acked-by: Christian König <christian.koenig at amd.com>
>> ---
>>   drivers/gpu/drm/ttm/tests/ttm_pool_test.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/ttm/tests/ttm_pool_test.c 
>> b/drivers/gpu/drm/ttm/tests/ttm_pool_test.c
>> index 2d9cae8cd984..b97f7b6daf5b 100644
>> --- a/drivers/gpu/drm/ttm/tests/ttm_pool_test.c
>> +++ b/drivers/gpu/drm/ttm/tests/ttm_pool_test.c
>> @@ -78,10 +78,9 @@ static struct ttm_pool 
>> *ttm_pool_pre_populated(struct kunit *test,
>>       struct ttm_test_devices *devs = priv->devs;
>>       struct ttm_pool *pool;
>>       struct ttm_tt *tt;
>> -    unsigned long order = __fls(size / PAGE_SIZE);
>>       int err;
>>   -    tt = ttm_tt_kunit_init(test, order, caching, size);
>> +    tt = ttm_tt_kunit_init(test, 0, caching, size);
>>       KUNIT_ASSERT_NOT_NULL(test, tt);
>>         pool = kunit_kzalloc(test, sizeof(*pool), GFP_KERNEL);
>


More information about the dri-devel mailing list