diff options
author | Aníbal Limón <anibal.limon@linaro.org> | 2020-05-26 15:25:19 -0500 |
---|---|---|
committer | Aníbal Limón <anibal.limon@linaro.org> | 2020-05-26 15:25:19 -0500 |
commit | 50f49db65bfcca20c70982bbe55e4448b20930d6 (patch) | |
tree | e99ab147fdda81f1969c2a6d508b990beb33ac1a | |
parent | 7e6a590df4eb16f11a046cad693287372d1fb4a0 (diff) |
debian: Bump to 20.0.7-1+linaro1mesa-20.0.7-1+linaro1
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/patches/0001-freedreno-clear-last_fence-after-resource-tracking.patch | 94 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 101 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 67d17e103f2..9c2239f4497 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mesa (20.0.7-1+linaro1) unstable; urgency=medium + + * Add patch to fix freedreno a6xx issue. + + -- Anibal Limon <anibal.limon@linaro.org> Tue, 26 May 2020 15:24:43 -0500 + mesa (20.0.7-1) unstable; urgency=medium * New upstream release. diff --git a/debian/patches/0001-freedreno-clear-last_fence-after-resource-tracking.patch b/debian/patches/0001-freedreno-clear-last_fence-after-resource-tracking.patch new file mode 100644 index 00000000000..2d4aa000b8c --- /dev/null +++ b/debian/patches/0001-freedreno-clear-last_fence-after-resource-tracking.patch @@ -0,0 +1,94 @@ +From 3c4e3006ef3318c1afe65341a1f92cf332ce0d81 Mon Sep 17 00:00:00 2001 +From: Rob Clark <robdclark@chromium.org> +Date: Sat, 23 May 2020 10:52:52 -0700 +Subject: [PATCH] freedreno: clear last_fence after resource tracking + +The resource tracking in the clear/draw_vbo/blit paths could itself +trigger a flush. Which would update last_fence. So we need to clear +last_fence *after* all the dependency tracking. + +Fixes: ddb7fadaf8b ("freedreno: avoid no-op flushes by re-using last-fence") +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2992 +Signed-off-by: Rob Clark <robdclark@chromium.org> +--- + src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 8 ++++++-- + src/gallium/drivers/freedreno/freedreno_draw.c | 16 ++++++++++++---- + 2 files changed, 18 insertions(+), 6 deletions(-) + +diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c +index f812aab37a6..21900312ae7 100644 +--- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c ++++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c +@@ -632,8 +632,6 @@ handle_rgba_blit(struct fd_context *ctx, const struct pipe_blit_info *info) + if (!can_do_blit(info)) + return false; + +- fd_fence_ref(&ctx->last_fence, NULL); +- + batch = fd_bc_alloc_batch(&ctx->screen->batch_cache, ctx, true); + + fd6_emit_restore(batch, batch->draw); +@@ -646,6 +644,12 @@ handle_rgba_blit(struct fd_context *ctx, const struct pipe_blit_info *info) + + mtx_unlock(&ctx->screen->lock); + ++ /* Clearing last_fence must come after the batch dependency tracking ++ * (resource_read()/resource_write()), as that can trigger a flush, ++ * re-populating last_fence ++ */ ++ fd_fence_ref(&ctx->last_fence, NULL); ++ + emit_setup(batch); + + if ((info->src.resource->target == PIPE_BUFFER) && +diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c +index 94e2aae9e68..e2a0a1260fa 100644 +--- a/src/gallium/drivers/freedreno/freedreno_draw.c ++++ b/src/gallium/drivers/freedreno/freedreno_draw.c +@@ -93,8 +93,6 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) + return; + } + +- fd_fence_ref(&ctx->last_fence, NULL); +- + /* Upload a user index buffer. */ + struct pipe_resource *indexbuf = NULL; + unsigned index_offset = 0; +@@ -282,6 +280,12 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) + /* and any buffers used, need to be resolved: */ + batch->resolve |= buffers; + ++ /* Clearing last_fence must come after the batch dependency tracking ++ * (resource_read()/resource_written()), as that can trigger a flush, ++ * re-populating last_fence ++ */ ++ fd_fence_ref(&ctx->last_fence, NULL); ++ + DBG("%p: %x %ux%u num_draws=%u (%s/%s)", batch, buffers, + pfb->width, pfb->height, batch->num_draws, + util_format_short_name(pipe_surface_format(pfb->cbufs[0])), +@@ -318,8 +322,6 @@ fd_clear(struct pipe_context *pctx, unsigned buffers, + if (!fd_render_condition_check(pctx)) + return; + +- fd_fence_ref(&ctx->last_fence, NULL); +- + if (ctx->in_blit) { + fd_batch_reset(batch); + fd_context_all_dirty(ctx); +@@ -366,6 +368,12 @@ fd_clear(struct pipe_context *pctx, unsigned buffers, + + mtx_unlock(&ctx->screen->lock); + ++ /* Clearing last_fence must come after the batch dependency tracking ++ * (resource_read()/resource_written()), as that can trigger a flush, ++ * re-populating last_fence ++ */ ++ fd_fence_ref(&ctx->last_fence, NULL); ++ + DBG("%p: %x %ux%u depth=%f, stencil=%u (%s/%s)", batch, buffers, + pfb->width, pfb->height, depth, stencil, + util_format_short_name(pipe_surface_format(pfb->cbufs[0])), +-- +2.27.0.rc0 + diff --git a/debian/patches/series b/debian/patches/series index 10bd782af67..4ec271543de 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ path_max.diff fix-build-with-llvm-10.diff fix-ppc64el.patch src_glx_dri_common.h.diff +0001-freedreno-clear-last_fence-after-resource-tracking.patch |