Commit 65c7600f authored by Paulo Zanoni's avatar Paulo Zanoni

drm/i915/fbc: make sure we cancel the work function at fbc_disable

Just to be sure nothing will survive a module unload. We need to do
this after the unlock in order to make sure the function won't get
stuck trying to grab the lock we already own while we wait for it to
finish.
Reported-by: default avatarReported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1453210558-7875-15-git-send-email-paulo.r.zanoni@intel.com
parent c937ab3e
...@@ -1098,6 +1098,8 @@ void intel_fbc_disable(struct intel_crtc *crtc) ...@@ -1098,6 +1098,8 @@ void intel_fbc_disable(struct intel_crtc *crtc)
__intel_fbc_disable(dev_priv); __intel_fbc_disable(dev_priv);
} }
mutex_unlock(&fbc->lock); mutex_unlock(&fbc->lock);
cancel_work_sync(&fbc->work.work);
} }
/** /**
...@@ -1117,6 +1119,8 @@ void intel_fbc_global_disable(struct drm_i915_private *dev_priv) ...@@ -1117,6 +1119,8 @@ void intel_fbc_global_disable(struct drm_i915_private *dev_priv)
if (fbc->enabled) if (fbc->enabled)
__intel_fbc_disable(dev_priv); __intel_fbc_disable(dev_priv);
mutex_unlock(&fbc->lock); mutex_unlock(&fbc->lock);
cancel_work_sync(&fbc->work.work);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment