aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_os_linux.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-07-19 17:11:11 -0700
committerEric Anholt <eric@anholt.net>2007-07-20 18:16:42 -0700
commit5b38e134163cc375e91424c4688cc9328c6e9082 (patch)
tree3930e659e99aa4c5c319aaca8cffa041e9087e62 /linux-core/drm_os_linux.h
parentc1119b1b092527fbb6950d0b5e51e076ddb00f29 (diff)
Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE.
The data is now in kernel space, copied in/out as appropriate according to the This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal with those failures. This also means that XFree86 4.2.0 support for i810 DRM is lost.
Diffstat (limited to 'linux-core/drm_os_linux.h')
-rw-r--r--linux-core/drm_os_linux.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h
index 3f143833..2688479a 100644
--- a/linux-core/drm_os_linux.h
+++ b/linux-core/drm_os_linux.h
@@ -6,8 +6,6 @@
#include <linux/interrupt.h> /* For task queue support */
#include <linux/delay.h>
-/** Ioctl arguments */
-#define DRM_IOCTL_ARGS struct inode *inode, struct drm_file *file_priv, unsigned int cmd, unsigned long data
/** Current process ID */
#define DRM_CURRENTPID current->pid
#define DRM_SUSER(p) capable(CAP_SYS_ADMIN)
@@ -48,8 +46,6 @@
#define DRM_WRITEMEMORYBARRIER() wmb()
/** Read/write memory barrier */
#define DRM_MEMORYBARRIER() mb()
-/** DRM device local declaration */
-#define DRM_DEVICE struct drm_device *dev = file_priv->head->dev
/** IRQ handler arguments and return type and values */
#define DRM_IRQ_ARGS int irq, void *arg
@@ -89,14 +85,6 @@ static __inline__ int mtrr_del(int reg, unsigned long base, unsigned long size)
#define MTRR_TYPE_WRCOMB 1
#endif
-/** For data going into the kernel through the ioctl argument */
-#define DRM_COPY_FROM_USER_IOCTL(arg1, arg2, arg3) \
- if ( copy_from_user(&arg1, arg2, arg3) ) \
- return -EFAULT
-/** For data going from the kernel through the ioctl argument */
-#define DRM_COPY_TO_USER_IOCTL(arg1, arg2, arg3) \
- if ( copy_to_user(arg1, &arg2, arg3) ) \
- return -EFAULT
/** Other copying of data to kernel space */
#define DRM_COPY_FROM_USER(arg1, arg2, arg3) \
copy_from_user(arg1, arg2, arg3)