drm/i915/dp_mst: Use link caps for non-DSC config selection

Use the link caps helper to select the maximum MST link configuration
for non-DSC computation, instead of using the separate max rate and lane
count limits, which may not form a valid configuration after individual
configs are disabled by fallback.

This is a step towards unifying configuration selection and iteration
across connector types and between compute and fallback paths.

In some cases all configurations should be considered, as noted in the
code comment; for now keep the existing behavior of selecting the
maximum bandwidth configuration as determined by the MST connector's BW
config iteration order.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260701153204.4124150-21-imre.deak@intel.com
This commit is contained in:
Imre Deak 2026-07-01 18:31:49 +03:00
parent 15c441a3e8
commit 58e57526d4

View File

@ -445,8 +445,20 @@ static int mst_stream_compute_link_config(struct intel_dp *intel_dp,
struct drm_connector_state *conn_state,
const struct link_config_limits *limits)
{
crtc_state->lane_count = limits->max_lane_count;
crtc_state->port_clock = limits->max_rate;
struct intel_connector *connector = to_intel_connector(conn_state->connector);
struct intel_dp_link_config max_link_config;
/*
* FIXME: Use a proper iteration over the link configurations, instead
* of using only the max BW config. For instance UHBR rate configs may
* have additional limitations over non-UHBR ones, due to the DSC DPT
* bpp maximum limit.
*/
if (!intel_dp_get_connector_max_link_config(connector, limits, &max_link_config))
return -EINVAL;
crtc_state->port_clock = max_link_config.rate;
crtc_state->lane_count = max_link_config.lane_count;
/*
* FIXME: allocate the BW according to link_bpp, which in the case of