drm/amd/display: Add KUnit test for replay
authorAlex Hung <alex.hung@amd.com>
Thu, 23 Apr 2026 01:51:47 +0000 (19:51 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2026 15:54:37 +0000 (11:54 -0400)
commit15b2363e90f7a0b5b904ab2f011593fef3f73e16
tree438cd55d938d795756b39eb61fc4b6c6b168376e
parent53af0cf6c8e8712da2c30c55fd2b9118c8445b83
drm/amd/display: Add KUnit test for replay

Add KUnit tests for amdgpu_dm_link_supports_replay() which
validates panel replay capability based on link DPCD caps,
freesync state, and VSDB info. Nine test cases cover the
positive path and each individual failure condition.

Export the function under CONFIG_DRM_AMD_DC_KUNIT_TEST and
add the amdgpu include path to the tests Makefile so that
amdgpu_dm.h can resolve amdgpu_mode.h types under UML.

Assisted-by: Copilot:Claude-Opus-4.6
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c
drivers/gpu/drm/amd/display/amdgpu_dm/tests/Makefile
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_replay_test.c [new file with mode: 0644]