diff options
author | Jerome Glisse <glisse@freedesktop.org> | 2008-11-05 15:59:37 +0100 |
---|---|---|
committer | Jerome Glisse <glisse@freedesktop.org> | 2008-11-05 15:59:37 +0100 |
commit | ddfb12b32e64d00d302f7fbb36fb079deec3646f (patch) | |
tree | 5caeade40ef88936a88e47060b6090aa44d38b94 /shared-core/radeon_irq.c | |
parent | 7651b4c424aa6c6ac6c47b2d07c8f65d0b9d0191 (diff) | |
parent | 68fcb7770efc20b9e27b1724e2fb5ac112a5330e (diff) |
Merge branch 'modesetting-gem' of ssh://git.freedesktop.org/git/mesa/drm into modesetting-gem
Diffstat (limited to 'shared-core/radeon_irq.c')
-rw-r--r-- | shared-core/radeon_irq.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/shared-core/radeon_irq.c b/shared-core/radeon_irq.c index dcf58e43..46a27943 100644 --- a/shared-core/radeon_irq.c +++ b/shared-core/radeon_irq.c @@ -195,6 +195,7 @@ irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS) if (!stat) return IRQ_NONE; + atomic_inc(&dev_priv->irq_received); stat &= dev_priv->irq_enable_reg; /* SW interrupt */ @@ -222,15 +223,19 @@ int radeon_emit_irq(struct drm_device * dev) { drm_radeon_private_t *dev_priv = dev->dev_private; unsigned int ret; + int i; RING_LOCALS; - ret = radeon_update_breadcrumb(dev); + if (!dev_priv->irq_emitted) { + ret = radeon_update_breadcrumb(dev); - BEGIN_RING(4); - OUT_RING_REG(RADEON_LAST_SWI_REG, ret); - OUT_RING_REG(RADEON_GEN_INT_STATUS, RADEON_SW_INT_FIRE); - ADVANCE_RING(); - COMMIT_RING(); + BEGIN_RING(4); + OUT_RING_REG(RADEON_LAST_SWI_REG, ret); + OUT_RING_REG(RADEON_GEN_INT_STATUS, RADEON_SW_INT_FIRE); + ADVANCE_RING(); + COMMIT_RING(); + } else + ret = dev_priv->irq_emitted; return ret; } |