Revert "libdrm: Fix issue about differrent domainID but same BDF"

This reverts commit 56c21f877b.

There were issues pointed out during review that were not addressed.
Would love to have this re-land, once those are addressed.
main
Emil Velikov 2019-04-17 18:31:31 +01:00
parent f8f8b2b9b0
commit 439a4c0361
1 changed files with 0 additions and 23 deletions

View File

@ -586,30 +586,7 @@ static int drmOpenByBusid(const char *busid, int type)
if (base < 0) if (base < 0)
return -1; return -1;
/* We need to try for 1.4 first for proper PCI domain support */
drmMsg("drmOpenByBusid: Searching for BusID %s\n", busid); drmMsg("drmOpenByBusid: Searching for BusID %s\n", busid);
for (i = base; i < base + DRM_MAX_MINOR; i++) {
fd = drmOpenMinor(i, 1, type);
drmMsg("drmOpenByBusid: drmOpenMinor returns %d\n", fd);
if (fd >= 0) {
sv.drm_di_major = 1;
sv.drm_di_minor = 4;
sv.drm_dd_major = -1; /* Don't care */
sv.drm_dd_minor = -1; /* Don't care */
if (!drmSetInterfaceVersion(fd, &sv)) {
buf = drmGetBusid(fd);
drmMsg("drmOpenByBusid: drmGetBusid reports %s\n", buf);
if (buf && drmMatchBusID(buf, busid, 1)) {
drmFreeBusid(buf);
return fd;
}
if (buf)
drmFreeBusid(buf);
}
close(fd);
}
}
for (i = base; i < base + DRM_MAX_MINOR; i++) { for (i = base; i < base + DRM_MAX_MINOR; i++) {
fd = drmOpenMinor(i, 1, type); fd = drmOpenMinor(i, 1, type);
drmMsg("drmOpenByBusid: drmOpenMinor returns %d\n", fd); drmMsg("drmOpenByBusid: drmOpenMinor returns %d\n", fd);