[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    [PATCH 4/4] xfree86/dri: remove libdrm runtime checks
From:       Emil Velikov <emil.l.velikov () gmail ! com>
Date:       2016-09-29 17:35:04
Message-ID: 20160929173504.14312-4-emil.l.velikov () gmail ! com
[Download RAW message or body]

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@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

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic