On Thu, 2025-11-27 at 19:50 +0200, Imre Deak wrote: > Move computing the eDP compressed BPP value to the function computing > this for DP, allowing further simplifications later. > > Signed-off-by: Imre Deak <[email protected]> > --- > drivers/gpu/drm/i915/display/intel_dp.c | 21 +++++++++++++-------- > 1 file changed, 13 insertions(+), 8 deletions(-) >
Reviewed-by: Vinod Govindapillai <[email protected]> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c > b/drivers/gpu/drm/i915/display/intel_dp.c > index a921092e760b5..81240529337bc 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp.c > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > @@ -2226,6 +2226,14 @@ static int dsc_compute_compressed_bpp(struct > intel_dp *intel_dp, > > max_bpp_x16 = align_max_compressed_bpp_x16(connector, > pipe_config->output_format, > pipe_bpp, > max_bpp_x16); > + if (intel_dp_is_edp(intel_dp)) { > + pipe_config->port_clock = limits->max_rate; > + pipe_config->lane_count = limits->max_lane_count; > + > + pipe_config->dsc.compressed_bpp_x16 = max_bpp_x16; > + > + return 0; > + } > > for (bpp_x16 = max_bpp_x16; bpp_x16 >= min_bpp_x16; bpp_x16 > -= bpp_step_x16) { > if (!intel_dp_dsc_valid_compressed_bpp(intel_dp, > bpp_x16)) > @@ -2318,9 +2326,8 @@ static int > intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, > struct drm_connector_state > *conn_state, > const struct > link_config_limits *limits) > { > - struct intel_connector *connector = > - to_intel_connector(conn_state->connector); > int pipe_bpp, forced_bpp; > + int ret; > > forced_bpp = intel_dp_force_dsc_pipe_bpp(intel_dp, limits); > if (forced_bpp) > @@ -2328,12 +2335,10 @@ static int > intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, > else > pipe_bpp = limits->pipe.max_bpp; > > - pipe_config->port_clock = limits->max_rate; > - pipe_config->lane_count = limits->max_lane_count; > - > - pipe_config->dsc.compressed_bpp_x16 = > - align_max_compressed_bpp_x16(connector, pipe_config- > >output_format, > - pipe_bpp, limits- > >link.max_bpp_x16); > + ret = dsc_compute_compressed_bpp(intel_dp, pipe_config, > conn_state, > + limits, pipe_bpp); > + if (ret) > + return -EINVAL; > > pipe_config->pipe_bpp = pipe_bpp; >
