From 2150da5d1a57d25d0f4bc39bb6c883d410f586d1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 10 Jun 2008 15:30:23 -0700 Subject: [gem] Manage the ringbuffer from the kernel in the GEM case. This requires that the X Server use the execbuf interface for buffer submission, as it no longer has direct access to the ring. This is therefore a flag day for the gem interface. This also adds enter/leavevt ioctls for use by the X Server. These would get stubbed out in a modesetting implementation, but are required while in an environment where the device's state is only managed by the DRM while X has the VT. --- shared-core/i915_irq.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shared-core/i915_irq.c') diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c index 37d85f40..077af1ab 100644 --- a/shared-core/i915_irq.c +++ b/shared-core/i915_irq.c @@ -575,6 +575,11 @@ int i915_wait_irq(struct drm_device * dev, int irq_nr) drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; int ret = 0; + if (!dev_priv) { + DRM_ERROR("called with no initialization\n"); + return -EINVAL; + } + DRM_DEBUG("irq_nr=%d breadcrumb=%d\n", irq_nr, READ_BREADCRUMB(dev_priv)); -- cgit v1.2.3 From 62a3be962f1915d17813ecbfc9544232908b44e4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 10 Jun 2008 23:10:33 -0700 Subject: [intel] Fix BUG_ON trigger in irq masking if you did on/off with irqs disabled. --- shared-core/i915_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shared-core/i915_irq.c') diff --git a/shared-core/i915_irq.c b/shared-core/i915_irq.c index 077af1ab..0125f8b3 100644 --- a/shared-core/i915_irq.c +++ b/shared-core/i915_irq.c @@ -560,7 +560,7 @@ void i915_user_irq_on(drm_i915_private_t *dev_priv) void i915_user_irq_off(drm_i915_private_t *dev_priv) { DRM_SPINLOCK(&dev_priv->user_irq_lock); - BUG_ON(dev_priv->user_irq_refcount <= 0); + BUG_ON(dev_priv->irq_enabled && dev_priv->user_irq_refcount <= 0); if (dev_priv->irq_enabled && (--dev_priv->user_irq_refcount == 0)) { dev_priv->irq_mask_reg |= I915_USER_INTERRUPT; I915_WRITE(I915REG_INT_MASK_R, dev_priv->irq_mask_reg); -- cgit v1.2.3