Skip to content

Commit

Permalink
drm/i915/guc: Add uc_fini_wq in gem_init unwind path
Browse files Browse the repository at this point in the history
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: 3176ff4 ("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>
  • Loading branch information
Sagar Arun Kamble authored and Chris Wilson committed Jan 10, 2018
1 parent 17bd6e6 commit da943b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -5283,6 +5283,8 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
mutex_unlock(&dev_priv->drm.struct_mutex);

intel_uc_fini_wq(dev_priv);

if (ret != -EIO)
i915_gem_cleanup_userptr(dev_priv);

Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/i915/intel_uc.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ void intel_uc_fini_wq(struct drm_i915_private *dev_priv)
if (!USES_GUC(dev_priv))
return;

GEM_BUG_ON(!HAS_GUC(dev_priv));

intel_guc_fini_wq(&dev_priv->guc);
}

Expand Down

0 comments on commit da943b5

Please sign in to comment.