[Intel-gfx] [PATCH] drm/i915/selftests: Measure the energy consumed while in RC6

Chris Wilson chris at chris-wilson.co.uk
Tue Mar 24 20:56:02 UTC 2020


Quoting Chris Wilson (2020-03-24 20:44:55)
> +       dt = ktime_get();
> +       rc0_power = energy_uJ(rc6);
>         res[0] = rc6_residency(rc6);
>         msleep(250);
>         res[1] = rc6_residency(rc6);
> +       rc0_power = div64_u64(energy_uJ(rc6) - rc0_power,
> +                             ktime_to_ns(ktime_sub(ktime_get(), dt)));

Did you forget this was in ns? You did!
-Chris


More information about the Intel-gfx mailing list