[Intel-gfx] [RFC] drm/i915/selftests: Autotune timeouts

Chris Wilson chris at chris-wilson.co.uk
Fri Nov 15 18:45:15 UTC 2019


Quoting Chris Wilson (2019-11-15 18:41:56)
> +unsigned long igt_request_timeout(struct intel_engine_cs *engine,
> +                                 unsigned int factor)
> +{
> +       unsigned long base;
> +
> +       if (is_power_of_2(engine->mask)) {
> +               base = ewma_delay_read(&engine->delay);
> +       } else {
> +               intel_engine_mask_t mask = engine->mask, tmp;
> +               unsigned int n = 0;
> +
> +               base = 0;
> +               for_each_engine_masked(engine, engine->gt, mask, tmp)
> +                       base += ewma_delay_read(&engine->delay), n++;
> +               base /= n;

I forgot to switch to max().
-Chris


More information about the Intel-gfx mailing list