igt/gem_exec_gttfill: Reduce overhead in setting up filler batches

Since all the batches start with the same content, we can reuse the same
buf to fill them.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 192a0cf..7dca383 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -26,6 +26,7 @@
 #include <sched.h>
 
 #include "igt.h"
+#include "igt_rand.h"
 #include "igt_stats.h"
 
 #if defined(__x86_64__) || defined(__i386__)
@@ -41,16 +42,6 @@
 	drmModeRes *resources;
 };
 
-static uint32_t state = 0x12345678;
-
-static uint32_t
-hars_petruska_f54_1_random (void)
-{
-#define rol(x,k) ((x << k) | (x >> (32-k)))
-    return state = (state ^ rol (state, 5) ^ rol (state, 24)) + 0x37798849;
-#undef rol
-}
-
 static void stress(struct data *data,
 		   uint32_t *crtc_id, unsigned num_crtcs,
 		   int num_children, unsigned mode,
@@ -94,9 +85,9 @@
 		CPU_SET(child, &allowed);
 		sched_setaffinity(getpid(), sizeof(cpu_set_t), &allowed);
 
-		state ^= child;
+		hars_petruska_f54_1_random_perturb(child);
 		igt_until_timeout(timeout) {
-			arg.crtc_id = crtc_id[hars_petruska_f54_1_random() % num_crtcs];
+			arg.crtc_id = crtc_id[hars_petruska_f54_1_random_unsafe() % num_crtcs];
 			do_ioctl(data->fd, DRM_IOCTL_MODE_CURSOR, &arg);
 			count++;
 		}