]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/i915: Move the irq wait queue initialisation into the ring init
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 29 Mar 2011 12:19:09 +0000 (13:19 +0100)
committerKeith Packard <keithp@keithp.com>
Tue, 10 May 2011 20:19:12 +0000 (13:19 -0700)
Required so that we don't obliterate the queue if initialising the
rings after the global IRQ handler is installed.

[Jesse, you recently looked at refactoring the IRQ installation
routines, does moving the initialisation of ring buffer data structures away
from that routine make sense in your grand scheme?]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_ringbuffer.c

index 188b497e50768d56a3a93f2422000c03a0bcaddf..46ccfc814ea772cc187c3330594802c2f51c9f2e 100644 (file)
@@ -1688,12 +1688,6 @@ int i915_driver_irq_postinstall(struct drm_device *dev)
        u32 enable_mask = I915_INTERRUPT_ENABLE_FIX | I915_INTERRUPT_ENABLE_VAR;
        u32 error_mask;
 
-       DRM_INIT_WAITQUEUE(&dev_priv->ring[RCS].irq_queue);
-       if (HAS_BSD(dev))
-               DRM_INIT_WAITQUEUE(&dev_priv->ring[VCS].irq_queue);
-       if (HAS_BLT(dev))
-               DRM_INIT_WAITQUEUE(&dev_priv->ring[BCS].irq_queue);
-
        dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B;
 
        if (HAS_PCH_SPLIT(dev))
index e9e6f71418a43122c3545d712c2ea3268861c2c4..884556d9814e3c0d2cdbe9d4d6fb1ecd24344bba 100644 (file)
@@ -800,6 +800,7 @@ int intel_init_ring_buffer(struct drm_device *dev,
        INIT_LIST_HEAD(&ring->request_list);
        INIT_LIST_HEAD(&ring->gpu_write_list);
 
+       init_waitqueue_head(&ring->irq_queue);
        spin_lock_init(&ring->irq_lock);
        ring->irq_mask = ~0;