Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: "Cavitt, Jonathan" <jonathan.cavitt@intel.com>
Cc: "Dong, Zhanjun" <zhanjun.dong@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Wajdeczko, Michal" <Michal.Wajdeczko@intel.com>,
	"Summers, Stuart" <stuart.summers@intel.com>
Subject: Re: [PATCH v9] drm/xe/uc: Disable GuC communication on hardware initialization error.
Date: Tue, 8 Jul 2025 12:03:54 -0700	[thread overview]
Message-ID: <aG1rmorqfoFSTfyy@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <aG1oS2eHN875k//x@lstrano-desk.jf.intel.com>

On Tue, Jul 08, 2025 at 11:49:47AM -0700, Matthew Brost wrote:
> On Tue, Jul 08, 2025 at 12:36:43PM -0600, Cavitt, Jonathan wrote:
> > -----Original Message-----
> > From: Dong, Zhanjun <zhanjun.dong@intel.com> 
> > Sent: Monday, July 7, 2025 4:11 PM
> > To: intel-xe@lists.freedesktop.org
> > Cc: Dong, Zhanjun <zhanjun.dong@intel.com>; Wajdeczko, Michal <Michal.Wajdeczko@intel.com>; Summers, Stuart <stuart.summers@intel.com>; Cavitt, Jonathan <jonathan.cavitt@intel.com>; Brost, Matthew <matthew.brost@intel.com>
> > Subject: [PATCH v9] drm/xe/uc: Disable GuC communication on hardware initialization error.
> > > 
> > > Disable GuC communication on Xe micro controller hardware initialization
> > > error.
> > > 
> > > Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
> > > Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4917
> > 
> > I think you need to swap the order of the Closes and Signed-off-by,
> > but that can be done at merge-time if it's necessary, so there's no
> > need to create another revision for this change.
> > 
> > You might also need to remove the period from the commit name,
> > but that too can be a merge-time revision, so again, no need for
> > another revision.
> > 
> > Otherwise:
> > Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> > -Jonathan Cavitt
> > 
> 
> Also the change log is typically above the tags, since it is pretty
> verbose for a simple patch, maybe just drop the change log.
> 

Ignore the above comment, I was just aware of [1].

[1] https://docs.kernel.org/process/submitting-patches.html#commentary

Matt

> Anyways:
> 
> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> 
> > > 
> > > ---
> > > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > > Cc: Stuart Summers <stuart.summers@intel.com>
> > > Cc: Jonathan Cavitt <jonathan.cavitt@intel.com>
> > > Cc: Matthew Brost <matthew.brost@intel.com>
> > > 
> > > Change list:
> > > v9: Switched to xe_guc_sanitize
> > > v8: Fix kernel-doc style
> > >     Add error handling in vf_guc_min_load_for_hwconfig
> > > v7: Add kernel-doc for xe_guc_disable_communication
> > >     Unset submission_state.enabled as well
> > > v6: Skip disable ct on xe_guc_enable_communication error
> > > v5: Set wedge is excessive action, revert back to disable ct
> > > v4: Fix typo and add new line
> > > v3: v2 CI re-run
> > > v2: Remove unnecessary jump to err-out
> > >     Drop disable ct, switch to set wedge
> > > ---
> > >  drivers/gpu/drm/xe/xe_guc.c |  8 ++++++--
> > >  drivers/gpu/drm/xe/xe_uc.c  | 18 +++++++++++++-----
> > >  2 files changed, 19 insertions(+), 7 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> > > index 8573957facae..b1d1d6da3758 100644
> > > --- a/drivers/gpu/drm/xe/xe_guc.c
> > > +++ b/drivers/gpu/drm/xe/xe_guc.c
> > > @@ -1219,13 +1219,17 @@ static int vf_guc_min_load_for_hwconfig(struct xe_guc *guc)
> > >  
> > >  	ret = xe_gt_sriov_vf_connect(gt);
> > >  	if (ret)
> > > -		return ret;
> > > +		goto err_out;
> > >  
> > >  	ret = xe_gt_sriov_vf_query_runtime(gt);
> > >  	if (ret)
> > > -		return ret;
> > > +		goto err_out;
> > >  
> > >  	return 0;
> > > +
> > > +err_out:
> > > +	xe_guc_sanitize(guc);
> > > +	return ret;
> > >  }
> > >  
> > >  /**
> > > diff --git a/drivers/gpu/drm/xe/xe_uc.c b/drivers/gpu/drm/xe/xe_uc.c
> > > index 6431ba3a2c53..3e0c3af235f2 100644
> > > --- a/drivers/gpu/drm/xe/xe_uc.c
> > > +++ b/drivers/gpu/drm/xe/xe_uc.c
> > > @@ -158,7 +158,7 @@ static int vf_uc_load_hw(struct xe_uc *uc)
> > >  
> > >  	err = xe_gt_sriov_vf_connect(uc_to_gt(uc));
> > >  	if (err)
> > > -		return err;
> > > +		goto err_out;
> > >  
> > >  	uc->guc.submission_state.enabled = true;
> > >  
> > > @@ -168,9 +168,13 @@ static int vf_uc_load_hw(struct xe_uc *uc)
> > >  
> > >  	err = xe_gt_record_default_lrcs(uc_to_gt(uc));
> > >  	if (err)
> > > -		return err;
> > > +		goto err_out;
> > >  
> > >  	return 0;
> > > +
> > > +err_out:
> > > +	xe_guc_sanitize(&uc->guc);
> > > +	return err;
> > >  }
> > >  
> > >  /*
> > > @@ -202,15 +206,15 @@ int xe_uc_load_hw(struct xe_uc *uc)
> > >  
> > >  	ret = xe_gt_record_default_lrcs(uc_to_gt(uc));
> > >  	if (ret)
> > > -		return ret;
> > > +		goto err_out;
> > >  
> > >  	ret = xe_guc_post_load_init(&uc->guc);
> > >  	if (ret)
> > > -		return ret;
> > > +		goto err_out;
> > >  
> > >  	ret = xe_guc_pc_start(&uc->guc.pc);
> > >  	if (ret)
> > > -		return ret;
> > > +		goto err_out;
> > >  
> > >  	xe_guc_engine_activity_enable_stats(&uc->guc);
> > >  
> > > @@ -222,6 +226,10 @@ int xe_uc_load_hw(struct xe_uc *uc)
> > >  	xe_gsc_load_start(&uc->gsc);
> > >  
> > >  	return 0;
> > > +
> > > +err_out:
> > > +	xe_guc_sanitize(&uc->guc);
> > > +	return ret;
> > >  }
> > >  
> > >  int xe_uc_reset_prepare(struct xe_uc *uc)
> > > -- 
> > > 2.34.1
> > > 
> > > 

      reply	other threads:[~2025-07-08 19:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-07 23:11 [PATCH v9] drm/xe/uc: Disable GuC communication on hardware initialization error Zhanjun Dong
2025-07-08  0:57 ` ✓ CI.KUnit: success for drm/xe/uc: Disable GuC communication on hardware initialization error. (rev7) Patchwork
2025-07-08  1:37 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-08  4:25 ` ✗ Xe.CI.Full: failure " Patchwork
2025-07-08 16:43   ` Dong, Zhanjun
2025-07-08 18:36 ` [PATCH v9] drm/xe/uc: Disable GuC communication on hardware initialization error Cavitt, Jonathan
2025-07-08 18:49   ` Matthew Brost
2025-07-08 19:03     ` Matthew Brost [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=aG1rmorqfoFSTfyy@lstrano-desk.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=Michal.Wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=stuart.summers@intel.com \
    --cc=zhanjun.dong@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