Commit Graph

141 Commits

Author SHA1 Message Date
Doug Chapman
f7abe05b33 Bug #14091: Fix build (and runtime) on ia64. 2008-03-13 17:40:34 -04:00
Mark Kettenis
06c0372c3a 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.
2008-03-12 21:45:37 +01:00
Tiago Vignatti
c46f7b62d2 Fine, we don't need pciInit() anymore. Nuke, nuke, nuke... 2008-02-25 18:14:08 -03:00
Tiago Vignatti
a9050d5424 Jesus, pciInit() was called 32 times in my machine without need!
xf86scanpci() will always call pciInit() before any other function, so
there's no need to guarantee it after.
2008-02-25 18:10:18 -03:00
Tiago Vignatti
81272f7ec9 Some doc clean up:
clean up legacy things in os-support/bus/Pci.c.

    Put InitOutput() comment to its right place.
2008-02-25 17:39:33 -03:00
Tiago Vignatti
f19f7b8e53 Clean some garbage caused when pciaccess was merged:
FindPCIVideoInfo() function isn't need anymore.

    xf86scanpci() is being called only once so we don't need permanent
    (static) variables there.

    restorePciState() is not used for now (until we find why multiple
    cards aren't working).
2008-02-25 17:07:07 -03:00
David S. Miller
ae869fc766 [SBUS]: Fix build, use getpagesize() instead of xf86getpagesize().
xf86getpagesize() was removed, but this one call site was
not fixed up.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-12-27 07:34:09 +01:00
Adam Jackson
fe25f897c6 xf86getpagesize -> getpagesize elsewhere in os-support/ 2007-12-03 18:34:40 -05:00
Alan Coopersmith
a55ec1a9f4 Restore checks for __i386 where needed for Sun compilers on Solaris 2007-11-20 18:31:07 -08:00
Ben Byer
3d4eb17b38 mass change from #ifdef i386 to #ifdef __i386__ to conform to ANSI 2007-10-14 18:07:03 -07:00
Alan Coopersmith
62a9fb4cda Fix PCI rework build on Solaris (copy what BSD does) 2007-09-27 16:47:32 -07:00
Alan Coopersmith
1d938a80fd Remove unused pciAddrHostToBus functions from ix86Pci.c
Matches linuxPci.c changes made in 8279444a54
Fixes compiler errors:
 "ix86Pci.c", line 194: too many struct/union initializers
 "ix86Pci.c", line 204: too many struct/union initializers
 "ix86Pci.c", line 214: too many struct/union initializers
2007-09-26 19:42:46 -07:00
Eric Anholt
adf46b57ce Replace BSD custom PCI code with a stub implementation thanks to pciaccess.
Note that pciaccess doesn't yet have Net/OpenBSD support, but the relevant
code should go there instead of disconnected code in the X Server.

While here, remove the now-disabled INCLUDE_XF86_NO_DOMAIN from the headers,
and un-disable xf8StdAccResFromOS for those OSes without domain support which
will need it.
2007-08-28 10:13:27 -07:00
Eric Anholt
3fe67d23ed Remove the BusAccWindows resource code which is now unused.
This was a bunch of poorly defined resource ranges per OS/platform combination
which were supposed to represent what regions could potentially have resources
allocated into them.
2007-08-27 19:02:41 -07:00
Ian Romanick
8b6b40b727 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts:

	hw/xfree86/common/xf86.h
	hw/xfree86/common/xf86Init.c
	hw/xfree86/common/xf86pciBus.c
	hw/xfree86/int10/generic.c
	hw/xfree86/int10/helper_exec.c
	hw/xfree86/loader/xf86sym.c
	hw/xfree86/os-support/bus/Pci.c
	hw/xfree86/os-support/bus/Pci.h
	hw/xfree86/os-support/bus/linuxPci.c
	hw/xfree86/os-support/linux/int10/linux.c
2007-08-23 18:19:17 -07:00
Jeremy C. Reed
1d4bea6106 Add some more support for DragonFly. From Joerg Sonnenberger
and pkgsrc.
2007-08-16 11:20:12 -05:00
Jonathan Lim
16e429bcbf Bug 5000: Fix domain support for SGI Altix 2007-07-04 20:08:49 +02:00
Adam Jackson
8a06ff9ffa Fix another usage of MAX_PCI_DEVICES.
Fixes cases where the VGA device is above the 128th device on the system.
2007-06-28 16:41:28 -04:00
Ian Romanick
ab7a6d860d Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts:

	hw/xfree86/os-support/bus/Pci.c
	hw/xfree86/os-support/bus/linuxPci.c
2007-06-18 16:51:13 -07:00
David Nusinow
6bf8d50193 Read ROM in chunks
This patch speeds up reads of the ROM by reading in large chunks rather
than one byte at a time. This patch was by Dann Frazier.
2007-05-28 21:42:10 -04:00
Matthias Hopf
ebaa6c920c Disable Simba PCI bridge routing code (Bug #8020).
The code in hw/xfree86/os-support/bus/sparcPci.c:simbaCheckBus()
is trying to mimmick VGA routing by disabling I/O space responses
behind the Simba PCI-PCI controller.

Unfortunately, doing this also happens to disable access to the
IDE controller I/O space registers, thus crashing the system.  The
granularity of the I/O disabling in the Simba controller is not
fine enough to disable VGA without also disabling the IDE controller
registers.
2007-05-10 15:25:31 +02:00
Adam Jackson
d322608dc9 Fix a buffer overrun on machines with excessively large PCI busses.
Formerly we sized an array with a compile time constant, then initialized
its size to the same constant, but the Linux PCI init code would increase
that "constant".  So if you happened to have more than 128 PCI devices,
you'd happily scribble into whatever variables happened to be in .bss
after that array.

Only really fixed for Linux atm.  Other OSes will simply (still) fail to
work on video devices above the 128th PCI device.
2007-04-25 16:29:48 -04:00
Adam Jackson
67e1c98895 Look for the PCI ROM file elsewhere in sysfs.
/sys/devices reflects the bus topology, and we don't care that much.
Easier (and more reliable) to just look in /sys/bus/pci/devices, which
is a flat view.
2007-04-09 19:08:52 -04:00
Ian Romanick
2c6d471088 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts:

	hw/xfree86/Makefile.am
	hw/xfree86/dri/dri.c
2007-03-28 08:08:04 -07:00
Jay Estabrook
a16360733e Fix root bus/domain selection on alpha 2007-02-25 21:00:25 +00:00
Ian Romanick
e540d572c5 Merge fix missed on previous commit. 2007-02-14 15:38:10 -08:00
Ian Romanick
3814862a86 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts:

	hw/xfree86/os-support/bus/linuxPci.c
2007-01-29 15:14:31 -08:00
Jonathan Lim
1627af5449 Call linuxPciOpenFile() for r/w access if applicable.
Currently, the call to linuxPciOpenFile() is always made for read
only access which causes the subsequent mmap call to fail when the
memory is mapped read/write.

Xorg #9692
2007-01-26 13:00:45 +01:00
Ian Romanick
24506ea65b Move xf86ReadLegacyBIOS to the one place that uses it.
xf86ReadLegacyBIOS is only used by one function in int10/generic.c.
Move a generic implementation of that function there, rename it to
read_legcay_BIOS, and delete all remnants of it from all other places.
2007-01-24 15:33:49 -08:00
Ian Romanick
637b19b3ee Eliminate pciControlBridge, pciGetBridgeBuses, and pciGetBridgeResources. 2007-01-22 09:58:33 -08:00
Ian Romanick
a232e4ae93 Convert xf86GetPciHostConfigFromTag to get_parent_bridge.
Convert xf86GetPciHostConfigFromTag to a new function called
get_parent_bridge.  This name better represents what
xf86GetPciHostConfigFromTag is used for:  walking up the lists of PCI
bridges from a device.
2007-01-22 09:16:45 -08:00
Ian Romanick
844560a02f Elminiate ARCH_PCI_OS_INIT.
Never, ever use the ix86Pci stuff on Linux.  This renders the whole
ARCH_PCI_OS_INIT mechanism useless.  Remove it.
2007-01-22 09:13:59 -08:00
Ian Romanick
780b55ec6f Fix accidental commit (bug) in linuxOpenLegacy. 2007-01-15 15:30:16 -08:00
Ian Romanick
31bd8d1507 Fix domain insanity.
Eliminate xf86GetPciDomain.  The domain from libpciaccess is the
domain.  Period.  This means that 0 is a valid domain.  Make sure that
INCLUDE_XF86_NO_DOMAIN is *not* set.  Always run in "domain mode,"
even if the only domain possible is 0.
2007-01-15 15:19:30 -08:00
Ian Romanick
1c326bf75f Eliminate unused INCLUDE_XF86_MAP_PCI_MEM define. 2007-01-12 12:07:19 -08:00
Ian Romanick
1a493509e3 Fix typos in conditionally compiled code. 2007-01-12 10:58:59 -08:00
Ian Romanick
8279444a54 Eliminate unused pciAddrHostToBus infrastructure. 2007-01-12 10:41:03 -08:00
Ian Romanick
e32fa10a04 Remove prototype for pciGetBaseSize. 2007-01-12 10:33:17 -08:00
Ian Romanick
7411f5c389 Eliminate pciHostAddrToBusAddr from interface.
pciHostAddrToBusAddr is no longer used anywhere in the tree.  Remove
it with extreme prejudice.
2007-01-12 10:32:04 -08:00
Ian Romanick
c3016a2996 Missed file from previous commit.
Convert xf86ReadLegacyVideoBIOS to take a 'struct pci_device *'
parameter instead of a PCITAG.
2007-01-12 09:56:00 -08:00
Ian Romanick
ca9c41e09d Convert int10 and vgaHW to use 'struct pci_device' instead of PCITAG.
Convert all uses of PCITAG in int10 and vgaHW to 'struct pci_device'.
This allows the conversion of xf86ReadLegacyVideoBIOS and
xf86MapDomainMemory to 'struct pci_device' from PCITAG.
2007-01-11 21:09:20 -08:00
Ian Romanick
e1f73d2208 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts:

	hw/xfree86/common/xf86Configure.c
	hw/xfree86/common/xf86Helper.c
	hw/xfree86/common/xf86pciBus.c
	hw/xfree86/int10/helper_exec.c
	hw/xfree86/os-support/bus/Pci.c
	hw/xfree86/os-support/bus/linuxPci.c
	hw/xfree86/os-support/linux/lnx_pci.c
	hw/xfree86/scanpci/Makefile.am
	hw/xfree86/utils/pcitweak/Makefile.am
	hw/xfree86/utils/scanpci/Makefile.am
2006-12-08 17:24:15 -08:00
Eric Anholt
b4b0d901d9 Merge branch 'randr-1.2'
Conflicts:

	dix/events.c
	dix/getevents.c
	hw/xfree86/common/xf86Mode.c
	hw/xfree86/dri/Makefile.am
	hw/xfree86/os-support/drm/xf86drm.c
	hw/xfree86/os-support/xf86drm.h
2006-11-27 15:43:15 -08:00
Bjorn Helgaas
ae3c9ad4ab Bug 9041: Check the return code in xf86MapDomainMemory(). 2006-11-16 17:29:06 +01:00
Keith Packard
20e9144c07 Add $(DIX_CFLAGS) to remaining Makefile.am files 2006-11-07 12:49:28 -08:00
Bjorn Helgaas
bd0c829654 Do not map full 0-1MB legacy range
If we're mapping something in the "legacy range" (0-1Mb), we shouldn't
expand the requested range to the entire 0-1Mb range.  Typically this
is for mapping the VGA frame buffer, and some platforms support mmap of
the frame buffer but not the entire 0-1Mb range.

For example, HP sx1000 and sx2000 ia64 platforms can have memory from
0-0x9ffff, VGA frame buffer from 0xa0000-0xbffff, and memory from
0xc0000-0xfffff.  On these platforms, we can't map the entire 0-1Mb
range with the same attribute because the memory only supports WB,
while the frame buffer supports only UC.  But an mmap of just the
frame buffer should work fine.
2006-11-03 18:59:52 +01:00
Egbert Eich
c1828a8ff5 Fixing mach64 driver bailing out on ia64
Mach64 driver bails out on ia64 because it cannot map device
memory. It turns out that some bogus and unneeded code attempts
to find the root bridge of the device and fails to do so proberly
as there this host-to-pci bridge is not existant. This code has
been around for years although it completely unclear what it had
been intended for. Fixing this by eliminating the bogus code.
2006-11-03 18:59:52 +01:00
Matthias Hopf
d50fc413b3 Fix device path in altixPCI.c to be domain aware. 2006-11-03 18:59:52 +01:00
Matthias Hopf
1d731fc54a Add domain support to linuxPciOpenFile().
Loosely based on patch from David S. Miller <davem@davemloft.net>
See also bug #2368.
2006-11-03 18:59:51 +01:00
Matthias Hopf
caaa113acf Fixing domain support for ia64
ia64 specific functions + defines.
Still uses /proc interface for some scaning code.
Based on code from Egbert Eich <eich@freedesktop.org>.
2006-11-03 18:59:51 +01:00