mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-21 06:20:10 +01:00
drm: fixup for new sysfs API
This commit is contained in:
parent
48a166af14
commit
add7d21c79
1 changed files with 19 additions and 0 deletions
|
|
@ -568,6 +568,25 @@ int drmCheckModesettingSupported(const char *busid)
|
||||||
if (ret != 4)
|
if (ret != 4)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
sprintf(pci_dev_dir, "/sys/bus/pci/devices/%04x:%02x:%02x.%d/drm",
|
||||||
|
domain, bus, dev, func);
|
||||||
|
|
||||||
|
sysdir = opendir(pci_dev_dir);
|
||||||
|
if (sysdir) {
|
||||||
|
dent = readdir(sysdir);
|
||||||
|
while (dent) {
|
||||||
|
if (!strncmp(dent->d_name, "controlD", 8)) {
|
||||||
|
found = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
dent = readdir(sysdir);
|
||||||
|
}
|
||||||
|
closedir(sysdir);
|
||||||
|
if (found)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
sprintf(pci_dev_dir, "/sys/bus/pci/devices/%04x:%02x:%02x.%d/",
|
sprintf(pci_dev_dir, "/sys/bus/pci/devices/%04x:%02x:%02x.%d/",
|
||||||
domain, bus, dev, func);
|
domain, bus, dev, func);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue