When trying to map a piece of device memory with a cacheability attribue
(e.g. the graphics aperture on most video cards), don't error if we failed to set the mtrr but the map succeeded. Instead print a warning (other osen handle this case similarly). Libraries shouldn't use fprintf(stderr, ...); but libpciaccess is really quite poorly designed. This diff means that mine and drahn's laptops work with xserver 1.5. ok kettenis@
This commit is contained in:
parent
50f1260b8d
commit
4cd1a7a593
@ -149,7 +149,8 @@ pci_device_openbsd_map_range(struct pci_device *dev,
|
||||
mo.mo_arg[0] = MEMRANGE_SET_UPDATE;
|
||||
|
||||
if (ioctl(aperturefd, MEMRANGE_SET, &mo))
|
||||
return errno;
|
||||
(void)fprintf(stderr, "mtrr set failed: %s\n",
|
||||
strerror(errno));
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user