diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-02-20 20:17:35 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-03-03 23:47:30 -0500 |
commit | 9f35421e09c494c36079d7cf5724ae9f832431d7 (patch) | |
tree | 1c9ab806a43a30df918e9e12505823a387779e34 /include/drm | |
parent | e1e84017f95504348308085ae7cd0bfe268caf10 (diff) |
drm/core: add ioctl to query device/driver capabilities
We're coming to see a need to have a set of generic capability checks in
the core DRM, in addition to the driver-specific ioctls that already
exist.
This patch defines an ioctl to do as such, but does not yet define any
capabilities.
[airlied: drop the driver callback for now.]
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm.h | 7 | ||||
-rw-r--r-- | include/drm/drmP.h | 2 |
2 files changed, 9 insertions, 0 deletions
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 */ | ||
612 | struct 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); |
1277 | extern int drm_getstats(struct drm_device *dev, void *data, | 1277 | extern int drm_getstats(struct drm_device *dev, void *data, |
1278 | struct drm_file *file_priv); | 1278 | struct drm_file *file_priv); |
1279 | extern int drm_getcap(struct drm_device *dev, void *data, | ||
1280 | struct drm_file *file_priv); | ||
1279 | extern int drm_setversion(struct drm_device *dev, void *data, | 1281 | extern int drm_setversion(struct drm_device *dev, void *data, |
1280 | struct drm_file *file_priv); | 1282 | struct drm_file *file_priv); |
1281 | extern int drm_noop(struct drm_device *dev, void *data, | 1283 | extern int drm_noop(struct drm_device *dev, void *data, |