diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-02-21 11:27:19 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-03-04 15:25:51 +1000 |
commit | 5c6c6913d1260024e5d156db7973c9e46fe1ff03 (patch) | |
tree | 5db622ccb0cbb5c8b80ca53782cdb0b1abcc031d /xf86drm.c | |
parent | 4473a7e8234da6d16f4ccfa660fbd72ff1b7dd95 (diff) |
Implement drmGetCap() to query device/driver capabilities
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'xf86drm.c')
-rw-r--r-- | xf86drm.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -810,6 +810,18 @@ drmVersionPtr drmGetLibVersion(int fd) return (drmVersionPtr)version; } +int drmGetCap(int fd, uint64_t capability, uint64_t *value) +{ + struct drm_get_cap cap = { capability, 0 }; + int ret; + + ret = drmIoctl(fd, DRM_IOCTL_GET_CAP, &cap); + if (ret) + return ret; + + *value = cap.value; + return cap.value; +} /** * Free the bus ID information. |