All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Mark i915.inject_load_failure as being hit
@ 2018-06-06 13:09 Chris Wilson
  2018-06-06 13:25 ` Michal Wajdeczko
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Chris Wilson @ 2018-06-06 13:09 UTC (permalink / raw)
  To: intel-gfx

When we reach the magic value and do inject a fault into our module load,
mark the module option as being hit. Since we fail from inside pci
probe, the module load isn't actually aborted and the module (and
paramters) are left lingering. igt can then inspect the parameter on its
synchronous completion of modprobe to see if the fault injection was
successful, and will keeping on injecting new faults until the module
succeeds in loading having surpassed the number of fault points.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c    | 1 +
 drivers/gpu/drm/i915/i915_params.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 6b599b1837dc..71b7302e6f8c 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -67,6 +67,7 @@ bool __i915_inject_load_failure(const char *func, int line)
 	if (++i915_load_fail_count == i915_modparams.inject_load_failure) {
 		DRM_INFO("Injecting failure at checkpoint %u [%s:%d]\n",
 			 i915_modparams.inject_load_failure, func, line);
+		i915_modparams.inject_load_failure = -1;
 		return true;
 	}
 
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index aebe0469ddaa..3b115975745a 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -55,7 +55,7 @@ struct drm_printer;
 	param(int, mmio_debug, 0) \
 	param(int, edp_vswing, 0) \
 	param(int, reset, 2) \
-	param(unsigned int, inject_load_failure, 0) \
+	param(int, inject_load_failure, 0) \
 	/* leave bools at the end to not create holes */ \
 	param(bool, alpha_support, IS_ENABLED(CONFIG_DRM_I915_ALPHA_SUPPORT)) \
 	param(bool, enable_hangcheck, true) \
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-06-07 18:12 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-06 13:09 [PATCH] drm/i915: Mark i915.inject_load_failure as being hit Chris Wilson
2018-06-06 13:25 ` Michal Wajdeczko
2018-06-06 13:33   ` Chris Wilson
2018-06-06 14:19     ` Chris Wilson
2018-06-06 14:28       ` Michal Wajdeczko
2018-06-06 13:57 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-06-06 14:12 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-06-06 14:26 ` [PATCH v2] " Chris Wilson
2018-06-07 11:09   ` kbuild test robot
2018-06-07 11:17   ` kbuild test robot
2018-06-07 18:11   ` kbuild test robot
2018-06-06 14:41 ` [PATCH v3] " Chris Wilson
2018-06-06 14:50   ` Michał Winiarski
2018-06-06 14:54     ` Michal Wajdeczko
2018-06-06 17:40       ` Chris Wilson
2018-06-06 14:55     ` Chris Wilson
2018-06-06 15:21 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Mark i915.inject_load_failure as being hit (rev3) Patchwork
2018-06-06 15:36 ` ✓ Fi.CI.BAT: success " Patchwork
2018-06-06 18:07 ` ✓ Fi.CI.IGT: " Patchwork

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.