mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/amd/display: Test ISM idle commit
[WHAT] Add KUnit tests for the three idle-optimization commit arms of the ISM FSM: OPTIMIZED_IDLE, OPTIMIZED_IDLE_SSO and TIMER_ABORTED. [HOW] Record idle changes with a stub on dc->hwss.apply_idle_power_optimizations() and read the outcome from dc->idle_optimizations_allowed. DC already owns that callback, so it is the natural injection point. dc_allow_idle_optimizations() returns early when the requested state already matches, so the stub runs only on a real transition and its call count is the number of idle changes the FSM asked for. That count is what separates the three arms, which otherwise all leave idle in the same state. The remaining two commit calls need no double: dc_post_update_surfaces_to_stream() returns on !dc->optimized_required and amdgpu_dm_crtc_set_static_screen_optimze() stops in the replay and PSR event helpers when the link has neither feature enabled. Both are already no-ops on a test dc, so a double would only add upkeep. Assisted-by: Copilot:Claude-Opus-5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
5153f7864c
commit
4066b56704
1 changed files with 193 additions and 5 deletions
Loading…
Add table
Add a link
Reference in a new issue