summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/drm_context.h14
-rw-r--r--linux/drm_drv.h8
2 files changed, 4 insertions, 18 deletions
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;