diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-29 08:19:09 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-05-10 16:19:12 -0400 |
commit | b259f6730c09bc356df932ba9188f291de816808 (patch) | |
tree | 7994cdd9085ce1777d711ec5da6726ad158c7f65 /drivers/gpu | |
parent | 2fb4e61d9471867677c97bf11dba8f1e9dfa7f7c (diff) |
drm/i915: Move the irq wait queue initialisation into the ring init
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 1 |
2 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 188b497e5076..46ccfc814ea7 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -1688,12 +1688,6 @@ int i915_driver_irq_postinstall(struct drm_device *dev) | |||
1688 | u32 enable_mask = I915_INTERRUPT_ENABLE_FIX | I915_INTERRUPT_ENABLE_VAR; | 1688 | u32 enable_mask = I915_INTERRUPT_ENABLE_FIX | I915_INTERRUPT_ENABLE_VAR; |
1689 | u32 error_mask; | 1689 | u32 error_mask; |
1690 | 1690 | ||
1691 | DRM_INIT_WAITQUEUE(&dev_priv->ring[RCS].irq_queue); | ||
1692 | if (HAS_BSD(dev)) | ||
1693 | DRM_INIT_WAITQUEUE(&dev_priv->ring[VCS].irq_queue); | ||
1694 | if (HAS_BLT(dev)) | ||
1695 | DRM_INIT_WAITQUEUE(&dev_priv->ring[BCS].irq_queue); | ||
1696 | |||
1697 | dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B; | 1691 | dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B; |
1698 | 1692 | ||
1699 | if (HAS_PCH_SPLIT(dev)) | 1693 | if (HAS_PCH_SPLIT(dev)) |
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index e9e6f71418a4..884556d9814e 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -800,6 +800,7 @@ int intel_init_ring_buffer(struct drm_device *dev, | |||
800 | INIT_LIST_HEAD(&ring->request_list); | 800 | INIT_LIST_HEAD(&ring->request_list); |
801 | INIT_LIST_HEAD(&ring->gpu_write_list); | 801 | INIT_LIST_HEAD(&ring->gpu_write_list); |
802 | 802 | ||
803 | init_waitqueue_head(&ring->irq_queue); | ||
803 | spin_lock_init(&ring->irq_lock); | 804 | spin_lock_init(&ring->irq_lock); |
804 | ring->irq_mask = ~0; | 805 | ring->irq_mask = ~0; |
805 | 806 | ||