aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-09-14 19:03:43 -0400
committerDave Airlie <airlied@redhat.com>2009-09-14 19:03:43 -0400
commit70ba2a374704e00df8868a7ac3d7350329d28924 (patch)
treea9582dee5f7401edf2026ed2dd7ab70f5737127c /drivers/gpu
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')
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.h2
-rw-r--r--drivers/gpu/drm/radeon/radeon_ioc32.c15
3 files changed, 18 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 29f040a7861b..50fce498910c 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -286,7 +286,7 @@ static struct drm_driver kms_driver = {
286 .poll = drm_poll, 286 .poll = drm_poll,
287 .fasync = drm_fasync, 287 .fasync = drm_fasync,
288#ifdef CONFIG_COMPAT 288#ifdef CONFIG_COMPAT
289 .compat_ioctl = NULL, 289 .compat_ioctl = radeon_kms_compat_ioctl,
290#endif 290#endif
291 }, 291 },
292 292
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
index c7b185924f6c..bc79ad6199bc 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.h
+++ b/drivers/gpu/drm/radeon/radeon_drv.h
@@ -471,6 +471,8 @@ extern int radeon_driver_open(struct drm_device *dev,
471 struct drm_file *file_priv); 471 struct drm_file *file_priv);
472extern long radeon_compat_ioctl(struct file *filp, unsigned int cmd, 472extern long radeon_compat_ioctl(struct file *filp, unsigned int cmd,
473 unsigned long arg); 473 unsigned long arg);
474extern long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd,
475 unsigned long arg);
474 476
475extern int radeon_master_create(struct drm_device *dev, struct drm_master *master); 477extern int radeon_master_create(struct drm_device *dev, struct drm_master *master);
476extern void radeon_master_destroy(struct drm_device *dev, struct drm_master *master); 478extern void radeon_master_destroy(struct drm_device *dev, struct drm_master *master);
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)
422 422
423 return ret; 423 return ret;
424} 424}
425
426long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
427{
428 unsigned int nr = DRM_IOCTL_NR(cmd);
429 int ret;
430
431 if (nr < DRM_COMMAND_BASE)
432 return drm_compat_ioctl(filp, cmd, arg);
433
434 lock_kernel(); /* XXX for now */
435 ret = drm_ioctl(filp->f_path.dentry->d_inode, filp, cmd, arg);
436 unlock_kernel();
437
438 return ret;
439}