From bef7017749c9d3af733bdca4863a012f5d6506d3 Mon Sep 17 00:00:00 2001 From: Michel Daenzer Date: Fri, 25 Jul 2003 10:50:39 +0000 Subject: Compile fixes for recent 2.5/2.6 Linux kernels. I hope this doesn't break the i830 driver or the BSDs. :) --- linux/gamma_dma.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'linux/gamma_dma.c') 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. */ -- cgit v1.2.3