summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuchun Chen <guchun.chen@amd.com>2019-08-28 18:25:43 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-09-16 07:57:10 -0500
commitc51809fa674b3db1de0325485f9d93f6bdbc2c62 (patch)
treebed0bd6e2393aca695be8e8ee2216564dff0cbdc
parent58fc6d6eae1844a080e6b47d118a9a7d7dc72268 (diff)
downloadlibdrm-c51809fa674b3db1de0325485f9d93f6bdbc2c62.tar.gz
libdrm-c51809fa674b3db1de0325485f9d93f6bdbc2c62.tar.bz2
libdrm-c51809fa674b3db1de0325485f9d93f6bdbc2c62.zip
amdgpu: add ras feature capability check in inject test
When running ras inject test, it's needed to be aligned with kernel's ras enablement. Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Guchun Chen <guchun.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--tests/amdgpu/ras_tests.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/amdgpu/ras_tests.c b/tests/amdgpu/ras_tests.c
index d510b644..c1c543c1 100644
--- a/tests/amdgpu/ras_tests.c
+++ b/tests/amdgpu/ras_tests.c
@@ -861,6 +861,10 @@ static void __amdgpu_ras_ip_inject_test(const struct ras_inject_test_config *ip_
if (block == ARRAY_SIZE(ras_block_string))
break;
+ /* Ensure RAS feature for the IP block is enabled by kernel */
+ if (amdgpu_ras_is_feature_supported(block) <= 0)
+ break;
+
ret = amdgpu_ras_query_err_count(block, &old_ue, &old_ce);
CU_ASSERT_EQUAL(ret, 0);
if (ret)