diff options
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_blt.c')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_blt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_blt.c b/src/gallium/drivers/etnaviv/etnaviv_blt.c index f3067a7ac2d..a90bb4609e5 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_blt.c +++ b/src/gallium/drivers/etnaviv/etnaviv_blt.c @@ -324,6 +324,7 @@ etna_clear_blt(struct pipe_context *pctx, unsigned buffers, const union pipe_color_union *color, double depth, unsigned stencil) { struct etna_context *ctx = etna_context(pctx); + mtx_lock(&ctx->lock); etna_set_state(ctx->stream, VIVS_GL_FLUSH_CACHE, 0x00000c23); etna_set_state(ctx->stream, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH); @@ -344,9 +345,9 @@ etna_clear_blt(struct pipe_context *pctx, unsigned buffers, etna_set_state(ctx->stream, VIVS_GL_FLUSH_CACHE, 0x00000c23); else etna_set_state(ctx->stream, VIVS_GL_FLUSH_CACHE, 0x00000002); + mtx_unlock(&ctx->lock); } - static bool etna_try_blt_blit(struct pipe_context *pctx, const struct pipe_blit_info *blit_info) @@ -416,6 +417,7 @@ etna_try_blt_blit(struct pipe_context *pctx, return true; } + mtx_lock(&ctx->lock); /* Kick off BLT here */ if (src == dst && src_lev->ts_compress_fmt < 0) { /* Resolve-in-place */ @@ -510,6 +512,7 @@ etna_try_blt_blit(struct pipe_context *pctx, dst->seqno++; dst_lev->ts_valid = false; + mtx_unlock(&ctx->lock); return true; } |