From 58ef01648b18f85ad79620da110ece2339f638c3 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 17 Apr 2014 10:49:46 -0400 Subject: [PATCH] dri1: Don't bother asking the loader about drmGetLibVersion MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Eric Anholt Signed-off-by: Keith Packard --- hw/xfree86/dri/dri.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index 6033999..95828bb 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -177,19 +177,15 @@ DRIOpenDRMMaster(ScrnInfoPtr pScrn, memset(&tmp, 0, sizeof(tmp)); /* 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; drmlibminor = 0; - if (xf86LoaderCheckSymbol("drmGetLibVersion")) { - drmlibv = drmGetLibVersion(-1); - if (drmlibv != NULL) { - drmlibmajor = drmlibv->version_major; - drmlibminor = drmlibv->version_minor; - drmFreeVersion(drmlibv); - } + drmlibv = drmGetLibVersion(-1); + if (drmlibv != NULL) { + drmlibmajor = drmlibv->version_major; + drmlibminor = drmlibv->version_minor; + drmFreeVersion(drmlibv); } /* Check if the libdrm can handle falling back to loading based on name -- 2.7.4