diff options
Diffstat (limited to 'linux/gamma_dma.c')
-rw-r--r-- | linux/gamma_dma.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/linux/gamma_dma.c b/linux/gamma_dma.c index 993ca36b..85a9c084 100644 --- a/linux/gamma_dma.c +++ b/linux/gamma_dma.c @@ -105,13 +105,14 @@ static inline int gamma_dma_is_ready(drm_device_t *dev) return(!GAMMA_READ(GAMMA_DMACOUNT)); } -void gamma_dma_service(int irq, void *device, struct pt_regs *regs) +DRM_IRQ_RET gamma_dma_service( DRM_IRQ_ARGS ) { - drm_device_t *dev = (drm_device_t *)device; + drm_device_t *dev = (drm_device_t *)arg; drm_device_dma_t *dma = dev->dma; drm_gamma_private_t *dev_priv = (drm_gamma_private_t *)dev->dev_private; + /* FIXME: should check whether we're actually interested in the interrupt? */ atomic_inc(&dev->counts[6]); /* _DRM_STAT_IRQ */ while (GAMMA_READ(GAMMA_INFIFOSPACE) < 3); @@ -120,7 +121,7 @@ void gamma_dma_service(int irq, void *device, struct pt_regs *regs) GAMMA_WRITE(GAMMA_GINTFLAGS, 0x2001); if (gamma_dma_is_ready(dev)) { /* Free previous buffer */ - if (test_and_set_bit(0, &dev->dma_flag)) return; + if (test_and_set_bit(0, &dev->dma_flag)) return DRM_IRQ_HANDLED; if (dma->this_buffer) { gamma_free_buffer(dev, dma->this_buffer); dma->this_buffer = NULL; @@ -135,6 +136,7 @@ void gamma_dma_service(int irq, void *device, struct pt_regs *regs) schedule_work(&dev->work); #endif } + return DRM_IRQ_HANDLED; } /* Only called by gamma_dma_schedule. */ |