Commit 06c0372c authored by Mark Kettenis's avatar Mark Kettenis Committed by Matthieu Herrb

OpenBSD support for libpciaccess.

xserver and libpciaccess both need to open /dev/xf86, which can only
be opened once.  I implemented pci_system_init_dev_mem() like Ian
suggested.  This requires some minor changes to the BSD-specific
os-support code.  Since pci_system_init_dev_mem() is a no-op on
FreeBSD this should be no problem.
parent 20368511
......@@ -212,6 +212,9 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
pVidMem->mapMem = mapVidMem;
pVidMem->unmapMem = unmapVidMem;
if (useDevMem)
pci_system_init_dev_mem(devMemFd);
#ifdef HAS_MTRR_SUPPORT
if (useDevMem) {
if (cleanMTRR()) {
......
......@@ -81,4 +81,6 @@ bsdPciInit(void)
{
pciNumBuses = 1;
pciBusInfo[0] = &bsd_pci;
xf86InitVidMem();
}
......@@ -37,7 +37,7 @@ ioport_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
ioport_LDADD = \
../../os-support/libxorgos.la \
../../dummylib/libdummy-nonserver.a \
${UTILS_SYS_LIBS}
${UTILS_SYS_LIBS} ${PCIACCESS_LIBS}
ioport_SOURCES = \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment