summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-08-13 19:22:06 +0200
committerAndres Gomez <[email protected]>2017-08-19 17:39:35 +0300
commite05ea17c50fe5053b1a4388eb39b26e5060aa349 (patch)
treee544346ef55bd54a6396f20b5e6687bdc91b2efd /src
parent774e77ab64de05d437939110dd11c35a300d47f6 (diff)
radeonsi: disable CE by default
It makes performance worse by a very small (hard to measure) amount. We've done extensive profiling of this feature internally. Cc: 17.1 17.2 <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Christian König <[email protected]> (cherry picked from commit 1ab7fed7079a8b0f670d6a51ddc98691ace29508) [Andres Gomez: resolve trivial conflicts] Signed-off-by: Andres Gomez <[email protected]> Conflicts: src/gallium/drivers/radeonsi/si_pipe.c
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c1
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h4
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c27
3 files changed, 21 insertions, 11 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 2019ecdd577..1ac26fb2d54 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -769,6 +769,7 @@ static const struct debug_named_value common_debug_options[] = {
{ "norbplus", DBG_NO_RB_PLUS, "Disable RB+." },
{ "sisched", DBG_SI_SCHED, "Enable LLVM SI Machine Instruction Scheduler." },
{ "mono", DBG_MONOLITHIC_SHADERS, "Use old-style monolithic shaders compiled on demand" },
+ { "ce", DBG_CE, "Force enable the constant engine" },
{ "noce", DBG_NO_CE, "Disable the constant engine"},
{ "unsafemath", DBG_UNSAFE_MATH, "Enable unsafe math shader optimizations" },
{ "nodccfb", DBG_NO_DCC_FB, "Disable separate DCC on the main framebuffer" },
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index bd542e50071..6af20ae1c82 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -64,12 +64,12 @@
#define R600_PRIM_RECTANGLE_LIST PIPE_PRIM_MAX
/* Debug flags. */
-/* logging */
+/* logging and features */
#define DBG_TEX (1 << 0)
/* gap - reuse */
#define DBG_COMPUTE (1 << 2)
#define DBG_VM (1 << 3)
-/* gap - reuse */
+#define DBG_CE (1 << 4)
/* shader logging */
#define DBG_FS (1 << 5)
#define DBG_VS (1 << 6)
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index c672ed7f6c3..54e000d0570 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -185,15 +185,24 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
sctx->b.gfx.cs = ws->cs_create(sctx->b.ctx, RING_GFX,
si_context_gfx_flush, sctx);
- /* SI + AMDGPU + CE = GPU hang */
- if (!(sscreen->b.debug_flags & DBG_NO_CE) && ws->cs_add_const_ib &&
- sscreen->b.chip_class != SI &&
- /* These can't use CE due to a power gating bug in the kernel. */
- sscreen->b.family != CHIP_CARRIZO &&
- sscreen->b.family != CHIP_STONEY &&
- /* Some CE bug is causing green screen corruption w/ MPV video
- * playback and occasional corruption w/ 3D. */
- sscreen->b.chip_class != GFX9) {
+ bool enable_ce = sscreen->b.chip_class != SI && /* SI hangs */
+ /* These can't use CE due to a power gating bug in the kernel. */
+ sscreen->b.family != CHIP_CARRIZO &&
+ sscreen->b.family != CHIP_STONEY;
+
+ /* CE is currently disabled by default, because it makes s_load latency
+ * worse, because CE IB doesn't run in lockstep with DE.
+ * Remove this line after that performance issue has been resolved.
+ */
+ enable_ce = false;
+
+ /* Apply CE overrides. */
+ if (sscreen->b.debug_flags & DBG_NO_CE)
+ enable_ce = false;
+ else if (sscreen->b.debug_flags & DBG_CE)
+ enable_ce = true;
+
+ if (ws->cs_add_const_ib && enable_ce) {
sctx->ce_ib = ws->cs_add_const_ib(sctx->b.gfx.cs);
if (!sctx->ce_ib)
goto fail;