freedreno: fix context teardown race
authorRob Clark <robdclark@gmail.com>
Mon, 20 Aug 2018 13:55:12 +0000 (09:55 -0400)
committerRob Clark <robdclark@gmail.com>
Mon, 20 Aug 2018 14:03:05 +0000 (10:03 -0400)
commite11e9d639439c32fe9dfa5af22abda2b54157771
treecbf4b30c677fbe193f16539d6927eea04cd81b29
parent5fab32ddad8b32c4a05517c43623653f8634c4d9
freedreno: fix context teardown race

We could still have batches queued up to flush, so fd_context_destroy()
(which will kill and sync on the flush_queue) before deleting buffers
that might be referenced from fdN_gmem() from context of flush_queue.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a3xx/fd3_context.c
src/gallium/drivers/freedreno/a4xx/fd4_context.c
src/gallium/drivers/freedreno/a5xx/fd5_context.c
src/gallium/drivers/freedreno/a6xx/fd6_context.c