Add KUnit tests for helper functions, IRQ table management paths, and
DRM mock-backed CRTC lookup in amdgpu_dm_irq.c.
Tests cover:
- amdgpu_dm_hpd_to_dal_irq_source(): all HPD types 1-6,
AMDGPU_HPD_NONE, and out-of-range values
- are_sinks_equal(): NULL inputs, signal mismatch, EDID
length mismatch, EDID data mismatch, identical sinks,
zero-length EDID, full-length identical EDID, and a
single trailing-byte difference
- dmub_notification_type_str(): notification type mappings that are
always built, plus the unknown/default case
- amdgpu_dm_irq_init(): low/high handler list initialization
- amdgpu_dm_irq_register_interrupt(): NULL input rejection,
invalid context/source rejection, low/high handler insertion,
multiple handlers on one source, and the same handler registered
in both low and high contexts
- amdgpu_dm_irq_unregister_interrupt(): invalid source and NULL
handler rejection, removal of registered low/high handlers, and
the handler-not-found path
- amdgpu_dm_irq_fini(): cleanup of registered low/high handlers and
the empty-table case
- amdgpu_dm_get_crtc_by_otg_inst(): DRM mock CRTC list match,
no-match, and empty-list paths
Assisted-by: Copilot:Claude-Opus-4
Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>