Don't call fence::poll during irq if there are no waiters.

main
Thomas Hellström 2008-03-06 17:35:56 +01:00 committed by Thomas Hellstrom
parent cf3c0123a0
commit b8567bafff
1 changed files with 3 additions and 1 deletions

View File

@ -162,10 +162,12 @@ static int i915_fence_emit_sequence(struct drm_device *dev, uint32_t class,
void i915_fence_handler(struct drm_device *dev) 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_manager *fm = &dev->fm;
struct drm_fence_class_manager *fc = &fm->fence_class[0]; struct drm_fence_class_manager *fc = &fm->fence_class[0];
write_lock(&fm->lock); write_lock(&fm->lock);
if (likely(dev_priv->fence_irq_on))
i915_fence_poll(dev, 0, fc->waiting_types); i915_fence_poll(dev, 0, fc->waiting_types);
write_unlock(&fm->lock); write_unlock(&fm->lock);
} }