On 1/31/2018 11:02 PM, Michal Wajdeczko wrote:
Additional load failure checkpoints added into uC initialization
sequence should help us verify correctness of error handling.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
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;
In patch 3 we will be returning -EIO always from this function so just
goto here and below?
+ 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;
--
Thanks,
Sagar
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx