diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-02-29 10:50:06 +0000 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-02-29 10:59:02 +0000 |
| commit | d6cebd806cef8693201eaa4e86ac98763bf47e0c (patch) | |
| tree | d71722e3938251b23d5eb7f305717756caf1d1ed /lib | |
| parent | 0c01647760d5b64ec4fa8b60c4058fec777b80b0 (diff) | |
i915/gem_pwrite: Replace exhaustive tests with bounded probes
Our current tests for pwrite do an exhaustive test of each page within
the object in multiple directions to try and trick the page lookup into
flummoxing. This is quite time consuming, so replace those for CI with a
just a randomised, time-bounded check.
Closes: https://gitlab.freedesktop.org/drm/intel/issues/1283
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/igt_rand.c | 8 | ||||
| -rw-r--r-- | lib/igt_rand.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/igt_rand.c b/lib/igt_rand.c index 664a4764..16a6ba9b 100644 --- a/lib/igt_rand.c +++ b/lib/igt_rand.c @@ -23,6 +23,14 @@ uint32_t hars_petruska_f54_1_random(uint32_t *s) #undef rol } +uint64_t hars_petruska_f54_1_random64(uint32_t *s) +{ + uint32_t l = hars_petruska_f54_1_random(s); + uint32_t h = hars_petruska_f54_1_random(s); + + return (uint64_t)h << 32 | l; +} + uint32_t hars_petruska_f54_1_random_unsafe(void) { return hars_petruska_f54_1_random(&global); diff --git a/lib/igt_rand.h b/lib/igt_rand.h index c9cb3243..00156804 100644 --- a/lib/igt_rand.h +++ b/lib/igt_rand.h @@ -27,6 +27,7 @@ #include <stdint.h> uint32_t hars_petruska_f54_1_random(uint32_t *state); +uint64_t hars_petruska_f54_1_random64(uint32_t *s); uint32_t hars_petruska_f54_1_random_seed(uint32_t seed); uint32_t hars_petruska_f54_1_random_unsafe(void); |
