diff mbox series

[i-g-t] igt/gem_eio: Apply reset-stress to each engine

Message ID 20180808084924.17826-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [i-g-t] igt/gem_eio: Apply reset-stress to each engine | expand

Commit Message

Chris Wilson Aug. 8, 2018, 8:49 a.m. UTC
A simple question as to whether the error only occurs on rcs/hsw, or all.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
---
 tests/gem_eio.c | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

Comments

Mika Kuoppala Aug. 8, 2018, 9:14 a.m. UTC | #1
Chris Wilson <chris@chris-wilson.co.uk> writes:

> A simple question as to whether the error only occurs on rcs/hsw, or all.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  tests/gem_eio.c | 22 ++++++++++++++++------
>  1 file changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/tests/gem_eio.c b/tests/gem_eio.c
> index 9d608e83e..45f9f9c2d 100644
> --- a/tests/gem_eio.c
> +++ b/tests/gem_eio.c
> @@ -646,13 +646,10 @@ static void test_inflight_internal(int fd, unsigned int wait)
>  	close(fd);
>  }
>  
> -/*
> - * Verify that we can submit and execute work after unwedging the GPU.
> - */
> -static void test_reset_stress(int fd, unsigned int flags)
> +static void reset_stress(int fd,
> +			 uint32_t ctx0, unsigned int engine,
> +			 unsigned int flags)
>  {
> -	uint32_t ctx0 = context_create_safe(fd);
> -
>  	igt_until_timeout(5) {
>  		struct drm_i915_gem_execbuffer2 execbuf = { };
>  		struct drm_i915_gem_exec_object2 obj = { };
> @@ -680,6 +677,7 @@ static void test_reset_stress(int fd, unsigned int flags)
>  		execbuf.buffers_ptr = to_user_pointer(&obj);
>  		execbuf.buffer_count = 1;
>  		execbuf.rsvd1 = ctx0;
> +		execbuf.flags = engine;
>  
>  		for (i = 0; i < 10; i++)
>  			gem_execbuf(fd, &execbuf);
> @@ -710,6 +708,18 @@ static void test_reset_stress(int fd, unsigned int flags)
>  		gem_context_destroy(fd, ctx);
>  		gem_close(fd, obj.handle);
>  	}
> +}
> +
> +/*
> + * Verify that we can submit and execute work after unwedging the GPU.
> + */
> +static void test_reset_stress(int fd, unsigned int flags)
> +{
> +	uint32_t ctx0 = context_create_safe(fd);
> +	unsigned int engine;
> +
> +	for_each_engine(fd, engine)
> +		reset_stress(fd, ctx0, engine, flags);
>  
>  	gem_context_destroy(fd, ctx0);
>  }
> -- 
> 2.18.0
diff mbox series

Patch

diff --git a/tests/gem_eio.c b/tests/gem_eio.c
index 9d608e83e..45f9f9c2d 100644
--- a/tests/gem_eio.c
+++ b/tests/gem_eio.c
@@ -646,13 +646,10 @@  static void test_inflight_internal(int fd, unsigned int wait)
 	close(fd);
 }
 
-/*
- * Verify that we can submit and execute work after unwedging the GPU.
- */
-static void test_reset_stress(int fd, unsigned int flags)
+static void reset_stress(int fd,
+			 uint32_t ctx0, unsigned int engine,
+			 unsigned int flags)
 {
-	uint32_t ctx0 = context_create_safe(fd);
-
 	igt_until_timeout(5) {
 		struct drm_i915_gem_execbuffer2 execbuf = { };
 		struct drm_i915_gem_exec_object2 obj = { };
@@ -680,6 +677,7 @@  static void test_reset_stress(int fd, unsigned int flags)
 		execbuf.buffers_ptr = to_user_pointer(&obj);
 		execbuf.buffer_count = 1;
 		execbuf.rsvd1 = ctx0;
+		execbuf.flags = engine;
 
 		for (i = 0; i < 10; i++)
 			gem_execbuf(fd, &execbuf);
@@ -710,6 +708,18 @@  static void test_reset_stress(int fd, unsigned int flags)
 		gem_context_destroy(fd, ctx);
 		gem_close(fd, obj.handle);
 	}
+}
+
+/*
+ * Verify that we can submit and execute work after unwedging the GPU.
+ */
+static void test_reset_stress(int fd, unsigned int flags)
+{
+	uint32_t ctx0 = context_create_safe(fd);
+	unsigned int engine;
+
+	for_each_engine(fd, engine)
+		reset_stress(fd, ctx0, engine, flags);
 
 	gem_context_destroy(fd, ctx0);
 }