diff options
author | Guchun Chen <guchun.chen@amd.com> | 2019-08-28 18:25:43 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-09-16 07:57:10 -0500 |
commit | c51809fa674b3db1de0325485f9d93f6bdbc2c62 (patch) | |
tree | bed0bd6e2393aca695be8e8ee2216564dff0cbdc | |
parent | 58fc6d6eae1844a080e6b47d118a9a7d7dc72268 (diff) | |
download | libdrm-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.c | 4 |
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) |