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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
> ---
>  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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux