diff options
author | Jens Owen <jens@tungstengraphics.com> | 2002-04-09 17:57:01 +0000 |
---|---|---|
committer | Jens Owen <jens@tungstengraphics.com> | 2002-04-09 17:57:01 +0000 |
commit | 78de7fd3d8d1b194d699f0aaa19069bd7fa5f301 (patch) | |
tree | 93515f920b8f69e9502a0a74396f10bfdd0c5a58 | |
parent | 67a769160b0f13b2e59dfd02f008634339b59c35 (diff) |
Added version checking for drm library, included new entry point:drmcommand-0-0-1-20020409-freezedrmcommand-0-0-1-20020409drmcommand-0-0-1-branch
drmGetLibVersion
This is now used by r128, radeon, glint, i810, i830 and mga drivers
-rw-r--r-- | libdrm/xf86drm.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index b98c03783..9cc83a275 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -434,7 +434,7 @@ static void drmCopyVersion(drmVersionPtr d, const drm_version_t *s) d->desc = drmStrdup(s->desc); } -/* drmVersion obtains the version information via an ioctl. Similar +/* drmGet Version obtains the driver version information via an ioctl. Similar * information is available via /proc/dri. */ drmVersionPtr drmGetVersion(int fd) @@ -483,6 +483,26 @@ drmVersionPtr drmGetVersion(int fd) return retval; } +/* drmGetLibVersion set version information for the drm user space library. + * this version number is driver indepedent */ + +drmVersionPtr drmGetLibVersion(int fd) +{ + drm_version_t *version = drmMalloc(sizeof(*version)); + + /* Version history: + * revision 1.0.x = original DRM interface with no drmGetLibVersion + * entry point and many drm<Device> extensions + * revision 1.1.x = added drmCommand entry points for device extensions + * added drmGetLibVersion to identify libdrm.a version + */ + version->version_major = 1; + version->version_minor = 1; + version->version_patchlevel = 0; + + return (drmVersionPtr)version; +} + void drmFreeBusid(const char *busid) { drmFree((void *)busid); |