OSDN Git Service

amdgpu: Disable VM test suite by default for SI ASICs
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 16 Jan 2018 15:49:45 +0000 (16:49 +0100)
committerMichel Dänzer <michel@daenzer.net>
Fri, 26 Jan 2018 14:25:17 +0000 (15:25 +0100)
Hangs my Cape Verde.

Acked-by: Christian König <christian.koenig@amd.com>
tests/amdgpu/amdgpu_test.c
tests/amdgpu/amdgpu_test.h
tests/amdgpu/vm_tests.c

index 8fa3399..cbeb1ee 100644 (file)
@@ -167,7 +167,7 @@ static Suites_Active_Status suites_active_stat[] = {
                },
                {
                        .pName = VM_TESTS_STR,
-                       .pActive = always_active,
+                       .pActive = suite_vm_tests_enable,
                },
 };
 
index 3238e05..1db803c 100644 (file)
@@ -185,6 +185,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
  */
 extern CU_TestInfo vm_tests[];
index 5f18310..4b0121f 100644 (file)
@@ -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};