drm/amd/display: Add KUnit test for CRC function
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Wed, 4 Feb 2026 20:15:20 +0000 (15:15 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2026 15:54:36 +0000 (11:54 -0400)
commitd28859a47058e3cd57f5bfa886067112894010fd
tree780b3a15c3d2acb67300be591fb7ac46bf97b257
parent4cdbba5a16aaf16513b69cc332b1d6f971a44b52
drm/amd/display: Add KUnit test for CRC function

DM CRC parsing functions are an easy candidate for exploring the use of
KUnit unit-testing frameworks. Add a few tests for the same.

The test file and .kunitconfig are placed under amdgpu_dm/tests/ to
follow the convention of keeping test code separate from production
sources.

Assisted-by: Copilot:Claude-Opus-4.6
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@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/Kconfig
drivers/gpu/drm/amd/display/amdgpu_dm/Makefile
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_kunit_helpers.h [new file with mode: 0644]
drivers/gpu/drm/amd/display/amdgpu_dm/tests/.kunitconfig [new file with mode: 0644]
drivers/gpu/drm/amd/display/amdgpu_dm/tests/Makefile [new file with mode: 0644]
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crc_test.c [new file with mode: 0644]