Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Riana Tauro <riana.tauro@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH v3] drm/xe: remove gucrc disable from suspend path
Date: Fri, 14 Jul 2023 11:17:02 -0400	[thread overview]
Message-ID: <ZLFm7rtPXRzrdGky@intel.com> (raw)
In-Reply-To: <ZLFlVyosnfu8dPe3@intel.com>

On Fri, Jul 14, 2023 at 11:10:15AM -0400, Rodrigo Vivi wrote:
> On Fri, Jul 14, 2023 at 11:00:08AM +0530, Riana Tauro wrote:
> > Currently GuCRC is disabled in suspend path for xe.
> > Rc6 is a prerequiste to enable s0ix and
> > should not be disabled for s2idle. There is no requirement
> > to disable GuCRC for S3+.
> > 
> > Remove it from xe_guc_pc_stop, thus removing from suspend path.
> > Retain the call in other places where xe_guc_pc_stop is
> > called.
> > 
> > v2: add description and return statement to kernel-doc (Rodrigo)
> > v3: update commit message (Rodrigo)
> 
> pushed, thanks

ops, I have removed it after I noticed that this consistently break BAT:

https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-120263v2/bat-atsm-2/igt@core_hotunplug@unbind-rebind.html
https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-120263v3/bat-atsm-2/igt@core_hotunplug@unbind-rebind.html

> 
> > 
> > Signed-off-by: Riana Tauro <riana.tauro@intel.com>
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> >  drivers/gpu/drm/xe/xe_gt.c     |  1 +
> >  drivers/gpu/drm/xe/xe_guc_pc.c | 17 +++++++++++------
> >  drivers/gpu/drm/xe/xe_guc_pc.h |  1 +
> >  drivers/gpu/drm/xe/xe_uc.c     |  5 +++++
> >  drivers/gpu/drm/xe/xe_uc.h     |  1 +
> >  5 files changed, 19 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> > index a21d44bfe9e8..b31ef2a8ff17 100644
> > --- a/drivers/gpu/drm/xe/xe_gt.c
> > +++ b/drivers/gpu/drm/xe/xe_gt.c
> > @@ -517,6 +517,7 @@ static int gt_reset(struct xe_gt *gt)
> >  	if (err)
> >  		goto err_msg;
> >  
> > +	xe_uc_gucrc_disable(&gt->uc);
> >  	xe_uc_stop_prepare(&gt->uc);
> >  	xe_gt_pagefault_reset(gt);
> >  
> > diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
> > index 3093cfeff0c2..9a7fae727dfa 100644
> > --- a/drivers/gpu/drm/xe/xe_guc_pc.c
> > +++ b/drivers/gpu/drm/xe/xe_guc_pc.c
> > @@ -730,7 +730,15 @@ static int pc_adjust_requested_freq(struct xe_guc_pc *pc)
> >  	return ret;
> >  }
> >  
> > -static int pc_gucrc_disable(struct xe_guc_pc *pc)
> > +/**
> > + * xe_guc_pc_gucrc_disable - Disable GuC RC
> > + * @pc: Xe_GuC_PC instance
> > + *
> > + * Disables GuC RC by taking control of RC6 back from GuC.
> > + *
> > + * Return: 0 on success, negative error code on error.
> > + */
> > +int xe_guc_pc_gucrc_disable(struct xe_guc_pc *pc)
> >  {
> >  	struct xe_gt *gt = pc_to_gt(pc);
> >  	int ret;
> > @@ -827,7 +835,7 @@ int xe_guc_pc_start(struct xe_guc_pc *pc)
> >  		goto out;
> >  
> >  	if (xe->info.platform == XE_PVC) {
> > -		pc_gucrc_disable(pc);
> > +		xe_guc_pc_gucrc_disable(pc);
> >  		ret = 0;
> >  		goto out;
> >  	}
> > @@ -850,10 +858,6 @@ int xe_guc_pc_stop(struct xe_guc_pc *pc)
> >  
> >  	xe_device_mem_access_get(pc_to_xe(pc));
> >  
> > -	ret = pc_gucrc_disable(pc);
> > -	if (ret)
> > -		goto out;
> > -
> >  	mutex_lock(&pc->freq_lock);
> >  	pc->freq_ready = false;
> >  	mutex_unlock(&pc->freq_lock);
> > @@ -876,6 +880,7 @@ static void pc_fini(struct drm_device *drm, void *arg)
> >  {
> >  	struct xe_guc_pc *pc = arg;
> >  
> > +	XE_WARN_ON(xe_guc_pc_gucrc_disable(pc));
> >  	XE_WARN_ON(xe_guc_pc_stop(pc));
> >  	sysfs_remove_files(pc_to_gt(pc)->sysfs, pc_attrs);
> >  	xe_bo_unpin_map_no_vm(pc->bo);
> > diff --git a/drivers/gpu/drm/xe/xe_guc_pc.h b/drivers/gpu/drm/xe/xe_guc_pc.h
> > index 370353a40a17..81833a53b3c9 100644
> > --- a/drivers/gpu/drm/xe/xe_guc_pc.h
> > +++ b/drivers/gpu/drm/xe/xe_guc_pc.h
> > @@ -11,6 +11,7 @@
> >  int xe_guc_pc_init(struct xe_guc_pc *pc);
> >  int xe_guc_pc_start(struct xe_guc_pc *pc);
> >  int xe_guc_pc_stop(struct xe_guc_pc *pc);
> > +int xe_guc_pc_gucrc_disable(struct xe_guc_pc *pc);
> >  
> >  enum xe_gt_idle_state xe_guc_pc_c_status(struct xe_guc_pc *pc);
> >  u64 xe_guc_pc_rc6_residency(struct xe_guc_pc *pc);
> > diff --git a/drivers/gpu/drm/xe/xe_uc.c b/drivers/gpu/drm/xe/xe_uc.c
> > index 70eabf567156..f8cbd292d6d0 100644
> > --- a/drivers/gpu/drm/xe/xe_uc.c
> > +++ b/drivers/gpu/drm/xe/xe_uc.c
> > @@ -176,6 +176,11 @@ int xe_uc_reset_prepare(struct xe_uc *uc)
> >  	return xe_guc_reset_prepare(&uc->guc);
> >  }
> >  
> > +void xe_uc_gucrc_disable(struct xe_uc *uc)
> > +{
> > +	XE_WARN_ON(xe_guc_pc_gucrc_disable(&uc->guc.pc));
> > +}
> > +
> >  void xe_uc_stop_prepare(struct xe_uc *uc)
> >  {
> >  	xe_guc_stop_prepare(&uc->guc);
> > diff --git a/drivers/gpu/drm/xe/xe_uc.h b/drivers/gpu/drm/xe/xe_uc.h
> > index d6efc9ef00d3..42219b361df5 100644
> > --- a/drivers/gpu/drm/xe/xe_uc.h
> > +++ b/drivers/gpu/drm/xe/xe_uc.h
> > @@ -12,6 +12,7 @@ int xe_uc_init(struct xe_uc *uc);
> >  int xe_uc_init_hwconfig(struct xe_uc *uc);
> >  int xe_uc_init_post_hwconfig(struct xe_uc *uc);
> >  int xe_uc_init_hw(struct xe_uc *uc);
> > +void xe_uc_gucrc_disable(struct xe_uc *uc);
> >  int xe_uc_reset_prepare(struct xe_uc *uc);
> >  void xe_uc_stop_prepare(struct xe_uc *uc);
> >  int xe_uc_stop(struct xe_uc *uc);
> > -- 
> > 2.40.0
> > 

      reply	other threads:[~2023-07-14 15:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14  5:30 [Intel-xe] [PATCH v3] drm/xe: remove gucrc disable from suspend path Riana Tauro
2023-07-14  5:28 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe: remove gucrc disable from suspend path (rev3) Patchwork
2023-07-14  5:28 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-07-14  5:29 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-07-14  5:33 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-07-14  5:34 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-07-14  5:35 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-07-14  6:08 ` [Intel-xe] ○ CI.BAT: info " Patchwork
2023-07-14 15:10 ` [Intel-xe] [PATCH v3] drm/xe: remove gucrc disable from suspend path Rodrigo Vivi
2023-07-14 15:17   ` Rodrigo Vivi [this message]

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=ZLFm7rtPXRzrdGky@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=riana.tauro@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