67a8c659f2
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> |
||
---|---|---|
.. | ||
.gitignore | ||
BT.c | ||
BT.h | ||
BTPriv.h | ||
CURSOR.NOTES | ||
IBM.c | ||
IBM.h | ||
IBMPriv.h | ||
Makefile.am | ||
TI.c | ||
TI.h | ||
TIPriv.h | ||
xf86Cursor.c | ||
xf86Cursor.h | ||
xf86CursorPriv.h | ||
xf86HWCurs.c | ||
xf86RamDac.c | ||
xf86RamDac.h | ||
xf86RamDacCmap.c | ||
xf86RamDacPriv.h |