On Fri, Dec 12, 2025 at 11:17:52AM +0200, Vinod Govindapillai wrote:
> [...]
> > +
> > +static int align_max_compressed_bpp_x16(const struct intel_connector 
> > *connector,
> > +                                   enum intel_output_format output_format,
> > +                                   int pipe_bpp, int max_bpp_x16)
> > +{
> > +   struct intel_display *display = to_intel_display(connector);
> > +   int link_bpp_x16 = intel_dp_output_format_link_bpp_x16(output_format, 
> > pipe_bpp);
> > +   int bpp_step_x16 = intel_dp_dsc_bpp_step_x16(connector);
> > +
> > +   max_bpp_x16 = min(max_bpp_x16, link_bpp_x16 - bpp_step_x16);
> > +
> > +   if (DISPLAY_VER(display) >= 13) {
> > +           drm_WARN_ON(display->drm, !is_power_of_2(bpp_step_x16));
> > +
> > +           return round_down(max_bpp_x16, bpp_step_x16);
> > +   } else {
> > +           return align_max_vesa_compressed_bpp_x16(max_bpp_x16);
> > +   }
> 
> well.. return align_max_vesa_compressed_bpp_x16(...) could be placed
> without "else loop" as well here and above. 

I'm not aware of a rule saying not to use an else in this case. Imo
here using en else is the more readable form.

> Reviewed-by: Vinod Govindapillai <[email protected]>
> 
> > +}

Reply via email to