From: Michel Dänzer <[email protected]>

Hangs my Cape Verde.

Signed-off-by: Michel Dänzer <[email protected]>
---
 tests/amdgpu/amdgpu_test.c |  2 +-
 tests/amdgpu/amdgpu_test.h |  5 +++++
 tests/amdgpu/vm_tests.c    | 20 ++++++++++++++++++++
 3 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/tests/amdgpu/amdgpu_test.c b/tests/amdgpu/amdgpu_test.c
index 8fa3399a..cbeb1ee8 100644
--- a/tests/amdgpu/amdgpu_test.c
+++ b/tests/amdgpu/amdgpu_test.c
@@ -167,7 +167,7 @@ static Suites_Active_Status suites_active_stat[] = {
                },
                {
                        .pName = VM_TESTS_STR,
-                       .pActive = always_active,
+                       .pActive = suite_vm_tests_enable,
                },
 };
 
diff --git a/tests/amdgpu/amdgpu_test.h b/tests/amdgpu/amdgpu_test.h
index 3238e05f..1db803c6 100644
--- a/tests/amdgpu/amdgpu_test.h
+++ b/tests/amdgpu/amdgpu_test.h
@@ -184,6 +184,11 @@ int suite_vm_tests_init();
  */
 int suite_vm_tests_clean();
 
+/**
+ * Decide if the suite is enabled by default or not.
+ */
+CU_BOOL suite_vm_tests_enable(void);
+
 /**
  * Tests in vm test suite
  */
diff --git a/tests/amdgpu/vm_tests.c b/tests/amdgpu/vm_tests.c
index 5f183107..ade61c47 100644
--- a/tests/amdgpu/vm_tests.c
+++ b/tests/amdgpu/vm_tests.c
@@ -25,6 +25,7 @@
 
 #include "amdgpu_test.h"
 #include "amdgpu_drm.h"
+#include "amdgpu_internal.h"
 
 static  amdgpu_device_handle device_handle;
 static  uint32_t  major_version;
@@ -33,6 +34,25 @@ static  uint32_t  minor_version;
 
 static void amdgpu_vmid_reserve_test(void);
 
+CU_BOOL suite_vm_tests_enable(void)
+{
+    CU_BOOL enable = CU_TRUE;
+
+       if (amdgpu_device_initialize(drm_amdgpu[0], &major_version,
+                                 &minor_version, &device_handle))
+               return CU_FALSE;
+
+       if (device_handle->info.family_id == AMDGPU_FAMILY_SI) {
+               printf("\n\nCurrently hangs the CP on this ASIC, VM suite 
disabled\n");
+               enable = CU_FALSE;
+       }
+
+       if (amdgpu_device_deinitialize(device_handle))
+               return CU_FALSE;
+
+       return enable;
+}
+
 int suite_vm_tests_init(void)
 {
        struct amdgpu_gpu_info gpu_info = {0};
-- 
2.15.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to