Files
linux/drivers/gpu
Alex Hung 64aa07084a drm/amd/display: Add KUnit tests for dm_ism_dispatch_next_event
[Why & How]
Add 6 KUnit test cases exercising the new helper:

- hyst_wait_no_delay: HYSTERESIS_WAITING + delay_ns==0
  returns IMMEDIATE (covers null stream / no hysteresis config).
- hyst_wait_with_delay: HYSTERESIS_WAITING + delay_ns>0
  returns DM_ISM_NUM_EVENTS (timer scheduled, no immediate event).
- opt_idle_no_sso_delay: OPTIMIZED_IDLE + sso_delay_ns==0
  returns IMMEDIATE (skip SSO, transition immediately).
- opt_idle_with_sso_delay: OPTIMIZED_IDLE + sso_delay_ns>0
  returns DM_ISM_NUM_EVENTS (SSO timer scheduled).
- timer_aborted: TIMER_ABORTED always returns IMMEDIATE
  regardless of delay values.
- no_action_state: all other states return DM_ISM_NUM_EVENTS.

Assisted-by: Copilot:Claude-Sonnet-4.6
Reviewed-by: Ray Wu <ray.wu@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-06-03 13:41:50 -04:00
..