Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2 0/2] lib/xe: Use synchronous gt resets when needed
@ 2024-06-05 16:33 Jonathan Cavitt
  2024-06-05 16:33 ` [PATCH i-g-t v2 1/2] lib/xe: Add sync and async xe_force_gt_reset options Jonathan Cavitt
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jonathan Cavitt @ 2024-06-05 16:33 UTC (permalink / raw)
  To: igt-dev
  Cc: jonathan.cavitt, saurabhg.gupta, matthew.brost, john.c.harrison,
	stuart.summers

Add a new xe_force_gt_reset function, xe_force_gt_reset_sync, renaming
the original xe_force_gt_reset to xe_force_gt_reset_async.  This allows
the user to decide whether or not they want to initiate a synchronous or
asynchronous gt reset.  The asynchronous reset function was otherwise
unchanged, but the synchronous reset function operates by calling a new
debugfs function.

Tests will use the asynchronous gt reset function by default, but the
test xe_exec_reset@cm-gt-reset will want to use the synchronous version
because it lacks a blocking mechanism on the reset and may race with
itself otherwise.

v2:
- Create a new function for synchronous gt reset instead of using a tag
  to denote between the two modes

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1068
Test-with: 20240605150828.2736396-1-jonathan.cavitt@intel.com
Suggested-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
CC: John Harrison <john.c.harrison@intel.com>
CC: Stuart Summers <stuart.summers@intel.com>

Jonathan Cavitt (2):
  lib/xe: Add sync and async xe_force_gt_reset options
  test/intel/xe_exec_reset: Synchronize cm-gt-reset gt resets

 lib/xe/xe_gt.c              |  2 +-
 lib/xe/xe_ioctl.c           | 15 ++++++++++++++-
 lib/xe/xe_ioctl.h           |  3 ++-
 tests/intel/xe_exec_reset.c |  8 ++++----
 tests/intel/xe_gt_freq.c    |  2 +-
 tests/intel/xe_wedged.c     |  2 +-
 6 files changed, 23 insertions(+), 9 deletions(-)

-- 
2.25.1


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

* [PATCH i-g-t v2 1/2] lib/xe: Add sync and async xe_force_gt_reset options
  2024-06-05 16:33 [PATCH i-g-t v2 0/2] lib/xe: Use synchronous gt resets when needed Jonathan Cavitt
@ 2024-06-05 16:33 ` Jonathan Cavitt
  2024-06-05 17:05   ` Matthew Brost
  2024-06-05 16:33 ` [PATCH i-g-t v2 2/2] test/intel/xe_exec_reset: Synchronize cm-gt-reset gt resets Jonathan Cavitt
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Jonathan Cavitt @ 2024-06-05 16:33 UTC (permalink / raw)
  To: igt-dev
  Cc: jonathan.cavitt, saurabhg.gupta, matthew.brost, john.c.harrison,
	stuart.summers

Add a new xe_force_gt_reset function, xe_force_gt_reset_sync, renaming
the original xe_force_gt_reset to xe_force_gt_reset_async.  This allows
the user to decide whether or not they want to initiate a synchronous or
asynchronous gt reset.  The asynchronous reset function was otherwise
unchanged, but the synchronous reset function operates by calling a new
debugfs function.

For now, default to using the asynchronous version for all current use
cases.

Suggested-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
CC: John Harrison <john.c.harrison@intel.com>
CC: Stuart Summers <stuart.summers@intel.com>
---
 lib/xe/xe_gt.c              |  2 +-
 lib/xe/xe_ioctl.c           | 15 ++++++++++++++-
 lib/xe/xe_ioctl.h           |  3 ++-
 tests/intel/xe_exec_reset.c |  8 ++++----
 tests/intel/xe_gt_freq.c    |  2 +-
 tests/intel/xe_wedged.c     |  2 +-
 6 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/lib/xe/xe_gt.c b/lib/xe/xe_gt.c
index 743d7a26ec..36e8fde363 100644
--- a/lib/xe/xe_gt.c
+++ b/lib/xe/xe_gt.c
@@ -69,7 +69,7 @@ void xe_force_gt_reset_all(int xe_fd)
 	int gt;
 
 	xe_for_each_gt(xe_fd, gt)
-		xe_force_gt_reset(xe_fd, gt);
+		xe_force_gt_reset_async(xe_fd, gt);
 }
 
 /**
diff --git a/lib/xe/xe_ioctl.c b/lib/xe/xe_ioctl.c
index 934c877ebc..6e3234cd3d 100644
--- a/lib/xe/xe_ioctl.c
+++ b/lib/xe/xe_ioctl.c
@@ -529,7 +529,7 @@ int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
 	return timeout;
 }
 
-void xe_force_gt_reset(int fd, int gt)
+void xe_force_gt_reset_async(int fd, int gt)
 {
 	char reset_string[128];
 	struct stat st;
@@ -541,3 +541,16 @@ void xe_force_gt_reset(int fd, int gt)
 		 minor(st.st_rdev), gt);
 	system(reset_string);
 }
+
+void xe_force_gt_reset_sync(int fd, int gt)
+{
+	char reset_string[128];
+	struct stat st;
+
+	igt_assert_eq(fstat(fd, &st), 0);
+
+	snprintf(reset_string, sizeof(reset_string),
+		 "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
+		 minor(st.st_rdev), gt);
+	system(reset_string);
+}
diff --git a/lib/xe/xe_ioctl.h b/lib/xe/xe_ioctl.h
index 4d08402e0b..b27c0053f0 100644
--- a/lib/xe/xe_ioctl.h
+++ b/lib/xe/xe_ioctl.h
@@ -91,6 +91,7 @@ int __xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
 		     uint32_t exec_queue, int64_t *timeout);
 int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
 		       uint32_t exec_queue, int64_t timeout);
-void xe_force_gt_reset(int fd, int gt);
+void xe_force_gt_reset_async(int fd, int gt);
+void xe_force_gt_reset_sync(int fd, int gt);
 
 #endif /* XE_IOCTL_H */
diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c
index e47c3730dd..05d63c0ba5 100644
--- a/tests/intel/xe_exec_reset.c
+++ b/tests/intel/xe_exec_reset.c
@@ -239,7 +239,7 @@ test_balancer(int fd, int gt, int class, int n_exec_queues, int n_execs,
 	}
 
 	if (flags & GT_RESET)
-		xe_force_gt_reset(fd, gt);
+		xe_force_gt_reset_async(fd, gt);
 
 	if (flags & CLOSE_FD) {
 		if (flags & CLOSE_EXEC_QUEUES) {
@@ -383,7 +383,7 @@ test_legacy_mode(int fd, struct drm_xe_engine_class_instance *eci,
 	}
 
 	if (flags & GT_RESET)
-		xe_force_gt_reset(fd, eci->gt_id);
+		xe_force_gt_reset_async(fd, eci->gt_id);
 
 	if (flags & CLOSE_FD) {
 		if (flags & CLOSE_EXEC_QUEUES) {
@@ -530,7 +530,7 @@ test_compute_mode(int fd, struct drm_xe_engine_class_instance *eci,
 	}
 
 	if (flags & GT_RESET)
-		xe_force_gt_reset(fd, eci->gt_id);
+		xe_force_gt_reset_async(fd, eci->gt_id);
 
 	if (flags & CLOSE_FD) {
 		if (flags & CLOSE_EXEC_QUEUES) {
@@ -590,7 +590,7 @@ static void do_resets(struct gt_thread_data *t)
 	while (!*(t->exit)) {
 		usleep(250000);	/* 250 ms */
 		(*t->num_reset)++;
-		xe_force_gt_reset(t->fd, t->gt);
+		xe_force_gt_reset_async(t->fd, t->gt);
 	}
 }
 
diff --git a/tests/intel/xe_gt_freq.c b/tests/intel/xe_gt_freq.c
index ff99b46a08..d2e4d1a09c 100644
--- a/tests/intel/xe_gt_freq.c
+++ b/tests/intel/xe_gt_freq.c
@@ -324,7 +324,7 @@ static void test_reset(int fd, int gt_id, int cycles)
 		igt_assert_f(get_freq(fd, gt_id, "cur") == rpn,
 			     "Failed after %d good cycles\n", i);
 
-		xe_force_gt_reset(fd, gt_id);
+		xe_force_gt_reset_async(fd, gt_id);
 
 		igt_assert_f(get_freq(fd, gt_id, "min") == rpn,
 			     "Failed after %d good cycles\n", i);
diff --git a/tests/intel/xe_wedged.c b/tests/intel/xe_wedged.c
index aa4a452bfc..a4fc53869e 100644
--- a/tests/intel/xe_wedged.c
+++ b/tests/intel/xe_wedged.c
@@ -31,7 +31,7 @@ static void force_wedged(int fd)
 	igt_debugfs_write(fd, "fail_gt_reset/probability", "100");
 	igt_debugfs_write(fd, "fail_gt_reset/times", "2");
 
-	xe_force_gt_reset(fd, 0);
+	xe_force_gt_reset_async(fd, 0);
 	sleep(1);
 }
 
-- 
2.25.1


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

* [PATCH i-g-t v2 2/2] test/intel/xe_exec_reset: Synchronize cm-gt-reset gt resets
  2024-06-05 16:33 [PATCH i-g-t v2 0/2] lib/xe: Use synchronous gt resets when needed Jonathan Cavitt
  2024-06-05 16:33 ` [PATCH i-g-t v2 1/2] lib/xe: Add sync and async xe_force_gt_reset options Jonathan Cavitt
@ 2024-06-05 16:33 ` Jonathan Cavitt
  2024-06-05 17:08 ` ✗ Fi.CI.BUILD: failure for lib/xe: Use synchronous gt resets when needed (rev2) Patchwork
  2024-06-07 19:05 ` ✗ GitLab.Pipeline: warning " Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cavitt @ 2024-06-05 16:33 UTC (permalink / raw)
  To: igt-dev
  Cc: jonathan.cavitt, saurabhg.gupta, matthew.brost, john.c.harrison,
	stuart.summers

The cm-gt-reset test has the potential to race with itself on the gt
reset, so force the gt reset to be synchronous here.  The race condition
occurs because the test does not have a fencing mechanism (I.E.
dma-fence) to protect against this race, unlike in the gt-reset test
case, for example.

Suggested-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
CC: John Harrison <john.c.harrison@intel.com>
CC: Stuart Summers <stuart.summers@intel.com>
---
 tests/intel/xe_exec_reset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c
index 05d63c0ba5..817b82cdef 100644
--- a/tests/intel/xe_exec_reset.c
+++ b/tests/intel/xe_exec_reset.c
@@ -530,7 +530,7 @@ test_compute_mode(int fd, struct drm_xe_engine_class_instance *eci,
 	}
 
 	if (flags & GT_RESET)
-		xe_force_gt_reset_async(fd, eci->gt_id);
+		xe_force_gt_reset_sync(fd, eci->gt_id);
 
 	if (flags & CLOSE_FD) {
 		if (flags & CLOSE_EXEC_QUEUES) {
-- 
2.25.1


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

* Re: [PATCH i-g-t v2 1/2] lib/xe: Add sync and async xe_force_gt_reset options
  2024-06-05 16:33 ` [PATCH i-g-t v2 1/2] lib/xe: Add sync and async xe_force_gt_reset options Jonathan Cavitt
@ 2024-06-05 17:05   ` Matthew Brost
  2024-06-05 18:05     ` Cavitt, Jonathan
  0 siblings, 1 reply; 7+ messages in thread
From: Matthew Brost @ 2024-06-05 17:05 UTC (permalink / raw)
  To: Jonathan Cavitt; +Cc: igt-dev, saurabhg.gupta, john.c.harrison, stuart.summers

On Wed, Jun 05, 2024 at 09:33:43AM -0700, Jonathan Cavitt wrote:
> Add a new xe_force_gt_reset function, xe_force_gt_reset_sync, renaming
> the original xe_force_gt_reset to xe_force_gt_reset_async.  This allows
> the user to decide whether or not they want to initiate a synchronous or
> asynchronous gt reset.  The asynchronous reset function was otherwise
> unchanged, but the synchronous reset function operates by calling a new
> debugfs function.
> 
> For now, default to using the asynchronous version for all current use
> cases.
> 

Best practices are to add a change log to patches. So here is would be
something like:

v2:
 - Add *async and *sync versions of xe_force_gt_reset (Matthew Brost)

> Suggested-by: Matthew Brost <matthew.brost@intel.com>
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> CC: John Harrison <john.c.harrison@intel.com>
> CC: Stuart Summers <stuart.summers@intel.com>
> ---
>  lib/xe/xe_gt.c              |  2 +-
>  lib/xe/xe_ioctl.c           | 15 ++++++++++++++-
>  lib/xe/xe_ioctl.h           |  3 ++-
>  tests/intel/xe_exec_reset.c |  8 ++++----
>  tests/intel/xe_gt_freq.c    |  2 +-
>  tests/intel/xe_wedged.c     |  2 +-
>  6 files changed, 23 insertions(+), 9 deletions(-)
> 
> diff --git a/lib/xe/xe_gt.c b/lib/xe/xe_gt.c
> index 743d7a26ec..36e8fde363 100644
> --- a/lib/xe/xe_gt.c
> +++ b/lib/xe/xe_gt.c
> @@ -69,7 +69,7 @@ void xe_force_gt_reset_all(int xe_fd)
>  	int gt;
>  
>  	xe_for_each_gt(xe_fd, gt)
> -		xe_force_gt_reset(xe_fd, gt);
> +		xe_force_gt_reset_async(xe_fd, gt);
>  }
>  
>  /**
> diff --git a/lib/xe/xe_ioctl.c b/lib/xe/xe_ioctl.c
> index 934c877ebc..6e3234cd3d 100644
> --- a/lib/xe/xe_ioctl.c
> +++ b/lib/xe/xe_ioctl.c
> @@ -529,7 +529,7 @@ int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
>  	return timeout;
>  }
>  
> -void xe_force_gt_reset(int fd, int gt)
> +void xe_force_gt_reset_async(int fd, int gt)
>  {
>  	char reset_string[128];
>  	struct stat st;
> @@ -541,3 +541,16 @@ void xe_force_gt_reset(int fd, int gt)
>  		 minor(st.st_rdev), gt);
>  	system(reset_string);
>  }
> +
> +void xe_force_gt_reset_sync(int fd, int gt)
> +{
> +	char reset_string[128];
> +	struct stat st;
> +
> +	igt_assert_eq(fstat(fd, &st), 0);
> +
> +	snprintf(reset_string, sizeof(reset_string),
> +		 "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
> +		 minor(st.st_rdev), gt);

Again another nit, we can have an internal (static) function which
accepts the 'bool sync' argument. The xe_force_gt_reset_sync and
xe_force_gt_reset_async would call with correct argument. This gives use
a single implmentation but hides 'bool sync' argument from the IGT
layers of the code. Make sense?

Matt

> +	system(reset_string);
> +}
> diff --git a/lib/xe/xe_ioctl.h b/lib/xe/xe_ioctl.h
> index 4d08402e0b..b27c0053f0 100644
> --- a/lib/xe/xe_ioctl.h
> +++ b/lib/xe/xe_ioctl.h
> @@ -91,6 +91,7 @@ int __xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
>  		     uint32_t exec_queue, int64_t *timeout);
>  int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
>  		       uint32_t exec_queue, int64_t timeout);
> -void xe_force_gt_reset(int fd, int gt);
> +void xe_force_gt_reset_async(int fd, int gt);
> +void xe_force_gt_reset_sync(int fd, int gt);
>  
>  #endif /* XE_IOCTL_H */
> diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c
> index e47c3730dd..05d63c0ba5 100644
> --- a/tests/intel/xe_exec_reset.c
> +++ b/tests/intel/xe_exec_reset.c
> @@ -239,7 +239,7 @@ test_balancer(int fd, int gt, int class, int n_exec_queues, int n_execs,
>  	}
>  
>  	if (flags & GT_RESET)
> -		xe_force_gt_reset(fd, gt);
> +		xe_force_gt_reset_async(fd, gt);
>  
>  	if (flags & CLOSE_FD) {
>  		if (flags & CLOSE_EXEC_QUEUES) {
> @@ -383,7 +383,7 @@ test_legacy_mode(int fd, struct drm_xe_engine_class_instance *eci,
>  	}
>  
>  	if (flags & GT_RESET)
> -		xe_force_gt_reset(fd, eci->gt_id);
> +		xe_force_gt_reset_async(fd, eci->gt_id);
>  
>  	if (flags & CLOSE_FD) {
>  		if (flags & CLOSE_EXEC_QUEUES) {
> @@ -530,7 +530,7 @@ test_compute_mode(int fd, struct drm_xe_engine_class_instance *eci,
>  	}
>  
>  	if (flags & GT_RESET)
> -		xe_force_gt_reset(fd, eci->gt_id);
> +		xe_force_gt_reset_async(fd, eci->gt_id);
>  
>  	if (flags & CLOSE_FD) {
>  		if (flags & CLOSE_EXEC_QUEUES) {
> @@ -590,7 +590,7 @@ static void do_resets(struct gt_thread_data *t)
>  	while (!*(t->exit)) {
>  		usleep(250000);	/* 250 ms */
>  		(*t->num_reset)++;
> -		xe_force_gt_reset(t->fd, t->gt);
> +		xe_force_gt_reset_async(t->fd, t->gt);
>  	}
>  }
>  
> diff --git a/tests/intel/xe_gt_freq.c b/tests/intel/xe_gt_freq.c
> index ff99b46a08..d2e4d1a09c 100644
> --- a/tests/intel/xe_gt_freq.c
> +++ b/tests/intel/xe_gt_freq.c
> @@ -324,7 +324,7 @@ static void test_reset(int fd, int gt_id, int cycles)
>  		igt_assert_f(get_freq(fd, gt_id, "cur") == rpn,
>  			     "Failed after %d good cycles\n", i);
>  
> -		xe_force_gt_reset(fd, gt_id);
> +		xe_force_gt_reset_async(fd, gt_id);
>  
>  		igt_assert_f(get_freq(fd, gt_id, "min") == rpn,
>  			     "Failed after %d good cycles\n", i);
> diff --git a/tests/intel/xe_wedged.c b/tests/intel/xe_wedged.c
> index aa4a452bfc..a4fc53869e 100644
> --- a/tests/intel/xe_wedged.c
> +++ b/tests/intel/xe_wedged.c
> @@ -31,7 +31,7 @@ static void force_wedged(int fd)
>  	igt_debugfs_write(fd, "fail_gt_reset/probability", "100");
>  	igt_debugfs_write(fd, "fail_gt_reset/times", "2");
>  
> -	xe_force_gt_reset(fd, 0);
> +	xe_force_gt_reset_async(fd, 0);
>  	sleep(1);
>  }
>  
> -- 
> 2.25.1
> 

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

* ✗ Fi.CI.BUILD: failure for lib/xe: Use synchronous gt resets when needed (rev2)
  2024-06-05 16:33 [PATCH i-g-t v2 0/2] lib/xe: Use synchronous gt resets when needed Jonathan Cavitt
  2024-06-05 16:33 ` [PATCH i-g-t v2 1/2] lib/xe: Add sync and async xe_force_gt_reset options Jonathan Cavitt
  2024-06-05 16:33 ` [PATCH i-g-t v2 2/2] test/intel/xe_exec_reset: Synchronize cm-gt-reset gt resets Jonathan Cavitt
@ 2024-06-05 17:08 ` Patchwork
  2024-06-07 19:05 ` ✗ GitLab.Pipeline: warning " Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2024-06-05 17:08 UTC (permalink / raw)
  To: Jonathan Cavitt; +Cc: igt-dev

== Series Details ==

Series: lib/xe: Use synchronous gt resets when needed (rev2)
URL   : https://patchwork.freedesktop.org/series/134509/
State : failure

== Summary ==

IGT patchset build failed on latest successful build
08560f766a505e729dfee2846c1c11d28dd0e3d0 tools/intel_vbt_decode: Decode device handle as a bitmask

Tail of build.log:
[314/1679] Compiling C object 'lib/76b5a35@@igt-xe_xe_spin_c@sta/xe_xe_spin.c.o'.
[315/1679] Compiling C object 'lib/76b5a35@@igt-igt_dummyload_c@sta/igt_dummyload.c.o'.
[316/1679] Compiling C object 'lib/76b5a35@@igt-xe_xe_util_c@sta/xe_xe_util.c.o'.
[317/1679] Compiling C object 'lib/76b5a35@@igt-igt_frame_c@sta/igt_frame.c.o'.
[318/1679] Compiling C object 'lib/76b5a35@@igt-igt_aux_c@sta/igt_aux.c.o'.
[319/1679] Compiling C object 'tests/59830eb@@kms_tv_load_detect@exe/kms_tv_load_detect.c.o'.
[320/1679] Compiling C object 'tests/59830eb@@kms_sysfs_edid_timing@exe/kms_sysfs_edid_timing.c.o'.
[321/1679] Compiling C object 'tests/59830eb@@kms_rmfb@exe/kms_rmfb.c.o'.
[322/1679] Compiling C object 'lib/76b5a35@@igt-igt_chamelium_stream_c@sta/igt_chamelium_stream.c.o'.
[323/1679] Compiling C object 'lib/76b5a35@@igt-igt_v3d_c@sta/igt_v3d.c.o'.
[324/1679] Compiling C object 'tests/59830eb@@panfrost_get_param@exe/panfrost_get_param.c.o'.
[325/1679] Compiling C object 'tests/59830eb@@kms_scaling_modes@exe/kms_scaling_modes.c.o'.
[326/1679] Compiling C object 'lib/76b5a35@@igt-igt_draw_c@sta/igt_draw.c.o'.
[327/1679] Compiling C object 'lib/76b5a35@@igt-igt_alsa_c@sta/igt_alsa.c.o'.
[328/1679] Compiling C object 'tests/59830eb@@kms_sequence@exe/kms_sequence.c.o'.
[329/1679] Compiling C object 'lib/76b5a35@@igt-instdone_c@sta/instdone.c.o'.
[330/1679] Compiling C object 'lib/76b5a35@@igt-xe_xe_query_c@sta/xe_xe_query.c.o'.
[331/1679] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen6_c@sta/rendercopy_gen6.c.o'.
[332/1679] Compiling C object 'lib/76b5a35@@igt-igt_audio_c@sta/igt_audio.c.o'.
[333/1679] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen7_c@sta/rendercopy_gen7.c.o'.
[334/1679] Compiling C object 'lib/76b5a35@@igt-intel_compute_c@sta/intel_compute.c.o'.
[335/1679] Compiling C object 'lib/76b5a35@@igt-gpu_cmds_c@sta/gpu_cmds.c.o'.
[336/1679] Compiling C object 'lib/76b5a35@@igt-igt_device_scan_c@sta/igt_device_scan.c.o'.
[337/1679] Compiling C object 'tests/59830eb@@kms_tiled_display@exe/kms_tiled_display.c.o'.
[338/1679] Compiling C object 'tests/59830eb@@kms_prop_blob@exe/kms_prop_blob.c.o'.
[339/1679] Compiling C object 'lib/76b5a35@@igt-igt_pm_c@sta/igt_pm.c.o'.
[340/1679] Compiling C object 'lib/76b5a35@@igt-intel_bufops_c@sta/intel_bufops.c.o'.
[341/1679] Compiling C object 'tests/59830eb@@kms_plane_scaling@exe/kms_plane_scaling.c.o'.
[342/1679] Compiling C object 'tests/59830eb@@gem_concurrent_blit@exe/intel_gem_concurrent_blit.c.o'.
[343/1679] Compiling C object 'lib/76b5a35@@igt-igt_kmod_c@sta/igt_kmod.c.o'.
[344/1679] Compiling C object 'lib/76b5a35@@igt-igt_vmwgfx_c@sta/igt_vmwgfx.c.o'.
[345/1679] Compiling C object 'tests/59830eb@@kms_vblank@exe/kms_vblank.c.o'.
[346/1679] Compiling C object 'lib/76b5a35@@igt-igt_amd_c@sta/igt_amd.c.o'.
[347/1679] Compiling C object 'lib/76b5a35@@igt-intel_blt_c@sta/intel_blt.c.o'.
[348/1679] Compiling C object 'tests/59830eb@@kms_universal_plane@exe/kms_universal_plane.c.o'.
[349/1679] Compiling C object 'tests/59830eb@@kms_setmode@exe/kms_setmode.c.o'.
[350/1679] Compiling C object 'tests/59830eb@@kms_cursor_legacy@exe/kms_cursor_legacy.c.o'.
[351/1679] Compiling C object 'tests/59830eb@@kms_atomic@exe/kms_atomic.c.o'.
[352/1679] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen8_c@sta/rendercopy_gen8.c.o'.
[353/1679] Compiling C object 'lib/76b5a35@@igt-intel_batchbuffer_c@sta/intel_batchbuffer.c.o'.
[354/1679] Compiling C object 'lib/76b5a35@@igt-igt_core_c@sta/igt_core.c.o'.
[355/1679] Generating i915-perf-metrics-acmgt3 with a custom command.
[356/1679] Generating i915-perf-registers-acmgt3 with a custom command.
[357/1679] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen9_c@sta/rendercopy_gen9.c.o'.
[358/1679] Compiling C object 'lib/76b5a35@@igt-igt_chamelium_c@sta/igt_chamelium.c.o'.
[359/1679] Compiling C object 'lib/76b5a35@@igt-i915_intel_decode_c@sta/i915_intel_decode.c.o'.
[360/1679] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
[361/1679] Compiling C object 'lib/76b5a35@@igt-igt_kms_c@sta/igt_kms.c.o'.
[362/1679] Generating i915-perf-equations with a custom command.
ninja: build stopped: subcommand failed.



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

* RE: [PATCH i-g-t v2 1/2] lib/xe: Add sync and async xe_force_gt_reset options
  2024-06-05 17:05   ` Matthew Brost
@ 2024-06-05 18:05     ` Cavitt, Jonathan
  0 siblings, 0 replies; 7+ messages in thread
From: Cavitt, Jonathan @ 2024-06-05 18:05 UTC (permalink / raw)
  To: Brost, Matthew
  Cc: igt-dev@lists.freedesktop.org, Gupta, saurabhg, Harrison, John C,
	Summers, Stuart

-----Original Message-----
From: Brost, Matthew <matthew.brost@intel.com> 
Sent: Wednesday, June 5, 2024 10:05 AM
To: Cavitt, Jonathan <jonathan.cavitt@intel.com>
Cc: igt-dev@lists.freedesktop.org; Gupta, saurabhg <saurabhg.gupta@intel.com>; Harrison, John C <john.c.harrison@intel.com>; Summers, Stuart <stuart.summers@intel.com>
Subject: Re: [PATCH i-g-t v2 1/2] lib/xe: Add sync and async xe_force_gt_reset options
> 
> On Wed, Jun 05, 2024 at 09:33:43AM -0700, Jonathan Cavitt wrote:
> > Add a new xe_force_gt_reset function, xe_force_gt_reset_sync, renaming
> > the original xe_force_gt_reset to xe_force_gt_reset_async.  This allows
> > the user to decide whether or not they want to initiate a synchronous or
> > asynchronous gt reset.  The asynchronous reset function was otherwise
> > unchanged, but the synchronous reset function operates by calling a new
> > debugfs function.
> > 
> > For now, default to using the asynchronous version for all current use
> > cases.
> > 
> 
> Best practices are to add a change log to patches. So here is would be
> something like:
> 
> v2:
>  - Add *async and *sync versions of xe_force_gt_reset (Matthew Brost)

I was under the impression that this was unnecessary because this is pretty much
an entirely different patch from what was written for v1, but I'll add the missing
revision markers for v4.
-Jonathan Cavitt

> 
> > Suggested-by: Matthew Brost <matthew.brost@intel.com>
> > Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> > CC: John Harrison <john.c.harrison@intel.com>
> > CC: Stuart Summers <stuart.summers@intel.com>
> > ---
> >  lib/xe/xe_gt.c              |  2 +-
> >  lib/xe/xe_ioctl.c           | 15 ++++++++++++++-
> >  lib/xe/xe_ioctl.h           |  3 ++-
> >  tests/intel/xe_exec_reset.c |  8 ++++----
> >  tests/intel/xe_gt_freq.c    |  2 +-
> >  tests/intel/xe_wedged.c     |  2 +-
> >  6 files changed, 23 insertions(+), 9 deletions(-)
> > 
> > diff --git a/lib/xe/xe_gt.c b/lib/xe/xe_gt.c
> > index 743d7a26ec..36e8fde363 100644
> > --- a/lib/xe/xe_gt.c
> > +++ b/lib/xe/xe_gt.c
> > @@ -69,7 +69,7 @@ void xe_force_gt_reset_all(int xe_fd)
> >  	int gt;
> >  
> >  	xe_for_each_gt(xe_fd, gt)
> > -		xe_force_gt_reset(xe_fd, gt);
> > +		xe_force_gt_reset_async(xe_fd, gt);
> >  }
> >  
> >  /**
> > diff --git a/lib/xe/xe_ioctl.c b/lib/xe/xe_ioctl.c
> > index 934c877ebc..6e3234cd3d 100644
> > --- a/lib/xe/xe_ioctl.c
> > +++ b/lib/xe/xe_ioctl.c
> > @@ -529,7 +529,7 @@ int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
> >  	return timeout;
> >  }
> >  
> > -void xe_force_gt_reset(int fd, int gt)
> > +void xe_force_gt_reset_async(int fd, int gt)
> >  {
> >  	char reset_string[128];
> >  	struct stat st;
> > @@ -541,3 +541,16 @@ void xe_force_gt_reset(int fd, int gt)
> >  		 minor(st.st_rdev), gt);
> >  	system(reset_string);
> >  }
> > +
> > +void xe_force_gt_reset_sync(int fd, int gt)
> > +{
> > +	char reset_string[128];
> > +	struct stat st;
> > +
> > +	igt_assert_eq(fstat(fd, &st), 0);
> > +
> > +	snprintf(reset_string, sizeof(reset_string),
> > +		 "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
> > +		 minor(st.st_rdev), gt);
> 
> Again another nit, we can have an internal (static) function which
> accepts the 'bool sync' argument. The xe_force_gt_reset_sync and
> xe_force_gt_reset_async would call with correct argument. This gives use
> a single implmentation but hides 'bool sync' argument from the IGT
> layers of the code. Make sense?
> 
> Matt
> 
> > +	system(reset_string);
> > +}
> > diff --git a/lib/xe/xe_ioctl.h b/lib/xe/xe_ioctl.h
> > index 4d08402e0b..b27c0053f0 100644
> > --- a/lib/xe/xe_ioctl.h
> > +++ b/lib/xe/xe_ioctl.h
> > @@ -91,6 +91,7 @@ int __xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
> >  		     uint32_t exec_queue, int64_t *timeout);
> >  int64_t xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
> >  		       uint32_t exec_queue, int64_t timeout);
> > -void xe_force_gt_reset(int fd, int gt);
> > +void xe_force_gt_reset_async(int fd, int gt);
> > +void xe_force_gt_reset_sync(int fd, int gt);
> >  
> >  #endif /* XE_IOCTL_H */
> > diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c
> > index e47c3730dd..05d63c0ba5 100644
> > --- a/tests/intel/xe_exec_reset.c
> > +++ b/tests/intel/xe_exec_reset.c
> > @@ -239,7 +239,7 @@ test_balancer(int fd, int gt, int class, int n_exec_queues, int n_execs,
> >  	}
> >  
> >  	if (flags & GT_RESET)
> > -		xe_force_gt_reset(fd, gt);
> > +		xe_force_gt_reset_async(fd, gt);
> >  
> >  	if (flags & CLOSE_FD) {
> >  		if (flags & CLOSE_EXEC_QUEUES) {
> > @@ -383,7 +383,7 @@ test_legacy_mode(int fd, struct drm_xe_engine_class_instance *eci,
> >  	}
> >  
> >  	if (flags & GT_RESET)
> > -		xe_force_gt_reset(fd, eci->gt_id);
> > +		xe_force_gt_reset_async(fd, eci->gt_id);
> >  
> >  	if (flags & CLOSE_FD) {
> >  		if (flags & CLOSE_EXEC_QUEUES) {
> > @@ -530,7 +530,7 @@ test_compute_mode(int fd, struct drm_xe_engine_class_instance *eci,
> >  	}
> >  
> >  	if (flags & GT_RESET)
> > -		xe_force_gt_reset(fd, eci->gt_id);
> > +		xe_force_gt_reset_async(fd, eci->gt_id);
> >  
> >  	if (flags & CLOSE_FD) {
> >  		if (flags & CLOSE_EXEC_QUEUES) {
> > @@ -590,7 +590,7 @@ static void do_resets(struct gt_thread_data *t)
> >  	while (!*(t->exit)) {
> >  		usleep(250000);	/* 250 ms */
> >  		(*t->num_reset)++;
> > -		xe_force_gt_reset(t->fd, t->gt);
> > +		xe_force_gt_reset_async(t->fd, t->gt);
> >  	}
> >  }
> >  
> > diff --git a/tests/intel/xe_gt_freq.c b/tests/intel/xe_gt_freq.c
> > index ff99b46a08..d2e4d1a09c 100644
> > --- a/tests/intel/xe_gt_freq.c
> > +++ b/tests/intel/xe_gt_freq.c
> > @@ -324,7 +324,7 @@ static void test_reset(int fd, int gt_id, int cycles)
> >  		igt_assert_f(get_freq(fd, gt_id, "cur") == rpn,
> >  			     "Failed after %d good cycles\n", i);
> >  
> > -		xe_force_gt_reset(fd, gt_id);
> > +		xe_force_gt_reset_async(fd, gt_id);
> >  
> >  		igt_assert_f(get_freq(fd, gt_id, "min") == rpn,
> >  			     "Failed after %d good cycles\n", i);
> > diff --git a/tests/intel/xe_wedged.c b/tests/intel/xe_wedged.c
> > index aa4a452bfc..a4fc53869e 100644
> > --- a/tests/intel/xe_wedged.c
> > +++ b/tests/intel/xe_wedged.c
> > @@ -31,7 +31,7 @@ static void force_wedged(int fd)
> >  	igt_debugfs_write(fd, "fail_gt_reset/probability", "100");
> >  	igt_debugfs_write(fd, "fail_gt_reset/times", "2");
> >  
> > -	xe_force_gt_reset(fd, 0);
> > +	xe_force_gt_reset_async(fd, 0);
> >  	sleep(1);
> >  }
> >  
> > -- 
> > 2.25.1
> > 
> 

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

* ✗ GitLab.Pipeline: warning for lib/xe: Use synchronous gt resets when needed (rev2)
  2024-06-05 16:33 [PATCH i-g-t v2 0/2] lib/xe: Use synchronous gt resets when needed Jonathan Cavitt
                   ` (2 preceding siblings ...)
  2024-06-05 17:08 ` ✗ Fi.CI.BUILD: failure for lib/xe: Use synchronous gt resets when needed (rev2) Patchwork
@ 2024-06-07 19:05 ` Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2024-06-07 19:05 UTC (permalink / raw)
  To: Jonathan Cavitt; +Cc: igt-dev

== Series Details ==

Series: lib/xe: Use synchronous gt resets when needed (rev2)
URL   : https://patchwork.freedesktop.org/series/134509/
State : warning

== Summary ==

Pipeline status: FAILED.

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

build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59520987):
  FAILED: lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o 
  cc -Ilib/76b5a35@@igt-xe_xe_ioctl_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-conversion -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 -D_LARGEFILE64_SOURCE=1 -fPIC -pthread '-DIGT_DATADIR="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="xe/xe_ioctl"'  -MD -MQ 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o' -MF 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o.d' -o 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o' -c ../lib/xe/xe_ioctl.c
  ../lib/xe/xe_ioctl.c: In function ‘xe_force_gt_reset_sync’:
  ../lib/xe/xe_ioctl.c:553:56: error: expected ‘)’ before ‘gnu_dev_minor’
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                                          ^
                                                          )
  ../lib/xe/xe_ioctl.c:553:32: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                 ~^
  ../lib/xe/xe_ioctl.c:553:37: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                      ~^
  ninja: build stopped: subcommand failed.
  section_end:1717607378:step_script
  section_start:1717607378:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1717607380: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/59520990):
  FAILED: lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o 
  /usr/bin/aarch64-linux-gnu-gcc -Ilib/76b5a35@@igt-xe_xe_ioctl_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-conversion -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 -D_LARGEFILE64_SOURCE=1 -fPIC -pthread '-DIGT_DATADIR="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="xe/xe_ioctl"'  -MD -MQ 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o' -MF 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o.d' -o 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o' -c ../lib/xe/xe_ioctl.c
  ../lib/xe/xe_ioctl.c: In function ‘xe_force_gt_reset_sync’:
  ../lib/xe/xe_ioctl.c:553:56: error: expected ‘)’ before ‘gnu_dev_minor’
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                                          ^
                                                          )
  ../lib/xe/xe_ioctl.c:553:32: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                 ~^
  ../lib/xe/xe_ioctl.c:553:37: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                      ~^
  ninja: build stopped: subcommand failed.
  section_end:1717607383:step_script
  section_start:1717607383:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1717607384: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/59520989):
  FAILED: lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o 
  /usr/bin/arm-linux-gnueabihf-gcc -Ilib/76b5a35@@igt-xe_xe_ioctl_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-conversion -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 -D_LARGEFILE64_SOURCE=1 -fPIC -pthread '-DIGT_DATADIR="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="xe/xe_ioctl"'  -MD -MQ 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o' -MF 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o.d' -o 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o' -c ../lib/xe/xe_ioctl.c
  ../lib/xe/xe_ioctl.c: In function ‘xe_force_gt_reset_sync’:
  ../lib/xe/xe_ioctl.c:553:56: error: expected ‘)’ before ‘gnu_dev_minor’
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                                          ^
                                                          )
  ../lib/xe/xe_ioctl.c:553:32: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                 ~^
  ../lib/xe/xe_ioctl.c:553:37: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                      ~^
  ninja: build stopped: subcommand failed.
  section_end:1717607378:step_script
  section_start:1717607378:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1717607380: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/59520991):
  FAILED: lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o 
  /usr/bin/mips-linux-gnu-gcc -Ilib/76b5a35@@igt-xe_xe_ioctl_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-conversion -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 -D_LARGEFILE64_SOURCE=1 -fPIC -pthread '-DIGT_DATADIR="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="xe/xe_ioctl"'  -MD -MQ 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o' -MF 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o.d' -o 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o' -c ../lib/xe/xe_ioctl.c
  ../lib/xe/xe_ioctl.c: In function ‘xe_force_gt_reset_sync’:
  ../lib/xe/xe_ioctl.c:553:56: error: expected ‘)’ before ‘gnu_dev_minor’
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                                          ^
                                                          )
  ../lib/xe/xe_ioctl.c:553:32: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                 ~^
  ../lib/xe/xe_ioctl.c:553:37: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                      ~^
  ninja: build stopped: subcommand failed.
  section_end:1717607366:step_script
  section_start:1717607366:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1717607368:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-minimal has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59520988):
  FAILED: lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o 
  cc -Ilib/76b5a35@@igt-xe_xe_ioctl_c@sta -Ilib -I../lib -I../include -I../include/drm-uapi -I../include/linux-uapi -I../lib/stubs/syscalls -I. -I../ -I../lib/stubs/libunwind -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 -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-conversion -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 -D_LARGEFILE64_SOURCE=1 -fPIC -pthread '-DIGT_DATADIR="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="xe/xe_ioctl"'  -MD -MQ 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o' -MF 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o.d' -o 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o' -c ../lib/xe/xe_ioctl.c
  ../lib/xe/xe_ioctl.c: In function ‘xe_force_gt_reset_sync’:
  ../lib/xe/xe_ioctl.c:553:56: error: expected ‘)’ before ‘gnu_dev_minor’
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                                          ^
                                                          )
  ../lib/xe/xe_ioctl.c:553:32: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                 ~^
  ../lib/xe/xe_ioctl.c:553:37: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
      "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
                                      ~^
  ninja: build stopped: subcommand failed.
  section_end:1717607374:step_script
  section_start:1717607374:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1717607375:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59520982):
    553 |    "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
        |                                                        ^
        |                                                        )
  ../lib/xe/xe_ioctl.c:553:32: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
    553 |    "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
        |                               ~^
        |                                |
        |                                int
  ../lib/xe/xe_ioctl.c:553:37: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
    553 |    "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
        |                                    ~^
        |                                     |
        |                                     int
  ninja: build stopped: subcommand failed.
  section_end:1717607361:step_script
  section_start:1717607361:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1717607362:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-clang has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59520986):
  ../lib/xe/xe_ioctl.c:554:4: error: expected ')'
                   minor(st.st_rdev), gt);
                   ^
  /usr/include/sys/sysmacros.h:61:20: note: expanded from macro 'minor'
  #define minor(dev) gnu_dev_minor (dev)
                     ^
  ../lib/xe/xe_ioctl.c:552:2: note: to match this '('
          snprintf(reset_string, sizeof(reset_string),
          ^
  /usr/include/bits/stdio2.h:72:28: note: expanded from macro 'snprintf'
    __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), \
                             ^
  1 error generated.
  ninja: build stopped: subcommand failed.
  section_end:1717607384:step_script
  section_start:1717607384:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1717607384:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-no-libdrm-nouveau has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59520985):
    553 |    "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
        |                                                        ^
        |                                                        )
  ../lib/xe/xe_ioctl.c:553:32: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
    553 |    "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
        |                               ~^
        |                                |
        |                                int
  ../lib/xe/xe_ioctl.c:553:37: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
    553 |    "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
        |                                    ~^
        |                                     |
        |                                     int
  ninja: build stopped: subcommand failed.
  section_end:1717607360:step_script
  section_start:1717607360:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1717607363:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-no-libunwind has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59520983):
    553 |    "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
        |                                                        ^
        |                                                        )
  ../lib/xe/xe_ioctl.c:553:32: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
    553 |    "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
        |                               ~^
        |                                |
        |                                int
  ../lib/xe/xe_ioctl.c:553:37: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
    553 |    "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
        |                                    ~^
        |                                     |
        |                                     int
  ninja: build stopped: subcommand failed.
  section_end:1717607378:step_script
  section_start:1717607378:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1717607380:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-oldest-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59520984):
    553 |    "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
        |                                                        ^
        |                                                        )
  ../lib/xe/xe_ioctl.c:553:32: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
    553 |    "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
        |                               ~^
        |                                |
        |                                int
  ../lib/xe/xe_ioctl.c:553:37: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
    553 |    "cat /sys/kernel/debug/dri/%d/gt%d/force_reset_sync"
        |                                    ~^
        |                                     |
        |                                     int
  ninja: build stopped: subcommand failed.
  section_end:1717607379:step_script
  section_start:1717607379:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1717607380:cleanup_file_variables
  ERROR: Job failed: exit code 1

== Logs ==

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

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

end of thread, other threads:[~2024-06-07 19:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05 16:33 [PATCH i-g-t v2 0/2] lib/xe: Use synchronous gt resets when needed Jonathan Cavitt
2024-06-05 16:33 ` [PATCH i-g-t v2 1/2] lib/xe: Add sync and async xe_force_gt_reset options Jonathan Cavitt
2024-06-05 17:05   ` Matthew Brost
2024-06-05 18:05     ` Cavitt, Jonathan
2024-06-05 16:33 ` [PATCH i-g-t v2 2/2] test/intel/xe_exec_reset: Synchronize cm-gt-reset gt resets Jonathan Cavitt
2024-06-05 17:08 ` ✗ Fi.CI.BUILD: failure for lib/xe: Use synchronous gt resets when needed (rev2) Patchwork
2024-06-07 19:05 ` ✗ GitLab.Pipeline: warning " Patchwork

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