summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <mark.kettenis@xs4all.nl>2008-03-12 21:45:37 +0100
committerMatthieu Herrb <matthieu@reactor.herrb.net>2008-03-12 21:45:37 +0100
commit06c0372c3a1b45005eb6d50406f77f4e93f1de1e (patch)
treec4c069e4c73cfa6bbfa3e9f06b3d0430b15d63ca
parent2036851125226065891f13583ade3ce559e7bd37 (diff)
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.
-rw-r--r--hw/xfree86/os-support/bsd/i386_video.c3
-rw-r--r--hw/xfree86/os-support/bus/bsd_pci.c2
-rw-r--r--hw/xfree86/utils/ioport/Makefile.am2
3 files changed, 6 insertions, 1 deletions
diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c
index 0dcff6631..7e4a4d2a3 100644
--- a/hw/xfree86/os-support/bsd/i386_video.c
+++ b/hw/xfree86/os-support/bsd/i386_video.c
@@ -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()) {
diff --git a/hw/xfree86/os-support/bus/bsd_pci.c b/hw/xfree86/os-support/bus/bsd_pci.c
index bceb1087f..57ad09b6a 100644
--- a/hw/xfree86/os-support/bus/bsd_pci.c
+++ b/hw/xfree86/os-support/bus/bsd_pci.c
@@ -81,4 +81,6 @@ bsdPciInit(void)
{
pciNumBuses = 1;
pciBusInfo[0] = &bsd_pci;
+
+ xf86InitVidMem();
}
diff --git a/hw/xfree86/utils/ioport/Makefile.am b/hw/xfree86/utils/ioport/Makefile.am
index c1f9453a8..12f861372 100644
--- a/hw/xfree86/utils/ioport/Makefile.am
+++ b/hw/xfree86/utils/ioport/Makefile.am
@@ -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 = \