#if __HAVE_DMA_IRQ
extern int DRM(irq_install)( drm_device_t *dev, int irq );
extern int DRM(irq_uninstall)( drm_device_t *dev );
-extern void DRM(dma_service)( DRM_IRQ_ARGS );
+extern DRM_IRQ_RET DRM(dma_service)( DRM_IRQ_ARGS );
extern void DRM(driver_irq_preinstall)( drm_device_t *dev );
extern void DRM(driver_irq_postinstall)( drm_device_t *dev );
extern void DRM(driver_irq_uninstall)( drm_device_t *dev );
if ( retcode ) {
#elif defined(__NetBSD__)
dev->irqh = pci_intr_establish(&dev->pa.pa_pc, dev->ih, IPL_TTY,
- (int (*)(DRM_IRQ_ARGS))DRM(dma_service), dev);
+ (DRM_IRQ_RET (*)(DRM_IRQ_ARGS))DRM(dma_service), dev);
if ( !dev->irqh ) {
#endif
DRM_LOCK;
#define DRM_SUSER(p) suser(p)
#define DRM_TASKQUEUE_ARGS void *arg, int pending
#define DRM_IRQ_ARGS void *arg
+#define DRM_IRQ_RET void
+#define DRM_NONE
+#define DRM_HANDLED
#define DRM_DEVICE drm_device_t *dev = kdev->si_drv1
#define DRM_MALLOC(size) malloc( size, DRM(M_DRM), M_NOWAIT )
#define DRM_FREE(pt,size) free( pt, DRM(M_DRM) )
#define DRM_SUSER(p) suser(p->p_ucred, &p->p_acflag)
#define DRM_TASKQUEUE_ARGS void *dev, int pending
#define DRM_IRQ_ARGS void *arg
+#define DRM_IRQ_RET int
+#define DRM_NONE /* FIXME */
+#define DRM_HANDLED /* FIXME */
#define DRM_DEVICE drm_device_t *dev = device_lookup(&DRM(cd), minor(kdev))
/* XXX Not sure if this is the 'right' version.. */
#if __NetBSD_Version__ >= 106140000
#if __HAVE_DMA_IRQ
extern int DRM(irq_install)( drm_device_t *dev, int irq );
extern int DRM(irq_uninstall)( drm_device_t *dev );
-extern void DRM(dma_service)( DRM_IRQ_ARGS );
+extern DRM_IRQ_RET DRM(dma_service)( DRM_IRQ_ARGS );
extern void DRM(driver_irq_preinstall)( drm_device_t *dev );
extern void DRM(driver_irq_postinstall)( drm_device_t *dev );
extern void DRM(driver_irq_uninstall)( drm_device_t *dev );
if ( retcode ) {
#elif defined(__NetBSD__)
dev->irqh = pci_intr_establish(&dev->pa.pa_pc, dev->ih, IPL_TTY,
- (int (*)(DRM_IRQ_ARGS))DRM(dma_service), dev);
+ (DRM_IRQ_RET (*)(DRM_IRQ_ARGS))DRM(dma_service), dev);
if ( !dev->irqh ) {
#endif
DRM_LOCK;
#define DRM_SUSER(p) suser(p)
#define DRM_TASKQUEUE_ARGS void *arg, int pending
#define DRM_IRQ_ARGS void *arg
+#define DRM_IRQ_RET void
+#define DRM_NONE
+#define DRM_HANDLED
#define DRM_DEVICE drm_device_t *dev = kdev->si_drv1
#define DRM_MALLOC(size) malloc( size, DRM(M_DRM), M_NOWAIT )
#define DRM_FREE(pt,size) free( pt, DRM(M_DRM) )
#define DRM_SUSER(p) suser(p->p_ucred, &p->p_acflag)
#define DRM_TASKQUEUE_ARGS void *dev, int pending
#define DRM_IRQ_ARGS void *arg
+#define DRM_IRQ_RET int
+#define DRM_NONE /* FIXME */
+#define DRM_HANDLED /* FIXME */
#define DRM_DEVICE drm_device_t *dev = device_lookup(&DRM(cd), minor(kdev))
/* XXX Not sure if this is the 'right' version.. */
#if __NetBSD_Version__ >= 106140000
*/
typedef struct drm_agp_mem {
unsigned long handle; /**< handle */
- agp_memory *memory;
+ DRM_AGP_MEM *memory;
unsigned long bound; /**< address */
int pages;
struct drm_agp_mem *prev; /**< previous entry */
* \sa DRM(agp_init)() and drm_device::agp.
*/
typedef struct drm_agp_head {
- agp_kern_info agp_info; /**< AGP device information */
+ DRM_AGP_KERN agp_info; /**< AGP device information */
drm_agp_mem_t *memory; /**< memory entries */
unsigned long mode; /**< AGP mode */
int enabled; /**< whether the AGP bus as been enabled */
extern void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev);
#if __REALLY_HAVE_AGP
-extern agp_memory *DRM(alloc_agp)(int pages, u32 type);
-extern int DRM(free_agp)(agp_memory *handle, int pages);
-extern int DRM(bind_agp)(agp_memory *handle, unsigned int start);
-extern int DRM(unbind_agp)(agp_memory *handle);
+extern DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type);
+extern int DRM(free_agp)(DRM_AGP_MEM *handle, int pages);
+extern int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start);
+extern int DRM(unbind_agp)(DRM_AGP_MEM *handle);
#endif
/* Misc. IOCTL support (drm_ioctl.h) */
unsigned int cmd, unsigned long arg );
extern int DRM(irq_install)( drm_device_t *dev, int irq );
extern int DRM(irq_uninstall)( drm_device_t *dev );
-extern void DRM(dma_service)( int irq, void *device,
- struct pt_regs *regs );
+extern DRM_IRQ_RET DRM(dma_service)( DRM_IRQ_ARGS );
extern void DRM(driver_irq_preinstall)( drm_device_t *dev );
extern void DRM(driver_irq_postinstall)( drm_device_t *dev );
extern void DRM(driver_irq_uninstall)( drm_device_t *dev );
unsigned int cmd, unsigned long arg);
extern int DRM(agp_bind)(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
-extern agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type);
-extern int DRM(agp_free_memory)(agp_memory *handle);
-extern int DRM(agp_bind_memory)(agp_memory *handle, off_t start);
-extern int DRM(agp_unbind_memory)(agp_memory *handle);
+extern DRM_AGP_MEM *DRM(agp_allocate_memory)(size_t pages, u32 type);
+extern int DRM(agp_free_memory)(DRM_AGP_MEM *handle);
+extern int DRM(agp_bind_memory)(DRM_AGP_MEM *handle, off_t start);
+extern int DRM(agp_unbind_memory)(DRM_AGP_MEM *handle);
#endif
/* Stub support (drm_stub.h) */
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev;
- agp_kern_info *kern;
+ DRM_AGP_KERN *kern;
drm_agp_info_t info;
if (!dev->agp || !dev->agp->acquired || !drm_agp->copy_info)
drm_device_t *dev = priv->dev;
drm_agp_buffer_t request;
drm_agp_mem_t *entry;
- agp_memory *memory;
+ DRM_AGP_MEM *memory;
unsigned long pages;
u32 type;
}
/** Calls drm_agp->allocate_memory() */
-agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type)
+DRM_AGP_MEM *DRM(agp_allocate_memory)(size_t pages, u32 type)
{
if (!drm_agp->allocate_memory) return NULL;
return drm_agp->allocate_memory(pages, type);
}
/** Calls drm_agp->free_memory() */
-int DRM(agp_free_memory)(agp_memory *handle)
+int DRM(agp_free_memory)(DRM_AGP_MEM *handle)
{
if (!handle || !drm_agp->free_memory) return 0;
drm_agp->free_memory(handle);
}
/** Calls drm_agp->bind_memory() */
-int DRM(agp_bind_memory)(agp_memory *handle, off_t start)
+int DRM(agp_bind_memory)(DRM_AGP_MEM *handle, off_t start)
{
if (!handle || !drm_agp->bind_memory) return -EINVAL;
return drm_agp->bind_memory(handle, start);
}
/** Calls drm_agp->unbind_memory() */
-int DRM(agp_unbind_memory)(agp_memory *handle)
+int DRM(agp_unbind_memory)(DRM_AGP_MEM *handle)
{
if (!handle || !drm_agp->unbind_memory) return -EINVAL;
return drm_agp->unbind_memory(handle);
#if __REALLY_HAVE_AGP
/** Wrapper around agp_allocate_memory() */
-agp_memory *DRM(alloc_agp)(int pages, u32 type)
+DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type)
{
return DRM(agp_allocate_memory)(pages, type);
}
/** Wrapper around agp_free_memory() */
-int DRM(free_agp)(agp_memory *handle, int pages)
+int DRM(free_agp)(DRM_AGP_MEM *handle, int pages)
{
return DRM(agp_free_memory)(handle) ? 0 : -EINVAL;
}
/** Wrapper around agp_bind_memory() */
-int DRM(bind_agp)(agp_memory *handle, unsigned int start)
+int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start)
{
return DRM(agp_bind_memory)(handle, start);
}
/** Wrapper around agp_unbind_memory() */
-int DRM(unbind_agp)(agp_memory *handle)
+int DRM(unbind_agp)(DRM_AGP_MEM *handle)
{
return DRM(agp_unbind_memory)(handle);
}
#if __REALLY_HAVE_AGP
-agp_memory *DRM(alloc_agp)(int pages, u32 type)
+DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type)
{
- agp_memory *handle;
+ DRM_AGP_MEM *handle;
if (!pages) {
DRM_MEM_ERROR(DRM_MEM_TOTALAGP, "Allocating 0 pages\n");
return NULL;
}
-int DRM(free_agp)(agp_memory *handle, int pages)
+int DRM(free_agp)(DRM_AGP_MEM *handle, int pages)
{
int alloc_count;
int free_count;
return retval;
}
-int DRM(bind_agp)(agp_memory *handle, unsigned int start)
+int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start)
{
int retcode = -EINVAL;
return retcode;
}
-int DRM(unbind_agp)(agp_memory *handle)
+int DRM(unbind_agp)(DRM_AGP_MEM *handle)
{
int alloc_count;
int free_count;
#define DRM_DEVICE drm_file_t *priv = filp->private_data; \
drm_device_t *dev = priv->dev
-/** IRQ handler arguments */
-#define DRM_IRQ_ARGS int irq, void *arg, struct pt_regs *regs
+/** IRQ handler arguments and return type and values */
+#define DRM_IRQ_ARGS int irq, void *arg, struct pt_regs *regs
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69)
+#define DRM_IRQ_RET void
+#define DRM_IRQ_NONE
+#define DRM_IRQ_HANDLED
+#else
+#define DRM_IRQ_RET irqreturn_t
+#define DRM_IRQ_NONE IRQ_NONE
+#define DRM_IRQ_HANDLED IRQ_HANDLED
+#endif
+
+/** AGP types */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,70)
+#define DRM_AGP_MEM agp_memory
+#define DRM_AGP_KERN agp_kern_info
+#else
+#define DRM_AGP_MEM struct agp_memory
+#define DRM_AGP_KERN struct agp_kern_info
+#endif
+
/** Task queue handler arguments */
#define DRM_TASKQUEUE_ARGS void *arg
#include <linux/delay.h>
-void DRM(dma_service)(int irq, void *device, struct pt_regs *regs)
+DRM_IRQ_RET DRM(dma_service)( DRM_IRQ_ARGS )
{
drm_device_t *dev = (drm_device_t *)device;
drm_i830_private_t *dev_priv = (drm_i830_private_t *)dev->dev_private;
temp = I830_READ16(I830REG_INT_IDENTITY_R);
DRM_DEBUG("%x\n", temp);
- if (temp == 0)
- return;
+ if ( !( temp & 2 ) )
+ return DRM_IRQ_NONE;
I830_WRITE16(I830REG_INT_IDENTITY_R, temp);
- if (temp & 2) {
- atomic_inc(&dev_priv->irq_received);
- wake_up_interruptible(&dev_priv->irq_queue);
- }
+ atomic_inc(&dev_priv->irq_received);
+ wake_up_interruptible(&dev_priv->irq_queue);
+
+ return DRM_IRQ_HANDLED;
}
*/
typedef struct drm_agp_mem {
unsigned long handle; /**< handle */
- agp_memory *memory;
+ DRM_AGP_MEM *memory;
unsigned long bound; /**< address */
int pages;
struct drm_agp_mem *prev; /**< previous entry */
* \sa DRM(agp_init)() and drm_device::agp.
*/
typedef struct drm_agp_head {
- agp_kern_info agp_info; /**< AGP device information */
+ DRM_AGP_KERN agp_info; /**< AGP device information */
drm_agp_mem_t *memory; /**< memory entries */
unsigned long mode; /**< AGP mode */
int enabled; /**< whether the AGP bus as been enabled */
extern void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev);
#if __REALLY_HAVE_AGP
-extern agp_memory *DRM(alloc_agp)(int pages, u32 type);
-extern int DRM(free_agp)(agp_memory *handle, int pages);
-extern int DRM(bind_agp)(agp_memory *handle, unsigned int start);
-extern int DRM(unbind_agp)(agp_memory *handle);
+extern DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type);
+extern int DRM(free_agp)(DRM_AGP_MEM *handle, int pages);
+extern int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start);
+extern int DRM(unbind_agp)(DRM_AGP_MEM *handle);
#endif
/* Misc. IOCTL support (drm_ioctl.h) */
unsigned int cmd, unsigned long arg );
extern int DRM(irq_install)( drm_device_t *dev, int irq );
extern int DRM(irq_uninstall)( drm_device_t *dev );
-extern void DRM(dma_service)( int irq, void *device,
- struct pt_regs *regs );
+extern DRM_IRQ_RET DRM(dma_service)( DRM_IRQ_ARGS );
extern void DRM(driver_irq_preinstall)( drm_device_t *dev );
extern void DRM(driver_irq_postinstall)( drm_device_t *dev );
extern void DRM(driver_irq_uninstall)( drm_device_t *dev );
unsigned int cmd, unsigned long arg);
extern int DRM(agp_bind)(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
-extern agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type);
-extern int DRM(agp_free_memory)(agp_memory *handle);
-extern int DRM(agp_bind_memory)(agp_memory *handle, off_t start);
-extern int DRM(agp_unbind_memory)(agp_memory *handle);
+extern DRM_AGP_MEM *DRM(agp_allocate_memory)(size_t pages, u32 type);
+extern int DRM(agp_free_memory)(DRM_AGP_MEM *handle);
+extern int DRM(agp_bind_memory)(DRM_AGP_MEM *handle, off_t start);
+extern int DRM(agp_unbind_memory)(DRM_AGP_MEM *handle);
#endif
/* Stub support (drm_stub.h) */
{
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev;
- agp_kern_info *kern;
+ DRM_AGP_KERN *kern;
drm_agp_info_t info;
if (!dev->agp || !dev->agp->acquired || !drm_agp->copy_info)
drm_device_t *dev = priv->dev;
drm_agp_buffer_t request;
drm_agp_mem_t *entry;
- agp_memory *memory;
+ DRM_AGP_MEM *memory;
unsigned long pages;
u32 type;
}
/** Calls drm_agp->allocate_memory() */
-agp_memory *DRM(agp_allocate_memory)(size_t pages, u32 type)
+DRM_AGP_MEM *DRM(agp_allocate_memory)(size_t pages, u32 type)
{
if (!drm_agp->allocate_memory) return NULL;
return drm_agp->allocate_memory(pages, type);
}
/** Calls drm_agp->free_memory() */
-int DRM(agp_free_memory)(agp_memory *handle)
+int DRM(agp_free_memory)(DRM_AGP_MEM *handle)
{
if (!handle || !drm_agp->free_memory) return 0;
drm_agp->free_memory(handle);
}
/** Calls drm_agp->bind_memory() */
-int DRM(agp_bind_memory)(agp_memory *handle, off_t start)
+int DRM(agp_bind_memory)(DRM_AGP_MEM *handle, off_t start)
{
if (!handle || !drm_agp->bind_memory) return -EINVAL;
return drm_agp->bind_memory(handle, start);
}
/** Calls drm_agp->unbind_memory() */
-int DRM(agp_unbind_memory)(agp_memory *handle)
+int DRM(agp_unbind_memory)(DRM_AGP_MEM *handle)
{
if (!handle || !drm_agp->unbind_memory) return -EINVAL;
return drm_agp->unbind_memory(handle);
#if __REALLY_HAVE_AGP
/** Wrapper around agp_allocate_memory() */
-agp_memory *DRM(alloc_agp)(int pages, u32 type)
+DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type)
{
return DRM(agp_allocate_memory)(pages, type);
}
/** Wrapper around agp_free_memory() */
-int DRM(free_agp)(agp_memory *handle, int pages)
+int DRM(free_agp)(DRM_AGP_MEM *handle, int pages)
{
return DRM(agp_free_memory)(handle) ? 0 : -EINVAL;
}
/** Wrapper around agp_bind_memory() */
-int DRM(bind_agp)(agp_memory *handle, unsigned int start)
+int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start)
{
return DRM(agp_bind_memory)(handle, start);
}
/** Wrapper around agp_unbind_memory() */
-int DRM(unbind_agp)(agp_memory *handle)
+int DRM(unbind_agp)(DRM_AGP_MEM *handle)
{
return DRM(agp_unbind_memory)(handle);
}
#if __REALLY_HAVE_AGP
-agp_memory *DRM(alloc_agp)(int pages, u32 type)
+DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type)
{
- agp_memory *handle;
+ DRM_AGP_MEM *handle;
if (!pages) {
DRM_MEM_ERROR(DRM_MEM_TOTALAGP, "Allocating 0 pages\n");
return NULL;
}
-int DRM(free_agp)(agp_memory *handle, int pages)
+int DRM(free_agp)(DRM_AGP_MEM *handle, int pages)
{
int alloc_count;
int free_count;
return retval;
}
-int DRM(bind_agp)(agp_memory *handle, unsigned int start)
+int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start)
{
int retcode = -EINVAL;
return retcode;
}
-int DRM(unbind_agp)(agp_memory *handle)
+int DRM(unbind_agp)(DRM_AGP_MEM *handle)
{
int alloc_count;
int free_count;
#define DRM_DEVICE drm_file_t *priv = filp->private_data; \
drm_device_t *dev = priv->dev
-/** IRQ handler arguments */
-#define DRM_IRQ_ARGS int irq, void *arg, struct pt_regs *regs
+/** IRQ handler arguments and return type and values */
+#define DRM_IRQ_ARGS int irq, void *arg, struct pt_regs *regs
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69)
+#define DRM_IRQ_RET void
+#define DRM_IRQ_NONE
+#define DRM_IRQ_HANDLED
+#else
+#define DRM_IRQ_RET irqreturn_t
+#define DRM_IRQ_NONE IRQ_NONE
+#define DRM_IRQ_HANDLED IRQ_HANDLED
+#endif
+
+/** AGP types */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,70)
+#define DRM_AGP_MEM agp_memory
+#define DRM_AGP_KERN agp_kern_info
+#else
+#define DRM_AGP_MEM struct agp_memory
+#define DRM_AGP_KERN struct agp_kern_info
+#endif
+
/** Task queue handler arguments */
#define DRM_TASKQUEUE_ARGS void *arg
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);
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;
schedule_work(&dev->work);
#endif
}
+ return DRM_IRQ_HANDLED;
}
/* Only called by gamma_dma_schedule. */
#include <linux/delay.h>
-void DRM(dma_service)(int irq, void *device, struct pt_regs *regs)
+DRM_IRQ_RET DRM(dma_service)( DRM_IRQ_ARGS )
{
drm_device_t *dev = (drm_device_t *)device;
drm_i830_private_t *dev_priv = (drm_i830_private_t *)dev->dev_private;
temp = I830_READ16(I830REG_INT_IDENTITY_R);
DRM_DEBUG("%x\n", temp);
- if (temp == 0)
- return;
+ if ( !( temp & 2 ) )
+ return DRM_IRQ_NONE;
I830_WRITE16(I830REG_INT_IDENTITY_R, temp);
- if (temp & 2) {
- atomic_inc(&dev_priv->irq_received);
- wake_up_interruptible(&dev_priv->irq_queue);
- }
+ atomic_inc(&dev_priv->irq_received);
+ wake_up_interruptible(&dev_priv->irq_queue);
+
+ return DRM_IRQ_HANDLED;
}
#include "mga_drm.h"
#include "mga_drv.h"
-void mga_dma_service( DRM_IRQ_ARGS )
+DRM_IRQ_RET mga_dma_service( DRM_IRQ_ARGS )
{
drm_device_t *dev = (drm_device_t *) arg;
drm_mga_private_t *dev_priv =
atomic_inc(&dev->vbl_received);
DRM_WAKEUP(&dev->vbl_queue);
DRM(vbl_send_signals)( dev );
+ return DRM_IRQ_HANDLED;
}
+ return DRM_IRQ_NONE;
}
int mga_vblank_wait(drm_device_t *dev, unsigned int *sequence)
#include "r128_drm.h"
#include "r128_drv.h"
-void r128_dma_service( DRM_IRQ_ARGS )
+DRM_IRQ_RET r128_dma_service( DRM_IRQ_ARGS )
{
drm_device_t *dev = (drm_device_t *) arg;
drm_r128_private_t *dev_priv =
atomic_inc(&dev->vbl_received);
DRM_WAKEUP(&dev->vbl_queue);
DRM(vbl_send_signals)( dev );
+ return DRM_IRQ_HANDLED;
}
+ return DRM_IRQ_NONE;
}
int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence)
* tied to dma at all, this is just a hangover from dri prehistory.
*/
-void DRM(dma_service)( DRM_IRQ_ARGS )
+DRM_IRQ_RET DRM(dma_service)( DRM_IRQ_ARGS )
{
drm_device_t *dev = (drm_device_t *) arg;
drm_radeon_private_t *dev_priv =
stat = RADEON_READ(RADEON_GEN_INT_STATUS)
& (RADEON_SW_INT_TEST | RADEON_CRTC_VBLANK_STAT);
if (!stat)
- return;
+ return DRM_IRQ_NONE;
/* SW interrupt */
if (stat & RADEON_SW_INT_TEST) {
/* Acknowledge interrupts we handle */
RADEON_WRITE(RADEON_GEN_INT_STATUS, stat);
+ return DRM_IRQ_HANDLED;
}
static __inline__ void radeon_acknowledge_irqs(drm_radeon_private_t *dev_priv)
#include "mga_drm.h"
#include "mga_drv.h"
-void mga_dma_service( DRM_IRQ_ARGS )
+DRM_IRQ_RET mga_dma_service( DRM_IRQ_ARGS )
{
drm_device_t *dev = (drm_device_t *) arg;
drm_mga_private_t *dev_priv =
atomic_inc(&dev->vbl_received);
DRM_WAKEUP(&dev->vbl_queue);
DRM(vbl_send_signals)( dev );
+ return DRM_IRQ_HANDLED;
}
+ return DRM_IRQ_NONE;
}
int mga_vblank_wait(drm_device_t *dev, unsigned int *sequence)
#include "r128_drm.h"
#include "r128_drv.h"
-void r128_dma_service( DRM_IRQ_ARGS )
+DRM_IRQ_RET r128_dma_service( DRM_IRQ_ARGS )
{
drm_device_t *dev = (drm_device_t *) arg;
drm_r128_private_t *dev_priv =
atomic_inc(&dev->vbl_received);
DRM_WAKEUP(&dev->vbl_queue);
DRM(vbl_send_signals)( dev );
+ return DRM_IRQ_HANDLED;
}
+ return DRM_IRQ_NONE;
}
int DRM(vblank_wait)(drm_device_t *dev, unsigned int *sequence)
* tied to dma at all, this is just a hangover from dri prehistory.
*/
-void DRM(dma_service)( DRM_IRQ_ARGS )
+DRM_IRQ_RET DRM(dma_service)( DRM_IRQ_ARGS )
{
drm_device_t *dev = (drm_device_t *) arg;
drm_radeon_private_t *dev_priv =
stat = RADEON_READ(RADEON_GEN_INT_STATUS)
& (RADEON_SW_INT_TEST | RADEON_CRTC_VBLANK_STAT);
if (!stat)
- return;
+ return DRM_IRQ_NONE;
/* SW interrupt */
if (stat & RADEON_SW_INT_TEST) {
/* Acknowledge interrupts we handle */
RADEON_WRITE(RADEON_GEN_INT_STATUS, stat);
+ return DRM_IRQ_HANDLED;
}
static __inline__ void radeon_acknowledge_irqs(drm_radeon_private_t *dev_priv)