From 55c6e72306efd960eb28870c8f7520360275d444 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@linux.ie>
Date: Sun, 29 Aug 2004 12:17:26 +0000
Subject: remove hacky context thing that was gamma only

---
 linux/drm_context.h | 14 --------------
 linux/drm_drv.h     |  8 ++++----
 2 files changed, 4 insertions(+), 18 deletions(-)

(limited to 'linux')

diff --git a/linux/drm_context.h b/linux/drm_context.h
index 7ab376f1..c9ccaa01 100644
--- a/linux/drm_context.h
+++ b/linux/drm_context.h
@@ -42,7 +42,6 @@
 
 #include "drmP.h"
 
-#ifndef DRIVER_ALTERNATE_CONTEXT
 /******************************************************************/
 /** \name Context bitmap support */
 /*@{*/
@@ -574,18 +573,5 @@ int DRM(rmctx)( struct inode *inode, struct file *filp,
 
 	return 0;
 }
-#endif
-
-extern drm_ioctl_desc_t DRM(ioctls)[];
-void DRM(context_add_ioctls)(void)
-{
-  DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_SET_SAREA_CTX)].func = DRM(setsareactx);
-  DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_SET_SAREA_CTX)].auth_needed = 1;
-  DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_SET_SAREA_CTX)].root_only = 1;
-
-  DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_GET_SAREA_CTX)].func = DRM(getsareactx);
-  DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_GET_SAREA_CTX)].auth_needed = 1;
-  DRM(ioctls)[DRM_IOCTL_NR(DRM_IOCTL_GET_SAREA_CTX)].root_only = 0;
-}
 /*@}*/
 
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index 2c687111..51877e83 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -125,10 +125,13 @@ drm_ioctl_desc_t		  DRM(ioctls)[] = {
 	[DRM_IOCTL_NR(DRM_IOCTL_BLOCK)]         = { DRM(noop),        1, 1 },
 	[DRM_IOCTL_NR(DRM_IOCTL_UNBLOCK)]       = { DRM(noop),        1, 1 },
 	[DRM_IOCTL_NR(DRM_IOCTL_AUTH_MAGIC)]    = { DRM(authmagic),   1, 1 },
-
+	
 	[DRM_IOCTL_NR(DRM_IOCTL_ADD_MAP)]       = { DRM(addmap),      1, 1 },
 	[DRM_IOCTL_NR(DRM_IOCTL_RM_MAP)]        = { DRM(rmmap),       1, 0 },
 
+	[DRM_IOCTL_NR(DRM_IOCTL_SET_SAREA_CTX)] = { DRM(setsareactx), 1, 1 },
+	[DRM_IOCTL_NR(DRM_IOCTL_GET_SAREA_CTX)] = { DRM(getsareactx), 1, 0 },
+
 	[DRM_IOCTL_NR(DRM_IOCTL_ADD_CTX)]       = { DRM(addctx),      1, 1 },
 	[DRM_IOCTL_NR(DRM_IOCTL_RM_CTX)]        = { DRM(rmctx),       1, 1 },
 	[DRM_IOCTL_NR(DRM_IOCTL_MOD_CTX)]       = { DRM(modctx),      1, 1 },
@@ -502,9 +505,6 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	DRM(driver_register_fns)(dev);
 	
-	/* if we have CTX_BITMAP add the ioctls */
-	DRM(context_add_ioctls)();
-	
 	if (dev->fn_tbl.preinit)
 		if ((retcode = dev->fn_tbl.preinit(dev, ent->driver_data)))
 			goto error_out_unreg;
-- 
cgit v1.2.3