[PATCH xserver] dri2: Use the work queue to manage client sleeps
Chris Wilson
chris at chris-wilson.co.uk
Fri Feb 12 09:02:22 UTC 2016
On Thu, Feb 11, 2016 at 05:41:16PM +0000, Chris Wilson wrote:
> On Wed, Feb 10, 2016 at 11:51:18AM -0500, Adam Jackson wrote:
> > @@ -983,7 +990,7 @@ DRI2WakeClient(ClientPtr client, DrawablePtr pDraw, int frame,
> > {
> > ScreenPtr pScreen = pDraw->pScreen;
> > DRI2DrawablePtr pPriv;
> > -
> > +t
>
> Without this,
> Tested-by: Chris Wilson <chris at chris-wilson.co.uk>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Drat, valgrind turned up something obnoxious:
==8695== Invalid write of size 8
==8695== at 0x5A74E9: dri2ClientWake (in /opt/xorg/bin/Xorg)
==8695== by 0x43F811: ProcessWorkQueue (in /opt/xorg/bin/Xorg)
==8695== by 0x5DA640: WaitForSomething (in /opt/xorg/bin/Xorg)
==8695== by 0x4397E0: Dispatch (in /opt/xorg/bin/Xorg)
==8695== by 0x43E8B9: dix_main (in /opt/xorg/bin/Xorg)
==8695== by 0x6CD5EC4: (below main) (libc-start.c:287)
==8695== Address 0xcf4c688 is 56 bytes inside a block of size 144 free'd
==8695== at 0x4C2BE10: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8695== by 0x5A7AB9: DRI2DrawableGone (in /opt/xorg/bin/Xorg)
==8695== by 0x467EE6: FreeResource (in /opt/xorg/bin/Xorg)
==8695== by 0x4336D6: ProcDestroyWindow (in /opt/xorg/bin/Xorg)
==8695== by 0x439A85: Dispatch (in /opt/xorg/bin/Xorg)
==8695== by 0x43E8B9: dix_main (in /opt/xorg/bin/Xorg)
==8695== by 0x6CD5EC4: (below main) (libc-start.c:287)
==8695==
Fix incoming; if we remove limitation to only allow one DRI2 client to
block (thus allowing multiple clients to wait on a MSC on the root for
instance) we can use the ClientSleep to keep track of all the pending
wake ups, with just an introduction of ClientSignalAll.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the xorg-devel
mailing list