winsys/amdgpu+radeon: process AMD_DEBUG in addition to R600_DEBUG
authorMarek Olšák <marek.olsak@amd.com>
Wed, 21 Aug 2019 02:44:16 +0000 (22:44 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 27 Aug 2019 20:16:08 +0000 (16:16 -0400)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c

index 11dcf942c1241a5d9ec18db8a6a4b9673cd4fc79..a89432d8594c6b76b4c7449c1a0d7043c83bdaea 100644 (file)
@@ -106,11 +106,14 @@ static bool do_winsys_init(struct amdgpu_winsys *ws,
       goto fail;
    }
 
-   ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL;
+   ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL ||
+                  strstr(debug_get_option("AMD_DEBUG", ""), "check_vm") != NULL;
    ws->debug_all_bos = debug_get_option_all_bos();
-   ws->reserve_vmid = strstr(debug_get_option("R600_DEBUG", ""), "reserve_vmid") != NULL;
+   ws->reserve_vmid = strstr(debug_get_option("R600_DEBUG", ""), "reserve_vmid") != NULL ||
+                      strstr(debug_get_option("AMD_DEBUG", ""), "reserve_vmid") != NULL;
    ws->zero_all_vram_allocs = strstr(debug_get_option("R600_DEBUG", ""), "zerovram") != NULL ||
-      driQueryOptionb(config->options, "radeonsi_zerovram");
+                              strstr(debug_get_option("AMD_DEBUG", ""), "zerovram") != NULL ||
+                              driQueryOptionb(config->options, "radeonsi_zerovram");
 
    return true;
 
index 75d41ef4f567918a3f5e4b59685814274f9e9109..1630e93d2d6f4045c43dfc6ff35aaed09705827f 100644 (file)
@@ -590,7 +590,8 @@ static bool do_winsys_init(struct radeon_drm_winsys *ws)
     ws->info.has_graphics = true;
     ws->info.cpdma_prefetch_writes_memory = true;
 
-    ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL;
+    ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL ||
+                   strstr(debug_get_option("AMD_DEBUG", ""), "check_vm") != NULL;
 
     return true;
 }