Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jnettlet/2cba38d2e1bcf90ffc6a42ae4a9b1bf7 to your computer and use it in GitHub Desktop.
Save jnettlet/2cba38d2e1bcf90ffc6a42ae4a9b1bf7 to your computer and use it in GitHub Desktop.
Temp patch for mesa to fix Arm64 AmdGPU corruption
From c174f3201f58f57571f5676f07041eb50060d181 Mon Sep 17 00:00:00 2001
From: Jon Nettleton <[email protected]>
Date: Tue, 14 Jul 2020 15:01:42 +0200
Subject: [PATCH] radeonsi: Temporary patch to fix corruption with persitent
buffers
Until further debugging is done set kernel_flushes_hdp_before_ib to
false so persistent buffers are allocated from GTT memory. I have
an open issue for this in mesa that perhaps this should become a
runtime DRI option that can be enabled.
Signed-off-by: Jon <[email protected]>
---
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
index 7ac2a61bdfd..e0da35f37bc 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
@@ -117,6 +117,10 @@ static bool do_winsys_init(struct amdgpu_winsys *ws,
strstr(debug_get_option("AMD_DEBUG", ""), "zerovram") != NULL ||
driQueryOptionb(config->options, "radeonsi_zerovram");
+ #if defined(__aarch64__)
+ ws->info.kernel_flushes_hdp_before_ib = false;
+ #endif
+
return true;
fail:
--
2.26.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment