summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/shared
AgeCommit message (Collapse)AuthorFilesLines
2012-11-05xfree86: os-support: fix old-style function definition warningsYaakov Selkowitz2-3/+3
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-07-10XFree86: os-support: Remove unused xf86MakeNewMappingDaniel Stone1-13/+0
No drivers used this, so it got unexported, and now it's so unused it got culled during the link. Take the poor function out behind the shed and put it out of its misery. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-06xfree86: use udev to provide device enumeration for kms devices (v10)Dave Airlie1-0/+23
On Linux in order for future hotplug work, we are required to interface to udev to detect device creation/removal. In order to try and get some earlier testing on this, this patch adds the ability to use udev for device enumeration on Linux. At startup the list of drm/kms devices is probed and this info is used to load drivers. A new driver probing method is introduced that passes the udev device info to the driver for probing. The probing integrates with the pci probing code and will fallback to the pci probe and old school probe functions in turn. The flags parameter to the probe function will be used later to provide hotplug and gpu screen flags for the driver to behave in a different way. This patch changes the driver ABI, all drivers should at least be set with a NULL udev probe function after this commit. v2: rename to platform bus, now with 100% less udev specific, this version passes config_odev_attribs around which are an array of id/string pairs, then the udev code can attach the set of attribs it understands, the OS specific code can attach its attrib, and then the core/drivers can lookup the required attribs. also add MATCH_PCI_DEVICES macro. This version is mainly to address concerns raised by ajax. v3: Address comments from Peter. fix whitespace that snuck in. rework to use a linked list with some core functions that xf86 wraps. v4: add free list, fix struct whitespace. ajax this address most of your issues? v5: drop probe ifdef, fix logic issue v6: some overhaul after more testing. Implement primaryBus for platform devices. document hotplug.h dev attribs - drop sysname attrib fix build with udev kms disabled make probing work like the PCI probe code, match against bus id if one exists, or primary device. RFC: add new bus id support "PLAT:syspath". we probably want to match on this a bit different, or use a different property maybe. I was mainly wanting this for use with specifying usb devices in xorg.conf directly, but PLAT:path could also work I suppose. v6.1: add missing noop platform function v7: fix two interactions with pci probing and slot claiming, prevents pci and platform trying to load two drivers for same slot. v8: test with zaphod mode on -ati driver, fixup resulting issue clean up common probe code into another function, change busid matching to allow dropping end of strings. v9: fix platform probing logic so it actually works. v9.1: fix pdev init to NULL properly. v10: address most of Keith's concerns. v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com> v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-04Merge branch 'sigio-vt-switch-issues' into for-keithPeter Hutterer1-19/+5
Conflicts: test/Makefile.am Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-07-03xfree86: drop ddx-specific SIGIO blockingPeter Hutterer1-4/+3
The hooks are left for this cycle, we can drop it next cycle once the drivers that need it (e.g. wacom) have been updated. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-07-03xfree86: use OsBlockSIGIO from the ddxPeter Hutterer1-15/+2
We can ignore the "wasset" argument now since the DIX will keep proper refcounting. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2012-06-21Add global variable inSignalContextChase Douglas1-0/+4
This will be used for checking for proper logging when in signal context. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-03-21Introduce a consistent coding styleKeith Packard13-902/+866
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-29Move check definition MAP_FAILED in xf86_OSlib.hAlexandr Shadchin1-4/+0
Also remove odd definition MAP_FAILED. Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-15xfree86: Remove unused bios_devmem.cAdam Jackson1-75/+0
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>
2011-10-15linux: Remove ia64 domain I/O support codeAdam Jackson1-188/+0
pciaccess handles this now. 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>
2011-10-15bus: remove some dead struct fieldsAdam Jackson1-6/+0
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>
2011-09-27xfree86: switch options from pointer to XF86OptionPtrPeter Hutterer1-2/+2
In all cases, the pointer was simply type-cast anyway. Let's get some compile-time type safety going, how about that. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Squashed in: xfree86: Move definition of xf86OptionPtr into separate header file The pile of spaghettis that is the xfree86 include dependencies make it rather hard to have a single typedef somewhere that's not interfering with everything else or drags in a whole bunch of other includes. Move the xf86OptionRec and GenericListRec declarations into a separate header. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-27xfree86: Only log the serial bytes if debug is on.Peter Hutterer1-1/+1
Introduced in e3f296d91dfe6b827195e1d387e1a04aa73b85c3, when the ifdef DEBUG around the whole block was removed, but only two of the three ErrorF switched to DebugF. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-30xfree86: Remove dead ifdefs from VT switchingAdam Jackson1-15/+0
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18xfree86: Drop linux libc5 support from the SIGIO codeAdam Jackson1-9/+0
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-06-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov5-44/+44
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-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov2-8/+8
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>
2010-04-21xfree86: fix not reached code in tty codeTiago Vignatti1-5/+0
CLEARRTS_SUPPORT cannot be triggered at all. Notice that mouse driver manual page states the support for it though. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-03-24xfree86: remove if 1 from the dawn of time.Peter Hutterer1-10/+0
7+ years for an if 1 should be enough to just admit that there's no other option. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2010-01-25Move OS-specific VT key handler code from common to os-supportAlan Coopersmith2-0/+17
Adds new function xf86Activate to the OS-specific *VTsw*.c files and calls it from xf86ProcessActionEvent Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (GNU/Linux)
2009-10-06Revert "alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBus"Peter Hutterer1-1/+1
The vesa driver still uses slowbcopy_frombus and slowbcopy_tobus. This reverts commit 5ef53a94ce4e48e11de26290cd677266308640c8. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-17Add configuration option for use of SIGIO handlers for input eventsAlan Coopersmith1-0/+6
Boolean option to enable/disable SIGIO handlers is set by the first of these found: - UseSIGIO option is set in xorg.conf ServerFlags - Default set at build time by ./configure --enable-use-sigio-by-default - Platform default value: Solaris = no, all others = yes This matches the current settings on all platforms except Solaris. This reverts Solaris (for now) to the settings used in Xorg 1.6, before SIGIO support for Solaris was added, due to some system level bugs that won't be resolved in time for Xorg 1.7 release, but allows us to enable when those are resolved (or when we need to test if they're resolved). See http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6879897 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-31alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBusMatt Turner1-1/+1
xf86SlowBCopyToBus and xf86SlowBCopyFromBus cause segfaults on my system. Also remove associated slowbcopy_tobus/slowbcopy_frombus macros. Signed-off-by: Matt Turner <mattst88@gmail.com>
2009-08-03Ansify function arguments in VTsw_noop.cAlan Coopersmith1-3/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-07-28xserver: remove RAC/resource handling code.Dave Airlie1-110/+0
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-14xfree86: remove a bunch of unused pci headersTiago Vignatti1-4/+0
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-07-06s/MAX_DEVICES/MAXDEVICES/ updates.Peter Hutterer1-3/+3
The number of input devices is MAXDEVICES, not MAX_DEVICES (f781a752e6) Two comments updated to refer to MAXDEVICES. MAX_FUNCS in sigio.c was set to 16 if MAX_DEVICES was undefined. If more than 15 physical input devices were present, this could result in a failure to install the SIGIO handler for any device above 15. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-16xfree86: Remove superfluous ifdef DEBUG checks.Peter Hutterer2-17/+8
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-14xfree86: Add two __FreeBSD_kernel__ checksJulien Cristau1-1/+2
Debian bug#525475 <http://bugs.debian.org/525475> Reported-by: Petr Salinger <Petr.Salinger@seznam.cz> Signed-off-by: Julien Cristau <jcristau@debian.org>
2009-04-24Correct fcntl(F_SETOWN) error check in non-Solaris sigio codeJoel Bosveld1-1/+1
commit 64b7f96dca accidentally inverted the comparison, could result in crashes on some systems later on. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-24Add SIGIO/SIGPOLL support for SolarisAlan Coopersmith1-6/+36
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-15Fix build on hurd-i386Samuel Thibault1-1/+1
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523970
2009-01-11xfree86: ANSI cleanupsJulien Cristau2-4/+4
2008-12-15When disabling SIGIO tracking, use SIG_IGN instead of SIG_DFL.Keith Packard1-1/+1
This avoids a race condition for drivers which mis-order the fd close and signal disable. Signed-off-by: Keith Packard <keithp@keithp.com>
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade14-62/+62
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-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade7-15/+15
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-24Remove the remnants of Jensen supportAdam Jackson1-24/+5
As being an EISA-only machine, and as ISA support is gone now...
2008-11-24Bus: Remove the notion of estimated resources.Adam Jackson1-3/+0
2008-11-24PCI: Remove unused ia64 platform code.Adam Jackson1-46/+0
2008-08-18Remove some unused assembly code and assyntax.hMathieu Bérard1-111/+0
2008-07-17Drop a bunch of #ifdef Lynx.Mathieu Bérard1-10/+1
2008-06-19preserve errno around the SIGIO handlerMatthieu Herrb1-0/+3
2008-03-13Bug #14091: Fix build (and runtime) on ia64.Doug Chapman1-55/+0
2007-12-03xf86getpagesize -> getpagesize elsewhere in os-support/Adam Jackson1-1/+1
2007-12-03Death to libcwrapper.Adam Jackson2-2124/+1
This has been deprecated since 1.1. Since we're breaking ABI again anyway, remove it entirely.
2007-10-28XFree86: Remove ridiculous SIGIO debuggingDaniel Stone1-6/+0
YOU PRESSED A KEY AND AGAIN YOU RELEASED A KEY AND AGAIN YOU PRESSED A KEY AND AGAIN ... not so much.
2007-09-27Fix PCI rework build on Solaris (copy what BSD does)Alan Coopersmith1-1/+1
2007-08-30Remove dead xf86GetPciSizeFromOS and xf86GetPciOffsetFromOS.Eric Anholt1-48/+0
2007-08-30Remove the now-dead PciAvoid symbol.Eric Anholt1-2/+0