aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Zanoni <[email protected]>2016-01-19 11:35:47 -0200
committerPaulo Zanoni <[email protected]>2016-01-29 18:15:43 -0200
commit65c7600f07d4eb372c078dcd7138a9276f5705eb (patch)
tree0aaa3bc67e0013cc905c38ef63e6577259a05aa0
parentc937ab3e584ea66433ce743a42c752e31f3acdbe (diff)
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: Reported-by: Daniel Vetter <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/i915/intel_fbc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index 04783432d6f7..35d265092bc1 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -1098,6 +1098,8 @@ void intel_fbc_disable(struct intel_crtc *crtc)
__intel_fbc_disable(dev_priv);
}
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)
if (fbc->enabled)
__intel_fbc_disable(dev_priv);
mutex_unlock(&fbc->lock);
+
+ cancel_work_sync(&fbc->work.work);
}
/**