From 1baab2e43a40fe33606668c0be19ab772e25cc7a Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Wed, 30 Mar 2011 21:46:04 +0200 Subject: [PATCH] gem_stress: option to disable render copy It seems to be randomly broken, every boot in a slightly different way on my i945gme. Works quite well on my Q35. So add an option to disable it till this is resolved. Well, more testing seems to suggest that I've been hunting ghosts. Or maybe not and it works now simply because it's a different day. Anyway, leave this in for future testing. Signed-off-by: Daniel Vetter --- tests/gem_stress.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/gem_stress.c b/tests/gem_stress.c index aaa57c5..61e4b3c 100644 --- a/tests/gem_stress.c +++ b/tests/gem_stress.c @@ -114,6 +114,7 @@ static struct { int trace_tile; int no_hw; int gpu_busy_load; + int use_render; } options; #define MAX_BUFS 4096 @@ -574,7 +575,7 @@ static void next_copyfunc(int tile) if (tile == options.trace_tile) printf(" using prw\n"); copyfunc = prw_copyfunc; - } else if (copyfunc_seq % 3 == 0) { + } else if (copyfunc_seq % 3 == 0 && options.use_render) { if (tile == options.trace_tile) printf(" using render\n"); copyfunc = render_copyfunc; @@ -833,7 +834,8 @@ static void parse_options(int argc, char **argv) {"buf-size", 1, 0, 's'}, {"gpu-busy-load", 1, 0, 'g'}, {"buffer-count", 1, 0, 'c'}, - {"trace-tile", 1, 0, 't'} + {"trace-tile", 1, 0, 't'}, + {"disable-render", 0, 0, 'r'} }; options.scratch_buf_size = 256*4096; @@ -841,8 +843,9 @@ static void parse_options(int argc, char **argv) options.gpu_busy_load = 0; options.num_buffers = 0; options.trace_tile = -1; + options.use_render = 1; - while((c = getopt_long(argc, argv, "ns:g:c:t:", + while((c = getopt_long(argc, argv, "ns:g:c:t:r", long_options, &option_index)) != -1) { switch(c) { case 'd': @@ -878,6 +881,9 @@ static void parse_options(int argc, char **argv) options.trace_tile = atoi(optarg); printf("tracing tile %i\n", options.trace_tile); break; + case 'r': + options.use_render = 0; + printf("disabling render copy\n"); default: printf("unkown command options\n"); break; -- 2.7.4