Hi Amaranath,
Thanks for checking this.
On 2.04.2024 15:35, Somalapuram, Amaranath wrote:
/usr/bin/ld: drivers/gpu/drm/tests/drm_kunit_helpers.o:(.rodata+0xa0):
undefined reference to `drm_atomic_helper_crtc_reset'
/usr/bin/ld: drivers/gpu/drm/tests/drm_kunit_helpers.o:(.rodata+0xf0):
undefined reference to `drm_atomic_helper_crtc_duplicate_state'
/usr/bin/ld: drivers/gpu/drm/tests/drm_kunit_helpers.o:(.rodata+0xf8):
undefined reference to `drm_atomic_helper_crtc_destroy_state'
/usr/bin/ld: drivers/gpu/drm/tests/drm_kunit_helpers.o:(.rodata+0x1f8):
undefined reference to `drm_atomic_helper_plane_reset'
/usr/bin/ld: drivers/gpu/drm/tests/drm_kunit_helpers.o:(.rodata+0x208):
undefined reference to `drm_atomic_helper_plane_duplicate_state'
/usr/bin/ld: drivers/gpu/drm/tests/drm_kunit_helpers.o:(.rodata+0x210):
undefined reference to `drm_atomic_helper_plane_destroy_state'
/usr/bin/ld: drivers/gpu/drm/tests/drm_kunit_helpers.o:(.rodata+0x300):
undefined reference to `drm_atomic_helper_check'
/usr/bin/ld: drivers/gpu/drm/tests/drm_kunit_helpers.o:(.rodata+0x308):
undefined reference to `drm_atomic_helper_commit'
/usr/bin/ld: drivers/gpu/drm/display/drm_dp_mst_topology.o: in function
`drm_dp_mst_duplicate_state':
drm_dp_mst_topology.c:(.text+0x3164): undefined reference to
`__drm_atomic_helper_private_obj_duplicate_state'
/usr/bin/ld: drivers/gpu/drm/display/drm_dp_mst_topology.o: in function
`drm_dp_delayed_destroy_work':
drm_dp_mst_topology.c:(.text+0x39d6): undefined reference to
`drm_kms_helper_hotplug_event'
/usr/bin/ld: drivers/gpu/drm/display/drm_dp_mst_topology.o: in function
`drm_dp_mst_up_req_work':
drm_dp_mst_topology.c:(.text+0x930d): undefined reference to
`drm_kms_helper_hotplug_event'
/usr/bin/ld: drivers/gpu/drm/display/drm_dp_mst_topology.o: in function
`drm_dp_mst_link_probe_work':
drm_dp_mst_topology.c:(.text+0xacda): undefined reference to
`drm_kms_helper_hotplug_event'
collect2: error: ld returned 1 exit status
make[3]: *** [../scripts/Makefile.vmlinux:37: vmlinux] Error 1
make[2]: *** [/home/rtg/amar/git/drm-misc/Makefile:1162: vmlinux] Error 2
make[1]: *** [/home/rtg/amar/git/drm-misc/Makefile:240: __sub-make] Error 2
make: *** [Makefile:240: __sub-make] Error 2
rtg@rtg-prash-navi22:~/amar/git/drm-misc$
These linker errors were fixed in a patch[1] merged to
drm-misc-next-fixes and it took some time to propagate it back back to
drm-misc-next. It looks like it went back in on March 31st, which is
after commit 4c4f33be7e4d (dated March 25th, if I'm not mistaken). I
checked the series on the drm-misc-next with head commit 45c734fdd43d
and it passes (omitted UML warnings in the listing to improve readability):
$ [drm-misc-next] ./tools/testing/kunit/kunit.py run
--kunitconfig=drivers/gpu/drm/ttm/tests
[10:11:06] Configuring KUnit Kernel ...
[10:11:06] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=8
[10:11:55] Starting KUnit Kernel (1/1)...
[10:11:55] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[10:11:55] ================= ttm_device (5 subtests) ==================
[10:11:55] [PASSED] ttm_device_init_basic
[10:11:55] [PASSED] ttm_device_init_multiple
[10:11:55] [PASSED] ttm_device_fini_basic
[10:11:55] [PASSED] ttm_device_init_no_vma_man
[10:11:55] ================== ttm_device_init_pools ==================
[10:11:55] [PASSED] No DMA allocations, no DMA32 required
[10:11:55] [PASSED] DMA allocations, DMA32 required
[10:11:55] [PASSED] No DMA allocations, DMA32 required
[10:11:55] [PASSED] DMA allocations, no DMA32 required
[10:11:55] ============== [PASSED] ttm_device_init_pools ==============
[10:11:55] =================== [PASSED] ttm_device ====================
[10:11:55] ================== ttm_pool (8 subtests) ===================
[10:11:55] ================== ttm_pool_alloc_basic ===================
[10:11:55] [PASSED] One page
[10:11:55] [PASSED] More than one page
[10:11:55] [PASSED] Above the allocation limit
[10:11:55] [PASSED] One page, with coherent DMA mappings enabled
[10:11:55] [PASSED] Above the allocation limit, with coherent DMA
mappings enabled
[10:11:55] ============== [PASSED] ttm_pool_alloc_basic ===============
[10:11:55] ============== ttm_pool_alloc_basic_dma_addr ==============
[10:11:55] [PASSED] One page
[10:11:55] [PASSED] More than one page
[10:11:55] [PASSED] Above the allocation limit
[10:11:55] [PASSED] One page, with coherent DMA mappings enabled
[10:11:55] [PASSED] Above the allocation limit, with coherent DMA
mappings enabled
[10:11:55] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[10:11:55] [PASSED] ttm_pool_alloc_order_caching_match
[10:11:55] [PASSED] ttm_pool_alloc_caching_mismatch
[10:11:55] [PASSED] ttm_pool_alloc_order_mismatch
[10:11:55] [PASSED] ttm_pool_free_dma_alloc
[10:11:55] [PASSED] ttm_pool_free_no_dma_alloc
[10:11:55] [PASSED] ttm_pool_fini_basic
[10:11:55] ==================== [PASSED] ttm_pool =====================
[10:11:55] ================ ttm_resource (8 subtests) =================
[10:11:55] ================= ttm_resource_init_basic =================
[10:11:55] [PASSED] Init resource in TTM_PL_SYSTEM
[10:11:55] [PASSED] Init resource in TTM_PL_VRAM
[10:11:55] [PASSED] Init resource in a private placement
[10:11:55] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[10:11:55] ============= [PASSED] ttm_resource_init_basic =============
[10:11:55] [PASSED] ttm_resource_init_pinned
[10:11:55] [PASSED] ttm_resource_fini_basic
[10:11:55] [PASSED] ttm_resource_manager_init_basic
[10:11:55] [PASSED] ttm_resource_manager_usage_basic
[10:11:55] [PASSED] ttm_resource_manager_set_used_basic
[10:11:55] [PASSED] ttm_sys_man_alloc_basic
[10:11:55] [PASSED] ttm_sys_man_free_basic
[10:11:55] ================== [PASSED] ttm_resource ===================
[10:11:55] =================== ttm_tt (15 subtests) ===================
[10:11:55] ==================== ttm_tt_init_basic ====================
[10:11:55] [PASSED] Page-aligned size
[10:11:55] [PASSED] Extra pages requested
[10:11:55] ================ [PASSED] ttm_tt_init_basic ================
[10:11:55] [PASSED] ttm_tt_init_misaligned
[10:11:55] [PASSED] ttm_tt_fini_basic
[10:11:55] [PASSED] ttm_tt_fini_sg
[10:11:55] [PASSED] ttm_tt_fini_shmem
[10:11:55] [PASSED] ttm_tt_create_basic
[10:11:55] [PASSED] ttm_tt_create_invalid_bo_type
[10:11:55] [PASSED] ttm_tt_create_ttm_exists
[10:11:55] [PASSED] ttm_tt_create_failed
[10:11:55] [PASSED] ttm_tt_destroy_basic
[10:11:55] [PASSED] ttm_tt_populate_null_ttm
[10:11:55] [PASSED] ttm_tt_populate_populated_ttm
[10:11:55] [PASSED] ttm_tt_unpopulate_basic
[10:11:55] [PASSED] ttm_tt_unpopulate_empty_ttm
[10:11:55] [PASSED] ttm_tt_swapin_basic
[10:11:55] ===================== [PASSED] ttm_tt ======================
[10:11:55] =================== ttm_bo (14 subtests) ===================
[10:11:55] =========== ttm_bo_reserve_optimistic_no_ticket ===========
[10:11:55] [PASSED] Cannot be interrupted and sleeps
[10:11:55] [PASSED] Cannot be interrupted, locks straight away
[10:11:55] [PASSED] Can be interrupted, sleeps
[10:11:55] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[10:11:55] [PASSED] ttm_bo_reserve_locked_no_sleep
[10:11:55] [PASSED] ttm_bo_reserve_no_wait_ticket
[10:11:55] [PASSED] ttm_bo_reserve_double_resv
[10:11:55] [PASSED] ttm_bo_reserve_interrupted
[10:11:55] [PASSED] ttm_bo_reserve_deadlock
[10:11:55] [PASSED] ttm_bo_unreserve_basic
[10:11:55] [PASSED] ttm_bo_unreserve_pinned
[10:11:55] [PASSED] ttm_bo_unreserve_bulk
[10:11:55] [PASSED] ttm_bo_put_basic
[10:11:55] [PASSED] ttm_bo_put_shared_resv
[10:11:55] [PASSED] ttm_bo_pin_basic
[10:11:55] [PASSED] ttm_bo_pin_unpin_resource
[10:11:55] [PASSED] ttm_bo_multiple_pin_one_unpin
[10:11:55] ===================== [PASSED] ttm_bo ======================
[10:11:55] ============== ttm_bo_validate (22 subtests) ===============
[10:11:55] ============== ttm_bo_init_reserved_sys_man ===============
[10:11:55] [PASSED] Buffer object for userspace
[10:11:55] [PASSED] Kernel buffer object
[10:11:55] [PASSED] Shared buffer object
[10:11:55] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[10:11:55] ============== ttm_bo_init_reserved_mock_man ==============
[10:11:55] [PASSED] Buffer object for userspace
[10:11:55] [PASSED] Kernel buffer object
[10:11:55] [PASSED] Shared buffer object
[10:11:55] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[10:11:55] [PASSED] ttm_bo_init_reserved_resv
[10:11:55] ================== ttm_bo_validate_basic ==================
[10:11:55] [PASSED] Buffer object for userspace
[10:11:55] [PASSED] Kernel buffer object
[10:11:55] [PASSED] Shared buffer object
[10:11:55] ============== [PASSED] ttm_bo_validate_basic ==============
[10:11:55] [PASSED] ttm_bo_validate_invalid_placement
[10:11:55] ============= ttm_bo_validate_same_placement ==============
[10:11:55] [PASSED] System manager
[10:11:55] [PASSED] VRAM manager
[10:11:55] ========= [PASSED] ttm_bo_validate_same_placement ==========
[10:11:55] [PASSED] ttm_bo_validate_failed_alloc
[10:11:55] [PASSED] ttm_bo_validate_pinned
[10:11:55] [PASSED] ttm_bo_validate_busy_placement
[10:11:55] ================ ttm_bo_validate_multihop =================
[10:11:55] [PASSED] Buffer object for userspace
[10:11:55] [PASSED] Kernel buffer object
[10:11:55] [PASSED] Shared buffer object
[10:11:55] ============ [PASSED] ttm_bo_validate_multihop =============
[10:11:55] ========== ttm_bo_validate_no_placement_signaled ==========
[10:11:55] [PASSED] Buffer object in system domain, no page vector
[10:11:55] [PASSED] Buffer object in system domain with an existing page
vector
[10:11:55] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[10:11:55] ======== ttm_bo_validate_no_placement_not_signaled ========
[10:11:55] [PASSED] Buffer object for userspace
[10:11:55] [PASSED] Kernel buffer object
[10:11:55] [PASSED] Shared buffer object
[10:11:55] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[10:11:55] [PASSED] ttm_bo_validate_move_fence_signaled
[10:11:55] ========= ttm_bo_validate_move_fence_not_signaled =========
[10:11:55] [PASSED] Waits for GPU
[10:11:55] [PASSED] Tries to lock straight away
[10:11:55] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[10:11:55] [PASSED] ttm_bo_validate_swapout
[10:11:55] [PASSED] ttm_bo_validate_happy_evict
[10:11:55] [PASSED] ttm_bo_validate_all_pinned_evict
[10:11:55] [PASSED] ttm_bo_validate_allowed_only_evict
[10:11:55] [PASSED] ttm_bo_validate_deleted_evict
[10:11:55] [PASSED] ttm_bo_validate_busy_domain_evict
[10:11:55] [PASSED] ttm_bo_validate_evict_gutting
[10:11:55] [PASSED] ttm_bo_validate_recrusive_evict
[10:11:55] ================= [PASSED] ttm_bo_validate =================
[10:11:55] ============================================================
[10:11:55] Testing complete. Ran 102 tests: passed: 102
[10:11:55] Elapsed time: 49.333s total, 0.002s configuring, 48.814s
building, 0.417s running
All the best,
Karolina
--------------
[1] - https://patchwork.freedesktop.org/series/131077/