[Intel-gfx] [PATCH igt] igt/pm_rc6_residency: Allow some leeway on the upper %% bound
Sagar Arun Kamble
sagar.a.kamble at intel.com
Tue Oct 17 10:44:23 UTC 2017
On 10/17/2017 3:51 PM, Chris Wilson wrote:
> As we use rounding when converting from hw clocks to time, we may report
> a residency greater than wallclock (by a small margin), so allow us to
> overshoot by 5% (just due to our inaccuracy).
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Sagar Arun Kamble <sagar.a.kamble at intel.com>
> ---
> tests/pm_rc6_residency.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/pm_rc6_residency.c b/tests/pm_rc6_residency.c
> index d6fc4701..520d3b54 100644
> --- a/tests/pm_rc6_residency.c
> +++ b/tests/pm_rc6_residency.c
> @@ -79,9 +79,9 @@ static void residency_accuracy(unsigned int diff,
>
> ratio = (double)diff / duration;
>
> - igt_info("Residency in %s or deeper state: %u ms (sleep duration %u ms) (ratio to expected duration: %.02f)\n",
> - name_of_rc6_residency, diff, duration, ratio);
> - igt_assert_f(ratio > 0.9 && ratio <= 1,
> + igt_info("Residency in %s or deeper state: %u ms (sleep duration %u ms) (%.1f%% of expected duration)\n",
> + name_of_rc6_residency, diff, duration, 100*ratio);
> + igt_assert_f(ratio > 0.9 && ratio <= 1.05,
> "Sysfs RC6 residency counter is inaccurate.\n");
> }
>
More information about the Intel-gfx
mailing list