Don't call fence::poll during irq if there are no waiters.
authorThomas Hellström <thomas@linlap0.(none)>
Thu, 6 Mar 2008 16:35:56 +0000 (17:35 +0100)
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Sun, 30 Mar 2008 13:11:47 +0000 (15:11 +0200)
linux-core/i915_fence.c

index de64a4f..e403be6 100644 (file)
@@ -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);
 }