[Mesa-dev] [PATCH 0/4] fence refcnting fixes
robdclark at gmail.com
Thu Jul 9 05:03:39 PDT 2015
On Thu, Jul 9, 2015 at 4:21 AM, Christian König <deathsimple at vodafone.de> wrote:
> On 08.07.2015 22:34, Rob Clark wrote:
>> From: Rob Clark <robclark at freedesktop.org>
>> This isn't at all clear for pipe driver writers currently, since it
>> is not documented anywhere. But radeon/nouveau/llvmpipe seem to drop
>> the ref on the **fence passed in to pipe->flush() (if *fence!=NULL).
>> Freedreno/ilo/vc4 where not doing this. Some state trackers do call
>> screen->fence_reference(screen, &fence, NULL) before pipe->flush(),
>> but others do not.
>> Add a comment for pipe->flush() to clairify what is expected of the
>> driver, and fixup freedreno/ilo/vc4 to comply.
>> Note: that ilo/vc4 patches are untested
> Oh, yes please. That also annoyed me once or twice while hacking on the
> state trackers.
> Since I'm not into the drivers those changes are Acked-by: Christian König
> <christian.koenig at amd.com>
> Do you want to take care of the state trackers as well or should I look into
> the video state trackers to fix this myself?
I guess w/ the doc change + fixing drivers, we don't strictly need to
change the other state trackers to explicitly unref their last_fence,
if that is what you had in mind? It probably wouldn't hurt, but
shouldn't be required..
>> Rob Clark (4):
>> gallium: clarify reference counting for fence
>> freedreno: unref old fence
>> ilo: unref old fence
>> vc4: unref old fence
>> src/gallium/drivers/freedreno/freedreno_context.c | 2 +-
>> src/gallium/drivers/freedreno/freedreno_fence.c | 2 +-
>> src/gallium/drivers/ilo/ilo_context.c | 5 ++++-
>> src/gallium/drivers/ilo/ilo_screen.c | 2 +-
>> src/gallium/drivers/vc4/vc4_context.c | 3 ++-
>> src/gallium/drivers/vc4/vc4_fence.c | 2 +-
>> src/gallium/include/pipe/p_context.h | 8 +++++++-
>> 7 files changed, 17 insertions(+), 7 deletions(-)
More information about the mesa-dev