|  | 
| 62 | 62 | #include "nouveau_usif.h" | 
| 63 | 63 | #include "nouveau_connector.h" | 
| 64 | 64 | #include "nouveau_platform.h" | 
|  | 65 | +#include "nouveau_svm.h" | 
| 65 | 66 | 
 | 
| 66 | 67 | MODULE_PARM_DESC(config, "option string to pass to driver core"); | 
| 67 | 68 | static char *nouveau_config; | 
| @@ -549,6 +550,7 @@ nouveau_drm_device_init(struct drm_device *dev) | 
| 549 | 550 | 
 | 
| 550 | 551 | 	nouveau_debugfs_init(drm); | 
| 551 | 552 | 	nouveau_hwmon_init(dev); | 
|  | 553 | +	nouveau_svm_init(drm); | 
| 552 | 554 | 	nouveau_fbcon_init(dev); | 
| 553 | 555 | 	nouveau_led_init(dev); | 
| 554 | 556 | 
 | 
| @@ -592,6 +594,7 @@ nouveau_drm_device_fini(struct drm_device *dev) | 
| 592 | 594 | 
 | 
| 593 | 595 | 	nouveau_led_fini(dev); | 
| 594 | 596 | 	nouveau_fbcon_fini(dev); | 
|  | 597 | +	nouveau_svm_fini(drm); | 
| 595 | 598 | 	nouveau_hwmon_fini(dev); | 
| 596 | 599 | 	nouveau_debugfs_fini(drm); | 
| 597 | 600 | 
 | 
| @@ -737,6 +740,7 @@ nouveau_do_suspend(struct drm_device *dev, bool runtime) | 
| 737 | 740 | 	struct nouveau_drm *drm = nouveau_drm(dev); | 
| 738 | 741 | 	int ret; | 
| 739 | 742 | 
 | 
|  | 743 | +	nouveau_svm_suspend(drm); | 
| 740 | 744 | 	nouveau_led_suspend(dev); | 
| 741 | 745 | 
 | 
| 742 | 746 | 	if (dev->mode_config.num_crtc) { | 
| @@ -813,7 +817,7 @@ nouveau_do_resume(struct drm_device *dev, bool runtime) | 
| 813 | 817 | 	} | 
| 814 | 818 | 
 | 
| 815 | 819 | 	nouveau_led_resume(dev); | 
| 816 |  | - | 
|  | 820 | +	nouveau_svm_resume(drm); | 
| 817 | 821 | 	return 0; | 
| 818 | 822 | } | 
| 819 | 823 | 
 | 
| @@ -1033,6 +1037,7 @@ nouveau_ioctls[] = { | 
| 1033 | 1037 | 	DRM_IOCTL_DEF_DRV(NOUVEAU_GROBJ_ALLOC, nouveau_abi16_ioctl_grobj_alloc, DRM_AUTH|DRM_RENDER_ALLOW), | 
| 1034 | 1038 | 	DRM_IOCTL_DEF_DRV(NOUVEAU_NOTIFIEROBJ_ALLOC, nouveau_abi16_ioctl_notifierobj_alloc, DRM_AUTH|DRM_RENDER_ALLOW), | 
| 1035 | 1039 | 	DRM_IOCTL_DEF_DRV(NOUVEAU_GPUOBJ_FREE, nouveau_abi16_ioctl_gpuobj_free, DRM_AUTH|DRM_RENDER_ALLOW), | 
|  | 1040 | +	DRM_IOCTL_DEF_DRV(NOUVEAU_SVM_INIT, nouveau_svmm_init, DRM_AUTH|DRM_RENDER_ALLOW), | 
| 1036 | 1041 | 	DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_NEW, nouveau_gem_ioctl_new, DRM_AUTH|DRM_RENDER_ALLOW), | 
| 1037 | 1042 | 	DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_PUSHBUF, nouveau_gem_ioctl_pushbuf, DRM_AUTH|DRM_RENDER_ALLOW), | 
| 1038 | 1043 | 	DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_PREP, nouveau_gem_ioctl_cpu_prep, DRM_AUTH|DRM_RENDER_ALLOW), | 
|  | 
0 commit comments