diff options
author | Eric Anholt <eric@anholt.net> | 2008-07-30 15:06:12 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-10-17 17:10:12 -0400 |
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 f8759597233b..f295bdf16e2d 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) | |||
407 | I915_WRITE(PIPEBSTAT, pipeb_stats); | 407 | I915_WRITE(PIPEBSTAT, pipeb_stats); |
408 | } | 408 | } |
409 | 409 | ||
410 | if (iir & I915_ASLE_INTERRUPT) | 410 | I915_WRITE(IIR, iir); |
411 | opregion_asle_intr(dev); | 411 | if (dev->pdev->msi_enabled) |
412 | I915_WRITE(IMR, dev_priv->irq_mask_reg); | ||
413 | (void) I915_READ(IIR); /* Flush posted writes */ | ||
412 | 414 | ||
413 | dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); | 415 | dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); |
414 | 416 | ||
415 | if (dev->pdev->msi_enabled) | 417 | if (iir & I915_USER_INTERRUPT) { |
416 | I915_WRITE(IMR, dev_priv->irq_mask_reg); | 418 | dev_priv->mm.irq_gem_seqno = i915_get_gem_seqno(dev); |
417 | I915_WRITE(IIR, iir); | 419 | DRM_WAKEUP(&dev_priv->irq_queue); |
418 | (void) I915_READ(IIR); | 420 | } |
421 | |||
422 | if (iir & I915_ASLE_INTERRUPT) | ||
423 | opregion_asle_intr(dev); | ||
419 | 424 | ||
420 | if (vblank && dev_priv->swaps_pending > 0) | 425 | if (vblank && dev_priv->swaps_pending > 0) |
421 | drm_locked_tasklet(dev, i915_vblank_tasklet); | 426 | drm_locked_tasklet(dev, i915_vblank_tasklet); |
@@ -449,7 +454,7 @@ static int i915_emit_irq(struct drm_device * dev) | |||
449 | return dev_priv->counter; | 454 | return dev_priv->counter; |
450 | } | 455 | } |
451 | 456 | ||
452 | static void i915_user_irq_get(struct drm_device *dev) | 457 | void i915_user_irq_get(struct drm_device *dev) |
453 | { | 458 | { |
454 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 459 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
455 | 460 | ||