gem_stress: '-b' option to disable BLT copyfunc
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 25 May 2011 12:41:28 +0000 (13:41 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 25 May 2011 12:43:33 +0000 (13:43 +0100)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
tests/gem_stress.c
tests/gem_stress.h

index 46bf4e2..1f22862 100644 (file)
@@ -335,10 +335,16 @@ static void next_copyfunc(int tile)
                if (tile == options.trace_tile)
                        printf(" using render\n");
                copyfunc = render_copyfunc;
-       } else {
+       } else if (options.use_blt){
                if (tile == options.trace_tile)
                        printf(" using blitter\n");
                copyfunc = blitter_copyfunc;
+       } else if (options.use_render){
+               if (tile == options.trace_tile)
+                       printf(" using render\n");
+               copyfunc = render_copyfunc;
+       } else {
+               copyfunc = cpu_copyfunc;
        }
 
        copyfunc_seq++;
@@ -602,6 +608,7 @@ static void parse_options(int argc, char **argv)
                {"gpu-busy-load", 1, 0, 'g'},
                {"buffer-count", 1, 0, 'c'},
                {"trace-tile", 1, 0, 't'},
+               {"disable-blt", 0, 0, 'b'},
                {"disable-render", 0, 0, 'r'},
                {"untiled", 0, 0, 'u'},
                {"x-tiled", 0, 0, 'x'},
@@ -614,10 +621,11 @@ static void parse_options(int argc, char **argv)
        options.num_buffers = 0;
        options.trace_tile = -1;
        options.use_render = 1;
+       options.use_blt = 1;
        options.forced_tiling = -1;
        options.use_cpu_maps = 0;
 
-       while((c = getopt_long(argc, argv, "ds:g:c:t:ruxm",
+       while((c = getopt_long(argc, argv, "ds:g:c:t:rbuxm",
                               long_options, &option_index)) != -1) {
                switch(c) {
                case 'd':
@@ -657,6 +665,10 @@ static void parse_options(int argc, char **argv)
                        options.use_render = 0;
                        printf("disabling render copy\n");
                        break;
+               case 'b':
+                       options.use_blt = 0;
+                       printf("disabling blt copy\n");
+                       break;
                case 'u':
                        options.forced_tiling = I915_TILING_NONE;
                        printf("disabling tiling\n");
index e91453b..8c15782 100644 (file)
@@ -32,6 +32,7 @@ struct option_struct {
     int no_hw;
     int gpu_busy_load;
     int use_render;
+    int use_blt;
     int forced_tiling;
     int use_cpu_maps;
 };