[Intel-gfx] [PATCH igt 3/3] igt/gem_eio: Install an exithandler to unwedge the device after failure

Chris Wilson chris at chris-wilson.co.uk
Fri Sep 8 12:55:16 UTC 2017


Quoting Chris Wilson (2017-09-08 13:52:07)
> Under normal conditions, we try to repair the damage we inflict to the
> GPU, but if we fail we don't. Make sure that if the test does die, we do
> try to restore normal operation by using an atexit handler.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  tests/gem_eio.c | 18 ++++++++++++++----
>  1 file changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/gem_eio.c b/tests/gem_eio.c
> index 4e3b64b3..c441fef0 100644
> --- a/tests/gem_eio.c
> +++ b/tests/gem_eio.c
> @@ -283,15 +283,28 @@ out:
>         return flags;
>  }
>  
> +static int fd = -1;
> +
> +static void
> +exit_handler(int sig)
> +{
> +       igt_force_gpu_reset(fd);
> +       i915_reset_control(true);

Reverse me.
-Chris


More information about the Intel-gfx mailing list