summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86pciBus.c
AgeCommit message (Collapse)AuthorFilesLines
2011-11-23Fix gcc -Wwrite-strings warnings in xf86 ddxAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Remove xf86FormatPciBusNumber from API, inline the one place its usedAlan Coopersmith1-11/+6
Found no calls from current driver modules Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23matchDriverFromFiles: use one snprintf instead of strncpy/cat seriesAlan Coopersmith1-3/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23Convert strncpy/strncat to strlcpy/strlcatAlan Coopersmith1-4/+2
As long as we're carrying around a compatibility copy in os/strl*.c, might as well use them. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-18xfree86: Deprecate the use of xf86PciInfo.hJeremy Huddleston1-0/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Tormod Volden <debian.tormod@gmail.com>
2011-10-29xfree86: add nouveau as the first automatic driver for NVIDIA hardwareAnssi Hannula1-1/+9
Add nouveau as the first driver on linux for NVIDIA hardware when driver autoconfiguration is done, as it is more capable than nv. nv is also kept in the list as it is more widely supported and because some old cards are not supported by nouveau. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-15configure: change PCI function checking by a meaningful version of the libraryTiago Vignatti1-2/+0
People that don't want VGA arbiter active can go to the library and enable the stubs there. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-15pci: Port xf86MapLegacyIO to pciaccessAdam Jackson1-5/+12
Per-domain I/O is now something drivers must manually request, and must keep track of within their own state rather than in the ScrnInfoRec. It's not really possible to split that into two steps without an additional intermediate ABI break, so don't even try. Drivers that want source compatibility should ifdef on the presence of xf86UnmapLegacyIO. As a fringe benefit, domain-aware I/O is now OS-independent, relying only on support in pciaccess. Simplify OS PCI setup to reflect this. The IOADDRESS type is kept around to help drivers through the API transition and will be removed at some point in the future. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-12-07Convert alloc+sprintf pairs into asprintf() & XNFasprintf() callsAlan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-11-30Move xchomp inside #ifdef __linux__Alan Coopersmith1-1/+1
static function only called from the matchDriverFromFiles function that's inside #ifdef __linux__ section Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-09-14xfree86: delete useless "Primary device is not PCI" messageTiago Vignatti1-7/+2
The primary device being PCI or not has no effect on the server working. This message is superfluous. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-14xfree86: configure: move buses references to their own locationTiago Vignatti1-0/+35
This patch makes xf86Configure.c free of PCI and SBUS code, moving to a more meaningful location. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2010-09-14xfree86: use xf86PciIsolateDevice to get PCI config informationTiago Vignatti1-0/+5
Make xf86IsolateDevice private on PCI common file. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-07-01xfree86: pci: remove superfluous vendor and card name loggingTiago Vignatti1-12/+1
X server suffers in startup time when relying on the pciaccess's linear search to fetch vendor and video device name from PCI ID file (when existent). Such names are only used to write the log, which may be superfluous. This information often is provided by the drivers or likewise users can get the it using external tools like lspci or scanpci. This patch remove the references of those functions from X start up. Reported-by: Richard Barnette <jrbarnette@chromium.org> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Richard Barnette <jrbarnette@chromium.org> Reviewed-by: James Cloos <cloos@jhcloos.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov1-1/+1
This patch was generated by the following Perl code: perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-02xfree86: Unbreak autoconfig following 0abf065e38c4Chris Wilson1-1/+7
The move of the PCI device id probing into a separate file neglected to return the number of found devices, and so the PCI devices were being overwritten by the default entries for vesa and fbdev. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tiago Vignatti <tiago.vignatti@nokia.com> Cc: Alex Deucher <alexdeucher@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-24xfree86: move all pci code from auto configurator into a meaningful locationTiago Vignatti1-0/+252
This patch creates the private xf86PciMatchDriver hook, which goes inside pci code to match the drivers found in the system. Now there's no direct references to PCI inside xf86AutoConfig.c anymore. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-05-24xfree86: remove all kind of bus and PCI dependency from the common helper fileTiago Vignatti1-0/+494
Move all PCI procedures from xf86Helper.c to a more meaningful place (namely xf86pciBus.c). xf86Helper.c is free of PCI code now. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-05-19xfree86: remove PCI dependency from InitOutputTiago Vignatti1-0/+160
All functions that touch PCI and BUS were moved to their own files, organizing the mess inside the InitOutput. Now, inside InitOutput, mostly accesses to buses are coordinated by the new xf86BusConfig. Two PCI probe functions just changed the name and a procedure to receive the isolate devices parameters was created also, named xf86PciIsolateDevice. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov1-9/+9
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-20Free libpciaccess iterator in xf86PciProbeKeith Packard1-1/+2
Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-05xfree86: reorganize pci codeTiago Vignatti1-19/+1
- xf86PciVideoInfo doesn't need to be global - remove unused macros Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-08-05xfree86: remove unused functionsTiago Vignatti1-86/+0
RAC trash. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-07-28xserver: remove RAC/resource handling code.Dave Airlie1-424/+1
This changes the ABI, but since the video ABI is at 6 already it should be fine. driver changes are in the pipeline after this. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-07-28pci: add support for pci is boot vga call.Dave Airlie1-0/+6
This allows us to ask the kernel for the boot VGA device instead of nasty guessing.
2009-07-06Unclaim PCI slot if driver probing fails.Matthias Hopf1-0/+19
Otherwise no subsequent driver will be able to claim this pci slot. Example for this: fbdev tries to claim, but framebuffer device is not available. Later on VESA cannot claim the device.
2009-06-19pci: Dump vendor/devices ids in the printed device listAdam Jackson1-6/+4
2009-02-16PCI: Remove pciBusAddrToHostAddr and associated nonsenseAdam Jackson1-31/+0
This was all a glorified no-op. We rely on pciaccess to create device maps anyway, so we should have no reason to care about what the host address is. Acked-by: Ian Romanick <ian.d.romanick at intel.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade1-9/+9
Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it).
2008-11-30Correct static symbol XkmReadTOC and first pass on compile warning fixes.Paulo Cesar Pereira de Andrade1-3/+3
The warnings corrected were only the ones that should correct real problems. The most common one is 64 bit integers as "printf %l" arguments. Note that there is a patch related to this at: http://bugs.freedesktop.org/show_bug.cgi?id=18204
2008-11-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade1-1/+1
This is the biggest "visibility" patch. Instead of doing a "export" symbol on demand, export everything in the sdk, so that if some module fails due to an unresolved symbol, it is because it is using a symbol not in the sdk. Most exported symbols shouldn't really be made visible, neither advertised in the sdk, as they are only used by a single shared object. Symbols in the sdk (or referenced in sdk macros), but not defined anywhere include: XkbBuildCoreState() XkbInitialMap XkbXIUnsupported XkbCheckActionVMods() XkbSendCompatNotify() XkbDDXFakePointerButton() XkbDDXApplyConfig() _XkbStrCaseCmp() _XkbErrMessages[] _XkbErrCode _XkbErrLocation _XkbErrData XkbAccessXDetailText() XkbNKNDetailMaskText() XkbLookupGroupAndLevel() XkbInitAtoms() XkbGetOrderedDrawables() XkbFreeOrderedDrawables() XkbConvertXkbComponents() XkbWriteXKBSemantics() XkbWriteXKBLayout() XkbWriteXKBKeymap() XkbWriteXKBFile() XkbWriteCFile() XkbWriteXKMFile() XkbWriteToServer() XkbMergeFile() XkmFindTOCEntry() XkmReadFileSection() XkmReadFileSectionName() InitExtInput() xf86CheckButton() xf86SwitchCoreDevice() RamDacSetGamma() RamDacRestoreDACValues() xf86Bpp xf86ConfigPix24 xf86MouseCflags[] xf86SupportedMouseTypes[] xf86NumMouseTypes xf86ChangeBusIndex() xf86EntityEnter() xf86EntityLeave() xf86WrapperInit() xf86RingBell() xf86findOptionBoolean() xf86debugListOptions() LoadSubModuleLocal() LoaderSymbolLocal() getInt10Rec() xf86CurrentScreen xf86ReallocatePciResources() xf86NewSerialNumber() xf86RandRSetInitialMode() fbCompositeSolidMask_nx1xn fbCompositeSolidMask_nx8888x0565C fbCompositeSolidMask_nx8888x8888C fbCompositeSolidMask_nx8x0565 fbCompositeSolidMask_nx8x0888 fbCompositeSolidMask_nx8x8888 fbCompositeSrc_0565x0565 fbCompositeSrc_8888x0565 fbCompositeSrc_8888x0888 fbCompositeSrc_8888x8888 fbCompositeSrcAdd_1000x1000 fbCompositeSrcAdd_8000x8000 fbCompositeSrcAdd_8888x8888 fbGeneration fbIn fbOver fbOver24 fbOverlayGeneration fbRasterizeEdges fbRestoreAreas fbSaveAreas composeFunctions VBEBuildVbeModeList() VBECalcVbeModeIndex() TIramdac3030CalculateMNPForClock() shadowBufPtr shadowFindBuf() miRRGetScreenInfo() RRSetScreenConfig() RRModePruneUnused() PixmanImageFromPicture() extern int miPointerGetMotionEvents() miClipPicture() miRasterizeTriangle() fbPush1toN() fbInitializeBackingStore() ddxBeforeReset() SetupSprite() InitSprite() DGADeliverEvent() SPECIAL CASES o defined as _X_INTERNAL xf86NewInputDevice() o defined as static fbGCPrivateKey fbOverlayScreenPrivateKey fbScreenPrivateKey fbWinPrivateKey o defined in libXfont.so, but declared in xorg/dixfont.h GetGlyphs() QueryGlyphExtents() QueryTextExtents() ParseGlyphCachingMode() InitGlyphCaching() SetGlyphCachingMode()
2008-11-24Bus: Remove ISA support.Adam Jackson1-5/+0
No, really. PCI is old enough to drive now. If you want this, get the kernel to expose a framebuffer device.
2008-02-25Clean some garbage caused when pciaccess was merged:Tiago Vignatti1-124/+117
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).
2007-06-18Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into ↵Ian Romanick1-1/+0
pci-rework Conflicts: hw/xfree86/os-support/bus/Pci.c hw/xfree86/os-support/bus/linuxPci.c
2007-01-22Eliminate pciControlBridge, pciGetBridgeBuses, and pciGetBridgeResources.Ian Romanick1-70/+1
2007-01-17Replace PciBusId with 'struct pci_device *'Ian Romanick1-24/+7
There's no need to store the slot information for a PCI device as its ID. Instead, skip the middle man and just store a pointer to the pci_device structure.
2007-01-17Convert xf86IsolateDevice to a 'struct pci_slot_match'.Ian Romanick1-25/+8
2007-01-17Eliminate unused fields in pciAccRec.Ian Romanick1-3/+0
2007-01-15Fix domain insanity.Ian Romanick1-1/+1
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-15Convert to new pci_device_cfg_write_u* interface.Ian Romanick1-15/+15
2007-01-12Refactor pciTagConvertRange2Host and pciConvertRange2Host.Ian Romanick1-14/+10
2007-01-12Eliminate some dead code.Ian Romanick1-15/+0
2007-01-12Eliminate xf86GetPciEntity from public interface.Ian Romanick1-21/+14
xf86GetPciEntity was folded into the only place (xf86CheckPciSlot) in the tree that still called it.
2006-11-03Fix 2 warnings.Matthias Hopf1-3/+3
2006-08-08Make xf86PciVideoInfo static since it is only used within this file.Ian Romanick1-50/+67
Dummy out all of the PCI bus and device access control functions. We need a better way to do this, and that will probably be in libpciaccess and / or the kernel. Refactor xf86GetPciInfoForEntity to use pci_device_find_by_slot. Refector xf86CheckPciSlot to use xf86GetPciEntity. Eliminate disablePciBios and the one place that calls it.
2006-08-02Move xf86FindPciDeviceVendor and xf86FindPciClass from xf86pciBus.c toIan Romanick1-66/+0
xf86int10.c. Refactor common code from those functions to do_find.
2006-08-02Modify xf86FindPciDeviceVendor and xf86FindPciClass to use theIan Romanick1-18/+38
pci_interator interface instead of the xf86PciVideoInfo array.
2006-08-02Remove pciConfigPtr and all of the associated cruft.Ian Romanick1-4/+1
2006-07-26Pass correct pointer to xf86MapLegacyIO.Ian Romanick1-1/+1
2006-07-25Gut anything having to do with the PciBusPtr (or PciBusRec) type.Ian Romanick1-675/+27
Bump required version of libpciaccess to 0.5.0 so that pci_device_get_bridge_buses can be used.