aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_os_linux.h
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2003-03-28 14:27:37 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2003-03-28 14:27:37 +0000
commit1728bc637df023cce7b5abfeab2796ea481ca7e9 (patch)
tree9ca2295461929ec214307dc9986dbcec9e3809c6 /linux-core/drm_os_linux.h
parent37cb114bd92a17112033f4838e86857bcd466024 (diff)
merged drm-filp-0-1-branch
Diffstat (limited to 'linux-core/drm_os_linux.h')
-rw-r--r--linux-core/drm_os_linux.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h
index e9b24356..b57efd34 100644
--- a/linux-core/drm_os_linux.h
+++ b/linux-core/drm_os_linux.h
@@ -3,16 +3,17 @@
#include <linux/interrupt.h> /* For task queue support */
#include <linux/delay.h>
+#define DRMFILE struct file *
#define DRM_IOCTL_ARGS struct inode *inode, struct file *filp, unsigned int cmd, unsigned long data
#define DRM_ERR(d) -(d)
#define DRM_CURRENTPID current->pid
#define DRM_UDELAY(d) udelay(d)
-#define DRM_READ8(addr) readb(addr)
-#define DRM_READ32(addr) readl(addr)
-#define DRM_WRITE8(addr, val) writeb(val, addr)
-#define DRM_WRITE32(addr, val) writel(val, addr)
-#define DRM_READMEMORYBARRIER() mb()
-#define DRM_WRITEMEMORYBARRIER() wmb()
+#define DRM_READ8(map, offset) readb(((unsigned long)(map)->handle) + (offset))
+#define DRM_READ32(map, offset) readl(((unsigned long)(map)->handle) + (offset))
+#define DRM_WRITE8(map, offset, val) writeb(val, ((unsigned long)(map)->handle) + (offset))
+#define DRM_WRITE32(map, offset, val) writel(val, ((unsigned long)(map)->handle) + (offset))
+#define DRM_READMEMORYBARRIER(map) mb()
+#define DRM_WRITEMEMORYBARRIER(map) wmb()
#define DRM_DEVICE drm_file_t *priv = filp->private_data; \
drm_device_t *dev = priv->dev
@@ -42,7 +43,7 @@
/* malloc/free without the overhead of DRM(alloc) */
#define DRM_MALLOC(x) kmalloc(x, GFP_KERNEL)
-#define DRM_FREE(x) kfree(x)
+#define DRM_FREE(x,size) kfree(x)
#define DRM_GETSAREA() \
do { \