[PATCH xserver 4/4] dri2: Unblock Clients on Drawable release

Ville Syrjälä ville.syrjala at linux.intel.com
Wed Feb 3 14:02:54 UTC 2016


On Wed, Feb 03, 2016 at 09:54:46AM +0000, Chris Wilson wrote:
> If the Window is destroyed by another client, such as the window
> manager, the original client may be blocked by DRI2 awaiting a vblank
> event. When this happens, DRI2DrawableGone forgets to unblock that
> client and so the wait never completes.
> 
> Note Present/xshmfence is also suspectible to this race.
> 
> Testcase: dri2-race/manager
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

> ---
>  hw/xfree86/dri2/dri2.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
> index 2f05c64..80a601e 100644
> --- a/hw/xfree86/dri2/dri2.c
> +++ b/hw/xfree86/dri2/dri2.c
> @@ -416,6 +416,9 @@ DRI2DrawableGone(void *p, XID id)
>          (*pDraw->pScreen->DestroyPixmap)(pPriv->redirectpixmap);
>      }
>  
> +    if (pPriv->blockedClient)
> +        AttendClient(pPriv->blockedClient);
> +
>      free(pPriv);
>  
>      return Success;
> -- 
> 2.7.0

-- 
Ville Syrjälä
Intel OTC


More information about the xorg-devel mailing list