diff --git a/tests/gem_stress.c b/tests/gem_stress.c index d098a9b1..c143431e 100644 --- a/tests/gem_stress.c +++ b/tests/gem_stress.c @@ -617,7 +617,8 @@ static void parse_options(int argc, char **argv) {"disable-render", 0, 0, 'r'}, {"untiled", 0, 0, 'u'}, {"x-tiled", 0, 0, 'x'}, - {"use-cpu-maps", 0, 0, 'm'} + {"use-cpu-maps", 0, 0, 'm'}, + {"rounds", 1, 0, 'o'}, }; options.scratch_buf_size = 256*4096; @@ -629,8 +630,9 @@ static void parse_options(int argc, char **argv) options.use_blt = 1; options.forced_tiling = -1; options.use_cpu_maps = 0; + options.total_rounds = 512; - while((c = getopt_long(argc, argv, "ds:g:c:t:rbuxm", + while((c = getopt_long(argc, argv, "ds:g:c:t:rbuxmo:", long_options, &option_index)) != -1) { switch(c) { case 'd': @@ -691,6 +693,10 @@ static void parse_options(int argc, char **argv) options.forced_tiling = I915_TILING_NONE; printf("disabling tiling\n"); break; + case 'o': + options.total_rounds = atoi(optarg); + printf("total rounds %i\n", options.total_rounds); + break; default: printf("unkown command options\n"); break; @@ -816,7 +822,7 @@ int main(int argc, char **argv) fan_out(); - for (i = 0; i < 512; i++) { + for (i = 0; i < options.total_rounds; i++) { printf("round %i\n", i); if (i % 64 == 63) { fan_in_and_check(); diff --git a/tests/gem_stress.h b/tests/gem_stress.h index 3b1d456a..6bddf79f 100644 --- a/tests/gem_stress.h +++ b/tests/gem_stress.h @@ -36,6 +36,7 @@ struct option_struct { int use_blt; int forced_tiling; int use_cpu_maps; + int total_rounds; }; extern struct option_struct options;