[Mesa-dev] [PATCH] r600g: Manage fences per screen rather than per context.

Michel Dänzer michel at daenzer.net
Thu Dec 29 06:34:17 PST 2011


On Don, 2011-12-29 at 14:57 +0100, Mathias Fröhlich wrote: 
> On Thursday, December 29, 2011 13:35:19 Michel Dänzer wrote:
> > From: Michel Dänzer <michel.daenzer at amd.com>
> > 
> > Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=44151
> > 
> > Probably fixes: https://bugs.freedesktop.org/show_bug.cgi?id=44007
> >                 https://bugs.freedesktop.org/show_bug.cgi?id=43993
> > 
> > Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> > ---
> > 
> > This introduces a potential race condition with apps using several contexts
> > concurrently in several threads: rscreen->fences.bo is referenced by all
> > contexts, so e.g. rscreen->fences.bo->cs_buf->last_flush may be concurrently
> > read/written by several threads. However, I think this could already happen
> > e.g. when sharing textures between GLX contexts, so it should probably be
> > addressed separately. Also, in the case of rscreen->fences.bo I think it's
> > harmless, as no caches should need to be flushed for it.
> > 
> > No regressions (or fixes) in piglit quick.tests.
> 
> This actually fixes some piglit problems that I have here using different 
> vblank_mode's set in .drirc. These problems arise from the fences may be 
> living longer than the context itself. Which should be fixed with this patch 
> too.

Ah, the intermittent hangs of some GLX tests? It didn't occur to me that
those could be related to this problem as well, but it makes sense.


> I am missing a pipe_mutex_destroy in this change.

Good point, fixed in v2.


> Other than that - I am fine with that change.
> Also tested on a rv770 here - no piglit quick regressions.

Great, thanks!


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the mesa-dev mailing list