drm/i915/dp_mst: Check BW limit on the local MST link early
authorImre Deak <imre.deak@intel.com>
Fri, 9 May 2025 18:03:32 +0000 (21:03 +0300)
committerImre Deak <imre.deak@intel.com>
Mon, 12 May 2025 12:22:48 +0000 (15:22 +0300)
commitc2a38dc3006a2f8eff7044a3d1f0510fd7b749bd
tree91b1cbecd5ce8b9e02fd25189dbff7a4b96ba432
parentdd697c720fea53d415c4d86f6e128b8bfceb35ce
drm/i915/dp_mst: Check BW limit on the local MST link early

Check the BW requirement of a selected compressed bpp against the total
MST link BW early. This didn't cause a problem, since all the BW limits
within the MST topology are checked during the later MST topology BW
check. However it doesn't make sense to defer the total link BW check,
since for resolving a BW limit issue due to this later also (a) requires
selecting a pipe to reduce its bpp, ending up reducing the bpp for
another pipe, which is not ideal (b) requires recomputing the state for
all CRTC/stream's in the topology which may slow down the commit
considerably (especially when using fractional bpps).

Based on the above, check a stream bpp's BW requirement against the MST
link's total BW early.

Ideally drm_dp_atomic_find_time_slots() should check internally the
corresponding PBN/TU slot BW against the total link BW, returning an
error if the check fails, however that change would also affect other
drivers, so leaving this for a follow-up.

v2: Rephrase description of pipe selection/bpp reduction in commit
    message. (Ankit)

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://lore.kernel.org/r/20250509180340.554867-6-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp_mst.c