mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 02:21:39 -04:00
drm/i915/dp_link_training: Clamp sequential link training failure counter
Clamp link_training->seq_train_failures to MAX_SEQ_TRAIN_FAILURES to avoid - an unlikely - overflow. This is ok, because the code only makes a distinction between the cases where the counter is below or at the limit. This also prepares for replacing the counter with an enum in a follow-up change. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20260601093836.3057345-10-imre.deak@intel.com
This commit is contained in:
@@ -1831,7 +1831,8 @@ void intel_dp_start_link_train(struct intel_atomic_state *state,
|
||||
return;
|
||||
}
|
||||
|
||||
link_training->seq_train_failures++;
|
||||
if (link_training->seq_train_failures < MAX_SEQ_TRAIN_FAILURES)
|
||||
link_training->seq_train_failures++;
|
||||
|
||||
/*
|
||||
* Ignore the link failure in CI
|
||||
|
||||
Reference in New Issue
Block a user