summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_ioc32.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-09-15 09:03:43 +1000
committerDave Airlie <airlied@redhat.com>2009-09-15 09:03:43 +1000
commit70ba2a374704e00df8868a7ac3d7350329d28924 (patch)
treea9582dee5f7401edf2026ed2dd7ab70f5737127c /drivers/gpu/drm/radeon/radeon_ioc32.c
parent4aac047323e3082d0866b8ad3784236632105af4 (diff)
drm/radeon/kms: add 32/64 ioctl support.
Although the new radeon driver ioctls don't need this, some of the drm initialisation ioctls require it, so add this to make them work. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ioc32.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ioc32.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ioc32.c b/drivers/gpu/drm/radeon/radeon_ioc32.c
index 56decda2a71f..a1bf11de308a 100644
--- a/drivers/gpu/drm/radeon/radeon_ioc32.c
+++ b/drivers/gpu/drm/radeon/radeon_ioc32.c
@@ -422,3 +422,18 @@ long radeon_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
return ret;
}
+
+long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
+{
+ unsigned int nr = DRM_IOCTL_NR(cmd);
+ int ret;
+
+ if (nr < DRM_COMMAND_BASE)
+ return drm_compat_ioctl(filp, cmd, arg);
+
+ lock_kernel(); /* XXX for now */
+ ret = drm_ioctl(filp->f_path.dentry->d_inode, filp, cmd, arg);
+ unlock_kernel();
+
+ return ret;
+}