Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+4
+4
drivers/gpu/drm/i915/display/intel_dp_mst.c
··· 390 390 slots = drm_dp_atomic_find_time_slots(state, &intel_dp->mst.mgr, 391 391 connector->mst.port, 392 392 dfixed_trunc(pbn)); 393 + 394 + /* TODO: Check this already in drm_dp_atomic_find_time_slots(). */ 395 + if (slots > mst_state->total_avail_slots) 396 + slots = -EINVAL; 393 397 } else { 394 398 /* Same as above for remote_tu */ 395 399 crtc_state->dp_m_n.tu = ALIGN(crtc_state->dp_m_n.tu,