diff mbox series

[i-g-t,2/2] i915/gem_eio: Allow older platforms more leniency in reset latency

Message ID 20190212205740.20368-2-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [i-g-t,1/2] i915/gem_eio: Check average reset times | expand

Commit Message

Chris Wilson Feb. 12, 2019, 8:57 p.m. UTC
Older platforms need to clobber the display around a reset (incl. a
modeset to off, and a modeset back on), which can be much slower than
the reset itself. Give these platforms (gen2-4) some leniency and allow
them a higher limit before declaring them a failure.

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

Comments

Mika Kuoppala Feb. 15, 2019, 2:43 p.m. UTC | #1
Chris Wilson <chris@chris-wilson.co.uk> writes:

> Older platforms need to clobber the display around a reset (incl. a
> modeset to off, and a modeset back on), which can be much slower than
> the reset itself. Give these platforms (gen2-4) some leniency and allow
> them a higher limit before declaring them a failure.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/i915/gem_eio.c | 17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
> index bd5266104..ac85a2eff 100644
> --- a/tests/i915/gem_eio.c
> +++ b/tests/i915/gem_eio.c
> @@ -259,7 +259,7 @@ static void check_wait(int fd, uint32_t bo, unsigned int wait, igt_stats_t *st)
>  
>  static void check_wait_elapsed(int fd, igt_stats_t *st)
>  {
> -	double med, max;
> +	double med, max, limit;
>  
>  	igt_info("Completed %d resets, wakeups took %.3f+-%.3fms (min:%.3fms, median:%.3fms, max:%.3fms)\n",
>  		 st->n_values,
> @@ -272,15 +272,24 @@ static void check_wait_elapsed(int fd, igt_stats_t *st)
>  	if (st->n_values < 9)
>  		return; /* too few for stable median */
>  
> +	/*
> +	 * Older platforms need to reset the display (incl. modeset to off,
> +	 * modeset back on) around resets, so may take a lot longer.
> +	 */
> +	limit = 250e6;
> +	if (intel_gen(intel_get_drm_devid(fd)) < 5)
> +		limit += 300e6; /* guestimate for 2x worstcase modeset */

Don't have any insight to offer for the hard cap. 550ms sounds
reasonable!

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

> +
>  	med = igt_stats_get_median(st);
>  	max = igt_stats_get_max(st);
> -	igt_assert_f(med < 250e6 && max < 1250e6,
> -		     "Wake up following reset+wedge took %.3f+-%.3fms (min:%.3fms, median:%.3fms, max:%.3fms)\n",
> +	igt_assert_f(med < limit && max < 5 * limit,
> +		     "Wake up following reset+wedge took %.3f+-%.3fms (min:%.3fms, median:%.3fms, max:%.3fms); limit set to %.0fms on average and %.0fms maximum\n",
>  		     igt_stats_get_mean(st)*1e-6,
>  		     igt_stats_get_std_deviation(st)*1e-6,
>  		     igt_stats_get_min(st)*1e-6,
>  		     igt_stats_get_median(st)*1e-6,
> -		     igt_stats_get_max(st)*1e-6);
> +		     igt_stats_get_max(st)*1e-6,
> +		     limit*1e-6, limit*5e-6);
>  }
>  
>  static void __test_banned(int fd)
> -- 
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox series

Patch

diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index bd5266104..ac85a2eff 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -259,7 +259,7 @@  static void check_wait(int fd, uint32_t bo, unsigned int wait, igt_stats_t *st)
 
 static void check_wait_elapsed(int fd, igt_stats_t *st)
 {
-	double med, max;
+	double med, max, limit;
 
 	igt_info("Completed %d resets, wakeups took %.3f+-%.3fms (min:%.3fms, median:%.3fms, max:%.3fms)\n",
 		 st->n_values,
@@ -272,15 +272,24 @@  static void check_wait_elapsed(int fd, igt_stats_t *st)
 	if (st->n_values < 9)
 		return; /* too few for stable median */
 
+	/*
+	 * Older platforms need to reset the display (incl. modeset to off,
+	 * modeset back on) around resets, so may take a lot longer.
+	 */
+	limit = 250e6;
+	if (intel_gen(intel_get_drm_devid(fd)) < 5)
+		limit += 300e6; /* guestimate for 2x worstcase modeset */
+
 	med = igt_stats_get_median(st);
 	max = igt_stats_get_max(st);
-	igt_assert_f(med < 250e6 && max < 1250e6,
-		     "Wake up following reset+wedge took %.3f+-%.3fms (min:%.3fms, median:%.3fms, max:%.3fms)\n",
+	igt_assert_f(med < limit && max < 5 * limit,
+		     "Wake up following reset+wedge took %.3f+-%.3fms (min:%.3fms, median:%.3fms, max:%.3fms); limit set to %.0fms on average and %.0fms maximum\n",
 		     igt_stats_get_mean(st)*1e-6,
 		     igt_stats_get_std_deviation(st)*1e-6,
 		     igt_stats_get_min(st)*1e-6,
 		     igt_stats_get_median(st)*1e-6,
-		     igt_stats_get_max(st)*1e-6);
+		     igt_stats_get_max(st)*1e-6,
+		     limit*1e-6, limit*5e-6);
 }
 
 static void __test_banned(int fd)