aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichel Dänzer2018-01-16 09:49:45 -0600
committerMichel Dänzer2018-01-26 08:25:17 -0600
commit82aef5f0cbeb5145408f8c5979dc826937d51b7b (patch)
tree203810a33ec2941e294fca5f5ef7fa3929d07a3b /tests
parent8e75f5a1453b1699b91992493e2d2e2a6236965c (diff)
downloadexternal-libdrm-82aef5f0cbeb5145408f8c5979dc826937d51b7b.tar.gz
external-libdrm-82aef5f0cbeb5145408f8c5979dc826937d51b7b.tar.xz
external-libdrm-82aef5f0cbeb5145408f8c5979dc826937d51b7b.zip
amdgpu: Disable VM test suite by default for SI ASICs
Hangs my Cape Verde. Acked-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/amdgpu/amdgpu_test.c2
-rw-r--r--tests/amdgpu/amdgpu_test.h5
-rw-r--r--tests/amdgpu/vm_tests.c20
3 files changed, 26 insertions, 1 deletions
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[] = {
167 }, 167 },
168 { 168 {
169 .pName = VM_TESTS_STR, 169 .pName = VM_TESTS_STR,
170 .pActive = always_active, 170 .pActive = suite_vm_tests_enable,
171 }, 171 },
172}; 172};
173 173
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
@@ -185,6 +185,11 @@ int suite_vm_tests_init();
185int suite_vm_tests_clean(); 185int suite_vm_tests_clean();
186 186
187/** 187/**
188 * Decide if the suite is enabled by default or not.
189 */
190CU_BOOL suite_vm_tests_enable(void);
191
192/**
188 * Tests in vm test suite 193 * Tests in vm test suite
189 */ 194 */
190extern CU_TestInfo vm_tests[]; 195extern CU_TestInfo vm_tests[];
diff --git a/tests/amdgpu/vm_tests.c b/tests/amdgpu/vm_tests.c
index 5f183107..4b0121ff 100644
--- a/tests/amdgpu/vm_tests.c
+++ b/tests/amdgpu/vm_tests.c
@@ -25,6 +25,7 @@
25 25
26#include "amdgpu_test.h" 26#include "amdgpu_test.h"
27#include "amdgpu_drm.h" 27#include "amdgpu_drm.h"
28#include "amdgpu_internal.h"
28 29
29static amdgpu_device_handle device_handle; 30static amdgpu_device_handle device_handle;
30static uint32_t major_version; 31static uint32_t major_version;
@@ -33,6 +34,25 @@ static uint32_t minor_version;
33 34
34static void amdgpu_vmid_reserve_test(void); 35static void amdgpu_vmid_reserve_test(void);
35 36
37CU_BOOL suite_vm_tests_enable(void)
38{
39 CU_BOOL enable = CU_TRUE;
40
41 if (amdgpu_device_initialize(drm_amdgpu[0], &major_version,
42 &minor_version, &device_handle))
43 return CU_FALSE;
44
45 if (device_handle->info.family_id == AMDGPU_FAMILY_SI) {
46 printf("\n\nCurrently hangs the CP on this ASIC, VM suite disabled\n");
47 enable = CU_FALSE;
48 }
49
50 if (amdgpu_device_deinitialize(device_handle))
51 return CU_FALSE;
52
53 return enable;
54}
55
36int suite_vm_tests_init(void) 56int suite_vm_tests_init(void)
37{ 57{
38 struct amdgpu_gpu_info gpu_info = {0}; 58 struct amdgpu_gpu_info gpu_info = {0};