diff options
author | Marek Vasut <marex@denx.de> | 2019-09-05 20:02:58 +0200 |
---|---|---|
committer | Lucas Stach <dev@lynxeye.de> | 2019-10-18 17:03:25 +0000 |
commit | e5cc66dfad0a811338ef088b9b4be17cadc01dea (patch) | |
tree | 381502ae0af23bcaa046bdc5e7fa9da55469d5dc /src/gallium/drivers/etnaviv/etnaviv_texture.c | |
parent | 0c38c5454b34af6746b63210f9eb43a40316333e (diff) |
etnaviv: Rework locking
Replace the per-screen locking of flushing with per-context one and
add per-context lock around command stream buffer accesses, to prevent
cross-context flushing from corrupting these command stream buffers.
Signed-off-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_texture.c')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_texture.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.c b/src/gallium/drivers/etnaviv/etnaviv_texture.c index 748d3ff3e6f..2650192f4e0 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_texture.c +++ b/src/gallium/drivers/etnaviv/etnaviv_texture.c @@ -310,7 +310,9 @@ etna_texture_barrier(struct pipe_context *pctx, unsigned flags) struct etna_context *ctx = etna_context(pctx); /* clear color and texture cache to make sure that texture unit reads * what has been written */ + mtx_lock(&ctx->lock); etna_set_state(ctx->stream, VIVS_GL_FLUSH_CACHE, VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_TEXTURE); + mtx_unlock(&ctx->lock); } uint32_t |