drm/i915/dp_link_training: Add helper to query allowed autoretrain

Add link_recovery_autoretrain_allowed() to make it clearer what the
condition is about at its callers: queuing work for and starting an
autoretrain is allowed.

This also prepares for replacing the sequential link training failure
counter with an enum in a follow-up change.

v2: Convert link_recovery_autoretrain_allowed()'s documentation to be a
    non kernel-doc comment and detail what an allowed autoretrain is.
    (Jani)

Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260601093836.3057345-13-imre.deak@intel.com
This commit is contained in:
Imre Deak 2026-06-01 12:38:25 +03:00
commit 1a5e170bf7