diff options
author | Thomas Hellström <thomas@linlap0.(none)> | 2008-03-06 17:35:56 +0100 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2008-03-30 15:11:47 +0200 |
commit | b8567bafff58cfb9d77145088fd5b8ad2e5cde6b (patch) | |
tree | e51881c524cdf1340b883188b86f27a118fea434 | |
parent | cf3c0123a038a825d478fa10e29cd7490bab369e (diff) |
Don't call fence::poll during irq if there are no waiters.
-rw-r--r-- | linux-core/i915_fence.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux-core/i915_fence.c b/linux-core/i915_fence.c index de64a4f2..e403be6a 100644 --- a/linux-core/i915_fence.c +++ b/linux-core/i915_fence.c @@ -162,11 +162,13 @@ static int i915_fence_emit_sequence(struct drm_device *dev, uint32_t class, void i915_fence_handler(struct drm_device *dev) { + struct drm_i915_private *dev_priv = (struct drm_i915_private *) dev->dev_private; struct drm_fence_manager *fm = &dev->fm; struct drm_fence_class_manager *fc = &fm->fence_class[0]; write_lock(&fm->lock); - i915_fence_poll(dev, 0, fc->waiting_types); + if (likely(dev_priv->fence_irq_on)) + i915_fence_poll(dev, 0, fc->waiting_types); write_unlock(&fm->lock); } |