[PATCH 4/4] xfree86/dri: remove libdrm runtime checks
Emil Velikov
emil.l.velikov at gmail.com
Thu Sep 29 17:35:04 UTC 2016
As of last commit all the places in our configure.ac require version
2.3.1 (released back in 2007) or later. With the latter introducing the
1.3.0 version, as returned by drmGetLibVersion.
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
hw/xfree86/dri/dri.c | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index e4a21dc..0142b6e 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -158,9 +158,6 @@ DRIOpenDRMMaster(ScrnInfoPtr pScrn,
Bool drmWasAvailable;
DRIEntPrivPtr pDRIEntPriv;
DRIEntPrivRec tmp;
- drmVersionPtr drmlibv;
- int drmlibmajor, drmlibminor;
- const char *openBusID;
int count;
int err;
@@ -176,23 +173,6 @@ DRIOpenDRMMaster(ScrnInfoPtr pScrn,
memset(&tmp, 0, sizeof(tmp));
- /* Check the DRM lib version.
- */
-
- drmlibmajor = 1;
- drmlibminor = 0;
- 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
- * if a busid string is passed.
- */
- openBusID = (drmlibmajor == 1 && drmlibminor >= 2) ? busID : NULL;
-
tmp.drmFD = -1;
sv.drm_di_major = 1;
sv.drm_di_minor = 1;
@@ -201,7 +181,7 @@ DRIOpenDRMMaster(ScrnInfoPtr pScrn,
saveSv = sv;
count = 10;
while (count--) {
- tmp.drmFD = drmOpen(drmDriverName, openBusID);
+ tmp.drmFD = drmOpen(drmDriverName, busID);
if (tmp.drmFD < 0) {
DRIDrvMsg(-1, X_ERROR, "[drm] drmOpen failed.\n");
--
2.9.3
More information about the xorg-devel
mailing list