freedreno: add debug flag to force high priority context
authorRob Clark <robdclark@gmail.com>
Fri, 25 Aug 2017 11:58:40 +0000 (07:58 -0400)
committerRob Clark <robdclark@gmail.com>
Tue, 19 Dec 2017 21:36:10 +0000 (16:36 -0500)
Mainly for testing, FD_MESA_DEBUG=hiprio will force high priority
contexts.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_context.c
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/freedreno/freedreno_util.h

index 59e902956f021c0fbfcb4308f4873892d3af9ff5..0a2f02c5e97abd3d7e23ee66701ede1f20cbda46 100644 (file)
@@ -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;
index f1bc5682403947765c636028c64c49678f3100e5..1fca3c768bf82bce59f5d6aac2113e8e77d6acbb 100644 (file)
@@ -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
 };
 
index f8bde6a88c2a82e6ba29bb91af74ab89ecc23eec..687d874b007b4353ed395263caa79891850eddfe 100644 (file)
@@ -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;