diff mbox

[v5,1/8] drm/i915: Correctly handle error path in i915_gem_init_hw

Message ID 20180327203557.64484-1-michal.wajdeczko@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michal Wajdeczko March 27, 2018, 8:35 p.m. UTC
In function gem_init_hw() we are calling uc_init_hw() but in case
of error later in function, we missed to call matching uc_fini_hw()

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Chris Wilson March 28, 2018, 9:38 a.m. UTC | #1
Quoting Patchwork (2018-03-28 06:21:58)
> == Series Details ==
> 
> Series: series starting with [v5,1/8] drm/i915: Correctly handle error path in i915_gem_init_hw
> URL   : https://patchwork.freedesktop.org/series/40759/
> State : failure
> 
> == Summary ==
> 
> ---- Possible new issues:
> 
> Test drm_mm:
>         Subgroup sanitycheck:
>                 pass       -> INCOMPLETE (shard-apl)

<0>[  395.621771] drv_self-5796    0.... 395583503us : intel_guc_submission_disable: intel_guc_submission_disable:1242 GEM_BUG_ON(dev_priv->gt.awake)

> Test drv_hangman:
>         Subgroup error-state-basic:
>                 pass       -> INCOMPLETE (shard-apl)
>         Subgroup error-state-capture-blt:
>                 pass       -> INCOMPLETE (shard-apl)
>         Subgroup hangcheck-unterminated:
>                 pass       -> INCOMPLETE (shard-apl)

> Test gem_eio:
>         Subgroup execbuf:
>                 pass       -> INCOMPLETE (shard-apl)
>         Subgroup in-flight-external:
>                 pass       -> INCOMPLETE (shard-apl)

Wedged the machine (which then hit the same bug as gem_eio where we not
calling reset_default_submission from a safe point).

> Test gem_mocs_settings:
>         Subgroup mocs-reset-vebox:
>                 pass       -> INCOMPLETE (shard-apl)
> Test gem_ringfill:
>         Subgroup basic-default-hang:
>                 pass       -> INCOMPLETE (shard-apl)
> Test kms_flip:
>         Subgroup flip-vs-panning-vs-hang-interruptible:
>                 pass       -> INCOMPLETE (shard-apl)
> Test kms_frontbuffer_tracking:
>         Subgroup fbc-1p-offscren-pri-shrfb-draw-mmap-cpu:
>                 pass       -> SKIP       (shard-snb)
> Test kms_vblank:
>         Subgroup pipe-a-query-idle-hang:
>                 pass       -> INCOMPLETE (shard-apl)
>         Subgroup pipe-a-wait-forked-busy:
>                 pass       -> SKIP       (shard-snb)
>         Subgroup pipe-c-query-busy-hang:
>                 pass       -> INCOMPLETE (shard-apl)
>         Subgroup pipe-c-query-forked-hang:
>                 pass       -> INCOMPLETE (shard-apl)

More
<0>[  395.621771] drv_self-5796    0.... 395583503us : intel_guc_submission_disable: intel_guc_submission_disable:1242 GEM_BUG_ON(dev_priv->gt.awake)
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9650a7b..65ba104 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5171,9 +5171,15 @@  int i915_gem_init_hw(struct drm_i915_private *dev_priv)
 
 	/* Only when the HW is re-initialised, can we replay the requests */
 	ret = __i915_gem_restart_engines(dev_priv);
+	if (ret)
+		goto cleanup_uc;
 out:
 	intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
 	return ret;
+
+cleanup_uc:
+	intel_uc_fini_hw(dev_priv);
+	goto out;
 }
 
 static int __intel_engines_record_defaults(struct drm_i915_private *i915)