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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for clarification.


On 2/1/2018 7:57 PM, Michal Wajdeczko wrote:
On Thu, 01 Feb 2018 12:43:29 +0100, Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx> wrote:



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>
Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>
---
  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

"ret" will be uninitialized, but it is used there

and below?

well, I wanted to include path that captures GuC log ...

+        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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux