diff options
author | Eric Anholt <eric@anholt.net> | 2008-07-30 12:06:12 -0700 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-10-18 07:10:12 +1000 |
commit | 673a394b1e3b69be886ff24abfd6df97c52e8d08 (patch) | |
tree | 61ca8299333ab50ffc46cf328b20eb25133392ff /drivers/gpu/drm/i915/i915_irq.c | |
parent | d1d8c925b71dd6753bf438f9e14a9e5c5183bcc6 (diff) |
drm: Add GEM ("graphics execution manager") to i915 driver.
GEM allows the creation of persistent buffer objects accessible by the
graphics device through new ioctls for managing execution of commands on the
device. The userland API is almost entirely driver-specific to ensure that
any driver building on this model can easily map the interface to individual
driver requirements.
GEM is used by the 2d driver for managing its internal state allocations and
will be used for pixmap storage to reduce memory consumption and enable
zero-copy GLX_EXT_texture_from_pixmap, and in the 3d driver is used to enable
GL_EXT_framebuffer_object and GL_ARB_pixel_buffer_object.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index f8759597233..f295bdf16e2 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -407,15 +407,20 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) I915_WRITE(PIPEBSTAT, pipeb_stats); } - if (iir & I915_ASLE_INTERRUPT) - opregion_asle_intr(dev); + I915_WRITE(IIR, iir); + if (dev->pdev->msi_enabled) + I915_WRITE(IMR, dev_priv->irq_mask_reg); + (void) I915_READ(IIR); /* Flush posted writes */ dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); - if (dev->pdev->msi_enabled) - I915_WRITE(IMR, dev_priv->irq_mask_reg); - I915_WRITE(IIR, iir); - (void) I915_READ(IIR); + if (iir & I915_USER_INTERRUPT) { + dev_priv->mm.irq_gem_seqno = i915_get_gem_seqno(dev); + DRM_WAKEUP(&dev_priv->irq_queue); + } + + if (iir & I915_ASLE_INTERRUPT) + opregion_asle_intr(dev); if (vblank && dev_priv->swaps_pending > 0) drm_locked_tasklet(dev, i915_vblank_tasklet); @@ -449,7 +454,7 @@ static int i915_emit_irq(struct drm_device * dev) return dev_priv->counter; } -static void i915_user_irq_get(struct drm_device *dev) +void i915_user_irq_get(struct drm_device *dev) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |