Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Govindapillai, Vinod" <vinod.govindapillai@intel.com>
To: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: program wm blocks to at least blocks required per line
Date: Wed, 6 Apr 2022 09:21:11 +0000	[thread overview]
Message-ID: <2370d248501c25d719e8f298b0ed02031c8e0742.camel@intel.com> (raw)
In-Reply-To: <20220406081459.GA14945@intel.com>

On Wed, 2022-04-06 at 11:14 +0300, Lisovskiy, Stanislav wrote:
> On Mon, Apr 04, 2022 at 04:49:18PM +0300, Vinod Govindapillai wrote:
> > In configurations with single DRAM channel, for usecases like
> > 4K 60 Hz, FIFO underruns are observed quite frequently. Looks
> > like the wm0 watermark values need to bumped up because the wm0
> > memory latency calculations are probably not taking the DRAM
> > channel's impact into account.
> > 
> > As per the Bspec 49325, if the ddb allocation can hold at least
> > one plane_blocks_per_line we should have selected method2.
> > Assuming that modern HW versions have enough dbuf to hold
> > at least one line, set the wm blocks to equivalent to blocks
> > per line.
> > 
> > cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> > 
> > Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_pm.c | 19 ++++++++++++++++++-
> >  1 file changed, 18 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> > index 8824f269e5f5..ae28a8c63ca4 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -5474,7 +5474,24 @@ static void skl_compute_plane_wm(const struct intel_crtc_state
> > *crtc_state,
> >  		}
> >  	}
> >  
> > -	blocks = fixed16_to_u32_round_up(selected_result) + 1;
> > +	/*
> > +	 * Lets have blocks at minimum equivalent to plane_blocks_per_line
> > +	 * as there will be at minimum one line for lines configuration.
> > +	 *
> > +	 * As per the Bspec 49325, if the ddb allocation can hold at least
> > +	 * one plane_blocks_per_line, we should have selected method2 in
> > +	 * the above logic. Assuming that modern versions have enough dbuf
> > +	 * and method2 guarantees blocks equivalent to at least 1 line,
> > +	 * select the blocks as plane_blocks_per_line.
> > +	 *
> > +	 * TODO: Revisit the logic when we have better understanding on DRAM
> > +	 * channels' impact on the level 0 memory latency and the relevant
> > +	 * wm calculations.
> > +	 */
> > +	blocks = skl_wm_has_lines(dev_priv, level) ?
> > +			max_t(u32, fixed16_to_u32_round_up(selected_result) + 1,
> > +				  fixed16_to_u32_round_up(wp->plane_blocks_per_line)) :
> > +			fixed16_to_u32_round_up(selected_result) + 1;
> >  	lines = div_round_up_fixed16(selected_result,
> >  				     wp->plane_blocks_per_line);
> 
> I think this is a good fix, no IGT/BAT regressions are visible, also 
> it fixes some of the current issues at customer side. So don't see any reason
> for it not to be merged.
> 
> Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> 
> P.S: there is some checkpatch warning, which probably needs to be addressed :)

Thanks Stan. I will check this and update.

BR
vinod
> 
> Stan
> 
> >  
> > -- 
> > 2.25.1
> > 

  reply	other threads:[~2022-04-06  9:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 13:49 [Intel-gfx] [PATCH] drm/i915: program wm blocks to at least blocks required per line Vinod Govindapillai
2022-04-04 19:09 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-04-04 19:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-04-05  0:14 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-04-06  8:14 ` [Intel-gfx] [PATCH] " Lisovskiy, Stanislav
2022-04-06  9:21   ` Govindapillai, Vinod [this message]
2022-04-06 12:48 ` Ville Syrjälä
2022-04-06 13:45   ` Lisovskiy, Stanislav
2022-04-06 14:01     ` Ville Syrjälä
2022-04-06 14:15       ` Govindapillai, Vinod
2022-04-06 17:14       ` Lisovskiy, Stanislav
2022-04-06 18:09         ` Ville Syrjälä
2022-04-07  6:43           ` Lisovskiy, Stanislav
2022-04-07 12:09             ` Govindapillai, Vinod
2022-04-07 12:31               ` Lisovskiy, Stanislav

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=2370d248501c25d719e8f298b0ed02031c8e0742.camel@intel.com \
    --to=vinod.govindapillai@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stanislav.lisovskiy@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