etnaviv: Add lock around pending_ctx

Graphics / Mesa 3D Graphics Library / Mesa - Marek Vasut [denx.de] - 26 August 2020 09:58 UTC

The content of rsc->pending_ctx could be changed from multiple contexts and thus from multiple threads. The per-context lock is not sufficient to protect this list. Add per-resource lock to protect this list.

Fixes: e5cc66dfad0 ("etnaviv: Rework locking")

60975ebe58d etnaviv: Add lock around pending_ctx
src/gallium/drivers/etnaviv/etnaviv_context.c | 11 +++++++
src/gallium/drivers/etnaviv/etnaviv_resource.c | 42 ++++++++++++++++++++++++--
src/gallium/drivers/etnaviv/etnaviv_resource.h | 1 +
src/gallium/drivers/etnaviv/etnaviv_transfer.c | 2 ++
4 files changed, 53 insertions(+), 3 deletions(-)

Upstream: cgit.freedesktop.org


  • Share