Skip to content

Commit 069504f

Browse files
jnikularodrigovivi
authored andcommitted
drm/i915/dp: Fix potential infinite loop in 128b/132b SST
Passing 0 as the step only works when there are other reasons to break out of the BPP loop in intel_dp_mtp_tu_compute_config(). Otherwise, an infinite loop might occur. Fix it by explicitly checking for 0 step. Fixes: ef0a075 ("drm/i915/dp: compute config for 128b/132b SST w/o DSC") Reported-by: Imre Deak <[email protected]> Closes: https://lore.kernel.org/r/[email protected] Reviewed-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Jani Nikula <[email protected]> (cherry picked from commit a40e718) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 230b19b commit 069504f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/i915/display/intel_dp_mst.c

+4
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
341341

342342
break;
343343
}
344+
345+
/* Allow using zero step to indicate one try */
346+
if (!step)
347+
break;
344348
}
345349

346350
if (slots < 0) {

0 commit comments

Comments
 (0)