mirror of
https://github.com/torvalds/linux.git
synced 2026-11-13 05:04:29 +01:00
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>
This commit is contained in:
parent
1dff85f86b
commit
ee77cfd52c
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user