summaryrefslogtreecommitdiff
path: root/hw/xfree86/ramdac
AgeCommit message (Collapse)AuthorFilesLines
2010-04-08Don't keep a pointer to a possibly freed cursor when changing screens, ↵Pierre-Loup A. Griffais1-0/+1
preventing a crash in xf86CursorEnableDisableFBAccess() trying to restore it. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-03-15hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functionsRoland Scheidegger1-0/+6
The problem is that the xf86_use_hw_cursor(_argb) functions may get this correctly now, some drivers will replace these generic versions with their own functions. It is pretty insane to expect them to do reference counting of the cursor (as an example, look at driver/xf86-video-vmware to see how that looks like as a workaround). There are even places in xserver itself which replace these two functions. The segfaults if no reference counting is done are caused because the reference count of the cursor reached zero, hence the cursor was freed, however xf86CursorEnableDisableFBAccess() brought it back to life from the dead (from the SavedCursor). This patch hence adds reference counting in xf86CursorSetCursor. As per Michel Daenzer's suggestion, also free the cursor upon xf86CursorCloseScreen. In theory with this it should be possible to remove the reference counting in the UseHwCursor functions I think, though it should also be safe to keep them. Signed-off-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-11.gitignore: use common defaults with custom section #24239Gaetan Nadon1-0/+2
Using common defaults will reduce errors and maintenance. Only the very small or inexistent custom section need periodic maintenance when the structure of the component changes. Do not edit defaults. Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-14xfree86: remove a bunch of unused pci headersTiago Vignatti1-3/+0
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-07-03xfree86: fix wrong IsMaster() check causing crashes.Peter Hutterer1-2/+1
Crashes caused by dereferencing NULL if the path was executed for a floating slave device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-30Export symbols needed by the RandR implementation in fglrxFelix Kuehling1-1/+1
GIT change http://cgit.freedesktop.org/xorg/xserver/commit/?id=45c8bd0fe54273039fdaa1eeeafb81b5774f2c75 changed the default symbol visibility of the Xserver. As a result 2 symbols that are needed by the RandR 1.2/1.3 implementation in the fglrx driver are no longer visible: xf86configptr xf86CursorScreenKey We would like to get these two symbols _X_EXPORT'ed before Xserver 1.7 is released. Otherwise it will be problematic for fglrx to support RandR 1.3 on Xserver 1.7. In the future, we may want to sync our RandR implementation to later versions of the RandR implementation in hw/xfree86/modes. Therefore it would be nice if all symbols used by the Xserver RandR implementation were _X_EXPORT'ed in the future.
2009-06-18xfree86: fix SWCursor check in xf86CursorSetCursor.Peter Hutterer1-3/+4
Wrong check for inputInfo.pointer resulted in a SW cursor being rendered when the pointer left the screen (in a Xinerama setup). We must call the sprite rendering function if - SW cursors are enabled, or - The current device is not the VCP and not attached to the VCP. Reported-by: Gordon Yuan <GordonYuan@viatech.com.cn> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-22Input: rename DeviceIntRec->isMaster to ->type.Peter Hutterer1-2/+2
isMaster is not enough as long as we differ between master pointers and keyboard. With flexible device classes, the usual checks for whether a master device is a pointer (currently check for ->button, ->valuators or ->key) do not work as an SD may post an event through a master and mess this check up. Example, a device with valuators but no buttons would remove the button class from the VCP and thus result in the IsPointerDevice(inputInfo.pointer) == FALSE. This will become worse in the future when new device classes are introduced that aren't provided in the current system (e.g. a switch class). This patch replaces isMaster with "type", one of SLAVE, MASTER_POINTER and MASTER_KEYBOARD. All checks for dev->isMaster are replaced with an IsMaster(dev).
2009-05-16xfree86: Remove superfluous ifdef DEBUG checks.Peter Hutterer1-3/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-11xfree86: ANSI cleanupsJulien Cristau1-5/+5
2008-12-07Use libtool convenience libraries and better "symbol" table.Paulo Cesar Pereira de Andrade1-2/+2
All .a libraries were converted to .la, and instead of linking the Xorg binary with a mix of .a and .la, and adding some libraries more then once in the command line, etc, now it generates a single libxorg.la from all the required convenience libraries, and links with a dummy xorg.c (that should usually be the file with the main function...). This removes the requirement of some things like libosandcommon and libinit, that existed to circumvent problems when linking multiple .a and .la in the final Xorg binary. The "symbol table" is now generated dynamically, by a shell script, with an embedded gawk parser that parses cpp output. The new file sdksyms.sh is generated by hand by analyzing all Makefile.am's and making it create a sdksyms.c file, that includes all sdk headers that will add symbols for the Xorg binary. Module headers aren't read, and a in 2 files it was required to add a "<hash>ifndef XorgLoader" around declarations shared between the Xorg binary and libextmod. A few other changes were added to other sdk headers, like preventing multiple inclusion, or including other headers to satisfy dependencies. This should be a lot more portable, and better (hopefully properly) using libtool to generate convenience libraries.
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade11-75/+75
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-12-02xfree86: don't render SW cursors for devices attached to VCP (#16805)Peter Hutterer1-1/+2
When leaving 3D games such as quake3 or sauerbraten, a cursor may stay on the screen. This is caused by one run of SW rendering for the SD, even though the SD was attached to the VCP and thus has HW rendering capabilities. Check for the SD's attachment (like in all other functions) before deciding on SW or HW rendering. X.Org Bug 16805 <http://bugs.freedesktop.org/show_bug.cgi?id=16805> Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-30Remove declarations of symbols that are never defined.Paulo Cesar Pereira de Andrade2-6/+0
These symbols were removed from the X Server, or never declared. One symbol that may need special attention is XkbBuildCoreState(), that doesn't have a prototype anywhere, but is called from xkb/xkbEvents.c:XkbFilterEvents(), and also used by the macros XkbStateFieldFromRec() and XkbGrabStateFromRec() defined in include/xkbstr.h. fb/wfbrename.h also may need some cleanup, as it makes several "renames" of non existing symbols.
2008-11-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade4-19/+19
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-28Make visible symbols required by xorg modules.Paulo Cesar Pereira de Andrade6-19/+19
This patch exports all symbols required by the compilable (in a x86 linux computer) xorg/driver/* modules. Still missing symbols worth mentioning are: sunleo miFindMaxBand no longer available intel (uxa/uxa-accel.c) fbShmPutImage no longer available (and should have been static) mga MGAGetClientPointer (should come from matrox's libhal) This is not a definitive "visibility" patch, as all it does is to export missing symbols, but the modules that current don't compile, may require more symbols once fixed, and third party drivers should also require more symbols exported. A "definitive" patch should export symbols defined in the sdk.
2008-10-26Nuke unused variablesJulien Cristau1-1/+0
2008-10-06xalloc+memset(0) -> xcallocAdam Jackson1-1/+1
2008-08-28Prepare for array-index based devPrivates.Tomas Carnecky1-1/+2
TODO: static indices can be made just an int; some indices can be combined.
2008-08-27Add an array of integers for use as per-screen cursor private keys.Eamon Walsh2-5/+5
Replaces the use of the screen pointer itself as the key, which was nice but won't work now that an array index is being stored.
2008-06-24Fix "warning: suggest parentheses around && within ||".Eamon Walsh1-1/+1
2008-06-11Remove unused xf86DeviceCursorUndisplay() function.Tiago Vignatti1-1/+0
2008-05-16xfree86: always render first cursor in HW, all others in SW.Peter Hutterer1-53/+28
2008-05-16Restructure and organize the code.Tiago Vignatti1-33/+26
It was removed and simplified some conditionals. We don't need test for pDev->isMaster inside xf86CursorSetCursor() because only MD enters there. In the last chunk, ScreenPriv fields were being assigned without need, so that code was wrapped inside the conditional to avoid it. I also tried to make the identation more sane in some parts that I touched. Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> Minor modification, part of the original patch led to cursors not being updated properly when controlled through XTest. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-05-16Remove redundancy.Tiago Vignatti1-3/+0
The only function that cat set SWCursor before xf86DeviceCursorInitialize() is xf86InitCursor() when VCP and is created. Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-05-13Remove UndisplayCursor API.Peter Hutterer1-15/+1
We can achieve the same thing by simply displaying a NullCursor, there's no need for a separate API.
2008-05-06xfree86: call SetCursor for the VCP when switching between SW/HW rendering.Peter Hutterer1-13/+42
We need a manual call to SetCursor when we switch from SW to HW rendering and the other way round. This way we display the new cursor after removing the old one. In addition, we only update the internal state for the VCP's sprite. This way, when we switch back to HW rendering the state is up-to-date and wasn't overwritten with the other sprite's state. The second part is a hack. It would be better to keep a state for each sprite, but then again we don't have hardware that can render multiple cursors so we might as well do with the hack.
2008-05-06xfree86: switch between to SW cursors if more than 1 sprite is available.Peter Hutterer1-10/+32
Switches back to HW cursors when sprites other than the VCP are removed. The current state requires the cursor to change shape once before it updates to SW / HW rendering (whatever is appropriate), e.g. by moving into a different window. Until this is done, the cursor is invisible.
2008-05-06xfree86: re-enable hardware cursor (for a single cursor)Peter Hutterer2-5/+47
This commit enables HW rendering for cursors again, but only for a single cursor. Other cursors can be created, however they will not be visible.
2008-01-03Merge branch 'master' into mpxPeter Hutterer3-54/+46
Conflicts: XTrap/xtrapddmi.c Xext/security.c Xext/xprint.c Xext/xtest.c Xext/xvdisp.c Xi/exevents.c Xi/grabdevb.c Xi/grabdevk.c Xi/opendev.c Xi/ungrdev.c Xi/ungrdevb.c Xi/ungrdevk.c dix/cursor.c dix/devices.c dix/dixutils.c dix/events.c dix/getevents.c dix/main.c dix/window.c hw/xfree86/ramdac/xf86Cursor.c include/dix.h include/input.h include/inputstr.h mi/midispcur.c mi/miinitext.c mi/misprite.c render/animcur.c xfixes/cursor.c xkb/xkbAccessX.c
2007-08-30devPrivates rework: convert CursorRec and CursorBits over to new interface.Eamon Walsh2-5/+5
2007-08-28devPrivates rework: since API is already broken, switch everythingEamon Walsh3-47/+40
over to new system. Need to update documentation and address some remaining vestiges of old system such as CursorRec structure, fb "offman" structure, and FontRec privates.
2007-04-02Merge branch 'master' into mpxPeter Hutterer1-46/+0
Conflicts: Xi/closedev.c Xi/exevents.c Xi/extinit.c Xi/listdev.c dix/window.c hw/xfree86/common/xf86Xinput.c include/extinit.h mi/mipointer.c
2007-03-25Since ddc, i2c, and ramdac are in core now, remove their ModuleData stubs.Adam Jackson1-46/+0
2007-03-19Merge branch 'master' into mpxPeter Hutterer2-4/+5
Conflicts: dix/devices.c dix/events.c mi/misprite.c
2007-03-15Create driver-independent CRTC-based cursor layer.Keith Packard2-4/+5
This moves most of the cursor management code out of the intel driver and into the general server code. Of course, the hope is that this code will be useful for other driver writers as well. Check out xf86Crtc.h for the usage information, making sure you add the needed hooks to the crtc funcs structure for your driver. (cherry picked from commit 4d81c99a4660a0bf9014f789de55edabd185bd14)
2007-03-05Merge branch 'master' into mpxPeter Hutterer1-1/+2
Conflicts: configure.ac dix/getevents.c hw/xfree86/ramdac/xf86Cursor.c mi/mipointer.c xkb/xkbUtils.c
2007-02-15Merge crtc/output-based mode selection code.Keith Packard1-1/+2
This code comes from the intel driver, so there's no history in this tree. As the crtc/output-based mode selection code uses ddc, the ddc and i2c modules have been merged into the server. Attempts to load them are safely ignored now.
2006-12-18Cleaning up ifdef MPX from remaining files, removing it from configure.ac.Peter Hutterer1-3/+0
Removing building mpx extension from Makefile.am
2006-12-05Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver into mpxPeter Hutterer1-1/+1
Conflicts: dix/events.c
2006-11-23mi: closing memory leak, miPointer is freed in miPointerCloseScreenPeter Hutterer1-2/+3
bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX adding DeviceIntPtr parameter to ScreenRec's cursor functions. cleanup of miPointer code to use same scheme in each function dix: MPHasCursor() function determines checking whether to invoke cursor rendering. animcur: adding DeviceIntPtr parameter to cursor functions but animcur relies on the core pointer right now. xfixes: adding DeviceIntPtr parameter to cursor functions but xfixes relies on the core pointer right now. rac: adding DeviceIntPtr parameter to cursor functions but RAC relies on the core pointer right now. ramdac: adding DeviceIntPtr parameter to cursor functions but ramdac relies on the core pointer right now.
2006-11-17dix: moved isMPdev field to end of _DeviceIntRec structurePeter Hutterer2-21/+47
mi: added miMPPointers array to mipointer.c added DeviceIntPtr to all miPointerSpriteFuncs. Coming from miPointer we use inputInfo.pointer as standard value. ABI BREAK! ramdac: forcing failed HW Cursor initialisation. MPX needs software rendering. changes to use new miPointerSpriteFunc (this required externing inputInfo, should probably be fixed at a later point). RAC: changes to use new miPointerSpriteFuncs.
2006-09-18Remove smashing of CFLAGS from server build.Keith Packard1-1/+1
CFLAGS is a user variable, extracted from the environment at configure time and settable by the user at build time. We must not override this variable.
2006-07-21Remove RCS tags. Fix Xprint makefile braindamage.Adam Jackson17-17/+0
2006-07-18get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULEDaniel Stone1-1/+1
Get rid of almost all uses of these definitions. They're still defined for delinquent out-of-tree drivers, and also for the Mesa build. As well as for miinitext.c. But largely gone.
2006-06-05Ensure all *ModuleData symbols are marked _X_EXPORT. Start removingAdam Jackson1-4/+1
XFree86LOADER ifdefs, non-loadable hasn't been supported for a while now. Remove completely gratuitious REMOVE_LOADER_CHECK_MODULE_INFO ifdefs surrounding a call to a function added in XFree86 4.1 (!). Miscellaneous static markings.
2006-02-16Fix an occasional crash on VT switches: the server would save a pointer toBenjamin Herrenschmidt1-1/+3
the current cursor when disabling FB access and would try to restore that cursor when re-enabling. However, that cursor might have been destroyed in between. This fixes it by updating the saved cursor pointer when a cursor is set and vtSema is FALSE.
2006-02-10Remove libcwrapper usage from xorg server modules. The libcwrapper is onlyEric Anholt7-7/+2
of (marginal) use in the drivers, and that usage remains.
2006-01-23Commit #4633 - Initial mouse pointer incorrect with EXA which also fixesAlan Hourihane2-71/+38
the repaint of the cursor image with randr events.
2005-12-02Define XFree86Server only where it is required.Kevin E Martin1-1/+1