diff mbox series

[i-g-t] i915/gem_eio: Check for allow-hang prior to issuing a reset

Message ID 20190127124902.10139-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [i-g-t] i915/gem_eio: Check for allow-hang prior to issuing a reset | expand

Commit Message

Chris Wilson Jan. 27, 2019, 12:49 p.m. UTC
Check that we are allowed to hang/reset the GPU before we actually do so
for the first time.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_eio.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Antonio Argenziano Jan. 29, 2019, 11:36 p.m. UTC | #1
On 27/01/19 04:49, Chris Wilson wrote:
> Check that we are allowed to hang/reset the GPU before we actually do so
> for the first time.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/i915/gem_eio.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
> index 5250a414c..09059c311 100644
> --- a/tests/i915/gem_eio.c
> +++ b/tests/i915/gem_eio.c
> @@ -745,14 +745,14 @@ igt_main
>   		fd = drm_open_driver(DRIVER_INTEL);
>   		igt_device_drop_master(fd);
>   
> -		igt_require(i915_reset_control(true));
> -		igt_force_gpu_reset(fd);
> -		igt_install_exit_handler(exit_handler);
> -
>   		gem_submission_print_method(fd);
>   		igt_require_gem(fd);
>   
>   		igt_allow_hang(fd, 0, 0);
> +
> +		igt_require(i915_reset_control(true));

Don't we do this already in allow_hang?

Antnoio

> +		igt_force_gpu_reset(fd);
> +		igt_install_exit_handler(exit_handler);
>   	}
>   
>   	igt_subtest("throttle")
>
Chris Wilson Jan. 29, 2019, 11:41 p.m. UTC | #2
Quoting Antonio Argenziano (2019-01-29 23:36:38)
> 
> 
> On 27/01/19 04:49, Chris Wilson wrote:
> > Check that we are allowed to hang/reset the GPU before we actually do so
> > for the first time.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >   tests/i915/gem_eio.c | 8 ++++----
> >   1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
> > index 5250a414c..09059c311 100644
> > --- a/tests/i915/gem_eio.c
> > +++ b/tests/i915/gem_eio.c
> > @@ -745,14 +745,14 @@ igt_main
> >               fd = drm_open_driver(DRIVER_INTEL);
> >               igt_device_drop_master(fd);
> >   
> > -             igt_require(i915_reset_control(true));
> > -             igt_force_gpu_reset(fd);
> > -             igt_install_exit_handler(exit_handler);
> > -
> >               gem_submission_print_method(fd);
> >               igt_require_gem(fd);
> >   
> >               igt_allow_hang(fd, 0, 0);
> > +
> > +             igt_require(i915_reset_control(true));
> 
> Don't we do this already in allow_hang?

Not quite. There we set reset=INT_MAX (aka 2), here it's just reset=1.

Not much in it tbh; this allows us to check the pattern used by the
tests, but we explicitly require reset=1 in order to trigger the
wedging/EIO.
-Chris
diff mbox series

Patch

diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index 5250a414c..09059c311 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -745,14 +745,14 @@  igt_main
 		fd = drm_open_driver(DRIVER_INTEL);
 		igt_device_drop_master(fd);
 
-		igt_require(i915_reset_control(true));
-		igt_force_gpu_reset(fd);
-		igt_install_exit_handler(exit_handler);
-
 		gem_submission_print_method(fd);
 		igt_require_gem(fd);
 
 		igt_allow_hang(fd, 0, 0);
+
+		igt_require(i915_reset_control(true));
+		igt_force_gpu_reset(fd);
+		igt_install_exit_handler(exit_handler);
 	}
 
 	igt_subtest("throttle")