mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 07:00:11 +01:00
Added version checking for drm library, included new entry point:
drmGetLibVersion This is now used by r128, radeon, glint, i810, i830 and mga drivers
This commit is contained in:
parent
67a769160b
commit
78de7fd3d8
1 changed files with 21 additions and 1 deletions
|
|
@ -434,7 +434,7 @@ static void drmCopyVersion(drmVersionPtr d, const drm_version_t *s)
|
||||||
d->desc = drmStrdup(s->desc);
|
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. */
|
* information is available via /proc/dri. */
|
||||||
|
|
||||||
drmVersionPtr drmGetVersion(int fd)
|
drmVersionPtr drmGetVersion(int fd)
|
||||||
|
|
@ -483,6 +483,26 @@ drmVersionPtr drmGetVersion(int fd)
|
||||||
return retval;
|
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)
|
void drmFreeBusid(const char *busid)
|
||||||
{
|
{
|
||||||
drmFree((void *)busid);
|
drmFree((void *)busid);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue