From 383fea36709da9374a76b326a40fd2408234cfb0 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Mon, 24 Sep 2012 14:03:19 +0200 Subject: [PATCH] test patch --- drivers/gpu/drm/i915/i915_irq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index d7f0066..f6bffd7 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1499,8 +1499,11 @@ static int i915_enable_vblank(struct drm_device *dev, int pipe) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; unsigned long irqflags; + struct intel_crtc *crtc = + to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); - if (!i915_pipe_enabled(dev, pipe)) + /* This is shockinly racy .... */ + if (!crtc->active) return -EINVAL; spin_lock_irqsave(&dev_priv->irq_lock, irqflags); -- 1.7.11.2