Limit DRI2Drawable reference leak

Ville Syrjälä syrjala at sci.fi
Sat Feb 21 14:13:38 PST 2015


On Sat, Feb 21, 2015 at 09:31:07PM +0000, Chris Wilson wrote:
> With the current protocol and implementations, we have to often call
> DRI2CreateDrawable but can never call DRI2DestroyDrawable. This ends up
> with us leaking references to DRI2Drawables based on the assumption that
> the references have identical lifetimes to the Drawable going astray.
> This was spotted by Daniel Drake as the mali driver would create a new
> reference to the DRI2Drawable on every GetBuffers, but it can also be
> observed in mesa when running synthetic benchmarks (creating lots of
> contexts/glxdrawables for each window) and to a lesser extent with
> normal composited operation.
> 
> The first two patches implement the capping of the unnamed internal
> reference used by DRI2CreateDrawable to just one per Client.

IIRC we had many issues around the dri2 reference stuff during the
Maemo days. Pauli fixed tons of problems in the dri2 code but some
of the patches never made it in.

These seem somewhat relevant:
http://lists.x.org/archives/xorg-devel/2010-November/014783.html
http://lists.x.org/archives/xorg-devel/2010-November/014782.html

-- 
Ville Syrjälä
syrjala at sci.fi
http://www.sci.fi/~syrjala/


More information about the xorg-devel mailing list