add ras inject test for gfx and umc module
v2 cover add ras inject test for gfx and umc module
These patches are to support ras inject test for gfx and umc modules.
Patch v2:
Correct "eject" in all commits to "inject".
Add more error checks and print when parsing configuration file. Add umc multi_uncorrectable test in default configuration file.
Guchun Chen (3):
amdgpu: add gfx ras inject configuration file
tests/amdgpu/ras: refine ras inject test
amdgpu: add umc ras inject test configuration
configure.ac | 18 ++ data/amdgpu_ras.json | 267 ++++++++++++++++++++ meson.build | 1 + tests/amdgpu/Makefile.am | 5 +- tests/amdgpu/meson.build | 16 +- tests/amdgpu/ras_tests.c | 527 +++++++++++++++++++++++++++++++++++---- 6 files changed, 783 insertions(+), 51 deletions(-) create mode 100644 data/amdgpu_ras.json
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/3 amdgpu: add gfx ras inject configuration file
This configuration file will be picked up when running gfx ras inject tests by amdgpu_test tool. For the time being, only add those tests that are successfully trafficked. In addition, this file can also be modified by user to add or delete ras inject unit tests for different IP blocks/subblocks.
--- data/amdgpu_ras.json | 250 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) create mode 100644 data/amdgpu_ras.json
data/amdgpu_ras.json new file +250 -0
@@ -0,0 +1,250 @@ +{ + "version": "0.0.1", + "block": { + "gfx": { + "index": 2, + "subblock": { + "gfx_cpc_scratch": 0, + "gfx_cpc_ucode": 1, + "gfx_dc_state_me1": 2, + "gfx_dc_csinvoc_me1": 3, + "gfx_dc_restore_me1": 4, + "gfx_dc_state_me2": 5, + "gfx_dc_csinvoc_me2": 6, + "gfx_dc_restore_me2": 7, + "gfx_cpf_roq_me2": 8, + "gfx_cpf_roq_me1": 9, + "gfx_cpf_tag": 10, + "gfx_cpg_dma_roq": 11, + "gfx_cpg_dma_tag": 12, + "gfx_cpg_tag": 13, + "gfx_gds_mem": 14, + "gfx_gds_input_queue": 15, + "gfx_gds_oa_phy_cmd_ram_mem": 16, + "gfx_gds_oa_phy_data_ram_mem": 17, + "gfx_gds_oa_pipe_mem": 18, + "gfx_spi_sr_mem": 19, + "gfx_sq_sgpr": 20, + "gfx_sq_lds_d": 21, + "gfx_sq_lds_i": 22, + "gfx_sq_vgpr": 23, + "gfx_sqc_inst_utcl1_lfifo": 24, + "gfx_sqc_data_cu0_write_data_buf": 25, + "gfx_sqc_data_cu0_utcl1_lfifo": 26, + "gfx_sqc_data_cu1_write_data_buf": 27, + "gfx_sqc_data_cu1_utcl1_lfifo": 28, + "gfx_sqc_data_cu2_write_data_buf": 29, + "gfx_sqc_data_cu2_utcl1_lfifo": 30, + "gfx_sqc_inst_banka_tag_ram": 31, + "gfx_sqc_inst_banka_utcl1_miss_fifo": 32, + "gfx_sqc_inst_banka_miss_fifo": 33, + "gfx_sqc_inst_banka_bank_ram": 34, + "gfx_sqc_data_banka_tag_ram": 35, + "gfx_sqc_data_banka_hit_fifo": 36, + "gfx_sqc_data_banka_miss_fifo": 37, + "gfx_sqc_data_banka_dirty_bit_ram": 38, + "gfx_sqc_data_banka_bank_ram": 39, + "gfx_sqc_inst_bankb_tag_ram": 40, + "gfx_sqc_inst_bankb_utcl1_miss_fifo": 41, + "gfx_sqc_inst_bankb_miss_fifo": 42, + "gfx_sqc_inst_bankb_bank_ram": 43, + "gfx_sqc_data_bankb_tag_ram": 44, + "gfx_sqc_data_bankb_hit_fifo": 45, + "gfx_sqc_data_bankb_miss_fifo": 46, + "gfx_sqc_data_bankb_dirty_bit_ram": 47, + "gfx_sqc_data_bankb_bank_ram": 48, + "gfx_ta_fs_dfifo": 49, + "gfx_ta_fs_afifo": 50, + "gfx_ta_fl_lfifo": 51, + "gfx_ta_fx_lfifo": 52, + "gfx_ta_fs_cfifo": 53, + "gfx_tca_hole_fifo": 54, + "gfx_tca_req_fifo": 55, + "gfx_tcc_cache_data": 56, + "gfx_tcc_cache_data_bank_0_1": 57, + "gfx_tcc_cache_data_bank_1_0": 58, + "gfx_tcc_cache_data_bank_1_1": 59, + "gfx_tcc_cache_dirty_bank_0": 60, + "gfx_tcc_cache_dirty_bank_1": 61, + "gfx_tcc_high_rate_tag": 62, + "gfx_tcc_low_rate_tag": 63, + "gfx_tcc_in_use_dec": 64, + "gfx_tcc_in_use_transfer": 65, + "gfx_tcc_return_data": 66, + "gfx_tcc_return_control": 67, + "gfx_tcc_uc_atomic_fifo": 68, + "gfx_tcc_write_return": 69, + "gfx_tcc_write_cache_read": 70, + "gfx_tcc_src_fifo": 71, + "gfx_tcc_src_fifo_next_ram": 72, + "gfx_tcc_cache_tag_probe_fifo": 73, + "gfx_tcc_latency_fifo": 74, + "gfx_tcc_latency_fifo_next_ram": 75, + "gfx_tcc_wrret_tag_write_return": 76, + "gfx_tcc_atomic_return_buffer": 77, + "gfx_tci_write_ram": 78, + "gfx_tcp_cache_ram": 79, + "gfx_tcp_lfifo_ram": 80, + "gfx_tcp_cmd_fifo": 81, + "gfx_tcp_vm_fifo": 82, + "gfx_tcp_db_ram": 83, + "gfx_tcp_utcl1_lfifo0": 84, + "gfx_tcp_utcl1_lfifo1": 85, + "gfx_td_ss_fifo_lo": 86, + "gfx_td_ss_fifo_hi": 87, + "gfx_td_cs_fifo": 88, + "gfx_ea_dramrd_cmdmem": 89, + "gfx_ea_dramwr_cmdmem": 90, + "gfx_ea_dramwr_datamem": 91, + "gfx_ea_rret_tagmem": 92, + "gfx_ea_wret_tagmem": 93, + "gfx_ea_gmird_cmdmem": 94, + "gfx_ea_gmiwr_cmdmem": 95, + "gfx_ea_gmiwr_datamem": 96, + "gfx_ea_dramrd_pagemem": 97, + "gfx_ea_dramwr_pagemem": 98, + "gfx_ea_iord_cmdmem": 99, + "gfx_ea_iowr_cmdmem": 100, + "gfx_ea_iowr_datamem": 101, + "gfx_ea_gmird_pagemem": 102, + "gfx_ea_gmiwr_pagemem": 103, + "gfx_ea_mam_d0mem": 104, + "gfx_ea_mam_d1mem": 105, + "gfx_ea_mam_d2mem": 106, + "gfx_ea_mam_d3mem": 107, + "utc_vml2_bank_cache": 108, + "utc_vml2_walker": 109, + "utc_atcl2_cache_2m_bank": 110, + "utc_atcl2_cache_4k_bank": 111 + } + }, + }, + "type": { + "parity": 1, + "single_correctable": 2, + "multi_uncorrectable": 4, + "poison": 8 + }, + "tests": [ + { + "name": "ras_gfx.2.1", + "block": "gfx", + "subblock": "gfx_cpc_ucode", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.10", + "block": "gfx", + "subblock": "gfx_cpf_tag", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.13", + "block": "gfx", + "subblock": "gfx_cpg_tag", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.21", + "block": "gfx", + "subblock": "gfx_sq_lds_d", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.28", + "block": "gfx", + "subblock": "gfx_sqc_data_cu1_utcl1_lfifo", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.31", + "block": "gfx", + "subblock": "gfx_sqc_inst_banka_tag_ram", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.40", + "block": "gfx", + "subblock": "gfx_sqc_inst_bankb_tag_ram", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.49", + "block": "gfx", + "subblock": "gfx_ta_fs_dfifo", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.56", + "block": "gfx", + "subblock": "gfx_tcc_cache_data", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.57", + "block": "gfx", + "subblock": "gfx_tcc_cache_data_bank_0_1", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.58", + "block": "gfx", + "subblock": "gfx_tcc_cache_data_bank_1_0", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.59", + "block": "gfx", + "subblock": "gfx_tcc_cache_data_bank_1_1", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.79", + "block": "gfx", + "subblock": "gfx_tcp_cache_ram", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.86", + "block": "gfx", + "subblock": "gfx_td_ss_fifo_lo", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_gfx.2.89", + "block": "gfx", + "subblock": "gfx_ea_dramrd_cmdmem", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + ] +}
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH v2 2/3 tests/amdgpu/ras: refine ras inject test
In reply to a message not in the archiveRas inject test framework is invalid with original codes, so refine it to make it work on top of kernel ras inject feature enablement.
--- configure.ac | 18 ++ meson.build | 1 + tests/amdgpu/Makefile.am | 5 +- tests/amdgpu/meson.build | 16 +- tests/amdgpu/ras_tests.c | 527 +++++++++++++++++++++++++++++++++++---- 5 files changed, 516 insertions(+), 51 deletions(-)
configure.ac +18 -0
@@ -430,10 +430,24 @@ if test "x$AMDGPU" != xno; then AC_SUBST([CUNIT_CFLAGS]) fi fi + + # Detect json-c library + PKG_CHECK_MODULES([JSONC], [json-c >= 0.10.1], [have_jsonc=yes], [have_jsonc=no]) + if test "x${have_jsonc}" = "xno"; then + AC_CHECK_LIB([json-c], [json_object_object_get], [have_jsonc=yes], [have_jsonc=no]) + if test "x${have_jsonc}" = "xyes"; then + JSONC_LIBS="-ljson-c" + JSONC_CFLAGS="" + AC_SUBST([JSONC_LIBS]) + AC_SUBST([JSONC_CFLAGS]) + fi + fi else have_cunit=no + have_jsonc=no fi AM_CONDITIONAL(HAVE_CUNIT, [test "x$have_cunit" != "xno"]) +AM_CONDITIONAL(HAVE_JSONC, [test "x$have_jsonc" != "xno"]) AM_CONDITIONAL(HAVE_AMDGPU, [test "x$AMDGPU" = xyes]) if test "x$AMDGPU" = xyes; then
@@ -442,6 +456,10 @@ if test "x$AMDGPU" = xyes; then if test "x$have_cunit" = "xno"; then AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests]) fi + + if test "x$have_jsonc" = "xno"; then + AC_MSG_WARN([Could not find json-c library. Disabling amdgpu tests]) + fi else AC_DEFINE(HAVE_AMDGPU, 0) fi
meson.build +1 -0
@@ -217,6 +217,7 @@ libdrm_c_args = warn_c_args + ['-fvisibility=hidden'] dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel) dep_cunit = dependency('cunit', version : '>= 2.1', required : false) +dep_json = dependency('json-c', version : '>= 0.10.1', required : false) _cairo_tests = get_option('cairo-tests') if _cairo_tests != 'false' dep_cairo = dependency('cairo', required : _cairo_tests == 'true')
tests/amdgpu/Makefile.am +3 -2
@@ -7,7 +7,8 @@ AM_CFLAGS = \ LDADD = $(top_builddir)/libdrm.la \ $(top_builddir)/amdgpu/libdrm_amdgpu.la \ - $(CUNIT_LIBS) + $(CUNIT_LIBS) \ + $(JSONC_LIBS) if HAVE_INSTALL_TESTS bin_PROGRAMS = \
@@ -17,7 +18,7 @@ noinst_PROGRAMS = \ amdgpu_test endif -amdgpu_test_CPPFLAGS = $(CUNIT_CFLAGS) +amdgpu_test_CPPFLAGS = $(CUNIT_CFLAGS) $(JSONC_CFLAGS) amdgpu_test_SOURCES = \ amdgpu_test.c \
tests/amdgpu/meson.build +13 -3
@@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -if dep_cunit.found() +if dep_cunit.found() and dep_json.found() amdgpu_test = executable( 'amdgpu_test', files(
@@ -26,9 +26,19 @@ if dep_cunit.found() 'vce_tests.c', 'uvd_enc_tests.c', 'vcn_tests.c', 'deadlock_tests.c', 'vm_tests.c', 'ras_tests.c', 'syncobj_tests.c', ), - dependencies : [dep_cunit, dep_threads], + dependencies : [dep_cunit, dep_json, dep_threads], include_directories : [inc_root, inc_drm, include_directories('../../amdgpu')], link_with : [libdrm, libdrm_amdgpu], install : with_install_tests, ) -endif + + configure_file(input : '../../data/amdgpu_ras.json', + output : 'amdgpu_ras.json', + configuration : configuration_data()) + + install_data( + '../../data/amdgpu_ras.json', + install_mode : 'rw-r--r--', + install_dir : datadir_amdgpu, + ) +endif
tests/amdgpu/ras_tests.c +481 -46
578 lines not on this page · raw message
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH v2 3/3 amdgpu: add umc ras inject test configuration
In reply to a message not in the archiveBoth umc single_correctable and multi_uncorrectable inject types are added.
--- data/amdgpu_ras.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
data/amdgpu_ras.json +17 -0
@@ -1,6 +1,9 @@ { "version": "0.0.1", "block": { + "umc": { + "index": 0 + }, "gfx": { "index": 2, "subblock": {
@@ -126,6 +129,20 @@ "poison": 8 }, "tests": [ + { + "name": "ras_umc.1.0", + "block": "umc", + "type": "single_correctable", + "address": 0, + "value": 0 + }, + { + "name": "ras_umc.1.0", + "block": "umc", + "type": "multi_uncorrectable", + "address": 0, + "value": 0 + }, { "name": "ras_gfx.2.1", "block": "gfx",
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Zhang, Hawking
Reviewed-by Hawking ZhangRegards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Guchun Chen
Sent: 2019年8月7日 14:52
To: [email protected]; Zhang, Hawking <[email protected]>; Li, Dennis <[email protected]>; Pan, Xinhui <[email protected]>; Zhou1, Tao <[email protected]>
Cc: Chen, Guchun <[email protected]>
Subject: [PATCH v2 libdrm 0/3] add ras inject test for gfx and umc module
These patches are to support ras inject test for gfx and umc modules.
Patch v2:
Correct "eject" in all commits to "inject".
Add more error checks and print when parsing configuration file. Add umc multi_uncorrectable test in default configuration file.
Guchun Chen (3):
amdgpu: add gfx ras inject configuration file
tests/amdgpu/ras: refine ras inject test
amdgpu: add umc ras inject test configuration
configure.ac | 18 ++ data/amdgpu_ras.json | 267 ++++++++++++++++++++ meson.build | 1 + tests/amdgpu/Makefile.am | 5 +- tests/amdgpu/meson.build | 16 +- tests/amdgpu/ras_tests.c | 527 +++++++++++++++++++++++++++++++++++---- 6 files changed, 783 insertions(+), 51 deletions(-) create mode 100644 data/amdgpu_ras.json
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx