xserver/hw/xfree86
Jesse Barnes 8476d99231 DRI2: drawable lifetime fixes
Handle drawable destruction and lifetime correctly.

Check whether the drawable priv is valid in DRI2SwapInterval(),
DRI2WaitSBC() and DRI2WaitMSC(); it may have gone away, so be sure to
check it before using it.

If more than 1 outstanding swap is queued, we may complete several after
an app has exited.  If we free it after the first one completes and the
refcount reaches 0, we'll crash the server on subsequent completions.
So delay freeing until all swaps complete and remove the error message
as this is a normal occurence.  To do this properly, we must also avoid
destroying drawables in DRI2DestroyDrawable() if a swap or wait event is
pending.

And finally, make sure we free drawables in DRI2WaitMSCComplete() if
necessary (i.e. if the refcount has reached 0 and this MSC was the last
pending event on the object).

Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29 10:02:22 -07:00
..
common common: xf86Configure: alloc_strlen: Allocated memory does not have space for the terminating NUL of the string 2010-03-21 15:20:53 -07:00
ddc EDID: CEA extension support 2009-10-29 14:04:55 -04:00
dixmods Add type name argument to CreateNewResourceType 2009-12-18 17:44:12 -08:00
doc Fix .man.N targets for AM_SILENT_RULES 2010-03-22 00:45:55 -05:00
dri Add type name argument to CreateNewResourceType 2009-12-18 17:44:12 -08:00
dri2 DRI2: drawable lifetime fixes 2010-03-29 10:02:22 -07:00
exa Fix .man.N targets for AM_SILENT_RULES 2010-03-22 00:45:55 -05:00
fbdevhw Fix .man.N targets for AM_SILENT_RULES 2010-03-22 00:45:55 -05:00
i2c Don't cast double to int: use default conversions or explicitly round. 2009-10-28 18:56:42 -07:00
int10 Fix builds with --with-int10=stub 2009-12-15 10:23:16 -08:00
loader .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
modes hw/xfree86: fix refcounting in xf86_use_hw_cursor 2010-03-15 08:36:33 -07:00
os-support Solaris xf86OSRingBell() off-by-one error in filling iov[] array 2010-02-17 23:15:34 -08:00
parser parser: corrected xf86getBoolValue to use case insensitive compare 2010-02-17 23:16:25 -08:00
ramdac hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functions 2010-03-15 08:37:53 -07:00
shadowfb s/MIN/min/, s/MAX/max/ (#2968) 2009-06-03 13:45:42 -04:00
utils Fix .man.N targets for AM_SILENT_RULES 2010-03-22 00:45:55 -05:00
vbe Update to xextproto 7.0.99.1. 2009-07-15 17:00:05 +10:00
vgahw Revert "alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBus" 2009-10-06 20:40:20 -04:00
x86emu Replace assembly with generic unaligned access code 2010-03-03 20:02:49 -08:00
xaa .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
xf8_16bpp Update several of my and/or Red Hat's licenses to standard form. 2009-05-14 07:02:44 -04:00
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
Makefile.am Fix relink targets for silent rules 2010-03-22 00:45:52 -05:00
xorgconf.cpp Update xorg.conf man page & sample for changes in Xorg 1.7 2009-09-14 16:03:18 +10:00