From: Jani Nikula Date: Tue, 4 Feb 2025 15:49:25 +0000 (+0200) Subject: drm/i915/dp: Fix potential infinite loop in 128b/132b SST X-Git-Tag: v6.15-rc1~120^2~16^2~142 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a40e718d34d3d02c781c295466b013415f68c4f1;p=thirdparty%2Fkernel%2Flinux.git 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: ef0a0757bbea ("drm/i915/dp: compute config for 128b/132b SST w/o DSC") Reported-by: Imre Deak Closes: https://lore.kernel.org/r/Z6I0knh2Kt5T0JrT@ideak-desk.fi.intel.com Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20250204154925.3001781-1-jani.nikula@intel.com Signed-off-by: Jani Nikula --- diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index ff3ae5db4b54d..cc6e4ca375193 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -378,6 +378,10 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp, break; } + + /* Allow using zero step to indicate one try */ + if (!bpp_step_x16) + break; } if (slots < 0) {