On Wed, Jan 21, 2026 at 09:23:23AM +0530, Ankit Nautiyal wrote: > Move the calculation of num_joined_pipes and other constraints that > depend on it, into a single block in mst_stream_compute_config(). > > This groups all joiner-dependent logic together, preparing the code for a > future loop-based evaluation of multiple joiner configurations. > > Signed-off-by: Ankit Nautiyal <[email protected]>
Reviewed-by: Imre Deak <[email protected]> > --- > drivers/gpu/drm/i915/display/intel_dp_mst.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c > b/drivers/gpu/drm/i915/display/intel_dp_mst.c > index 31e2eae6e4b3..8a42da2588eb 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c > +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c > @@ -619,16 +619,16 @@ static int mst_stream_compute_config(struct > intel_encoder *encoder, > if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN) > return -EINVAL; > > + pipe_config->sink_format = INTEL_OUTPUT_FORMAT_RGB; > + pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB; > + pipe_config->has_pch_encoder = false; > + > num_joined_pipes = intel_dp_num_joined_pipes(intel_dp, connector, > > adjusted_mode->crtc_hdisplay, > adjusted_mode->crtc_clock); > if (num_joined_pipes > 1) > pipe_config->joiner_pipes = GENMASK(crtc->pipe + > num_joined_pipes - 1, crtc->pipe); > > - pipe_config->sink_format = INTEL_OUTPUT_FORMAT_RGB; > - pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB; > - pipe_config->has_pch_encoder = false; > - > joiner_needs_dsc = intel_dp_joiner_needs_dsc(display, num_joined_pipes); > > dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en || > @@ -685,6 +685,10 @@ static int mst_stream_compute_config(struct > intel_encoder *encoder, > pipe_config->dp_m_n.tu); > } > > + if (ret) > + return ret; > + > + ret = intel_dp_compute_min_hblank(pipe_config, conn_state); > if (ret) > return ret; > > @@ -695,10 +699,6 @@ static int mst_stream_compute_config(struct > intel_encoder *encoder, > pipe_config->lane_lat_optim_mask = > > bxt_dpio_phy_calc_lane_lat_optim_mask(pipe_config->lane_count); > > - ret = intel_dp_compute_min_hblank(pipe_config, conn_state); > - if (ret) > - return ret; > - > intel_vrr_compute_config(pipe_config, conn_state); > > intel_dp_audio_compute_config(encoder, pipe_config, conn_state); > -- > 2.45.2 >
