mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-26 06:04:49 +00:00
fbdevhw: Test for graphics:fb%d as well as graphics/fb%d
Apparently the kernel can't decide on an API to expose to userspace, so let's just try both in the hope that one will work. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Michel Dänzer <michel@daenzer.net>
This commit is contained in:
@@ -306,7 +306,13 @@ fbdev_open_pci(struct pci_device * pPci, char **namep)
|
||||
pPci->domain, pPci->bus, pPci->dev, pPci->func, i);
|
||||
|
||||
fd = open(filename, O_RDONLY, 0);
|
||||
if (fd != -1) {
|
||||
if (fd < 0) {
|
||||
sprintf(filename,
|
||||
"/sys/bus/pci/devices/%04x:%02x:%02x.%d/graphics:fb%d",
|
||||
pPci->domain, pPci->bus, pPci->dev, pPci->func, i);
|
||||
fd = open(filename, O_RDONLY, 0);
|
||||
}
|
||||
if (fd >= 0) {
|
||||
close(fd);
|
||||
sprintf(filename, "/dev/fb%d", i);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user