diff options
| author | Jani Nikula <jani.nikula@intel.com> | 2026-08-07 15:34:06 +0300 |
|---|---|---|
| committer | Jani Nikula <jani.nikula@intel.com> | 2026-08-10 19:02:23 +0300 |
| commit | ee77cfd52cd32c236d7bcd41464c824d456331fe (patch) | |
| tree | 7cc071bb56dba39e1b995b03ba3f42a20db6a83f | |
| parent | 1dff85f86b4673f6857c209041e2357e35e3397e (diff) | |
| download | linux-ee77cfd52cd32c236d7bcd41464c824d456331fe.tar.gz linux-ee77cfd52cd32c236d7bcd41464c824d456331fe.zip | |
drm/i915/dp: Limit compute config joining to pipes that can actually join
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 <ankit.k.nautiyal@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patch.msgid.link/dc1c7fc45d4da7d3fd1bd8b94c30c78d69aa0742.1786105831.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| -rw-r--r-- | drivers/gpu/drm/i915/display/intel_dp.c | 5 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 833375bd2c0c..1e0dfc4333ef 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2871,6 +2871,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); @@ -2885,6 +2886,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 57daed0b0b36..6a869d0f6ffc 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -766,6 +766,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); |
