Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Govindapillai, Vinod" <vinod.govindapillai@intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 10/11] drm/i915/bw: Use icl_qgv_bw()
Date: Thu, 4 Jun 2026 18:31:47 +0300	[thread overview]
Message-ID: <aiGaYxgQED_fS6uV@intel.com> (raw)
In-Reply-To: <e8a8f7d3773212fea0af63c878d856c08eb2ad51.camel@intel.com>

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ä <ville.syrjala@linux.intel.com>
> > > > 
> > > > Replace a hand rolled copy of icl_qgv_bw() with the real thing.
> > > > 
> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > ---
> > > >  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	other threads:[~2026-06-04 15:31 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28 10:34 [PATCH 00/11] drm/i915/bw: Cleanups Ville Syrjala
2026-05-28 10:34 ` [PATCH 01/11] drm/i915/bw: Don't memcpy() pointlessly Ville Syrjala
2026-06-01 20:54   ` Govindapillai, Vinod
2026-05-28 10:34 ` [PATCH 02/11] drm/i915/bw: Streamline dg2_get_bw_info() Ville Syrjala
2026-06-01 21:02   ` Govindapillai, Vinod
2026-05-28 10:34 ` [PATCH 03/11] drm/i915/bw: Initialize num_planes sensibly for the first plane group in TGL+ Ville Syrjala
2026-06-04 14:46   ` Govindapillai, Vinod
2026-05-28 10:34 ` [PATCH 04/11] drm/i915/bw: Move 'bi_next' to tighter scope Ville Syrjala
2026-06-04 14:48   ` Govindapillai, Vinod
2026-05-28 10:34 ` [PATCH 05/11] drn/i915/bw: s/num_points/num_qgv_points/ Ville Syrjala
2026-06-04 14:49   ` Govindapillai, Vinod
2026-05-28 10:34 ` [PATCH 06/11] drm/i915/bw: Move num_{qgv, psf}_points out from the plane group Ville Syrjala
2026-06-04 14:53   ` Govindapillai, Vinod
2026-05-28 10:34 ` [PATCH 07/11] drm/i915/bw: Move psf_bw[] " Ville Syrjala
2026-06-04 14:55   ` Govindapillai, Vinod
2026-05-28 10:34 ` [PATCH 08/11] drm/i915/bw: Move peakbw[] " Ville Syrjala
2026-06-04 14:57   ` Govindapillai, Vinod
2026-05-28 10:34 ` [PATCH 09/11] drm/i915/bw: Print derated bandwidth numbers for DG2 Ville Syrjala
2026-06-04 14:58   ` Govindapillai, Vinod
2026-05-28 10:34 ` [PATCH 10/11] drm/i915/bw: Use icl_qgv_bw() Ville Syrjala
2026-06-04 14:59   ` Govindapillai, Vinod
2026-06-04 15:12     ` Ville Syrjälä
2026-06-04 15:22       ` Govindapillai, Vinod
2026-06-04 15:31         ` Ville Syrjälä [this message]
2026-06-04 15:40           ` Govindapillai, Vinod
2026-05-28 10:34 ` [PATCH 11/11] drm/i915/bw: Simplify the best max_data_rate search Ville Syrjala
2026-06-04 16:14   ` Govindapillai, Vinod
2026-05-28 10:42 ` ✓ CI.KUnit: success for drm/i915/bw: Cleanups Patchwork
2026-05-28 11:22 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-28 18:04 ` ✗ Xe.CI.FULL: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aiGaYxgQED_fS6uV@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=vinod.govindapillai@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox