aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_drv.c1
-rw-r--r--drivers/gpu/drm/drm_ioctl.c11
-rw-r--r--include/drm/drm.h7
-rw-r--r--include/drm/drmP.h2
4 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 0d04914eb058..93a112d45c1a 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -67,6 +67,7 @@ static struct drm_ioctl_desc drm_ioctls[] = {
67 DRM_IOCTL_DEF(DRM_IOCTL_GET_MAP, drm_getmap, 0), 67 DRM_IOCTL_DEF(DRM_IOCTL_GET_MAP, drm_getmap, 0),
68 DRM_IOCTL_DEF(DRM_IOCTL_GET_CLIENT, drm_getclient, 0), 68 DRM_IOCTL_DEF(DRM_IOCTL_GET_CLIENT, drm_getclient, 0),
69 DRM_IOCTL_DEF(DRM_IOCTL_GET_STATS, drm_getstats, 0), 69 DRM_IOCTL_DEF(DRM_IOCTL_GET_STATS, drm_getstats, 0),
70 DRM_IOCTL_DEF(DRM_IOCTL_GET_CAP, drm_getcap, 0),
70 DRM_IOCTL_DEF(DRM_IOCTL_SET_VERSION, drm_setversion, DRM_MASTER), 71 DRM_IOCTL_DEF(DRM_IOCTL_SET_VERSION, drm_setversion, DRM_MASTER),
71 72
72 DRM_IOCTL_DEF(DRM_IOCTL_SET_UNIQUE, drm_setunique, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), 73 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 117490590f56..d6de9d042b76 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -268,6 +268,17 @@ int drm_getstats(struct drm_device *dev, void *data,
268} 268}
269 269
270/** 270/**
271 * Get device/driver capabilities
272 */
273int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
274{
275 struct drm_get_cap *req = data;
276
277 req->value = 0;
278 return 0;
279}
280
281/**
271 * Setversion ioctl. 282 * Setversion ioctl.
272 * 283 *
273 * \param inode device inode. 284 * \param inode device inode.
diff --git a/include/drm/drm.h b/include/drm/drm.h
index 8598cc94e169..da4efd162d58 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -608,6 +608,12 @@ struct drm_gem_open {
608 __u64 size; 608 __u64 size;
609}; 609};
610 610
611/** DRM_IOCTL_GET_CAP ioctl argument type */
612struct drm_get_cap {
613 __u64 capability;
614 __u64 value;
615};
616
611#include "drm_mode.h" 617#include "drm_mode.h"
612 618
613#define DRM_IOCTL_BASE 'd' 619#define DRM_IOCTL_BASE 'd'
@@ -628,6 +634,7 @@ struct drm_gem_open {
628#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close) 634#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close)
629#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) 635#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink)
630#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) 636#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open)
637#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap)
631 638
632#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) 639#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique)
633#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) 640#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth)
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 52a2fd2f7789..835214761d4f 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1276,6 +1276,8 @@ extern int drm_getclient(struct drm_device *dev, void *data,
1276 struct drm_file *file_priv); 1276 struct drm_file *file_priv);
1277extern int drm_getstats(struct drm_device *dev, void *data, 1277extern int drm_getstats(struct drm_device *dev, void *data,
1278 struct drm_file *file_priv); 1278 struct drm_file *file_priv);
1279extern int drm_getcap(struct drm_device *dev, void *data,
1280 struct drm_file *file_priv);
1279extern int drm_setversion(struct drm_device *dev, void *data, 1281extern int drm_setversion(struct drm_device *dev, void *data,
1280 struct drm_file *file_priv); 1282 struct drm_file *file_priv);
1281extern int drm_noop(struct drm_device *dev, void *data, 1283extern int drm_noop(struct drm_device *dev, void *data,