Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Francois Dugast <francois.dugast@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Riana Tauro <riana.tauro@intel.com>,
	<intel-xe@lists.freedesktop.org>, <rodrigo.vivi@intel.com>
Subject: Re: [PATCH] drm/xe: fix enable survivability mode
Date: Thu, 6 Mar 2025 12:00:09 +0100	[thread overview]
Message-ID: <Z8mAOQxYlyYmW5hl@fdugast-desk> (raw)
In-Reply-To: <uszj2ekc7jiapwdqd2a7mseokpu2iabr74qczkzfpfqahky7jq@vmfro22jihmt>

On Thu, Mar 06, 2025 at 12:05:53AM -0600, Lucas De Marchi wrote:
> On Thu, Mar 06, 2025 at 12:04:06AM -0600, Lucas De Marchi wrote:
> > On Thu, Mar 06, 2025 at 11:24:07AM +0530, Riana Tauro wrote:
> > > The current implementation skipped entering survivability mode even when
> > > survivability enable returned success. Enter survivability mode
> > > if enable returns success
> > > 
> > > Fixes: d40f275d96e8 ("drm/xe: Move survivability entirely to xe_pci")
> > > Signed-off-by: Riana Tauro <riana.tauro@intel.com>
> 
> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
> 
> Lucas De Marchi
> 
> > > ---
> > > drivers/gpu/drm/xe/xe_pci.c | 5 ++---
> > > 1 file changed, 2 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> > > index 6b5fa067b39b..ee0665e54489 100644
> > > --- a/drivers/gpu/drm/xe/xe_pci.c
> > > +++ b/drivers/gpu/drm/xe/xe_pci.c
> > > @@ -857,9 +857,8 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> > > 	 * HW to be enabled. In that case enable it and return success.
> > > 	 */
> > > 	if (err) {
> > > -		if (xe_survivability_mode_required(xe) &&
> > > -		    xe_survivability_mode_enable(xe))
> > > -			return 0;
> > > +		if (xe_survivability_mode_required(xe))
> > > +			return xe_survivability_mode_enable(xe);
> > 
> > ugh... the mix of bool and int above threw me off. I remember fixing it
> > but probably forgot to put it in the series.
> > 
> > +Francois
> > 
> > Can we inject 2 errors to easily test this in igt?
> > 
> > 1. xe_device_probe_early() to return error

Yes sure. BTW just tried that locally and it leads to a kernel NULL
pointer dereference. If that is confirmed, this is another good example
why we should test error paths with fault injection.

> > 2. xe_survivability_mode_required to return true

That seems not to work, we would need to change return type to int.

Francois

> > 
> > Thanks,
> > Lucas De Marchi
> > 
> > 
> > > 
> > > 		return err;
> > > 	}
> > > -- 
> > > 2.47.1
> > > 

  reply	other threads:[~2025-03-06 11:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06  5:54 [PATCH] drm/xe: fix enable survivability mode Riana Tauro
2025-03-06  5:37 ` ✓ CI.Patch_applied: success for " Patchwork
2025-03-06  5:37 ` ✓ CI.checkpatch: " Patchwork
2025-03-06  5:39 ` ✓ CI.KUnit: " Patchwork
2025-03-06  5:55 ` ✓ CI.Build: " Patchwork
2025-03-06  5:57 ` ✓ CI.Hooks: " Patchwork
2025-03-06  5:59 ` ✓ CI.checksparse: " Patchwork
2025-03-06  6:04 ` [PATCH] " Lucas De Marchi
2025-03-06  6:05   ` Lucas De Marchi
2025-03-06 11:00     ` Francois Dugast [this message]
2025-03-06  7:43   ` Riana Tauro
2025-03-06  6:20 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-03-06 13:15 ` ✗ 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=Z8mAOQxYlyYmW5hl@fdugast-desk \
    --to=francois.dugast@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@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