drm/radeon/kms: add 32/64 ioctl support.
authorDave Airlie <airlied@redhat.com>
Mon, 14 Sep 2009 23:03:43 +0000 (09:03 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 14 Sep 2009 23:03:43 +0000 (09:03 +1000)
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>
drivers/gpu/drm/radeon/radeon_drv.c
drivers/gpu/drm/radeon/radeon_drv.h
drivers/gpu/drm/radeon/radeon_ioc32.c

index 29f040a7861b4e4b67a5282e4c7e9733ebb7075b..50fce498910c6aec1548714cb727507545d858f3 100644 (file)
@@ -286,7 +286,7 @@ static struct drm_driver kms_driver = {
                 .poll = drm_poll,
                 .fasync = drm_fasync,
 #ifdef CONFIG_COMPAT
-                .compat_ioctl = NULL,
+                .compat_ioctl = radeon_kms_compat_ioctl,
 #endif
        },
 
index c7b185924f6c983af842e6a409924d987353f72c..bc79ad6199bc4f4297e5690748d2d4f26acff06f 100644 (file)
@@ -471,6 +471,8 @@ extern int radeon_driver_open(struct drm_device *dev,
                              struct drm_file *file_priv);
 extern long radeon_compat_ioctl(struct file *filp, unsigned int cmd,
                                unsigned long arg);
+extern long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd,
+                                   unsigned long arg);
 
 extern int radeon_master_create(struct drm_device *dev, struct drm_master *master);
 extern void radeon_master_destroy(struct drm_device *dev, struct drm_master *master);
index 56decda2a71ff20af100dde0dd959353be189c9e..a1bf11de308a1086a45c9a03c21faec839ce76e5 100644 (file)
@@ -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;
+}
This page took 0.052573 seconds and 5 git commands to generate.