summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMichel Daenzer <michel@daenzer.net>2003-11-04 00:46:05 +0000
committerMichel Daenzer <michel@daenzer.net>2003-11-04 00:46:05 +0000
commit2655ccddf4c026f37dcc76754cdfde6f0a4a4c86 (patch)
tree98ae7d93c77d64e24863fb27d5ce8342fd2fe2fa /linux
parent84dfe702e27e0ef22801f8fe366120bea90adf4f (diff)
Memory layout transition:
the 2D driver initializes MC_FB_LOCATION and related registers sanely the DRM deduces the layout from these registers clients use the new SETPARAM ioctl to tell the DRM where they think the framebuffer is located in the card's address space the DRM uses all this information to check client state and fix it up if necessary This is a prerequisite for things like direct rendering with IGP chips and video capturing.
Diffstat (limited to 'linux')
-rw-r--r--linux/drmP.h3
-rw-r--r--linux/drm_drv.h3
-rw-r--r--linux/drm_fops.h2
-rw-r--r--linux/drm_os_linux.h4
4 files changed, 12 insertions, 0 deletions
diff --git a/linux/drmP.h b/linux/drmP.h
index 3d3796645..f0fc64d4c 100644
--- a/linux/drmP.h
+++ b/linux/drmP.h
@@ -520,6 +520,9 @@ typedef struct drm_file {
struct drm_device *dev;
int remove_auth_on_close;
unsigned long lock_count;
+#ifdef DRIVER_FILE_FIELDS
+ DRIVER_FILE_FIELDS;
+#endif
} drm_file_t;
/** Wait queue */
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index e0c00f02f..e472dc332 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -126,6 +126,9 @@
#ifndef DRIVER_IOCTLS
#define DRIVER_IOCTLS
#endif
+#ifndef DRIVER_OPEN_HELPER
+#define DRIVER_OPEN_HELPER( priv, dev )
+#endif
#ifndef DRIVER_FOPS
#define DRIVER_FOPS \
static struct file_operations DRM(fops) = { \
diff --git a/linux/drm_fops.h b/linux/drm_fops.h
index f4841ae8b..771a2fa28 100644
--- a/linux/drm_fops.h
+++ b/linux/drm_fops.h
@@ -73,6 +73,8 @@ int DRM(open_helper)(struct inode *inode, struct file *filp, drm_device_t *dev)
priv->authenticated = capable(CAP_SYS_ADMIN);
priv->lock_count = 0;
+ DRIVER_OPEN_HELPER( priv, dev );
+
down(&dev->struct_sem);
if (!dev->file_last) {
priv->next = NULL;
diff --git a/linux/drm_os_linux.h b/linux/drm_os_linux.h
index cf7d7c2d4..c26a41086 100644
--- a/linux/drm_os_linux.h
+++ b/linux/drm_os_linux.h
@@ -74,8 +74,12 @@ typedef void irqreturn_t;
verify_area( VERIFY_READ, uaddr, size )
#define DRM_COPY_FROM_USER_UNCHECKED(arg1, arg2, arg3) \
__copy_from_user(arg1, arg2, arg3)
+#define DRM_COPY_TO_USER_UNCHECKED(arg1, arg2, arg3) \
+ __copy_to_user(arg1, arg2, arg3)
#define DRM_GET_USER_UNCHECKED(val, uaddr) \
__get_user(val, uaddr)
+#define DRM_PUT_USER_UNCHECKED(uaddr, val) \
+ __put_user(val, uaddr)
/** 'malloc' without the overhead of DRM(alloc)() */