platform/upstream/libpciaccess.git
16 years agoFixed typo in output ("performace" --> "performance").
Stefan Dirsch [Mon, 23 Jun 2008 08:50:30 +0000 (10:50 +0200)]
Fixed typo in output ("performace" --> "performance").

16 years agolibpciaccess 0.10.3 libpciaccess-0.10.3
Adam Jackson [Tue, 10 Jun 2008 19:24:56 +0000 (15:24 -0400)]
libpciaccess 0.10.3

16 years agolibpciaccess 0.10.2 libpciaccess-0.10.2
Adam Jackson [Tue, 10 Jun 2008 19:23:06 +0000 (15:23 -0400)]
libpciaccess 0.10.2

16 years agoCatch and recover from yet another linux kernel bug in mprotect.
Eric Anholt [Thu, 5 Jun 2008 18:39:06 +0000 (11:39 -0700)]
Catch and recover from yet another linux kernel bug in mprotect.

16 years agoLinux: Fail gracefully on machines without PCI.
Adam Jackson [Wed, 21 May 2008 17:44:38 +0000 (13:44 -0400)]
Linux: Fail gracefully on machines without PCI.

16 years agopciaccess: bump to 0.10.1
Dave Airlie [Wed, 21 May 2008 06:10:37 +0000 (16:10 +1000)]
pciaccess: bump to 0.10.1

16 years agolinux: add pci_device_enable entrypoint and sysfs support for it
Dave Airlie [Wed, 21 May 2008 06:10:24 +0000 (16:10 +1000)]
linux: add pci_device_enable entrypoint and sysfs support for it

16 years agoFix lint warnings in solx_devfs.c
Alan Coopersmith [Fri, 9 May 2008 22:15:42 +0000 (15:15 -0700)]
Fix lint warnings in solx_devfs.c

16 years agoAdd pci_system_solx_devfs_create prototype to pciaccess_private.h
Alan Coopersmith [Fri, 9 May 2008 22:05:46 +0000 (15:05 -0700)]
Add pci_system_solx_devfs_create prototype to pciaccess_private.h

16 years agoInitialize err to 0 in pci_device_solx_devfs_map_range
Alan Coopersmith [Fri, 9 May 2008 21:49:32 +0000 (14:49 -0700)]
Initialize err to 0 in pci_device_solx_devfs_map_range

Prevents returning errors when mapping actually succeeds

16 years agoKludge around linux bug and turn off write-through and cache-disable bits
Keith Packard [Wed, 16 Apr 2008 19:10:52 +0000 (12:10 -0700)]
Kludge around linux bug and turn off write-through and cache-disable bits

When mmaping the PCI device, the kernel turns on the write-through and
cache-disable bits in the allocated PTEs. This disables write-combining mode
and dramatically reduces write bandwidth to the frame buffer. While that
should be fixed in the kernel, we'll kludge around it here by using mprotect
to rewrite the PTEs and get those bits turned off.

16 years agoAdd DragonFly BSD support
Hasso Tepper [Mon, 7 Apr 2008 12:28:44 +0000 (15:28 +0300)]
Add DragonFly BSD support

DragonFly behaves exactly like FreeBSD, so no problem here.

16 years agoFix function prototypes for C++
Danny van Dyk [Sat, 29 Mar 2008 00:01:29 +0000 (17:01 -0700)]
Fix function prototypes for C++

16 years agoBug #13988: Fix reads from "0"-sized ROMs.
Stuart Bennett [Fri, 14 Mar 2008 15:58:33 +0000 (11:58 -0400)]
Bug #13988: Fix reads from "0"-sized ROMs.

16 years agoOpenBSD support for libpciaccess.
Mark Kettenis [Wed, 12 Mar 2008 20:29:58 +0000 (21:29 +0100)]
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.

16 years agosolaris: add pci_tools.h to OS_SUPPORT
Julien Cristau [Fri, 7 Mar 2008 13:41:47 +0000 (14:41 +0100)]
solaris: add pci_tools.h to OS_SUPPORT

pci_tools.h was missing from the tarball, but is needed by solx_devfs.c

16 years agolibpciaccess 0.10 libpciaccess-0.10
Adam Jackson [Thu, 6 Mar 2008 20:31:51 +0000 (15:31 -0500)]
libpciaccess 0.10

16 years agoBug #14818: Actually return the PCI vendor name, instead of NULL.
Doug Chapman [Thu, 6 Mar 2008 19:22:17 +0000 (14:22 -0500)]
Bug #14818: Actually return the PCI vendor name, instead of NULL.

16 years agoDon't export private symbols.
Julien Cristau [Tue, 19 Feb 2008 13:45:40 +0000 (14:45 +0100)]
Don't export private symbols.

16 years agoUse <byteswap.h> when using glibc, not just on linux
Julien Cristau [Tue, 19 Feb 2008 13:26:54 +0000 (14:26 +0100)]
Use <byteswap.h> when using glibc, not just on linux

This fixes the build on GNU/kFreeBSD.

16 years agoReplace static ChangeLog with dist-hook to generate from git log
James Cloos [Thu, 6 Dec 2007 21:38:51 +0000 (16:38 -0500)]
Replace static ChangeLog with dist-hook to generate from git log

17 years agoBit-fields have to have type _Bool, signed int, or unsigned int.
Matthias Hopf [Tue, 23 Oct 2007 13:19:36 +0000 (15:19 +0200)]
Bit-fields have to have type _Bool, signed int, or unsigned int.

ISO/IEC 9899:1999 (E), 6.7.2.1 Structure and union specifiers, (4).
_Bool is only supported for C99 and up, and 1-bit signed types don't make
sense -> unsigned int.

17 years agoUpdate bug reporting link.
Ian Romanick [Thu, 18 Oct 2007 22:59:14 +0000 (15:59 -0700)]
Update bug reporting link.

17 years agoFreeBSD: for 64-bit BARs, skip the resource slot used for the upper 32 bits.
Eric Anholt [Wed, 10 Oct 2007 22:20:51 +0000 (15:20 -0700)]
FreeBSD: for 64-bit BARs, skip the resource slot used for the upper 32 bits.

This gets us the same resource numbering as on Linux.

17 years agoFreeBSD: Don't try to unset an MTRR if we didn't set it.
Eric Anholt [Wed, 10 Oct 2007 21:55:45 +0000 (14:55 -0700)]
FreeBSD: Don't try to unset an MTRR if we didn't set it.

17 years agoAdd domain output to scanpci.
Eric Anholt [Wed, 10 Oct 2007 21:32:38 +0000 (14:32 -0700)]
Add domain output to scanpci.

17 years agoFreeBSD: Add support for multiple PCI domains.
Eric Anholt [Wed, 10 Oct 2007 21:32:09 +0000 (14:32 -0700)]
FreeBSD: Add support for multiple PCI domains.

17 years agoFreeBSD: Fix unmap_range to return an error value.
Eric Anholt [Tue, 9 Oct 2007 19:13:49 +0000 (12:13 -0700)]
FreeBSD: Fix unmap_range to return an error value.

17 years agoFreeBSD: don't set the MTRR if it's the default mode (uncacheable).
Eric Anholt [Tue, 9 Oct 2007 19:12:34 +0000 (12:12 -0700)]
FreeBSD: don't set the MTRR if it's the default mode (uncacheable).

17 years agoNeed to link with -ldevinfo on Solaris
Alan Coopersmith [Thu, 27 Sep 2007 22:22:51 +0000 (15:22 -0700)]
Need to link with -ldevinfo on Solaris

17 years agoFix Solaris build: missing static prototype & typo in variable name
Alan Coopersmith [Thu, 27 Sep 2007 00:26:47 +0000 (17:26 -0700)]
Fix Solaris build: missing static prototype & typo in variable name

17 years agoAdd FreeBSD MTRR setting support.
Eric Anholt [Tue, 11 Sep 2007 15:07:55 +0000 (15:07 +0000)]
Add FreeBSD MTRR setting support.

17 years agoAdd stub version of pci_device_map_memory_range
Ian Romanick [Tue, 4 Sep 2007 23:13:24 +0000 (16:13 -0700)]
Add stub version of pci_device_map_memory_range

This stub version of pci_device_map_memory_range allows the vesa driver and
other users of this interface to continue functioning with current
libpciaccess bits.  That said, users of this interface should convert over
to pci_device_map_range as soon as possible.

17 years agoMerge branch 'master' of ssh://git.freedesktop.org/git/xorg/lib/libpciaccess
James Cloos [Mon, 3 Sep 2007 10:15:58 +0000 (06:15 -0400)]
Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/lib/libpciaccess

17 years agoAdd *~ to .gitignore to skip patch/emacs droppings
James Cloos [Mon, 3 Sep 2007 09:53:57 +0000 (05:53 -0400)]
Add *~ to .gitignore to skip patch/emacs droppings

17 years agoDon't add MTRR for uncached regions. Remove MTRR on unmap.
Keith Packard [Fri, 31 Aug 2007 20:43:18 +0000 (13:43 -0700)]
Don't add MTRR for uncached regions. Remove MTRR on unmap.

MTRR regions aren't needed for uncached mappings, so don't add them. Also,
when unmapping memory, remove the MTRR entry.

17 years agoUpdate / add comments in struct pci_mem_region.
Ian Romanick [Fri, 31 Aug 2007 19:40:03 +0000 (12:40 -0700)]
Update / add comments in struct pci_mem_region.

17 years agoNew interfaces to map memory with MTRR (or similar) support.
Ian Romanick [Fri, 31 Aug 2007 00:52:02 +0000 (17:52 -0700)]
New interfaces to map memory with MTRR (or similar) support.

Added new functions pci_device_map_range and pci_device_unmap_range to
handle mapping of PCI device BARs.  These new interfaces allow the
possiblity of MTRRs on platforms that support them.

These additional APIs necessitated changing some internal interfaces.  The
code for FreeBSD and Solaris has been updated but has not been compiled or
tested.

Old interfaces are marked deprecated and will eventually be removed.

17 years agoMake the base address printout of scanpci more usable.
Eric Anholt [Tue, 28 Aug 2007 23:02:46 +0000 (16:02 -0700)]
Make the base address printout of scanpci more usable.

17 years agoBump version to 0.9.1 (sigh). libpciaccess-0.9.1 xf86-video-xgi-0.9.1
Ian Romanick [Mon, 27 Aug 2007 23:41:52 +0000 (16:41 -0700)]
Bump version to 0.9.1 (sigh).

17 years agoAdd linux_devmem.h to file list.
Ian Romanick [Mon, 27 Aug 2007 23:41:21 +0000 (16:41 -0700)]
Add linux_devmem.h to file list.

17 years agoBump version to 0.9.0.
Ian Romanick [Mon, 27 Aug 2007 23:39:00 +0000 (16:39 -0700)]
Bump version to 0.9.0.

17 years agoRemove deprecated .cvsignore files
James Cloos [Fri, 24 Aug 2007 01:31:50 +0000 (21:31 -0400)]
Remove deprecated .cvsignore files

17 years agoFreeBSD: Add VGA rom reading through /dev/mem.
Eric Anholt [Fri, 3 Aug 2007 23:47:09 +0000 (16:47 -0700)]
FreeBSD: Add VGA rom reading through /dev/mem.

17 years agoFreeBSD: Fill in the subdevice ID.
Eric Anholt [Fri, 3 Aug 2007 17:46:55 +0000 (10:46 -0700)]
FreeBSD: Fill in the subdevice ID.

17 years agoMake scanpci exit cleanly if pci_system_init() fails.
Eric Anholt [Fri, 3 Aug 2007 17:40:53 +0000 (10:40 -0700)]
Make scanpci exit cleanly if pci_system_init() fails.

17 years agoInitial support for reading expansion ROM via VGA BIOS address.
Ian Romanick [Mon, 18 Jun 2007 19:56:40 +0000 (12:56 -0700)]
Initial support for reading expansion ROM via VGA BIOS address.

17 years agoLibpciaccess on Solaris Initial integration
edward shu [Wed, 6 Jun 2007 15:05:56 +0000 (23:05 +0800)]
Libpciaccess on Solaris Initial integration

Libpciaccess on Solaris Initial integration. It depends on devfs to access
pci configuration space, also xsvc is used for memory map.

17 years agoWhitespace police.
Ian Romanick [Tue, 27 Mar 2007 15:01:39 +0000 (08:01 -0700)]
Whitespace police.

17 years agoDon't pci_device_probe until absolutely necessary.
Ian Romanick [Tue, 27 Mar 2007 14:57:35 +0000 (07:57 -0700)]
Don't pci_device_probe until absolutely necessary.

17 years agoMake sure header_type is available in read_bridge_info.
Ian Romanick [Tue, 27 Mar 2007 14:57:00 +0000 (07:57 -0700)]
Make sure header_type is available in read_bridge_info.

17 years agoPopulate device and vendor ID fields at device list creation.
Ian Romanick [Tue, 27 Mar 2007 14:56:16 +0000 (07:56 -0700)]
Populate device and vendor ID fields at device list creation.

17 years agoFreeBSD: Fix a couple of minor issues in cleanup paths.
Eric Anholt [Tue, 6 Mar 2007 18:48:51 +0000 (10:48 -0800)]
FreeBSD: Fix a couple of minor issues in cleanup paths.

17 years agoFreeBSD: Add system cleanup function.
Eric Anholt [Thu, 1 Mar 2007 18:49:13 +0000 (10:49 -0800)]
FreeBSD: Add system cleanup function.

17 years agoFreeBSD: When mapping regions, use the region's base address, not 0.
Eric Anholt [Thu, 1 Mar 2007 00:25:07 +0000 (16:25 -0800)]
FreeBSD: When mapping regions, use the region's base address, not 0.

17 years agoFix inverted protection typo for mmap in region mapping.
Eric Anholt [Thu, 1 Mar 2007 00:13:44 +0000 (16:13 -0800)]
Fix inverted protection typo for mmap in region mapping.

17 years agoscanpci prototype warning fix
Eric Anholt [Wed, 28 Feb 2007 23:42:24 +0000 (15:42 -0800)]
scanpci prototype warning fix

17 years agoUpdate freebsd code for pci_device_cfg_write API change.
Eric Anholt [Wed, 28 Feb 2007 23:39:38 +0000 (15:39 -0800)]
Update freebsd code for pci_device_cfg_write API change.

17 years agoscanpci: BIST line offsets were off by 4.
George Sapountzis [Wed, 15 Nov 2006 00:49:50 +0000 (02:49 +0200)]
scanpci: BIST line offsets were off by 4.

17 years agoFix bad parameter to pci_device_cfg_write in pci_device_cfg_write_u8.
Ian Romanick [Wed, 17 Jan 2007 05:24:12 +0000 (21:24 -0800)]
Fix bad parameter to pci_device_cfg_write in pci_device_cfg_write_u8.

When changing the interface of the pci_device_cfg_write_u* functions
in commit 37ce43c1804bad9c52b8316eaefd3a57b670ee29, I forgot to modify
pci_device_cfg_write_u8 to pass a pointer to data to
pci_device_cfg_write instead of just passing data.

17 years agoMerge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/lib/libpciaccess
Ian Romanick [Mon, 15 Jan 2007 19:18:29 +0000 (11:18 -0800)]
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/lib/libpciaccess

17 years agoConvert pci_device_write_u* funtions to take a value instead of a pointer.
Ian Romanick [Mon, 15 Jan 2007 19:18:19 +0000 (11:18 -0800)]
Convert pci_device_write_u* funtions to take a value instead of a pointer.

At anholt's request, the pci_device_write_u* functions have been
converted to take the value to be written as a parameter instead of a
pointer to the value.

Bump the version to 0.8.0.

17 years agoAdd support for getting region information on FreeBSD.
Eric Anholt [Sat, 13 Jan 2007 00:32:51 +0000 (16:32 -0800)]
Add support for getting region information on FreeBSD.

This could stand a lot more testing -- all it has received is visual inspection
of scanpci output on one machine, with some differing results from XFree86
scanpci output.

17 years agoOpen the pci device read-write so we can read and write config regs.
Eric Anholt [Fri, 12 Jan 2007 22:15:29 +0000 (14:15 -0800)]
Open the pci device read-write so we can read and write config regs.

With this, we can hook up the IRQ line information.  It would probably be nice
to have an unpriveleged mode, but for now, write access is required.

17 years agoRemove extra fallback definition of PCIIDS_PATH.
Eric Anholt [Fri, 12 Jan 2007 21:33:51 +0000 (13:33 -0800)]
Remove extra fallback definition of PCIIDS_PATH.

PCIIDS_PATH should always be provided by configure.ac and config.h.

17 years agoFix many warnings and bugs in the freebsd implementation.
Eric Anholt [Fri, 12 Jan 2007 21:13:27 +0000 (13:13 -0800)]
Fix many warnings and bugs in the freebsd implementation.

With this, scanpci gives partially-sane results.

17 years agoEnable more warnings when the compiler is GCC.
Eric Anholt [Fri, 12 Jan 2007 21:11:21 +0000 (13:11 -0800)]
Enable more warnings when the compiler is GCC.

17 years agoAdd pciaccess_private.h to _SOURCES so it gets included in the dist.
Eric Anholt [Fri, 12 Jan 2007 21:06:50 +0000 (13:06 -0800)]
Add pciaccess_private.h to _SOURCES so it gets included in the dist.

17 years agoAdd interfaces to map / unmap specific memory ranges, bump lib version to 0.7.0.
Ian Romanick [Fri, 12 Jan 2007 05:40:57 +0000 (21:40 -0800)]
Add interfaces to map / unmap specific memory ranges, bump lib version to 0.7.0.

Add pci_device_map_memory_range and pci_device_unmap_memory_range to
map and unmap specific memory ranges.  The unmap bit is still a bit
hinkey (unmaps the whole BAR).  Works so far for initial conversion of
VESA driver.  Will need to be revisited.

17 years agoFix bad cast that caused bit truncation.
Ian Romanick [Fri, 12 Jan 2007 05:39:15 +0000 (21:39 -0800)]
Fix bad cast that caused bit truncation.

18 years agoUpdate .gitignores.
Eric Anholt [Tue, 14 Nov 2006 22:38:48 +0000 (14:38 -0800)]
Update .gitignores.

18 years agoAdd missing newline at the end of the file.
Eric Anholt [Tue, 14 Nov 2006 22:37:53 +0000 (14:37 -0800)]
Add missing newline at the end of the file.

18 years agoMerge branch 'origin'
Eric Anholt [Tue, 14 Nov 2006 22:37:46 +0000 (14:37 -0800)]
Merge branch 'origin'

Conflicts:

src/Makefile.am

18 years agoAdd the beginnings of a FreeBSD port.
Eric Anholt [Sun, 30 Jul 2006 23:19:50 +0000 (16:19 -0700)]
Add the beginnings of a FreeBSD port.

18 years agoFix a segfault in populate_vendor that was triggered when the pci.ids file
Ian Romanick [Thu, 10 Aug 2006 16:46:07 +0000 (09:46 -0700)]
Fix a segfault in populate_vendor that was triggered when the pci.ids file
could not be opened.  Thanks to Aaron Plattner for reporting this.  Fix a
couple possible memory leaks in the same function.

18 years agoAdded some function preamble comments.
Ian Romanick [Sun, 30 Jul 2006 22:35:41 +0000 (15:35 -0700)]
Added some function preamble comments.

18 years agoAdd endian macros for BSD.
Eric Anholt [Sun, 30 Jul 2006 21:29:58 +0000 (14:29 -0700)]
Add endian macros for BSD.

18 years agoUse ENXIO instead of ENODATA for pci reads returning less than desired.
Eric Anholt [Sun, 30 Jul 2006 21:26:38 +0000 (14:26 -0700)]
Use ENXIO instead of ENODATA for pci reads returning less than desired.

18 years agoAdd pci_device_get_bridge_buses, bump API version to 0.5.0.
Ian Romanick [Tue, 25 Jul 2006 22:36:52 +0000 (15:36 -0700)]
Add pci_device_get_bridge_buses, bump API version to 0.5.0.

18 years agoFiles missed (for reasons I still don't understand) on the previous
Ian Romanick [Fri, 7 Jul 2006 00:18:14 +0000 (17:18 -0700)]
Files missed (for reasons I still don't understand) on the previous
commit.  REALLY add support for querying bridge information.  Bump to
version 0.5.0.

18 years agoAdd support for querying bridge information. Bump to version 0.5.0.
Ian Romanick [Fri, 7 Jul 2006 00:09:47 +0000 (17:09 -0700)]
Add support for querying bridge information.  Bump to version 0.5.0.

18 years agoFix byte ordering of the PCI class.
Ian Romanick [Fri, 7 Jul 2006 00:07:18 +0000 (17:07 -0700)]
Fix byte ordering of the PCI class.

18 years agoFix foolish endianess bug. Bump to version 0.4.1.
Ian Romanick [Mon, 22 May 2006 16:10:37 +0000 (16:10 +0000)]
Fix foolish endianess bug. Bump to version 0.4.1.

18 years agoBump to version 0.4.0.
Ian Romanick [Wed, 12 Apr 2006 22:56:50 +0000 (22:56 +0000)]
Bump to version 0.4.0.
Add multiple-inclusion protection.
Add new function to write masked bits to PCI config space. This mirrors
    functionality currently available in X.org that is slated to be
    removed.
Gut old regex based search mechanism with a new mechanism that is modeled
    after the Linux kernel. In addition to searching for devices by device
    / vendor ID, it is possible to search for devices by their domain / bus
    / slot / function.
Fix serious bus in the reading of ROMs and in the unmapping of regions. The
    main point is that the map routine depens on the pci_mem_region::memory
    pointer being non-NULL only when the region is mapped. Therefore, the
    unmap routine should set it to NULL after unmapping.
Update to use new search API.

18 years agoRemove src/pcils.c and src/Makefile.foo. Add src/scanpci.c. XORG-7_0_99_901
Ian Romanick [Mon, 27 Mar 2006 18:08:42 +0000 (18:08 +0000)]
Remove src/pcils.c and src/Makefile.foo. Add src/scanpci.c.
Bump version to 0.3.0.
Replace pci_get_name with pci_get_strings. This function matches the
    functionality provided by the Xorg scanpci module almost identically.

18 years agoRemove src/Makefile.foo from CVS since the generated Makefile can do
Ian Romanick [Fri, 24 Mar 2006 16:57:17 +0000 (16:57 +0000)]
Remove src/Makefile.foo from CVS since the generated Makefile can do
    everything now.

18 years agoAdd scanpci as a noinst target.
Kristian Høgsberg [Mon, 20 Mar 2006 20:13:34 +0000 (20:13 +0000)]
Add scanpci as a noinst target.
Drop from CVS.

18 years agoInitial import of libpciaccess.
Ian Romanick [Sat, 18 Mar 2006 00:12:48 +0000 (00:12 +0000)]
Initial import of libpciaccess.