dri1: Don't bother asking the loader about drmGetLibVersion

This was added for DRM_IOCTL_SET_VERSION support, which has been around
for over ten years now. Since we require ≥2.3.0 in configure.ac this
would really only protect you if you managed to build against a modern
libdrm but run against one that's more than 7½ years old, which, doctor
it hurts when I do this.

Archaeology: http://cgit.freedesktop.org/~ajax/dri/commit/xc/programs/Xserver/GL/dri/dri.c?id=77d62efca033dced96ab7998b7c62a4e2df907d5
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Adam Jackson 2014-04-17 10:49:46 -04:00 committed by Keith Packard
parent 461ed561b9
commit 58ef01648b

View File

@ -177,20 +177,16 @@ DRIOpenDRMMaster(ScrnInfoPtr pScrn,
memset(&tmp, 0, sizeof(tmp)); memset(&tmp, 0, sizeof(tmp));
/* Check the DRM lib version. /* Check the DRM lib version.
* drmGetLibVersion was not supported in version 1.0, so check for
* symbol first to avoid possible crash or hang.
*/ */
drmlibmajor = 1; drmlibmajor = 1;
drmlibminor = 0; drmlibminor = 0;
if (xf86LoaderCheckSymbol("drmGetLibVersion")) {
drmlibv = drmGetLibVersion(-1); drmlibv = drmGetLibVersion(-1);
if (drmlibv != NULL) { if (drmlibv != NULL) {
drmlibmajor = drmlibv->version_major; drmlibmajor = drmlibv->version_major;
drmlibminor = drmlibv->version_minor; drmlibminor = drmlibv->version_minor;
drmFreeVersion(drmlibv); drmFreeVersion(drmlibv);
} }
}
/* Check if the libdrm can handle falling back to loading based on name /* Check if the libdrm can handle falling back to loading based on name
* if a busid string is passed. * if a busid string is passed.