Mesa (master): freedreno: add debug flag to force high priority context
Rob Clark
robclark at kemper.freedesktop.org
Tue Dec 19 21:37:40 UTC 2017
Module: Mesa
Branch: master
Commit: 308076fd55a44f8defedd80d75e256e51bdff0a2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=308076fd55a44f8defedd80d75e256e51bdff0a2
Author: Rob Clark <robdclark at gmail.com>
Date: Fri Aug 25 07:58:40 2017 -0400
freedreno: add debug flag to force high priority context
Mainly for testing, FD_MESA_DEBUG=hiprio will force high priority
contexts.
Signed-off-by: Rob Clark <robdclark at gmail.com>
---
src/gallium/drivers/freedreno/freedreno_context.c | 4 +++-
src/gallium/drivers/freedreno/freedreno_screen.c | 1 +
src/gallium/drivers/freedreno/freedreno_util.h | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c
index 59e902956f..0a2f02c5e9 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.c
+++ b/src/gallium/drivers/freedreno/freedreno_context.c
@@ -263,7 +263,9 @@ fd_context_init(struct fd_context *ctx, struct pipe_screen *pscreen,
int i;
/* lower numerical value == higher priority: */
- if (flags & PIPE_CONTEXT_HIGH_PRIORITY)
+ if (fd_mesa_debug & FD_DBG_HIPRIO)
+ prio = 0;
+ else if (flags & PIPE_CONTEXT_HIGH_PRIORITY)
prio = 0;
else if (flags & PIPE_CONTEXT_LOW_PRIORITY)
prio = 2;
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index f1bc568240..1fca3c768b 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -81,6 +81,7 @@ static const struct debug_named_value debug_options[] = {
{"lrz", FD_DBG_LRZ, "Enable experimental LRZ support (a5xx+)"},
{"noindirect",FD_DBG_NOINDR, "Disable hw indirect draws (emulate on CPU)"},
{"noblit", FD_DBG_NOBLIT, "Disable blitter (fallback to generic blit path)"},
+ {"hiprio", FD_DBG_HIPRIO, "Force high-priority context"},
DEBUG_NAMED_VALUE_END
};
diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h
index f8bde6a88c..687d874b00 100644
--- a/src/gallium/drivers/freedreno/freedreno_util.h
+++ b/src/gallium/drivers/freedreno/freedreno_util.h
@@ -82,6 +82,7 @@ enum adreno_stencil_op fd_stencil_op(unsigned op);
#define FD_DBG_LRZ 0x20000
#define FD_DBG_NOINDR 0x40000
#define FD_DBG_NOBLIT 0x80000
+#define FD_DBG_HIPRIO 0x100000
extern int fd_mesa_debug;
extern bool fd_binning_enabled;
More information about the mesa-commit
mailing list