summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_uc.c
diff options
context:
space:
mode:
authorMichel Thierry <michel.thierry@intel.com>2017-06-05 10:12:51 -0700
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>2017-06-08 12:21:19 +0300
commitc4a8952612f6c1c28bab200c45d773e08dfd24d5 (patch)
treefc120ea3ff36f9a54b5497836c79a0a4d3ce2947 /drivers/gpu/drm/i915/intel_uc.c
parentd5553c0990c8b9cde6a9abb1f15acf8a11c5eef3 (diff)
downloadlinux-stable-c4a8952612f6c1c28bab200c45d773e08dfd24d5.tar.gz
linux-stable-c4a8952612f6c1c28bab200c45d773e08dfd24d5.tar.bz2
linux-stable-c4a8952612f6c1c28bab200c45d773e08dfd24d5.zip
drm/i915/guc: Clear enable_guc_loading in case of init failure
And prevent calling i915_ggtt_disable_guc twice (the first when GuC init failed, and the second time during driver unload / intel_uc_fini_hw), and hitting the GEM_BUG_ON. v2: Clear enable_guc_loading unconditionally (Michal) Make sure guc_free_load_err_log is still called (Daniele) Don't shoot the messenger (Chris) Fixes: 3950bf3dbff10 ("drm/i915/guc: Add onion teardown to the GuC setup") Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170605171251.9905-1-michel.thierry@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_uc.c')
-rw-r--r--drivers/gpu/drm/i915/intel_uc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 7a7b07de28a3..27e072cc96eb 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -433,16 +433,19 @@ err_guc:
DRM_NOTE("Falling back from GuC submission to execlist mode\n");
}
+ i915.enable_guc_loading = 0;
+ DRM_NOTE("GuC firmware loading disabled\n");
+
return ret;
}
void intel_uc_fini_hw(struct drm_i915_private *dev_priv)
{
+ guc_free_load_err_log(&dev_priv->guc);
+
if (!i915.enable_guc_loading)
return;
- guc_free_load_err_log(&dev_priv->guc);
-
if (i915.enable_guc_submission)
i915_guc_submission_disable(dev_priv);