summaryrefslogtreecommitdiff
path: root/linux/drm_irq.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-08-30 11:34:51 +0000
committerDave Airlie <airlied@linux.ie>2004-08-30 11:34:51 +0000
commitda6b44849763fac5ccb7d7511128454c6c2a92c7 (patch)
treeeeacf7b240241350c040dc4751f4a4c3d9d52502 /linux/drm_irq.h
parent7809efc8c32520e6b25c143ee3276edbf534ed14 (diff)
implement drm_core_check_feature and use it .. looks lots nicer
Diffstat (limited to 'linux/drm_irq.h')
-rw-r--r--linux/drm_irq.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/linux/drm_irq.h b/linux/drm_irq.h
index b34f1ce4..a1622c0e 100644
--- a/linux/drm_irq.h
+++ b/linux/drm_irq.h
@@ -58,7 +58,7 @@ int DRM(irq_by_busid)(struct inode *inode, struct file *filp,
drm_irq_busid_t __user *argp = (void __user *)arg;
drm_irq_busid_t p;
- if (!(dev->driver_features & DRIVER_HAVE_IRQ))
+ if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
return -EINVAL;
if (copy_from_user(&p, argp, sizeof(p)))
@@ -94,7 +94,7 @@ int DRM(irq_install)( drm_device_t *dev )
int ret;
unsigned long sh_flags=0;
- if (!(dev->driver_features & DRIVER_HAVE_IRQ ))
+ if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ ))
return -EINVAL;
if ( dev->irq == 0 )
@@ -121,7 +121,7 @@ int DRM(irq_install)( drm_device_t *dev )
dev->dma->next_queue = NULL;
dev->dma->this_buffer = NULL;
- if (dev->driver_features & DRIVER_IRQ_VBL) {
+ if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) {
init_waitqueue_head(&dev->vbl_queue);
spin_lock_init( &dev->vbl_lock );
@@ -135,7 +135,7 @@ int DRM(irq_install)( drm_device_t *dev )
dev->fn_tbl.irq_preinstall(dev);
/* Install handler */
- if (dev->driver_features & DRIVER_IRQ_SHARED)
+ if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED))
sh_flags = SA_SHIRQ;
ret = request_irq( dev->irq, dev->fn_tbl.irq_handler,
@@ -164,7 +164,7 @@ int DRM(irq_uninstall)( drm_device_t *dev )
{
int irq_enabled;
- if (!(dev->driver_features & DRIVER_HAVE_IRQ ))
+ if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ ))
return -EINVAL;
down( &dev->struct_sem );
@@ -209,14 +209,14 @@ int DRM(control)( struct inode *inode, struct file *filp,
switch ( ctl.func ) {
case DRM_INST_HANDLER:
- if (!(dev->driver_features & DRIVER_HAVE_IRQ))
+ if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
return 0;
if (dev->if_version < DRM_IF_VERSION(1, 2) &&
ctl.irq != dev->irq)
return -EINVAL;
return DRM(irq_install)( dev );
case DRM_UNINST_HANDLER:
- if (!(dev->driver_features & DRIVER_HAVE_IRQ))
+ if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
return 0;
return DRM(irq_uninstall)( dev );
default:
@@ -253,7 +253,7 @@ int DRM(wait_vblank)( DRM_IOCTL_ARGS )
int ret = 0;
unsigned int flags;
- if (!(dev->driver_features & DRIVER_IRQ_VBL))
+ if (!drm_core_check_feature(dev, DRIVER_IRQ_VBL))
return -EINVAL;
if (!dev->irq)