xserver-multidpi/hw/xfree86/ramdac
Roland Scheidegger 67a8c659f2 hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functions
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>
2010-03-15 08:37:53 -07:00
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
BT.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
BT.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
BTPriv.h Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
CURSOR.NOTES Merging XORG-CURRENT into trunk 2004-04-23 19:54:30 +00:00
IBM.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
IBM.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
IBMPriv.h Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Makefile.am Use libtool convenience libraries and better "symbol" table. 2008-12-07 02:22:19 -02:00
TI.c xfree86: Remove superfluous ifdef DEBUG checks. 2009-05-16 12:20:57 +10:00
TI.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
TIPriv.h Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
xf86Cursor.c hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functions 2010-03-15 08:37:53 -07:00
xf86Cursor.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86CursorPriv.h Export symbols needed by the RandR implementation in fglrx 2009-06-30 20:07:30 -04:00
xf86HWCurs.c xalloc+memset(0) -> xcalloc 2008-10-06 15:36:51 -04:00
xf86RamDac.c xfree86: ANSI cleanups 2009-01-11 08:54:11 +01:00
xf86RamDac.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86RamDacCmap.c xfree86: remove a bunch of unused pci headers 2009-07-14 17:11:13 +03:00
xf86RamDacPriv.h Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00