Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Badal Nilawar <badal.nilawar@intel.com>,
	<intel-gfx@lists.freedesktop.org>, <anshuman.gupta@intel.com>,
	<chris.p.wilson@linux.intel.com>
Subject: Re: [PATCH] drm/i915/rc6: Disable RPG during workload execution
Date: Tue, 22 Oct 2024 13:09:16 -0400	[thread overview]
Message-ID: <ZxfcPLgi8tmLiomr@intel.com> (raw)
In-Reply-To: <Zxeoi1baLtbqDKIr@ashyti-mobl2.lan>

On Tue, Oct 22, 2024 at 03:28:43PM +0200, Andi Shyti wrote:
> Hi Badal,
> 
> On Tue, Oct 22, 2024 at 06:52:26PM +0530, Badal Nilawar wrote:
> > Encountering forcewake errors related to render power gating;
> 
> Can you please expand your explanation here?

yeap. More explanation please. All platforms? really?

> 
> > therefore, disable it during workload execution.
> 
> ... and here.
> 
> > Cc: Chris Wilson <chris.p.wilson@linux.intel.com>
> > Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
> > ---
> >  drivers/gpu/drm/i915/gt/intel_rc6.c       | 18 +++++++++++++++++-
> >  drivers/gpu/drm/i915/gt/intel_rc6_types.h |  1 +
> >  2 files changed, 18 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gt/intel_rc6.c b/drivers/gpu/drm/i915/gt/intel_rc6.c
> > index c864d101faf9..459394ab5258 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_rc6.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_rc6.c
> > @@ -140,6 +140,7 @@ static void gen11_rc6_enable(struct intel_rc6 *rc6)
> >  					      VDN_MFX_POWERGATE_ENABLE(i));
> >  	}
> >  
> > +	rc6->pg_enable = pg_enable;
> 
> this looks borderline racy, it's fine only because this function
> is called during resume which normally runs in atomic context.
> 
> >  	intel_uncore_write_fw(uncore, GEN9_PG_ENABLE, pg_enable);
> >  }
> >  
> > @@ -572,8 +573,11 @@ static void __intel_rc6_disable(struct intel_rc6 *rc6)
> >  	intel_guc_rc_disable(gt_to_guc(gt));
> >  
> >  	intel_uncore_forcewake_get(uncore, FORCEWAKE_ALL);
> > -	if (GRAPHICS_VER(i915) >= 9)
> > +	if (GRAPHICS_VER(i915) >= 9) {
> > +		rc6->pg_enable = 0;
> >  		intel_uncore_write_fw(uncore, GEN9_PG_ENABLE, 0);
> > +	}
> > +
> >  	intel_uncore_write_fw(uncore, GEN6_RC_CONTROL, 0);
> >  	intel_uncore_write_fw(uncore, GEN6_RC_STATE, 0);
> >  	intel_uncore_forcewake_put(uncore, FORCEWAKE_ALL);
> > @@ -687,6 +691,15 @@ void intel_rc6_unpark(struct intel_rc6 *rc6)
> >  
> >  	/* Restore HW timers for automatic RC6 entry while busy */
> >  	intel_uncore_write_fw(uncore, GEN6_RC_CONTROL, rc6->ctl_enable);
> > +
> > +	/*
> > +	 * Seeing render forcewake timeouts during active submissions so disable render PG
> > +	 * while workloads are under execution.
> 
> Can you please improve this sentence? If I never new about the
> issue I would be a bit confused.
> 
> > +	 * FIXME Remove this change once real cause of render force wake timeout is fixed
> > +	 */
> > +	if (rc6->pg_enable == GEN9_RENDER_PG_ENABLE)
> 
> is this supposed to be "pg_enable == GEN9_RENDER_PG_ENABLE" or
> "pg_enable & GEN9_RENDER_PG_ENABLE" ?
> 
> Andi

  reply	other threads:[~2024-10-22 17:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 13:22 [PATCH] drm/i915/rc6: Disable RPG during workload execution Badal Nilawar
2024-10-22 13:28 ` Andi Shyti
2024-10-22 17:09   ` Rodrigo Vivi [this message]
2024-10-23  5:33     ` Nilawar, Badal
2024-10-23 14:48       ` Rodrigo Vivi
2024-10-23 16:01         ` Nilawar, Badal
2024-10-23 16:11           ` Nilawar, Badal
2024-10-24 14:28             ` Gupta, Anshuman
2024-10-24 17:34               ` Rodrigo Vivi
2024-10-24 19:06                 ` Nilawar, Badal
2024-10-22 14:00 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2024-10-22 14:10 ` ✓ Fi.CI.BAT: success " Patchwork
2024-10-22 19:28 ` ✓ Fi.CI.IGT: " 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=ZxfcPLgi8tmLiomr@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=chris.p.wilson@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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