Mesa (staging/20.2): radeonsi: disable SDMA on gfx6-7 and gfx10.3 to decrease CPU overhead
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Dec 15 19:22:05 UTC 2020
Module: Mesa
Branch: staging/20.2
Commit: 825369ce07e164d07869a7e442861f03ebd9d8da
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=825369ce07e164d07869a7e442861f03ebd9d8da
Author: Marek Olšák <marek.olsak at amd.com>
Date: Tue Oct 6 06:51:36 2020 -0400
radeonsi: disable SDMA on gfx6-7 and gfx10.3 to decrease CPU overhead
same as gfx8-10
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7055>
(cherry picked from commit 205f1d79e2464bf565dd02a9cb86ad7e5a3bf29d)
---
.pick_status.json | 2 +-
src/gallium/drivers/radeonsi/si_pipe.c | 33 +++++++++++++++------------------
2 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 8380250abde..a651abec92a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -27436,7 +27436,7 @@
"description": "radeonsi: disable SDMA on gfx6-7 and gfx10.3 to decrease CPU overhead",
"nominated": false,
"nomination_type": null,
- "resolution": 4,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 6789f27c346..93f721e0aac 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -477,25 +477,22 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, unsign
if (!sctx->ctx)
goto fail;
+ /* SDMA causes corruption on: :
+ * - RX 580: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1399, 1889
+ * - gfx9 APUs: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2814
+ * - gfx10: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1907,
+ https://gitlab.freedesktop.org/drm/amd/issues/892
+ *
+ * While we could keep buffer copies and clears enabled, let's disable
+ * everything because SDMA decreases CPU performance because of its
+ * command submission overhead.
+ *
+ * And SDMA is disabled on all chips (instead of just the ones listed above),
+ * because it doesn't make sense to keep it enabled on old chips only
+ * that are not tested as often as newer chips.
+ */
if (sscreen->info.num_rings[RING_DMA] && !(sscreen->debug_flags & DBG(NO_SDMA)) &&
- /* SDMA causes corruption on RX 580:
- * https://gitlab.freedesktop.org/mesa/mesa/-/issues/1399
- * https://gitlab.freedesktop.org/mesa/mesa/-/issues/1889
- */
- (sctx->chip_class != GFX8 || sscreen->debug_flags & DBG(FORCE_SDMA)) &&
- /* SDMA causes corruption on gfx9 APUs:
- * https://gitlab.freedesktop.org/mesa/mesa/-/issues/2814
- *
- * While we could keep buffer copies and clears enabled, let's disable
- * everything, because neither gfx8 nor gfx10 enable SDMA, and it's not
- * easy to test.
- */
- (sctx->chip_class != GFX9 || sscreen->debug_flags & DBG(FORCE_SDMA)) &&
- /* SDMA timeouts sometimes on gfx10 so disable it for now. See:
- * https://bugs.freedesktop.org/show_bug.cgi?id=111481
- * https://gitlab.freedesktop.org/mesa/mesa/-/issues/1907
- */
- (sctx->chip_class != GFX10 || sscreen->debug_flags & DBG(FORCE_SDMA))) {
+ sscreen->debug_flags & DBG(FORCE_SDMA)) {
sctx->sdma_cs = sctx->ws->cs_create(sctx->ctx, RING_DMA, (void *)si_flush_dma_cs, sctx,
stop_exec_on_failure);
}
More information about the mesa-commit
mailing list