diff options
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ioc32.c | 15 |
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); |
472 | extern long radeon_compat_ioctl(struct file *filp, unsigned int cmd, | 472 | extern long radeon_compat_ioctl(struct file *filp, unsigned int cmd, |
473 | unsigned long arg); | 473 | unsigned long arg); |
474 | extern long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, | ||
475 | unsigned long arg); | ||
474 | 476 | ||
475 | extern int radeon_master_create(struct drm_device *dev, struct drm_master *master); | 477 | extern int radeon_master_create(struct drm_device *dev, struct drm_master *master); |
476 | extern void radeon_master_destroy(struct drm_device *dev, struct drm_master *master); | 478 | extern 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 | |||
426 | long 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 | } | ||