Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH] tests/amdgpu: add GFX11 to tests
@ 2023-09-20 22:39 vitaly.prosyak
  2023-09-20 23:31 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: vitaly.prosyak @ 2023-09-20 22:39 UTC (permalink / raw)
  To: igt-dev; +Cc: Alex Deucher, Luben Tuikov, Christian Koenig

From: Vitaly Prosyak <vitaly.prosyak@amd.com>

Add GFX11 to basic and GPU reset tests.
Improve GPU reset tests by validating flags, if no reset or
reset is still in progress then avoid asserting the status.

Cc: Jesse Zhang <Jesse.Zhang@amd.com>
Cc: Luben Tuikov <luben.tuikov@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
---
 include/drm-uapi/amdgpu_drm.h |  2 ++
 lib/amdgpu/amd_dispatch.c     | 21 +++++++++++++++++----
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/include/drm-uapi/amdgpu_drm.h b/include/drm-uapi/amdgpu_drm.h
index 0cbd1540a..323137f42 100644
--- a/include/drm-uapi/amdgpu_drm.h
+++ b/include/drm-uapi/amdgpu_drm.h
@@ -225,6 +225,8 @@ union drm_amdgpu_bo_list {
 /* indicate some errors are detected by RAS */
 #define AMDGPU_CTX_QUERY2_FLAGS_RAS_CE   (1<<3)
 #define AMDGPU_CTX_QUERY2_FLAGS_RAS_UE   (1<<4)
+/* indicate that the reset hasn't completed yet */
+#define AMDGPU_CTX_QUERY2_FLAGS_RESET_IN_PROGRESS (1<<5)
 
 /* Context priority level */
 #define AMDGPU_CTX_PRIORITY_UNSET       -2048
diff --git a/lib/amdgpu/amd_dispatch.c b/lib/amdgpu/amd_dispatch.c
index f17240f5c..b337646d3 100644
--- a/lib/amdgpu/amd_dispatch.c
+++ b/lib/amdgpu/amd_dispatch.c
@@ -103,6 +103,8 @@ amdgpu_memset_dispatch_test(amdgpu_device_handle device_handle,
 		base_cmd->emit(base_cmd, 0x74fac);
 	else if (version == 10)
 		base_cmd->emit(base_cmd, 0x1104bfac);
+	else if (version == 11)
+		base_cmd->emit(base_cmd, 0x1003dfac);
 
 	/* Sets a range of pixel shader constants */
 	base_cmd->emit(base_cmd, PACKET3_COMPUTE(PKT3_SET_SH_REG, 4));
@@ -351,9 +353,9 @@ amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,
 	void *ptr_shader;
 	unsigned char *ptr_src;
 	uint32_t *ptr_cmd;
-	uint64_t mc_address_src, mc_address_dst, mc_address_shader, mc_address_cmd;
+	uint64_t mc_address_src, mc_address_dst, mc_address_shader, mc_address_cmd, reset_flags;
 	amdgpu_va_handle va_src, va_dst, va_shader, va_cmd;
-	int r;
+	int r, r2;
 
 	int bo_dst_size = 0x4000000;
 	int bo_shader_size = 0x400000;
@@ -425,6 +427,8 @@ amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,
 		base_cmd->emit(base_cmd, 0x74fac);
 	else if (version == 10)
 		base_cmd->emit(base_cmd, 0x1104bfac);
+	else if (version == 11)
+		base_cmd->emit(base_cmd, 0x1003dfac);
 
 
 	/* Writes the UAV constant data to the SGPRs. */
@@ -485,7 +489,16 @@ amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,
 
 	r = amdgpu_cs_query_reset_state(context_handle, &hang_state, &hangs);
 	igt_assert_eq(r, 0);
-	igt_assert_eq(hang_state, gpu_reset_status_equel);
+	r2 = amdgpu_cs_query_reset_state2(context_handle, &reset_flags);
+	igt_assert_eq(r2, 0);
+
+	if (!(reset_flags == 0 ||
+		  reset_flags & AMDGPU_CTX_QUERY2_FLAGS_RESET_IN_PROGRESS)) {
+		/*
+		 *  Check reset_state only when reset is occured and not in progress
+		 */
+		igt_assert_eq(hang_state, gpu_reset_status_equel);
+	}
 
 	r = amdgpu_bo_list_destroy(bo_list);
 	igt_assert_eq(r, 0);
@@ -513,7 +526,7 @@ amdgpu_dispatch_hang_slow_helper(amdgpu_device_handle device_handle,
 		igt_info("SKIP ... as there's no ring for ip %d\n", ip_type);
 
 	version = info.hw_ip_version_major;
-	if (version != 9 && version != 10 /*&& version != 11*/) {
+	if (version != 9 && version != 10 && version != 11) {
 		igt_info("SKIP ... unsupported gfx version %d\n", version);
 		return;
 	}
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [igt-dev] ✗ GitLab.Pipeline: warning for tests/amdgpu: add GFX11 to tests
  2023-09-20 22:39 [igt-dev] [PATCH] tests/amdgpu: add GFX11 to tests vitaly.prosyak
@ 2023-09-20 23:31 ` Patchwork
  2023-09-21  0:11 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2023-09-20 23:31 UTC (permalink / raw)
  To: vitaly.prosyak; +Cc: igt-dev

== Series Details ==

Series: tests/amdgpu: add GFX11 to tests
URL   : https://patchwork.freedesktop.org/series/124018/
State : warning

== Summary ==

Pipeline status: FAILED.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/990765 for the overview.

build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/49254783):
  ninja: Entering directory `build'
  [1/1369] Generating version.h with a custom command.
  [2/1365] Linking static target lib/libigt-amdgpu_amd_ip_blocks_c.a.
  [3/1365] Compiling C object 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o'.
  FAILED: lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o 
  cc -Ilib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta -Ilib -I../lib -I../include -I../include/drm-uapi -I../include/linux-uapi -I../lib/stubs/syscalls -I. -I../ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/x86_64-linux-gnu -I/usr/include/valgrind -I/usr/include/alsa -I/usr/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wimplicit-fallthrough=0 -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-clobbered -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-pointer-arith -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fPIC -pthread '-DIGT_DATADIR="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="amdgpu/amd_dispatch"'  -MD -MQ 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o' -MF 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o.d' -o 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o' -c ../lib/amdgpu/amd_dispatch.c
  ../lib/amdgpu/amd_dispatch.c: In function ‘amdgpu_memcpy_dispatch_hang_slow_test’:
  ../lib/amdgpu/amd_dispatch.c:492:7: error: implicit declaration of function ‘amdgpu_cs_query_reset_state2’; did you mean ‘amdgpu_cs_query_reset_state’? [-Werror=implicit-function-declaration]
    r2 = amdgpu_cs_query_reset_state2(context_handle, &reset_flags);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         amdgpu_cs_query_reset_state
  ../lib/amdgpu/amd_dispatch.c:492:7: warning: nested extern declaration of ‘amdgpu_cs_query_reset_state2’ [-Wnested-externs]
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1695252477:step_script
  section_start:1695252477:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1695252478:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-meson-arm64 has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/49254786):
  [1/1031] Generating version.h with a custom command.
  [2/1027] Linking static target lib/libigt-igt_audio_c.a.
  [3/1027] Linking static target lib/libigt-amdgpu_amd_ip_blocks_c.a.
  [4/1027] Compiling C object 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o'.
  FAILED: lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o 
  /usr/bin/aarch64-linux-gnu-gcc -Ilib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta -Ilib -I../lib -I../include -I../include/drm-uapi -I../include/linux-uapi -I../lib/stubs/syscalls -I. -I../ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/aarch64-linux-gnu -I/usr/include/valgrind -I/usr/include/alsa -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wimplicit-fallthrough=0 -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-clobbered -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-pointer-arith -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fPIC -pthread '-DIGT_DATADIR="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="amdgpu/amd_dispatch"'  -MD -MQ 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o' -MF 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o.d' -o 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o' -c ../lib/amdgpu/amd_dispatch.c
  ../lib/amdgpu/amd_dispatch.c: In function ‘amdgpu_memcpy_dispatch_hang_slow_test’:
  ../lib/amdgpu/amd_dispatch.c:492:7: error: implicit declaration of function ‘amdgpu_cs_query_reset_state2’; did you mean ‘amdgpu_cs_query_reset_state’? [-Werror=implicit-function-declaration]
    r2 = amdgpu_cs_query_reset_state2(context_handle, &reset_flags);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         amdgpu_cs_query_reset_state
  ../lib/amdgpu/amd_dispatch.c:492:7: warning: nested extern declaration of ‘amdgpu_cs_query_reset_state2’ [-Wnested-externs]
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1695252484:step_script
  section_start:1695252484:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1695252484:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-meson-armhf has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/49254785):
  ninja: build stopped: subcommand failed.
  ninja: Entering directory `build'
  [1/1029] Generating version.h with a custom command.
  [2/1025] Compiling C object 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o'.
  FAILED: lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o 
  /usr/bin/arm-linux-gnueabihf-gcc -Ilib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta -Ilib -I../lib -I../include -I../include/drm-uapi -I../include/linux-uapi -I../lib/stubs/syscalls -I. -I../ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/arm-linux-gnueabihf -I/usr/include/valgrind -I/usr/include/alsa -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wimplicit-fallthrough=0 -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-clobbered -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-pointer-arith -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fPIC -pthread '-DIGT_DATADIR="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="amdgpu/amd_dispatch"'  -MD -MQ 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o' -MF 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o.d' -o 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o' -c ../lib/amdgpu/amd_dispatch.c
  ../lib/amdgpu/amd_dispatch.c: In function ‘amdgpu_memcpy_dispatch_hang_slow_test’:
  ../lib/amdgpu/amd_dispatch.c:492:7: error: implicit declaration of function ‘amdgpu_cs_query_reset_state2’; did you mean ‘amdgpu_cs_query_reset_state’? [-Werror=implicit-function-declaration]
    r2 = amdgpu_cs_query_reset_state2(context_handle, &reset_flags);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         amdgpu_cs_query_reset_state
  ../lib/amdgpu/amd_dispatch.c:492:7: warning: nested extern declaration of ‘amdgpu_cs_query_reset_state2’ [-Wnested-externs]
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1695252485:step_script
  section_start:1695252485:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1695252485:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-meson-mips has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/49254787):
  [1/1040] Generating version.h with a custom command.
  [2/1036] Linking static target lib/libigt-igt_frame_c.a.
  [3/1036] Linking static target lib/libigt-amdgpu_amd_ip_blocks_c.a.
  [4/1036] Compiling C object 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o'.
  FAILED: lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o 
  /usr/bin/mips-linux-gnu-gcc -Ilib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta -Ilib -I../lib -I../include -I../include/drm-uapi -I../include/linux-uapi -I../lib/stubs/syscalls -I. -I../ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/mips-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/mips-linux-gnu -I/usr/include/valgrind -I/usr/include/alsa -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wimplicit-fallthrough=0 -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-clobbered -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-pointer-arith -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fPIC -pthread '-DIGT_DATADIR="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="amdgpu/amd_dispatch"'  -MD -MQ 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o' -MF 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o.d' -o 'lib/76b5a35@@igt-amdgpu_amd_dispatch_c@sta/amdgpu_amd_dispatch.c.o' -c ../lib/amdgpu/amd_dispatch.c
  ../lib/amdgpu/amd_dispatch.c: In function ‘amdgpu_memcpy_dispatch_hang_slow_test’:
  ../lib/amdgpu/amd_dispatch.c:492:7: error: implicit declaration of function ‘amdgpu_cs_query_reset_state2’; did you mean ‘amdgpu_cs_query_reset_state’? [-Werror=implicit-function-declaration]
    r2 = amdgpu_cs_query_reset_state2(context_handle, &reset_flags);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         amdgpu_cs_query_reset_state
  ../lib/amdgpu/amd_dispatch.c:492:7: warning: nested extern declaration of ‘amdgpu_cs_query_reset_state2’ [-Wnested-externs]
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1695252491:step_script
  section_start:1695252491:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1695252492:cleanup_file_variables
  ERROR: Job failed: exit code 1

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/990765

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [igt-dev] ✗ Fi.CI.BAT: failure for tests/amdgpu: add GFX11 to tests
  2023-09-20 22:39 [igt-dev] [PATCH] tests/amdgpu: add GFX11 to tests vitaly.prosyak
  2023-09-20 23:31 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
@ 2023-09-21  0:11 ` Patchwork
  2023-09-21  0:45 ` [igt-dev] ✗ CI.xeBAT: " Patchwork
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2023-09-21  0:11 UTC (permalink / raw)
  To: vitaly.prosyak; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 5426 bytes --]

== Series Details ==

Series: tests/amdgpu: add GFX11 to tests
URL   : https://patchwork.freedesktop.org/series/124018/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13659 -> IGTPW_9833
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_9833 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_9833, please notify your bug team (lgci.bug.filing@intel.com) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/index.html

Participating hosts (40 -> 37)
------------------------------

  Missing    (3): fi-hsw-4770 bat-dg2-9 fi-snb-2520m 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_9833:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_exec_suspend@basic-s3@lmem0:
    - bat-dg2-11:         NOTRUN -> [INCOMPLETE][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/bat-dg2-11/igt@gem_exec_suspend@basic-s3@lmem0.html

  
Known issues
------------

  Here are the changes found in IGTPW_9833 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_busy@busy@all-engines:
    - bat-mtlp-8:         [PASS][2] -> [DMESG-FAIL][3] ([i915#8962])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13659/bat-mtlp-8/igt@gem_busy@busy@all-engines.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/bat-mtlp-8/igt@gem_busy@busy@all-engines.html

  * igt@gem_exec_suspend@basic-s0@smem:
    - bat-mtlp-8:         NOTRUN -> [ABORT][4] ([i915#9262])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/bat-mtlp-8/igt@gem_exec_suspend@basic-s0@smem.html

  * igt@i915_selftest@live@gt_heartbeat:
    - fi-apl-guc:         [PASS][5] -> [DMESG-FAIL][6] ([i915#5334])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13659/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_suspend@basic-s3-without-i915:
    - bat-mtlp-8:         NOTRUN -> [SKIP][7] ([i915#6645])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/bat-mtlp-8/igt@i915_suspend@basic-s3-without-i915.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@gt_heartbeat:
    - fi-glk-j4005:       [DMESG-FAIL][8] ([i915#5334]) -> [PASS][9]
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13659/fi-glk-j4005/igt@i915_selftest@live@gt_heartbeat.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/fi-glk-j4005/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_selftest@live@gt_lrc:
    - bat-dg2-11:         [INCOMPLETE][10] ([i915#7609] / [i915#7913]) -> [PASS][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13659/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/bat-dg2-11/igt@i915_selftest@live@gt_lrc.html

  * igt@i915_selftest@live@requests:
    - bat-mtlp-8:         [ABORT][12] ([i915#9262]) -> [PASS][13]
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13659/bat-mtlp-8/igt@i915_selftest@live@requests.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/bat-mtlp-8/igt@i915_selftest@live@requests.html

  * igt@kms_chamelium_edid@hdmi-edid-read:
    - {bat-dg2-13}:       [DMESG-WARN][14] ([i915#7952]) -> [PASS][15]
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13659/bat-dg2-13/igt@kms_chamelium_edid@hdmi-edid-read.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/bat-dg2-13/igt@kms_chamelium_edid@hdmi-edid-read.html

  * igt@kms_hdmi_inject@inject-audio:
    - fi-kbl-guc:         [FAIL][16] ([IGT#3] / [i915#6121]) -> [PASS][17]
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13659/fi-kbl-guc/igt@kms_hdmi_inject@inject-audio.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/fi-kbl-guc/igt@kms_hdmi_inject@inject-audio.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [IGT#3]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/3
  [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
  [i915#6121]: https://gitlab.freedesktop.org/drm/intel/issues/6121
  [i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
  [i915#7609]: https://gitlab.freedesktop.org/drm/intel/issues/7609
  [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
  [i915#7952]: https://gitlab.freedesktop.org/drm/intel/issues/7952
  [i915#8962]: https://gitlab.freedesktop.org/drm/intel/issues/8962
  [i915#9262]: https://gitlab.freedesktop.org/drm/intel/issues/9262


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_7494 -> IGTPW_9833

  CI-20190529: 20190529
  CI_DRM_13659: b64f074fa9711dea043833b2d0990d1a4f7a36ac @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_9833: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/index.html
  IGT_7494: 8b5be5770319f47d71782bc89e4738aa63d6906d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/index.html

[-- Attachment #2: Type: text/html, Size: 6425 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [igt-dev] ✗ CI.xeBAT: failure for tests/amdgpu: add GFX11 to tests
  2023-09-20 22:39 [igt-dev] [PATCH] tests/amdgpu: add GFX11 to tests vitaly.prosyak
  2023-09-20 23:31 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
  2023-09-21  0:11 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
@ 2023-09-21  0:45 ` Patchwork
  2023-09-21 12:46 ` [igt-dev] [PATCH] " Kamil Konieczny
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2023-09-21  0:45 UTC (permalink / raw)
  To: vitaly.prosyak; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 7372 bytes --]

== Series Details ==

Series: tests/amdgpu: add GFX11 to tests
URL   : https://patchwork.freedesktop.org/series/124018/
State : failure

== Summary ==

CI Bug Log - changes from XEIGT_7494_BAT -> XEIGTPW_9833_BAT
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with XEIGTPW_9833_BAT absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in XEIGTPW_9833_BAT, please notify your bug team (lgci.bug.filing@intel.com) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (4 -> 4)
------------------------------

  No changes in participating hosts

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in XEIGTPW_9833_BAT:

### IGT changes ###

#### Possible regressions ####

  * igt@xe_live_ktest@dmabuf:
    - bat-pvc-2:          NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@xe_live_ktest@dmabuf.html

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * {igt@xe_live_ktest@dmabuf@xe_dma_buf-xe_dma_buf_kunit}:
    - bat-pvc-2:          NOTRUN -> [FAIL][2]
   [2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@xe_live_ktest@dmabuf@xe_dma_buf-xe_dma_buf_kunit.html

  
Known issues
------------

  Here are the changes found in XEIGTPW_9833_BAT that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_addfb_basic@addfb25-x-tiled-legacy:
    - bat-pvc-2:          NOTRUN -> [SKIP][3] ([Intel XE#538]) +33 other tests skip
   [3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@kms_addfb_basic@addfb25-x-tiled-legacy.html

  * igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
    - bat-pvc-2:          NOTRUN -> [SKIP][4] ([Intel XE#539]) +7 other tests skip
   [4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@kms_cursor_legacy@basic-flip-after-cursor-atomic.html

  * igt@kms_flip@basic-flip-vs-dpms:
    - bat-pvc-2:          NOTRUN -> [SKIP][5] ([Intel XE#275] / [Intel XE#541]) +3 other tests skip
   [5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@kms_flip@basic-flip-vs-dpms.html

  * igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1:
    - bat-adlp-7:         [PASS][6] -> [FAIL][7] ([Intel XE#480]) +1 other test fail
   [6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7494/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html
   [7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html

  * igt@kms_force_connector_basic@force-connector-state:
    - bat-pvc-2:          NOTRUN -> [SKIP][8] ([Intel XE#540]) +3 other tests skip
   [8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@kms_force_connector_basic@force-connector-state.html

  * igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
    - bat-pvc-2:          NOTRUN -> [SKIP][9] ([Intel XE#537]) +6 other tests skip
   [9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html

  * igt@kms_prop_blob@basic:
    - bat-pvc-2:          NOTRUN -> [SKIP][10] ([Intel XE#536])
   [10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@kms_prop_blob@basic.html

  * igt@kms_psr@primary_page_flip:
    - bat-pvc-2:          NOTRUN -> [SKIP][11] ([Intel XE#535]) +2 other tests skip
   [11]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@kms_psr@primary_page_flip.html

  * igt@xe_evict@evict-beng-small-external:
    - bat-pvc-2:          NOTRUN -> [FAIL][12] ([Intel XE#389]) +3 other tests fail
   [12]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@xe_evict@evict-beng-small-external.html

  * igt@xe_evict@evict-small-cm:
    - bat-pvc-2:          NOTRUN -> [DMESG-FAIL][13] ([Intel XE#482]) +3 other tests dmesg-fail
   [13]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@xe_evict@evict-small-cm.html

  * igt@xe_guc_pc@freq_range_idle:
    - bat-pvc-2:          NOTRUN -> [SKIP][14] ([Intel XE#533]) +1 other test skip
   [14]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@xe_guc_pc@freq_range_idle.html

  * igt@xe_huc_copy@huc_copy:
    - bat-pvc-2:          NOTRUN -> [SKIP][15] ([Intel XE#255])
   [15]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@xe_huc_copy@huc_copy.html

  * igt@xe_intel_bb@render:
    - bat-pvc-2:          NOTRUN -> [SKIP][16] ([Intel XE#532])
   [16]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@xe_intel_bb@render.html

  * igt@xe_pm_residency@gt-c6-on-idle:
    - bat-pvc-2:          NOTRUN -> [SKIP][17] ([Intel XE#531])
   [17]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@xe_pm_residency@gt-c6-on-idle.html

  
#### Possible fixes ####

  * igt@xe_module_load@load:
    - bat-pvc-2:          [INCOMPLETE][18] ([Intel XE#597]) -> [PASS][19]
   [18]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7494/bat-pvc-2/igt@xe_module_load@load.html
   [19]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/bat-pvc-2/igt@xe_module_load@load.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [Intel XE#255]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/255
  [Intel XE#275]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/275
  [Intel XE#389]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/389
  [Intel XE#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480
  [Intel XE#482]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/482
  [Intel XE#531]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/531
  [Intel XE#532]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/532
  [Intel XE#533]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/533
  [Intel XE#535]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/535
  [Intel XE#536]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/536
  [Intel XE#537]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/537
  [Intel XE#538]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/538
  [Intel XE#539]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/539
  [Intel XE#540]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/540
  [Intel XE#541]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/541
  [Intel XE#597]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/597


Build changes
-------------

  * IGT: IGT_7494 -> IGTPW_9833
  * Linux: xe-386-805557401e7aaeeec5aeb1de6688853390738bee -> xe-387-6e4a4aa0279d8de30726606ccf74de109af20e6c

  IGTPW_9833: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9833/index.html
  IGT_7494: 8b5be5770319f47d71782bc89e4738aa63d6906d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  xe-386-805557401e7aaeeec5aeb1de6688853390738bee: 805557401e7aaeeec5aeb1de6688853390738bee
  xe-387-6e4a4aa0279d8de30726606ccf74de109af20e6c: 6e4a4aa0279d8de30726606ccf74de109af20e6c

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9833/index.html

[-- Attachment #2: Type: text/html, Size: 8367 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH] tests/amdgpu: add GFX11 to tests
  2023-09-20 22:39 [igt-dev] [PATCH] tests/amdgpu: add GFX11 to tests vitaly.prosyak
                   ` (2 preceding siblings ...)
  2023-09-21  0:45 ` [igt-dev] ✗ CI.xeBAT: " Patchwork
@ 2023-09-21 12:46 ` Kamil Konieczny
  2023-09-21 17:16   ` Luben Tuikov
  2023-09-22  1:24 ` Zhang, Jesse(Jie)
  2023-09-22  1:49 ` [igt-dev] ✗ Fi.CI.BUILD: failure for tests/amdgpu: add GFX11 to tests (rev2) Patchwork
  5 siblings, 1 reply; 8+ messages in thread
From: Kamil Konieczny @ 2023-09-21 12:46 UTC (permalink / raw)
  To: igt-dev; +Cc: Alex Deucher, Luben Tuikov, Christian Koenig

Hi Vitaly,

On 2023-09-20 at 18:39:05 -0400, vitaly.prosyak@amd.com wrote:
> From: Vitaly Prosyak <vitaly.prosyak@amd.com>
> 
> Add GFX11 to basic and GPU reset tests.
> Improve GPU reset tests by validating flags, if no reset or
> reset is still in progress then avoid asserting the status.
> 
> Cc: Jesse Zhang <Jesse.Zhang@amd.com>
> Cc: Luben Tuikov <luben.tuikov@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Christian Koenig <christian.koenig@amd.com>
> 
> Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
> ---
>  include/drm-uapi/amdgpu_drm.h |  2 ++
>  lib/amdgpu/amd_dispatch.c     | 21 +++++++++++++++++----
>  2 files changed, 19 insertions(+), 4 deletions(-)
> 
> diff --git a/include/drm-uapi/amdgpu_drm.h b/include/drm-uapi/amdgpu_drm.h
> index 0cbd1540a..323137f42 100644
> --- a/include/drm-uapi/amdgpu_drm.h
> +++ b/include/drm-uapi/amdgpu_drm.h
> @@ -225,6 +225,8 @@ union drm_amdgpu_bo_list {
>  /* indicate some errors are detected by RAS */
>  #define AMDGPU_CTX_QUERY2_FLAGS_RAS_CE   (1<<3)
>  #define AMDGPU_CTX_QUERY2_FLAGS_RAS_UE   (1<<4)
> +/* indicate that the reset hasn't completed yet */
> +#define AMDGPU_CTX_QUERY2_FLAGS_RESET_IN_PROGRESS (1<<5)
>  
>  /* Context priority level */
>  #define AMDGPU_CTX_PRIORITY_UNSET       -2048
> diff --git a/lib/amdgpu/amd_dispatch.c b/lib/amdgpu/amd_dispatch.c
> index f17240f5c..b337646d3 100644
> --- a/lib/amdgpu/amd_dispatch.c
> +++ b/lib/amdgpu/amd_dispatch.c
> @@ -103,6 +103,8 @@ amdgpu_memset_dispatch_test(amdgpu_device_handle device_handle,
>  		base_cmd->emit(base_cmd, 0x74fac);
>  	else if (version == 10)
>  		base_cmd->emit(base_cmd, 0x1104bfac);
> +	else if (version == 11)
> +		base_cmd->emit(base_cmd, 0x1003dfac);
>  
>  	/* Sets a range of pixel shader constants */
>  	base_cmd->emit(base_cmd, PACKET3_COMPUTE(PKT3_SET_SH_REG, 4));
> @@ -351,9 +353,9 @@ amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,
>  	void *ptr_shader;
>  	unsigned char *ptr_src;
>  	uint32_t *ptr_cmd;
> -	uint64_t mc_address_src, mc_address_dst, mc_address_shader, mc_address_cmd;
> +	uint64_t mc_address_src, mc_address_dst, mc_address_shader, mc_address_cmd, reset_flags;
>  	amdgpu_va_handle va_src, va_dst, va_shader, va_cmd;
> -	int r;
> +	int r, r2;
>  
>  	int bo_dst_size = 0x4000000;
>  	int bo_shader_size = 0x400000;
> @@ -425,6 +427,8 @@ amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,
>  		base_cmd->emit(base_cmd, 0x74fac);
>  	else if (version == 10)
>  		base_cmd->emit(base_cmd, 0x1104bfac);
> +	else if (version == 11)
> +		base_cmd->emit(base_cmd, 0x1003dfac);
>  
>  
>  	/* Writes the UAV constant data to the SGPRs. */
> @@ -485,7 +489,16 @@ amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,
>  
>  	r = amdgpu_cs_query_reset_state(context_handle, &hang_state, &hangs);
>  	igt_assert_eq(r, 0);
> -	igt_assert_eq(hang_state, gpu_reset_status_equel);
> +	r2 = amdgpu_cs_query_reset_state2(context_handle, &reset_flags);
> +	igt_assert_eq(r2, 0);
> +
> +	if (!(reset_flags == 0 ||
> +		  reset_flags & AMDGPU_CTX_QUERY2_FLAGS_RESET_IN_PROGRESS)) {
> +		/*
> +		 *  Check reset_state only when reset is occured and not in progress

Spotted by checkpatch.pl:

WARNING: 'occured' may be misspelled - perhaps 'occurred'?
#79: FILE: lib/amdgpu/amd_dispatch.c:498:
+                *  Check reset_state only when reset is occured and not in progress
                                                         ^^^^^^^
Btw your patch didn't build on debian image, see gitlab warning.

Regards,
Kamil

> +		 */
> +		igt_assert_eq(hang_state, gpu_reset_status_equel);
> +	}
>  
>  	r = amdgpu_bo_list_destroy(bo_list);
>  	igt_assert_eq(r, 0);
> @@ -513,7 +526,7 @@ amdgpu_dispatch_hang_slow_helper(amdgpu_device_handle device_handle,
>  		igt_info("SKIP ... as there's no ring for ip %d\n", ip_type);
>  
>  	version = info.hw_ip_version_major;
> -	if (version != 9 && version != 10 /*&& version != 11*/) {
> +	if (version != 9 && version != 10 && version != 11) {
>  		igt_info("SKIP ... unsupported gfx version %d\n", version);
>  		return;
>  	}
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH] tests/amdgpu: add GFX11 to tests
  2023-09-21 12:46 ` [igt-dev] [PATCH] " Kamil Konieczny
@ 2023-09-21 17:16   ` Luben Tuikov
  0 siblings, 0 replies; 8+ messages in thread
From: Luben Tuikov @ 2023-09-21 17:16 UTC (permalink / raw)
  To: Kamil Konieczny, igt-dev, vitaly.prosyak, Alex Deucher,
	Christian Koenig

On 2023-09-21 08:46, Kamil Konieczny wrote:
> Hi Vitaly,
> 
> On 2023-09-20 at 18:39:05 -0400, vitaly.prosyak@amd.com wrote:
>> From: Vitaly Prosyak <vitaly.prosyak@amd.com>
>>
>> Add GFX11 to basic and GPU reset tests.
>> Improve GPU reset tests by validating flags, if no reset or
>> reset is still in progress then avoid asserting the status.
>>
>> Cc: Jesse Zhang <Jesse.Zhang@amd.com>
>> Cc: Luben Tuikov <luben.tuikov@amd.com>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: Christian Koenig <christian.koenig@amd.com>
>>
>> Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
>> ---
>>  include/drm-uapi/amdgpu_drm.h |  2 ++
>>  lib/amdgpu/amd_dispatch.c     | 21 +++++++++++++++++----
>>  2 files changed, 19 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/drm-uapi/amdgpu_drm.h b/include/drm-uapi/amdgpu_drm.h
>> index 0cbd1540a..323137f42 100644
>> --- a/include/drm-uapi/amdgpu_drm.h
>> +++ b/include/drm-uapi/amdgpu_drm.h
>> @@ -225,6 +225,8 @@ union drm_amdgpu_bo_list {
>>  /* indicate some errors are detected by RAS */
>>  #define AMDGPU_CTX_QUERY2_FLAGS_RAS_CE   (1<<3)
>>  #define AMDGPU_CTX_QUERY2_FLAGS_RAS_UE   (1<<4)
>> +/* indicate that the reset hasn't completed yet */
>> +#define AMDGPU_CTX_QUERY2_FLAGS_RESET_IN_PROGRESS (1<<5)
>>  
>>  /* Context priority level */
>>  #define AMDGPU_CTX_PRIORITY_UNSET       -2048
>> diff --git a/lib/amdgpu/amd_dispatch.c b/lib/amdgpu/amd_dispatch.c
>> index f17240f5c..b337646d3 100644
>> --- a/lib/amdgpu/amd_dispatch.c
>> +++ b/lib/amdgpu/amd_dispatch.c
>> @@ -103,6 +103,8 @@ amdgpu_memset_dispatch_test(amdgpu_device_handle device_handle,
>>  		base_cmd->emit(base_cmd, 0x74fac);
>>  	else if (version == 10)
>>  		base_cmd->emit(base_cmd, 0x1104bfac);
>> +	else if (version == 11)
>> +		base_cmd->emit(base_cmd, 0x1003dfac);
>>  
>>  	/* Sets a range of pixel shader constants */
>>  	base_cmd->emit(base_cmd, PACKET3_COMPUTE(PKT3_SET_SH_REG, 4));
>> @@ -351,9 +353,9 @@ amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,
>>  	void *ptr_shader;
>>  	unsigned char *ptr_src;
>>  	uint32_t *ptr_cmd;
>> -	uint64_t mc_address_src, mc_address_dst, mc_address_shader, mc_address_cmd;
>> +	uint64_t mc_address_src, mc_address_dst, mc_address_shader, mc_address_cmd, reset_flags;
>>  	amdgpu_va_handle va_src, va_dst, va_shader, va_cmd;
>> -	int r;
>> +	int r, r2;
>>  
>>  	int bo_dst_size = 0x4000000;
>>  	int bo_shader_size = 0x400000;
>> @@ -425,6 +427,8 @@ amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,
>>  		base_cmd->emit(base_cmd, 0x74fac);
>>  	else if (version == 10)
>>  		base_cmd->emit(base_cmd, 0x1104bfac);
>> +	else if (version == 11)
>> +		base_cmd->emit(base_cmd, 0x1003dfac);
>>  
>>  
>>  	/* Writes the UAV constant data to the SGPRs. */
>> @@ -485,7 +489,16 @@ amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,
>>  
>>  	r = amdgpu_cs_query_reset_state(context_handle, &hang_state, &hangs);
>>  	igt_assert_eq(r, 0);
>> -	igt_assert_eq(hang_state, gpu_reset_status_equel);
>> +	r2 = amdgpu_cs_query_reset_state2(context_handle, &reset_flags);
>> +	igt_assert_eq(r2, 0);
>> +
>> +	if (!(reset_flags == 0 ||
>> +		  reset_flags & AMDGPU_CTX_QUERY2_FLAGS_RESET_IN_PROGRESS)) {
>> +		/*
>> +		 *  Check reset_state only when reset is occured and not in progress
> 
> Spotted by checkpatch.pl:
> 
> WARNING: 'occured' may be misspelled - perhaps 'occurred'?
> #79: FILE: lib/amdgpu/amd_dispatch.c:498:
> +                *  Check reset_state only when reset is occured and not in progress
>                                                          ^^^^^^^
> Btw your patch didn't build on debian image, see gitlab warning.

Good catch!

1. Now, since we're fixing this comment, we might as well say:

	/* If we're in reset and reset hasn't occurred, then check
	 * that the hang state is equal to the GPU reset status and
	 * assert otherwise.
	 */
	igt_assert_eq(hang_state, gpu_reset_status_equel);

2. Could we please also fix the spelling of,

gpu_reset_status_equel --> gpu_reset_status_equal ?

It's just not a good impression when there are spelling mistakes in code.

Thanks!
-- 
Regards,
Luben

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH] tests/amdgpu: add GFX11 to tests
  2023-09-20 22:39 [igt-dev] [PATCH] tests/amdgpu: add GFX11 to tests vitaly.prosyak
                   ` (3 preceding siblings ...)
  2023-09-21 12:46 ` [igt-dev] [PATCH] " Kamil Konieczny
@ 2023-09-22  1:24 ` Zhang, Jesse(Jie)
  2023-09-22  1:49 ` [igt-dev] ✗ Fi.CI.BUILD: failure for tests/amdgpu: add GFX11 to tests (rev2) Patchwork
  5 siblings, 0 replies; 8+ messages in thread
From: Zhang, Jesse(Jie) @ 2023-09-22  1:24 UTC (permalink / raw)
  To: Prosyak, Vitaly, igt-dev@lists.freedesktop.org
  Cc: Deucher, Alexander, Tuikov, Luben, Koenig, Christian

[AMD Official Use Only - General]

Reviewed-by: Jesse Zhang <Jesse.Zhang@amd.com>

Regards,
Jesse

-----Original Message-----
From: vitaly.prosyak@amd.com <vitaly.prosyak@amd.com>
Sent: Thursday, September 21, 2023 6:39 AM
To: igt-dev@lists.freedesktop.org
Cc: Prosyak, Vitaly <Vitaly.Prosyak@amd.com>; Zhang, Jesse(Jie) <Jesse.Zhang@amd.com>; Tuikov, Luben <Luben.Tuikov@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>
Subject: [PATCH] tests/amdgpu: add GFX11 to tests

From: Vitaly Prosyak <vitaly.prosyak@amd.com>

Add GFX11 to basic and GPU reset tests.
Improve GPU reset tests by validating flags, if no reset or reset is still in progress then avoid asserting the status.

Cc: Jesse Zhang <Jesse.Zhang@amd.com>
Cc: Luben Tuikov <luben.tuikov@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
---
 include/drm-uapi/amdgpu_drm.h |  2 ++
 lib/amdgpu/amd_dispatch.c     | 21 +++++++++++++++++----
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/include/drm-uapi/amdgpu_drm.h b/include/drm-uapi/amdgpu_drm.h index 0cbd1540a..323137f42 100644
--- a/include/drm-uapi/amdgpu_drm.h
+++ b/include/drm-uapi/amdgpu_drm.h
@@ -225,6 +225,8 @@ union drm_amdgpu_bo_list {
 /* indicate some errors are detected by RAS */
 #define AMDGPU_CTX_QUERY2_FLAGS_RAS_CE   (1<<3)
 #define AMDGPU_CTX_QUERY2_FLAGS_RAS_UE   (1<<4)
+/* indicate that the reset hasn't completed yet */ #define
+AMDGPU_CTX_QUERY2_FLAGS_RESET_IN_PROGRESS (1<<5)

 /* Context priority level */
 #define AMDGPU_CTX_PRIORITY_UNSET       -2048
diff --git a/lib/amdgpu/amd_dispatch.c b/lib/amdgpu/amd_dispatch.c index f17240f5c..b337646d3 100644
--- a/lib/amdgpu/amd_dispatch.c
+++ b/lib/amdgpu/amd_dispatch.c
@@ -103,6 +103,8 @@ amdgpu_memset_dispatch_test(amdgpu_device_handle device_handle,
                base_cmd->emit(base_cmd, 0x74fac);
        else if (version == 10)
                base_cmd->emit(base_cmd, 0x1104bfac);
+       else if (version == 11)
+               base_cmd->emit(base_cmd, 0x1003dfac);

        /* Sets a range of pixel shader constants */
        base_cmd->emit(base_cmd, PACKET3_COMPUTE(PKT3_SET_SH_REG, 4)); @@ -351,9 +353,9 @@ amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,
        void *ptr_shader;
        unsigned char *ptr_src;
        uint32_t *ptr_cmd;
-       uint64_t mc_address_src, mc_address_dst, mc_address_shader, mc_address_cmd;
+       uint64_t mc_address_src, mc_address_dst, mc_address_shader,
+mc_address_cmd, reset_flags;
        amdgpu_va_handle va_src, va_dst, va_shader, va_cmd;
-       int r;
+       int r, r2;

        int bo_dst_size = 0x4000000;
        int bo_shader_size = 0x400000;
@@ -425,6 +427,8 @@ amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,
                base_cmd->emit(base_cmd, 0x74fac);
        else if (version == 10)
                base_cmd->emit(base_cmd, 0x1104bfac);
+       else if (version == 11)
+               base_cmd->emit(base_cmd, 0x1003dfac);


        /* Writes the UAV constant data to the SGPRs. */ @@ -485,7 +489,16 @@ amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,

        r = amdgpu_cs_query_reset_state(context_handle, &hang_state, &hangs);
        igt_assert_eq(r, 0);
-       igt_assert_eq(hang_state, gpu_reset_status_equel);
+       r2 = amdgpu_cs_query_reset_state2(context_handle, &reset_flags);
+       igt_assert_eq(r2, 0);
+
+       if (!(reset_flags == 0 ||
+                 reset_flags & AMDGPU_CTX_QUERY2_FLAGS_RESET_IN_PROGRESS)) {
+               /*
+                *  Check reset_state only when reset is occured and not in progress
+                */
+               igt_assert_eq(hang_state, gpu_reset_status_equel);
+       }

        r = amdgpu_bo_list_destroy(bo_list);
        igt_assert_eq(r, 0);
@@ -513,7 +526,7 @@ amdgpu_dispatch_hang_slow_helper(amdgpu_device_handle device_handle,
                igt_info("SKIP ... as there's no ring for ip %d\n", ip_type);

        version = info.hw_ip_version_major;
-       if (version != 9 && version != 10 /*&& version != 11*/) {
+       if (version != 9 && version != 10 && version != 11) {
                igt_info("SKIP ... unsupported gfx version %d\n", version);
                return;
        }
--
2.25.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [igt-dev] ✗ Fi.CI.BUILD: failure for tests/amdgpu: add GFX11 to tests (rev2)
  2023-09-20 22:39 [igt-dev] [PATCH] tests/amdgpu: add GFX11 to tests vitaly.prosyak
                   ` (4 preceding siblings ...)
  2023-09-22  1:24 ` Zhang, Jesse(Jie)
@ 2023-09-22  1:49 ` Patchwork
  5 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2023-09-22  1:49 UTC (permalink / raw)
  To: Jesse Zhang; +Cc: igt-dev

== Series Details ==

Series: tests/amdgpu: add GFX11 to tests (rev2)
URL   : https://patchwork.freedesktop.org/series/124018/
State : failure

== Summary ==

Applying: tests/amdgpu: add GFX11 to tests
Patch failed at 0001 tests/amdgpu: add GFX11 to tests
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-09-22  1:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20 22:39 [igt-dev] [PATCH] tests/amdgpu: add GFX11 to tests vitaly.prosyak
2023-09-20 23:31 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2023-09-21  0:11 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
2023-09-21  0:45 ` [igt-dev] ✗ CI.xeBAT: " Patchwork
2023-09-21 12:46 ` [igt-dev] [PATCH] " Kamil Konieczny
2023-09-21 17:16   ` Luben Tuikov
2023-09-22  1:24 ` Zhang, Jesse(Jie)
2023-09-22  1:49 ` [igt-dev] ✗ Fi.CI.BUILD: failure for tests/amdgpu: add GFX11 to tests (rev2) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox