aboutsummaryrefslogtreecommitdiffstats
path: root/libdrm
diff options
context:
space:
mode:
authorThomas Hellstrom2007-10-25 03:12:21 -0500
committerThomas Hellstrom2007-10-25 03:12:21 -0500
commit11f3e5e53f8fc4de90d1c289e0ba218ddfca23dc (patch)
tree788f1bfbafe608fa55b377673b540f9f5a3de401 /libdrm
parentb5cad27e05ad3666be8ccdf71e10d743efa5849e (diff)
downloadexternal-libdrm-11f3e5e53f8fc4de90d1c289e0ba218ddfca23dc.tar.gz
external-libdrm-11f3e5e53f8fc4de90d1c289e0ba218ddfca23dc.tar.xz
external-libdrm-11f3e5e53f8fc4de90d1c289e0ba218ddfca23dc.zip
Buffer manager:
Implement a version check IOCTL for drivers that don't use drmMMInit from user-space. Remove the minor check from the kernel code. That's really up to the driver. Bump major.
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drm.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 82b77d7f..2f9d5c80 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -2855,6 +2855,30 @@ int drmMMUnlock(int fd, unsigned memType, int unlockBM)
2855 return (ret) ? -errno : 0; 2855 return (ret) ? -errno : 0;
2856} 2856}
2857 2857
2858int drmBOVersion(int fd, unsigned int *major,
2859 unsigned int *minor,
2860 unsigned int *patchlevel)
2861{
2862 struct drm_bo_version_arg arg;
2863 int ret;
2864
2865 memset(&arg, 0, sizeof(arg));
2866 ret = ioctl(fd, DRM_IOCTL_BO_VERSION, &arg);
2867 if (ret)
2868 return ret;
2869
2870 if (major)
2871 *major = arg.major;
2872 if (minor)
2873 *minor = arg.minor;
2874 if (patchlevel)
2875 *patchlevel = arg.patchlevel;
2876
2877 return (ret) ? -errno : 0;
2878}
2879
2880
2881
2858#define DRM_MAX_FDS 16 2882#define DRM_MAX_FDS 16
2859static struct { 2883static struct {
2860 char *BusID; 2884 char *BusID;