]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: Add KUnit test for colorop TF bitmasks
authorAlex Hung <alex.hung@amd.com>
Wed, 22 Apr 2026 17:37:19 +0000 (11:37 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2026 15:54:36 +0000 (11:54 -0400)
commit77f3ed873c5985bb326ab8a4fd8d243e957e962a
treed5c83a46823c711579fafe312a3303ec79cfcf19
parent7a5371e20884cd2b8d583f2879da7679648ff440
drm/amd/display: Add KUnit test for colorop TF bitmasks

Add KUnit tests that verify the three supported transfer
function bitmask constants exported by amdgpu_dm_colorop.c:
amdgpu_dm_supported_degam_tfs, amdgpu_dm_supported_shaper_tfs,
and amdgpu_dm_supported_blnd_tfs.

Each bitmask is tested for presence of each expected curve
flag and absence of any unexpected bits.  A cross-check
confirms that degam and blnd bitmasks are identical.

amdgpu_dm_initialize_default_pipeline() is not tested
because it needs a fully initialised drm_plane backed by
an amdgpu_device with DC color caps.

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/tests/Makefile
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_colorop_test.c [new file with mode: 0644]