radeonsi: add AMD_DEBUG=tmz option
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 28 Feb 2020 13:24:29 +0000 (14:24 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 11 May 2020 08:25:53 +0000 (10:25 +0200)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4401>

src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c

index 3d81129a33423dc3c6a2cf0d195281942e61b772..befdc14815cacd6e899c738b7e8baa30c0bc6ac2 100644 (file)
@@ -112,6 +112,11 @@ static bool do_winsys_init(struct amdgpu_winsys *ws,
    ws->zero_all_vram_allocs = strstr(debug_get_option("R600_DEBUG", ""), "zerovram") != NULL ||
                               strstr(debug_get_option("AMD_DEBUG", ""), "zerovram") != NULL ||
                               driQueryOptionb(config->options, "radeonsi_zerovram");
+   ws->secure = strstr(debug_get_option("AMD_DEBUG", ""), "tmz");
+
+   if (ws->secure) {
+      fprintf(stderr, "=== TMZ usage enabled ===\n");
+   }
 
    return true;