diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drv.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index cad254c8e387..9a36f5f39b06 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "drm.h" | 29 | #include "drm.h" |
30 | #include "drm_crtc_helper.h" | 30 | #include "drm_crtc_helper.h" |
31 | #include "nouveau_drv.h" | 31 | #include "nouveau_drv.h" |
32 | #include "nouveau_abi16.h" | ||
32 | #include "nouveau_hw.h" | 33 | #include "nouveau_hw.h" |
33 | #include "nouveau_fb.h" | 34 | #include "nouveau_fb.h" |
34 | #include "nouveau_fbcon.h" | 35 | #include "nouveau_fbcon.h" |
@@ -384,6 +385,21 @@ nouveau_pci_resume(struct pci_dev *pdev) | |||
384 | return 0; | 385 | return 0; |
385 | } | 386 | } |
386 | 387 | ||
388 | static struct drm_ioctl_desc nouveau_ioctls[] = { | ||
389 | DRM_IOCTL_DEF_DRV(NOUVEAU_GETPARAM, nouveau_abi16_ioctl_getparam, DRM_UNLOCKED|DRM_AUTH), | ||
390 | DRM_IOCTL_DEF_DRV(NOUVEAU_SETPARAM, nouveau_abi16_ioctl_setparam, DRM_UNLOCKED|DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), | ||
391 | DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_ALLOC, nouveau_abi16_ioctl_channel_alloc, DRM_UNLOCKED|DRM_AUTH), | ||
392 | DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_FREE, nouveau_abi16_ioctl_channel_free, DRM_UNLOCKED|DRM_AUTH), | ||
393 | DRM_IOCTL_DEF_DRV(NOUVEAU_GROBJ_ALLOC, nouveau_abi16_ioctl_grobj_alloc, DRM_UNLOCKED|DRM_AUTH), | ||
394 | DRM_IOCTL_DEF_DRV(NOUVEAU_NOTIFIEROBJ_ALLOC, nouveau_abi16_ioctl_notifierobj_alloc, DRM_UNLOCKED|DRM_AUTH), | ||
395 | DRM_IOCTL_DEF_DRV(NOUVEAU_GPUOBJ_FREE, nouveau_abi16_ioctl_gpuobj_free, DRM_UNLOCKED|DRM_AUTH), | ||
396 | DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_NEW, nouveau_gem_ioctl_new, DRM_UNLOCKED|DRM_AUTH), | ||
397 | DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_PUSHBUF, nouveau_gem_ioctl_pushbuf, DRM_UNLOCKED|DRM_AUTH), | ||
398 | DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_PREP, nouveau_gem_ioctl_cpu_prep, DRM_UNLOCKED|DRM_AUTH), | ||
399 | DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_FINI, nouveau_gem_ioctl_cpu_fini, DRM_UNLOCKED|DRM_AUTH), | ||
400 | DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_INFO, nouveau_gem_ioctl_info, DRM_UNLOCKED|DRM_AUTH), | ||
401 | }; | ||
402 | |||
387 | static const struct file_operations nouveau_driver_fops = { | 403 | static const struct file_operations nouveau_driver_fops = { |
388 | .owner = THIS_MODULE, | 404 | .owner = THIS_MODULE, |
389 | .open = drm_open, | 405 | .open = drm_open, |
@@ -422,7 +438,6 @@ static struct drm_driver driver = { | |||
422 | .get_vblank_counter = drm_vblank_count, | 438 | .get_vblank_counter = drm_vblank_count, |
423 | .enable_vblank = nouveau_vblank_enable, | 439 | .enable_vblank = nouveau_vblank_enable, |
424 | .disable_vblank = nouveau_vblank_disable, | 440 | .disable_vblank = nouveau_vblank_disable, |
425 | .reclaim_buffers = drm_core_reclaim_buffers, | ||
426 | .ioctls = nouveau_ioctls, | 441 | .ioctls = nouveau_ioctls, |
427 | .fops = &nouveau_driver_fops, | 442 | .fops = &nouveau_driver_fops, |
428 | 443 | ||
@@ -463,7 +478,7 @@ static struct pci_driver nouveau_pci_driver = { | |||
463 | 478 | ||
464 | static int __init nouveau_init(void) | 479 | static int __init nouveau_init(void) |
465 | { | 480 | { |
466 | driver.num_ioctls = nouveau_max_ioctl; | 481 | driver.num_ioctls = ARRAY_SIZE(nouveau_ioctls); |
467 | 482 | ||
468 | if (nouveau_modeset == -1) { | 483 | if (nouveau_modeset == -1) { |
469 | #ifdef CONFIG_VGA_CONSOLE | 484 | #ifdef CONFIG_VGA_CONSOLE |