diff options
author | Michel Daenzer <michel@daenzer.net> | 2003-07-25 10:50:39 +0000 |
---|---|---|
committer | Michel Daenzer <michel@daenzer.net> | 2003-07-25 10:50:39 +0000 |
commit | bef7017749c9d3af733bdca4863a012f5d6506d3 (patch) | |
tree | 8152d62dfe6515a9f89c21934c5beb48b53180d2 /linux/gamma_dma.c | |
parent | 32ef0f59a8d62460da338568af347286aa450146 (diff) |
Compile fixes for recent 2.5/2.6 Linux kernels. I hope this doesn't break
the i830 driver or the BSDs. :)
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. */ |