summaryrefslogtreecommitdiff
path: root/linux/drm_drv.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-09-20 11:29:16 +0000
committerDave Airlie <airlied@linux.ie>2004-09-20 11:29:16 +0000
commit5654880eeed0646a53655b093f4d3bf5608ebcc7 (patch)
treeb3ae97908ab5f4a8e83f30fce3eeeafd9f78556b /linux/drm_drv.h
parentfa75a81c9acbae7282e2ea5596f04a6b359c95e9 (diff)
remove HAVE_COUNTERS
Diffstat (limited to 'linux/drm_drv.h')
-rw-r--r--linux/drm_drv.h58
1 files changed, 14 insertions, 44 deletions
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index f0485ea7..0e5524f4 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -52,10 +52,6 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#ifndef __HAVE_COUNTERS
-#define __HAVE_COUNTERS 0
-#endif
-
#ifndef DRIVER_IOCTLS
#define DRIVER_IOCTLS
#endif
@@ -180,42 +176,7 @@ static int DRM(setup)( drm_device_t *dev )
if ( i < 0 )
return i;
}
-
- dev->counters = 6 + __HAVE_COUNTERS;
- dev->types[0] = _DRM_STAT_LOCK;
- dev->types[1] = _DRM_STAT_OPENS;
- dev->types[2] = _DRM_STAT_CLOSES;
- dev->types[3] = _DRM_STAT_IOCTLS;
- dev->types[4] = _DRM_STAT_LOCKS;
- dev->types[5] = _DRM_STAT_UNLOCKS;
-#ifdef __HAVE_COUNTER6
- dev->types[6] = __HAVE_COUNTER6;
-#endif
-#ifdef __HAVE_COUNTER7
- dev->types[7] = __HAVE_COUNTER7;
-#endif
-#ifdef __HAVE_COUNTER8
- dev->types[8] = __HAVE_COUNTER8;
-#endif
-#ifdef __HAVE_COUNTER9
- dev->types[9] = __HAVE_COUNTER9;
-#endif
-#ifdef __HAVE_COUNTER10
- dev->types[10] = __HAVE_COUNTER10;
-#endif
-#ifdef __HAVE_COUNTER11
- dev->types[11] = __HAVE_COUNTER11;
-#endif
-#ifdef __HAVE_COUNTER12
- dev->types[12] = __HAVE_COUNTER12;
-#endif
-#ifdef __HAVE_COUNTER13
- dev->types[13] = __HAVE_COUNTER13;
-#endif
-#ifdef __HAVE_COUNTER14
- dev->types[14] = __HAVE_COUNTER14;
-#endif
-
+
for ( i = 0 ; i < DRM_ARRAY_SIZE(dev->counts) ; i++ )
atomic_set( &dev->counts[i], 0 );
@@ -461,7 +422,16 @@ int DRM(fill_in_dev)(drm_device_t *dev, struct pci_dev *pdev, const struct pci_d
/* dev_priv_size can be changed by a driver in driver_register_fns */
dev->dev_priv_size = sizeof(u32);
- DRM(init_fn_table)(dev);
+ /* the DRM has 6 counters */
+ dev->counters = 6;
+ dev->types[0] = _DRM_STAT_LOCK;
+ dev->types[1] = _DRM_STAT_OPENS;
+ dev->types[2] = _DRM_STAT_CLOSES;
+ dev->types[3] = _DRM_STAT_IOCTLS;
+ dev->types[4] = _DRM_STAT_LOCKS;
+ dev->types[5] = _DRM_STAT_UNLOCKS;
+
+ DRM(init_fn_table)(dev);
DRM(driver_register_fns)(dev);
@@ -489,8 +459,8 @@ int DRM(fill_in_dev)(drm_device_t *dev, struct pci_dev *pdev, const struct pci_d
retcode = DRM(ctxbitmap_init)( dev );
if( retcode ) {
- DRM_ERROR( "Cannot allocate memory for context bitmap.\n" );
- goto error_out_unreg;
+ DRM_ERROR( "Cannot allocate memory for context bitmap.\n" );
+ goto error_out_unreg;
}
dev->device = MKDEV(DRM_MAJOR, dev->minor );
@@ -905,7 +875,7 @@ int DRM(release)( struct inode *inode, struct file *filp )
list_del( &pos->head );
DRM(free)( pos, sizeof(*pos), DRM_MEM_CTXLIST );
- --dev->ctx_count;
+ --dev->ctx_count;
}
}
}