diff options
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 9 | ||||
-rw-r--r-- | include/drm/drmP.h | 2 | ||||
-rw-r--r-- | include/uapi/drm/drm.h | 7 |
4 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index e572dd20bdee..e79d8d9ca203 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c | |||
@@ -69,6 +69,7 @@ static const struct drm_ioctl_desc drm_ioctls[] = { | |||
69 | DRM_IOCTL_DEF(DRM_IOCTL_GET_CLIENT, drm_getclient, DRM_UNLOCKED), | 69 | DRM_IOCTL_DEF(DRM_IOCTL_GET_CLIENT, drm_getclient, DRM_UNLOCKED), |
70 | DRM_IOCTL_DEF(DRM_IOCTL_GET_STATS, drm_getstats, DRM_UNLOCKED), | 70 | DRM_IOCTL_DEF(DRM_IOCTL_GET_STATS, drm_getstats, DRM_UNLOCKED), |
71 | DRM_IOCTL_DEF(DRM_IOCTL_GET_CAP, drm_getcap, DRM_UNLOCKED|DRM_RENDER_ALLOW), | 71 | DRM_IOCTL_DEF(DRM_IOCTL_GET_CAP, drm_getcap, DRM_UNLOCKED|DRM_RENDER_ALLOW), |
72 | DRM_IOCTL_DEF(DRM_IOCTL_SET_CLIENT_CAP, drm_setclientcap, 0), | ||
72 | DRM_IOCTL_DEF(DRM_IOCTL_SET_VERSION, drm_setversion, DRM_MASTER), | 73 | DRM_IOCTL_DEF(DRM_IOCTL_SET_VERSION, drm_setversion, DRM_MASTER), |
73 | 74 | ||
74 | DRM_IOCTL_DEF(DRM_IOCTL_SET_UNIQUE, drm_setunique, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), | 75 | DRM_IOCTL_DEF(DRM_IOCTL_SET_UNIQUE, drm_setunique, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), |
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 07247e2855a2..15da4124ee12 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c | |||
@@ -303,6 +303,15 @@ int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv) | |||
303 | } | 303 | } |
304 | 304 | ||
305 | /** | 305 | /** |
306 | * Set device/driver capabilities | ||
307 | */ | ||
308 | int | ||
309 | drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv) | ||
310 | { | ||
311 | return -EINVAL; | ||
312 | } | ||
313 | |||
314 | /** | ||
306 | * Setversion ioctl. | 315 | * Setversion ioctl. |
307 | * | 316 | * |
308 | * \param inode device inode. | 317 | * \param inode device inode. |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index b46fb45f2cca..dbc86b06a724 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -1303,6 +1303,8 @@ extern int drm_getstats(struct drm_device *dev, void *data, | |||
1303 | struct drm_file *file_priv); | 1303 | struct drm_file *file_priv); |
1304 | extern int drm_getcap(struct drm_device *dev, void *data, | 1304 | extern int drm_getcap(struct drm_device *dev, void *data, |
1305 | struct drm_file *file_priv); | 1305 | struct drm_file *file_priv); |
1306 | extern int drm_setclientcap(struct drm_device *dev, void *data, | ||
1307 | struct drm_file *file_priv); | ||
1306 | extern int drm_setversion(struct drm_device *dev, void *data, | 1308 | extern int drm_setversion(struct drm_device *dev, void *data, |
1307 | struct drm_file *file_priv); | 1309 | struct drm_file *file_priv); |
1308 | extern int drm_noop(struct drm_device *dev, void *data, | 1310 | extern int drm_noop(struct drm_device *dev, void *data, |
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 1e09e8f257ba..526baed365ff 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h | |||
@@ -627,6 +627,12 @@ struct drm_get_cap { | |||
627 | __u64 value; | 627 | __u64 value; |
628 | }; | 628 | }; |
629 | 629 | ||
630 | /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ | ||
631 | struct drm_set_client_cap { | ||
632 | __u64 capability; | ||
633 | __u64 value; | ||
634 | }; | ||
635 | |||
630 | #define DRM_CLOEXEC O_CLOEXEC | 636 | #define DRM_CLOEXEC O_CLOEXEC |
631 | struct drm_prime_handle { | 637 | struct drm_prime_handle { |
632 | __u32 handle; | 638 | __u32 handle; |
@@ -659,6 +665,7 @@ struct drm_prime_handle { | |||
659 | #define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) | 665 | #define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) |
660 | #define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) | 666 | #define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) |
661 | #define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) | 667 | #define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) |
668 | #define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap) | ||
662 | 669 | ||
663 | #define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) | 670 | #define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) |
664 | #define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) | 671 | #define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) |