diff mbox

drm/i915: Mark the GPU as wedged without error on fault injection

Message ID 20180607134558.31150-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson June 7, 2018, 1:45 p.m. UTC
If we have been instructed (by CI) to inject a fault to load the module
with a wedged GPU, do so quietly less we upset CI.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Chris Wilson June 7, 2018, 1:49 p.m. UTC | #1
Quoting Chris Wilson (2018-06-07 14:45:58)
> If we have been instructed (by CI) to inject a fault to load the module
> with a wedged GPU, do so quietly less we upset CI.
s/less/lest/
-Chris
Michał Winiarski June 8, 2018, 9:32 a.m. UTC | #2
On Thu, Jun 07, 2018 at 02:45:58PM +0100, Chris Wilson wrote:
> If we have been instructed (by CI) to inject a fault to load the module
> with a wedged GPU, do so quietly less we upset CI.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>

Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

-Michał

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index fd882eb389d2..4187e0688e50 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -5491,6 +5491,8 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
>  	}
>  
>  	if (i915_inject_load_failure()) {
> +		DRM_DEBUG_DRIVER("Marking the driver as wedged\n");
> +		i915_gem_set_wedged(dev_priv);  /* Fail silently! */
>  		ret = -EIO;
>  		goto err_init_hw;
>  	}
> -- 
> 2.17.1
>
Chris Wilson June 8, 2018, 9:54 a.m. UTC | #3
Quoting Michał Winiarski (2018-06-08 10:32:04)
> On Thu, Jun 07, 2018 at 02:45:58PM +0100, Chris Wilson wrote:
> > If we have been instructed (by CI) to inject a fault to load the module
> > with a wedged GPU, do so quietly less we upset CI.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Michał Winiarski <michal.winiarski@intel.com>
> > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> 
> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

Applied for peace and quiet, thanks.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index fd882eb389d2..4187e0688e50 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5491,6 +5491,8 @@  int i915_gem_init(struct drm_i915_private *dev_priv)
 	}
 
 	if (i915_inject_load_failure()) {
+		DRM_DEBUG_DRIVER("Marking the driver as wedged\n");
+		i915_gem_set_wedged(dev_priv);  /* Fail silently! */
 		ret = -EIO;
 		goto err_init_hw;
 	}