[Intel-gfx] [PATCH 1/5] drm/i915/uc: Add few more load failure checkpoints

Michal Wajdeczko michal.wajdeczko at intel.com
Wed Jan 31 17:32:36 UTC 2018


Additional load failure checkpoints added into uC initialization
sequence should help us verify correctness of error handling.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_uc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index e3f3509..2f80cab 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -287,6 +287,9 @@ int intel_uc_init(struct drm_i915_private *dev_priv)
 	if (!HAS_GUC(dev_priv))
 		return -ENODEV;
 
+	if (i915_inject_load_failure())
+		return -ENODEV;
+
 	ret = intel_guc_init(guc);
 	if (ret)
 		return ret;
@@ -330,6 +333,11 @@ int intel_uc_init_hw(struct drm_i915_private *dev_priv)
 	if (!USES_GUC(dev_priv))
 		return 0;
 
+	if (i915_inject_load_failure()) {
+		ret = -ECANCELED;
+		goto err_out;
+	}
+
 	GEM_BUG_ON(!HAS_GUC(dev_priv));
 
 	guc_disable_communication(guc);
@@ -371,6 +379,9 @@ int intel_uc_init_hw(struct drm_i915_private *dev_priv)
 				 "retry %d more time(s)\n", ret, attempts);
 	}
 
+	if (i915_inject_load_failure())
+		ret = -ECANCELED;
+
 	/* Did we succeded or run out of retries? */
 	if (ret)
 		goto err_log_capture;
-- 
1.9.1



More information about the Intel-gfx mailing list