summaryrefslogtreecommitdiff
path: root/shared-core/nouveau_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core/nouveau_state.c')
-rw-r--r--shared-core/nouveau_state.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c
index 3bfa99ca..01ebbc8f 100644
--- a/shared-core/nouveau_state.c
+++ b/shared-core/nouveau_state.c
@@ -132,3 +132,39 @@ int nouveau_unload(struct drm_device *dev)
return 0;
}
+int nouveau_ioctl_getparam(DRM_IOCTL_ARGS)
+{
+ DRM_DEVICE;
+ drm_nouveau_getparam_t getparam;
+
+ DRM_COPY_FROM_USER_IOCTL(getparam, (drm_nouveau_getparam_t __user *)data,
+ sizeof(getparam));
+
+ switch (getparam.param) {
+ default:
+ DRM_ERROR("unknown parameter %d\n", getparam.param);
+ return DRM_ERR(EINVAL);
+ }
+
+ DRM_COPY_TO_USER_IOCTL((drm_nouveau_getparam_t __user *)data, getparam,
+ sizeof(getparam));
+ return 0;
+}
+
+int nouveau_ioctl_setparam(DRM_IOCTL_ARGS)
+{
+ DRM_DEVICE;
+ drm_nouveau_setparam_t setparam;
+
+ DRM_COPY_FROM_USER_IOCTL(setparam, (drm_nouveau_setparam_t __user *)data,
+ sizeof(setparam));
+
+ switch (setparam.param) {
+ default:
+ DRM_ERROR("unknown parameter %d\n", setparam.param);
+ return DRM_ERR(EINVAL);
+ }
+
+ return 0;
+}
+