All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francois Dugast <francois.dugast@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-xe <intel-xe@lists.freedesktop.org>,
	Riana Tauro <riana.tauro@intel.com>
Subject: Re: [PATCH v2 2/2] drm/xe: Allow to inject error in early probe
Date: Wed, 12 Mar 2025 09:20:16 +0100	[thread overview]
Message-ID: <Z9FDtXqmC-e5uxFW@fdugast-desk> (raw)
In-Reply-To: <20250311-fix-survivability-v2-2-729ce081155e@intel.com>

On Tue, Mar 11, 2025 at 11:34:56AM -0700, Lucas De Marchi wrote:
> Allow to test if driver behaves correctly when xe_pcode_probe_early()
> fails. Note that this is not sufficient for testing survivability mode
> as it's still required to read the hw to check for errors, which doesn't
> happen on an injected failure.
> 
> To complete the early probe coverage, allow injection in the other
> functions as well: xe_mmio_probe_early() and xe_device_probe_early().
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

Reviewed-by: Francois Dugast <francois.dugast@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_device.c | 1 +
>  drivers/gpu/drm/xe/xe_mmio.c   | 1 +
>  drivers/gpu/drm/xe/xe_pcode.c  | 2 ++
>  3 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index 023290e5be392..1b443f54ee16a 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -728,6 +728,7 @@ int xe_device_probe_early(struct xe_device *xe)
>  
>  	return 0;
>  }
> +ALLOW_ERROR_INJECTION(xe_device_probe_early, ERRNO); /* See xe_pci_probe() */
>  
>  static int probe_has_flat_ccs(struct xe_device *xe)
>  {
> diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
> index 70a36e7775466..e1470fcf95d6d 100644
> --- a/drivers/gpu/drm/xe/xe_mmio.c
> +++ b/drivers/gpu/drm/xe/xe_mmio.c
> @@ -138,6 +138,7 @@ int xe_mmio_probe_early(struct xe_device *xe)
>  
>  	return devm_add_action_or_reset(xe->drm.dev, mmio_fini, xe);
>  }
> +ALLOW_ERROR_INJECTION(xe_mmio_probe_early, ERRNO); /* See xe_pci_probe() */
>  
>  /**
>   * xe_mmio_init() - Initialize an MMIO instance
> diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c
> index 9333ce776a6e5..cf955b3ed52cd 100644
> --- a/drivers/gpu/drm/xe/xe_pcode.c
> +++ b/drivers/gpu/drm/xe/xe_pcode.c
> @@ -7,6 +7,7 @@
>  
>  #include <linux/delay.h>
>  #include <linux/errno.h>
> +#include <linux/error-injection.h>
>  
>  #include <drm/drm_managed.h>
>  
> @@ -323,3 +324,4 @@ int xe_pcode_probe_early(struct xe_device *xe)
>  {
>  	return xe_pcode_ready(xe, false);
>  }
> +ALLOW_ERROR_INJECTION(xe_pcode_probe_early, ERRNO); /* See xe_pci_probe */
> 
> -- 
> 2.48.1
> 

  reply	other threads:[~2025-03-12  8:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-11 18:34 [PATCH v2 0/2] drm/xe: Fix survivability Lucas De Marchi
2025-03-11 18:34 ` [PATCH v2 1/2] drm/xe: Move survivability back to xe Lucas De Marchi
2025-03-11 20:55   ` Rodrigo Vivi
2025-03-11 21:09     ` Lucas De Marchi
2025-03-12 20:12       ` Rodrigo Vivi
2025-03-11 18:34 ` [PATCH v2 2/2] drm/xe: Allow to inject error in early probe Lucas De Marchi
2025-03-12  8:20   ` Francois Dugast [this message]
2025-03-11 22:02 ` ✓ CI.Patch_applied: success for drm/xe: Fix survivability (rev2) Patchwork
2025-03-11 22:03 ` ✓ CI.checkpatch: " Patchwork
2025-03-11 22:04 ` ✓ CI.KUnit: " Patchwork
2025-03-11 22:21 ` ✓ CI.Build: " Patchwork
2025-03-11 22:23 ` ✓ CI.Hooks: " Patchwork
2025-03-11 22:24 ` ✓ CI.checksparse: " Patchwork
2025-03-12  5:46 ` ✓ Xe.CI.BAT: " 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=Z9FDtXqmC-e5uxFW@fdugast-desk \
    --to=francois.dugast@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.