On Thu, Jun 04, 2026 at 03:22:57PM +0000, Govindapillai, Vinod wrote:
> On Thu, 2026-06-04 at 18:12 +0300, Ville Syrjälä wrote:
> > On Thu, Jun 04, 2026 at 02:59:09PM +0000, Govindapillai, Vinod wrote:
> > > On Thu, 2026-05-28 at 13:34 +0300, Ville Syrjala wrote:
> > > > From: Ville Syrjälä <[email protected]>
> > > > 
> > > > Replace a hand rolled copy of icl_qgv_bw() with the real thing.
> > > > 
> > > > Signed-off-by: Ville Syrjälä <[email protected]>
> > > > ---
> > > >  drivers/gpu/drm/i915/display/intel_bw.c | 10 ++--------
> > > >  1 file changed, 2 insertions(+), 8 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/display/intel_bw.c
> > > > b/drivers/gpu/drm/i915/display/intel_bw.c
> > > > index f4121223a58b..423cae2ff208 100644
> > > > --- a/drivers/gpu/drm/i915/display/intel_bw.c
> > > > +++ b/drivers/gpu/drm/i915/display/intel_bw.c
> > > > @@ -1106,14 +1106,8 @@ static int mtl_find_qgv_points(struct
> > > > intel_display *display,
> > > >          * offered per plane group
> > > >          */
> > > >         for (i = 0; i < num_qgv_points; i++) {
> > > > -               unsigned int bw_index =
> > > > -                       tgl_max_bw_index(display,
> > > > num_active_planes,
> > > > i);
> > > > -               unsigned int max_data_rate;
> > > > -
> > > > -               if (bw_index >= ARRAY_SIZE(display->bw.max))
> > > > -                       continue;
> > > > -
> > > > -               max_data_rate = display-
> > > > > bw.max[bw_index].deratedbw[i];
> > > > +               unsigned int max_data_rate =
> > > > +                       icl_qgv_bw(display, num_active_planes,
> > > > i);
> > > >  
> > > >                 if (max_data_rate < data_rate)
> > > >                         continue;
> > > 
> > > Wonder if this could be squashed to patch 3 in the series for
> > > completeness.
> > 
> > This has nothing to do with that other patch.
> 
> Between patch 3 and Patch 10, because tgl_max_bw_index() returns
> UINT_MAX in patch 3, mtl_find_qgv_points() will never find a qgv point
> (in recent platforms num_planes is 0 for all the plane groups..). The
> functionality breaks between patch 3 and patch 10. Thats what I meant.

tgl_max_bw_index() will never return UINT_MAX. The loop will always
terminate at i==0 (if not before) because max[0].num_planes=<big number>.

-- 
Ville Syrjälä
Intel

Reply via email to