]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/selftests: Tweak the tolerance for clock ticks to 12.5%
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 28 Apr 2020 11:43:07 +0000 (12:43 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 28 Apr 2020 13:25:21 +0000 (14:25 +0100)
Give a small bump for our tolerance on comparing the expected vs
measured clock ticks/time from 10% to 12.5% to accommodate a bad result
on Sandybridge that was off by 10.3%. Hopefully, that is the worst we
will see.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1802
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200428114307.5153-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/selftest_rps.c

index 6ce7003bf92ff325d56c794d6544fdb6e18eb8fa..21338c1980de7f2aecf788c8f733f9d23123a9ef 100644 (file)
@@ -312,15 +312,15 @@ int live_rps_clock_interval(void *arg)
                                engine->name, cycles, time, ktime_to_ns(dt), expected,
                                gt->clock_frequency / 1000);
 
-                       if (10 * time < 9 * ktime_to_ns(dt) ||
-                           10 * time > 11 * ktime_to_ns(dt)) {
+                       if (10 * time < 8 * ktime_to_ns(dt) ||
+                           8 * time > 10 * ktime_to_ns(dt)) {
                                pr_err("%s: rps clock time does not match walltime!\n",
                                       engine->name);
                                err = -EINVAL;
                        }
 
-                       if (10 * expected < 9 * cycles ||
-                           10 * expected > 11 * cycles) {
+                       if (10 * expected < 8 * cycles ||
+                           8 * expected > 10 * cycles) {
                                pr_err("%s: walltime does not match rps clock ticks!\n",
                                       engine->name);
                                err = -EINVAL;