diff options
Diffstat (limited to 'drivers/gpu/drm/drm_ioctl.c')
-rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 00587a1e3c83..3785d66721f2 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <drm/drm_core.h> | 32 | #include <drm/drm_core.h> |
33 | #include "drm_legacy.h" | 33 | #include "drm_legacy.h" |
34 | #include "drm_internal.h" | 34 | #include "drm_internal.h" |
35 | #include "drm_crtc_internal.h" | ||
35 | 36 | ||
36 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
37 | #include <linux/export.h> | 38 | #include <linux/export.h> |
@@ -345,6 +346,17 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv) | |||
345 | return -EINVAL; | 346 | return -EINVAL; |
346 | file_priv->universal_planes = req->value; | 347 | file_priv->universal_planes = req->value; |
347 | break; | 348 | break; |
349 | case DRM_CLIENT_CAP_ATOMIC: | ||
350 | /* for now, hide behind experimental drm.atomic moduleparam */ | ||
351 | if (!drm_atomic) | ||
352 | return -EINVAL; | ||
353 | if (!drm_core_check_feature(dev, DRIVER_ATOMIC)) | ||
354 | return -EINVAL; | ||
355 | if (req->value > 1) | ||
356 | return -EINVAL; | ||
357 | file_priv->atomic = req->value; | ||
358 | file_priv->universal_planes = req->value; | ||
359 | break; | ||
348 | default: | 360 | default: |
349 | return -EINVAL; | 361 | return -EINVAL; |
350 | } | 362 | } |
@@ -620,6 +632,7 @@ static const struct drm_ioctl_desc drm_ioctls[] = { | |||
620 | DRM_IOCTL_DEF(DRM_IOCTL_MODE_OBJ_GETPROPERTIES, drm_mode_obj_get_properties_ioctl, DRM_CONTROL_ALLOW|DRM_UNLOCKED), | 632 | DRM_IOCTL_DEF(DRM_IOCTL_MODE_OBJ_GETPROPERTIES, drm_mode_obj_get_properties_ioctl, DRM_CONTROL_ALLOW|DRM_UNLOCKED), |
621 | DRM_IOCTL_DEF(DRM_IOCTL_MODE_OBJ_SETPROPERTY, drm_mode_obj_set_property_ioctl, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED), | 633 | DRM_IOCTL_DEF(DRM_IOCTL_MODE_OBJ_SETPROPERTY, drm_mode_obj_set_property_ioctl, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED), |
622 | DRM_IOCTL_DEF(DRM_IOCTL_MODE_CURSOR2, drm_mode_cursor2_ioctl, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED), | 634 | DRM_IOCTL_DEF(DRM_IOCTL_MODE_CURSOR2, drm_mode_cursor2_ioctl, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED), |
635 | DRM_IOCTL_DEF(DRM_IOCTL_MODE_ATOMIC, drm_mode_atomic_ioctl, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED), | ||
623 | }; | 636 | }; |
624 | 637 | ||
625 | #define DRM_CORE_IOCTL_COUNT ARRAY_SIZE( drm_ioctls ) | 638 | #define DRM_CORE_IOCTL_COUNT ARRAY_SIZE( drm_ioctls ) |