Mesa (main): freedreno: Disable TC syncs for get_device_reset_status()
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Oct 4 20:24:01 UTC 2021
Module: Mesa
Branch: main
Commit: 5b7c81fd13294207feecd1b454fb9dd18525f47b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b7c81fd13294207feecd1b454fb9dd18525f47b
Author: Rob Clark <robdclark at chromium.org>
Date: Mon Oct 4 11:16:36 2021 -0700
freedreno: Disable TC syncs for get_device_reset_status()
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13163>
---
src/gallium/drivers/freedreno/freedreno_context.c | 9 +--------
src/gallium/drivers/freedreno/freedreno_context.h | 7 +++++--
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c
index 5b5776d6780..7587b35a507 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.c
+++ b/src/gallium/drivers/freedreno/freedreno_context.c
@@ -428,11 +428,6 @@ fd_get_device_reset_status(struct pipe_context *pctx)
int global_faults = fd_get_reset_count(ctx, false);
enum pipe_reset_status status;
- /* Not called in driver thread, but threaded_context syncs
- * before calling this:
- */
- fd_context_access_begin(ctx);
-
if (context_faults != ctx->context_reset_count) {
status = PIPE_GUILTY_CONTEXT_RESET;
} else if (global_faults != ctx->global_reset_count) {
@@ -444,8 +439,6 @@ fd_get_device_reset_status(struct pipe_context *pctx)
ctx->context_reset_count = context_faults;
ctx->global_reset_count = global_faults;
- fd_context_access_end(ctx);
-
return status;
}
@@ -701,7 +694,7 @@ fd_context_init_tc(struct pipe_context *pctx, unsigned flags)
fd_fence_create_unflushed,
fd_resource_busy,
false,
- false,
+ true,
&ctx->tc);
if (tc && tc != pctx)
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h
index d1892d6f9fd..67bdba50718 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.h
+++ b/src/gallium/drivers/freedreno/freedreno_context.h
@@ -323,9 +323,12 @@ struct fd_context {
* count increases, it means some other context crashed. If
* per-context reset count increases, it means we crashed the
* gpu.
+ *
+ * Only accessed by front-end thread, never accessed by TC driver
+ * thread.
*/
- uint32_t context_reset_count dt;
- uint32_t global_reset_count dt;
+ uint32_t context_reset_count;
+ uint32_t global_reset_count;
/* Context sequence #, used for batch-cache key: */
uint16_t seqno;
More information about the mesa-commit
mailing list