Blame SOURCES/libdrm-2.4.0-no-bc.patch

cccf15
diff -up libdrm-2.4.114/xf86drm.c.dma libdrm-2.4.114/xf86drm.c
cccf15
--- libdrm-2.4.114/xf86drm.c.dma	2022-11-03 18:33:36.000000000 +1000
cccf15
+++ libdrm-2.4.114/xf86drm.c	2022-11-10 05:39:58.652477119 +1000
cccf15
@@ -930,11 +930,6 @@ drm_public int drmAvailable(void)
a63331
     int           fd;
a63331
 
a63331
     if ((fd = drmOpenMinor(0, 1, DRM_NODE_PRIMARY)) < 0) {
a63331
-#ifdef __linux__
a63331
-        /* Try proc for backward Linux compatibility */
a63331
-        if (!access("/proc/dri/0", R_OK))
a63331
-            return 1;
a63331
-#endif
a63331
         return 0;
a63331
     }
a63331
 
cccf15
@@ -1127,38 +1122,6 @@ static int drmOpenByName(const char *nam
a63331
         }
a63331
     }
a63331
 
a63331
-#ifdef __linux__
a63331
-    /* Backward-compatibility /proc support */
a63331
-    for (i = 0; i < 8; i++) {
a63331
-        char proc_name[64], buf[512];
a63331
-        char *driver, *pt, *devstring;
a63331
-        int  retcode;
a63331
-
a63331
-        sprintf(proc_name, "/proc/dri/%d/name", i);
cccf15
-        if ((fd = open(proc_name, O_RDONLY)) >= 0) {
a63331
-            retcode = read(fd, buf, sizeof(buf)-1);
a63331
-            close(fd);
a63331
-            if (retcode) {
a63331
-                buf[retcode-1] = '\0';
a63331
-                for (driver = pt = buf; *pt && *pt != ' '; ++pt)
a63331
-                    ;
a63331
-                if (*pt) { /* Device is next */
a63331
-                    *pt = '\0';
a63331
-                    if (!strcmp(driver, name)) { /* Match */
a63331
-                        for (devstring = ++pt; *pt && *pt != ' '; ++pt)
a63331
-                            ;
a63331
-                        if (*pt) { /* Found busid */
a63331
-                            return drmOpenByBusid(++pt, type);
a63331
-                        } else { /* No busid */
a63331
-                            return drmOpenDevice(strtol(devstring, NULL, 0),i, type);
a63331
-                        }
a63331
-                    }
a63331
-                }
a63331
-            }
a63331
-        }
a63331
-    }
a63331
-#endif
a63331
-
a63331
     return -1;
a63331
 }
a63331