gem_exec_lut_handle: Do a warm up pass before timing
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 May 2014 12:10:54 +0000 (13:10 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 May 2014 12:11:41 +0000 (13:11 +0100)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
tests/gem_exec_lut_handle.c

index dc78efb..6ee7527 100644 (file)
@@ -155,6 +155,7 @@ igt_simple_main
                        for (i = 0, m = 1; m <= MAX_NUM_RELOC; m *= 2, i++) {
                                struct timeval start, end;
 
+                               do_or_die(exec(fd, n, m, 0 | p->flags));
                                gettimeofday(&start, NULL);
                                for (count = 0; count < 1000; count++)
                                        do_or_die(exec(fd, n, m, 0 | p->flags));
@@ -162,6 +163,7 @@ igt_simple_main
                                gem_sync(fd, gem_exec[MAX_NUM_EXEC].handle);
                                elapsed[i][0] = ELAPSED(&start, &end);
 
+                               do_or_die(exec(fd, n, m, USE_LUT | p->flags));
                                gettimeofday(&start, NULL);
                                for (count = 0; count < 1000; count++)
                                        do_or_die(exec(fd, n, m, USE_LUT | p->flags));