Re: [Intel-gfx] [PATCH i-g-t] i915/gem_ctx_exec: Remember to ask for permission to reset the GPU

2019-02-20 Thread Mika Kuoppala
Chris Wilson  writes:

> norecovery intentionally issues a GPU reset, but we should only do so
> after confirming with the kernel that this can work.
>
> Signed-off-by: Chris Wilson 

Reviewed-by: Mika Kuoppala 

> ---
>  tests/i915/gem_ctx_exec.c | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
> index 78cfe66c8..d67d0ec25 100644
> --- a/tests/i915/gem_ctx_exec.c
> +++ b/tests/i915/gem_ctx_exec.c
> @@ -158,7 +158,10 @@ static bool has_recoverable_param(int i915)
>  
>  static void norecovery(int i915)
>  {
> + igt_hang_t hang;
> +
>   igt_require(has_recoverable_param(i915));
> + hang = igt_allow_hang(i915, 0, 0);
>  
>   for (int pass = 1; pass >= 0; pass--) {
>   struct drm_i915_gem_context_param param = {
> @@ -190,6 +193,8 @@ static void norecovery(int i915)
>  
>   gem_context_destroy(i915, param.ctx_id);
>   }
> +
> +  igt_disallow_hang(i915, hang);
>  }
>  
>  igt_main
> -- 
> 2.20.1
>
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH i-g-t] i915/gem_ctx_exec: Remember to ask for permission to reset the GPU

2019-02-20 Thread Chris Wilson
norecovery intentionally issues a GPU reset, but we should only do so
after confirming with the kernel that this can work.

Signed-off-by: Chris Wilson 
---
 tests/i915/gem_ctx_exec.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index 78cfe66c8..d67d0ec25 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -158,7 +158,10 @@ static bool has_recoverable_param(int i915)
 
 static void norecovery(int i915)
 {
+   igt_hang_t hang;
+
igt_require(has_recoverable_param(i915));
+   hang = igt_allow_hang(i915, 0, 0);
 
for (int pass = 1; pass >= 0; pass--) {
struct drm_i915_gem_context_param param = {
@@ -190,6 +193,8 @@ static void norecovery(int i915)
 
gem_context_destroy(i915, param.ctx_id);
}
+
+igt_disallow_hang(i915, hang);
 }
 
 igt_main
-- 
2.20.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx