aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSagar Arun Kamble <sagar.a.kamble@intel.com>2018-01-10 07:54:16 -0500
committerRodrigo Vivi <rodrigo.vivi@intel.com>2018-02-01 10:31:33 -0500
commitc950af50e5983a119bebedceed94ef505df8d552 (patch)
tree13cf300d7711b8e28d804e02573055f9caea8e0c
parent6389902072db658366ec53711a83d711364b7330 (diff)
drm/i915/guc: Add uc_fini_wq in gem_init unwind path
While moving code around for solving lockdep issue for GuC log relay, spotted that uc_fini_wq is not being called in failure path in gem_init. Missed in the below commit. Add it. v2: Removed GEM_BUG_ON(!HAS_GUC()) from intel_uc_fini_wq as init happens only based on enable_guc module parameter and does not consider has_guc capability. (Michal) Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com> Fixes: 3176ff49bc3e ("drm/i915/guc: Move GuC workqueue allocations outside of the mutex") Cc: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/1515588857-10283-1-git-send-email-sagar.a.kamble@intel.com Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit da943b5ab071584fcb9cfa896dc8c643d376f362) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
-rw-r--r--drivers/gpu/drm/i915/intel_uc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 8bc3283484be..1135a77b383a 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5283,6 +5283,8 @@ err_unlock:
5283 intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL); 5283 intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
5284 mutex_unlock(&dev_priv->drm.struct_mutex); 5284 mutex_unlock(&dev_priv->drm.struct_mutex);
5285 5285
5286 intel_uc_fini_wq(dev_priv);
5287
5286 if (ret != -EIO) 5288 if (ret != -EIO)
5287 i915_gem_cleanup_userptr(dev_priv); 5289 i915_gem_cleanup_userptr(dev_priv);
5288 5290
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 907deac6e3fa..d82ca0f438f5 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -209,8 +209,6 @@ void intel_uc_fini_wq(struct drm_i915_private *dev_priv)
209 if (!USES_GUC(dev_priv)) 209 if (!USES_GUC(dev_priv))
210 return; 210 return;
211 211
212 GEM_BUG_ON(!HAS_GUC(dev_priv));
213
214 intel_guc_fini_wq(&dev_priv->guc); 212 intel_guc_fini_wq(&dev_priv->guc);
215} 213}
216 214