aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-graphics/mesa/mesa/0001-freedreno-clear-last_fence-after-resource-tracking.patch94
-rw-r--r--recipes-graphics/mesa/mesa_%.bbappend5
-rw-r--r--recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb2
-rw-r--r--recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch29
-rw-r--r--recipes-support/pd-mapper/pd-mapper_git.bb6
-rw-r--r--recipes-test/images/initramfs-test-image.bb5
6 files changed, 138 insertions, 3 deletions
diff --git a/recipes-graphics/mesa/mesa/0001-freedreno-clear-last_fence-after-resource-tracking.patch b/recipes-graphics/mesa/mesa/0001-freedreno-clear-last_fence-after-resource-tracking.patch
new file mode 100644
index 0000000..2d4aa00
--- /dev/null
+++ b/recipes-graphics/mesa/mesa/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/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend
index 7a14a57..fd40c39 100644
--- a/recipes-graphics/mesa/mesa_%.bbappend
+++ b/recipes-graphics/mesa/mesa_%.bbappend
@@ -1,3 +1,8 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+SRC_URI_append = " \
+ file://0001-freedreno-clear-last_fence-after-resource-tracking.patch \
+"
+
# Enable freedreno driver
GALLIUMDRIVERS_append_apq8064 = ",freedreno"
GALLIUMDRIVERS_append_apq8016 = ",freedreno"
diff --git a/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb b/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb
index 130cfb3..83074c1 100644
--- a/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb
+++ b/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb
@@ -9,7 +9,7 @@ require recipes-kernel/linux/linux-qcom-bootimg.inc
LOCALVERSION ?= "-linaro-lt-qcom"
SRCBRANCH ?= "release/qcomlt-5.4"
-SRCREV ?= "8c79b3d123550fde184d9ef6b3d5e2e530abe0bd"
+SRCREV ?= "e2db8e82634bd73bce5ce1e447720756777ca432"
COMPATIBLE_MACHINE = "(apq8016|apq8096|sdm845)"
diff --git a/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch b/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch
new file mode 100644
index 0000000..de3fea8
--- /dev/null
+++ b/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch
@@ -0,0 +1,29 @@
+From 874dadf1168f8a1b2b1bd4ab5bb4a20097147ab0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 28 May 2020 08:01:37 -0700
+Subject: [PATCH] pd-mapper: Include limits.h for PATH_MAX
+
+Fixes
+pd-mapper.c:199:22: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'AF_MAX'?
+
+Upstream-Status: Submitted [https://github.com/andersson/pd-mapper/pull/4]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ pd-mapper.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/pd-mapper.c b/pd-mapper.c
+index 45177ae..f5d45ee 100644
+--- a/pd-mapper.c
++++ b/pd-mapper.c
+@@ -36,6 +36,7 @@
+ #include <fcntl.h>
+ #include <libgen.h>
+ #include <libqrtr.h>
++#include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+--
+2.26.2
+
diff --git a/recipes-support/pd-mapper/pd-mapper_git.bb b/recipes-support/pd-mapper/pd-mapper_git.bb
index 2d24786..9e5ca11 100644
--- a/recipes-support/pd-mapper/pd-mapper_git.bb
+++ b/recipes-support/pd-mapper/pd-mapper_git.bb
@@ -9,8 +9,10 @@ DEPENDS = "qrtr"
inherit systemd
-SRCREV = "4236829a625ba5e90e689bc3d07e5ad15bca9733"
-SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https"
+SRCREV = "ab5074fdd5e4130578aa4c99b00d44527a79636f"
+SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https \
+ file://0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch \
+"
PV = "0.0+${SRCPV}"
diff --git a/recipes-test/images/initramfs-test-image.bb b/recipes-test/images/initramfs-test-image.bb
index 16eafef..8497ec5 100644
--- a/recipes-test/images/initramfs-test-image.bb
+++ b/recipes-test/images/initramfs-test-image.bb
@@ -7,6 +7,11 @@ PACKAGE_INSTALL = " \
base-passwd \
dhcp-client \
diag \
+ e2fsprogs \
+ e2fsprogs-e2fsck \
+ e2fsprogs-mke2fs \
+ e2fsprogs-resize2fs \
+ e2fsprogs-tune2fs \
ethtool \
gptfdisk \
lava-test-shell \