On Thu, 2025-11-27 at 19:50 +0200, Imre Deak wrote: > If dsc_compute_compressed_bpp() failed with a forced pipe BPP value > (where the forced pipe BPP value itself is valid within the min/max > pipe > BPP limits), the function will also fail when called with the maximum > pipe BPP value: dsc_compute_compressed_bpp() will try all compressed > BPPs below the passed in pipe BPP value and if the function failed > with > a given (low) compressed BPP value it will also fail with a > compressed > BPP value higher than the one which failed already. > > Based on the above remove the logic to retry computing a compressed > BPP > value with the maximum pipe BPP value if computing the compressed BPP > failed already with the (lower) forced pipe BPP value. > > Signed-off-by: Imre Deak <[email protected]> > --- > drivers/gpu/drm/i915/display/intel_dp.c | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 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 902f3a054a971..a921092e760b5 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp.c > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > @@ -2298,17 +2298,11 @@ static int > intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp, > int ret; > > forced_bpp = intel_dp_force_dsc_pipe_bpp(intel_dp, limits); > + if (forced_bpp) > + pipe_bpp = forced_bpp; > + else > + pipe_bpp = limits->pipe.max_bpp; > > - if (forced_bpp) { > - ret = dsc_compute_compressed_bpp(intel_dp, > pipe_config, conn_state, > - limits, > forced_bpp); > - if (ret == 0) { > - pipe_config->pipe_bpp = forced_bpp; > - return 0; > - } > - } > - > - pipe_bpp = limits->pipe.max_bpp; > ret = dsc_compute_compressed_bpp(intel_dp, pipe_config, > conn_state, > limits, pipe_bpp); > if (ret)
