libdrm/libdrm-2.4.0-no-bc.patch
DistroBaker a3ce7e60aa Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/libdrm.git#f9254acf932b0771bc4af934391caab4549d78e5
2020-11-04 04:08:54 +00:00

55 lines
1.7 KiB
Diff

diff -up libdrm-2.4.103/xf86drm.c.dma libdrm-2.4.103/xf86drm.c
--- libdrm-2.4.103/xf86drm.c.dma 2020-11-04 13:24:14.000000000 +1000
+++ libdrm-2.4.103/xf86drm.c 2020-11-04 13:42:04.190975193 +1000
@@ -507,11 +507,6 @@ drm_public int drmAvailable(void)
int fd;
if ((fd = drmOpenMinor(0, 1, DRM_NODE_PRIMARY)) < 0) {
-#ifdef __linux__
- /* Try proc for backward Linux compatibility */
- if (!access("/proc/dri/0", R_OK))
- return 1;
-#endif
return 0;
}
@@ -704,38 +699,6 @@ static int drmOpenByName(const char *nam
}
}
-#ifdef __linux__
- /* Backward-compatibility /proc support */
- for (i = 0; i < 8; i++) {
- char proc_name[64], buf[512];
- char *driver, *pt, *devstring;
- int retcode;
-
- sprintf(proc_name, "/proc/dri/%d/name", i);
- if ((fd = open(proc_name, O_RDONLY, 0)) >= 0) {
- retcode = read(fd, buf, sizeof(buf)-1);
- close(fd);
- if (retcode) {
- buf[retcode-1] = '\0';
- for (driver = pt = buf; *pt && *pt != ' '; ++pt)
- ;
- if (*pt) { /* Device is next */
- *pt = '\0';
- if (!strcmp(driver, name)) { /* Match */
- for (devstring = ++pt; *pt && *pt != ' '; ++pt)
- ;
- if (*pt) { /* Found busid */
- return drmOpenByBusid(++pt, type);
- } else { /* No busid */
- return drmOpenDevice(strtol(devstring, NULL, 0),i, type);
- }
- }
- }
- }
- }
- }
-#endif
-
return -1;
}