Re: [PATCH 3/4] drm/i915/dp: Limit compute config joining to pipes that can actually join

"Nautiyal, Ankit K" <[email protected]>
Newsgroups org.freedesktop.lists.intel-xe,org.freedesktop.lists.intel-gfx
Message-ID <[email protected]>
On 8/7/2026 6:04 PM, Jani Nikula wrote:
> Skip joining for pipes that can't work as joiner primary pipe for the
> number of pipes being joined. This limits the invalid combos early,
> instead of ending up with crtc_state->joiner_pipes that would fail
> during modeset. Before, crtc_state->joiner pipes could have ended up
> including pipes that do not exist on the platform.
>
> Cc: Ankit Nautiyal <[email protected]>
> Signed-off-by: Jani Nikula <[email protected]>

LGTM.

Reviewed-by: Ankit Nautiyal <[email protected]>

> ---
>   drivers/gpu/drm/i915/display/intel_dp.c     | 5 +++++
>   drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 ++++
>   2 files changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index e1604bc895e5..6b60e0a1c8ee 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2910,6 +2910,7 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
>   			     struct drm_connector_state *conn_state,
>   			     bool respect_downstream_limits)
>   {
> +	struct intel_display *display = to_intel_display(encoder);
>   	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
>   	struct intel_connector *connector =
>   		to_intel_connector(conn_state->connector);
> @@ -2924,6 +2925,10 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
>   		return -EINVAL;
>   
>   	for_each_joiner_candidate(connector, adjusted_mode, num_joined_pipes) {
> +		/* If the pipe can't be a joiner primary, skip early. */
> +		if (!(intel_joiner_valid_primary_pipe_mask(display, num_joined_pipes) & BIT(crtc->pipe)))
> +			continue;
> +
>   		/*
>   		 * NOTE:
>   		 * The crtc_state->joiner_pipes should have been set at the end
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 3be1643f8d03..379666692bc8 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -770,6 +770,10 @@ static int mst_stream_compute_config(struct intel_atomic_state *state,
>   		return ret;
>   
>   	for_each_joiner_candidate(connector, adjusted_mode, num_joined_pipes) {
> +		/* If the pipe can't be a joiner primary, skip early. */
> +		if (!(intel_joiner_valid_primary_pipe_mask(display, num_joined_pipes) & BIT(crtc->pipe)))
> +			continue;
> +
>   		if (num_joined_pipes > 1)
>   			pipe_config->joiner_pipes = GENMASK(crtc->pipe + num_joined_pipes - 1,
>   							    crtc->pipe);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.