gem_stress: option to disable tiling

Of all the things I've tried, this seems to be the only thing
to fix tile corruptions reliably on gen2&gen3 (safe for outright
disabling the render copy).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2011-04-04 22:10:21 +02:00
parent 272c898807
commit e68652cad6
2 changed files with 12 additions and 2 deletions

View File

@ -448,6 +448,8 @@ static void init_set(unsigned set)
else else
buffers[set][i].tiling = I915_TILING_NONE; buffers[set][i].tiling = I915_TILING_NONE;
r >>= 2; r >>= 2;
if (options.no_tiling)
buffers[set][i].tiling = I915_TILING_NONE;
if (buffers[set][i].tiling == I915_TILING_NONE) { if (buffers[set][i].tiling == I915_TILING_NONE) {
/* min 64 byte stride */ /* min 64 byte stride */
@ -557,7 +559,8 @@ static void parse_options(int argc, char **argv)
{"gpu-busy-load", 1, 0, 'g'}, {"gpu-busy-load", 1, 0, 'g'},
{"buffer-count", 1, 0, 'c'}, {"buffer-count", 1, 0, 'c'},
{"trace-tile", 1, 0, 't'}, {"trace-tile", 1, 0, 't'},
{"disable-render", 0, 0, 'r'} {"disable-render", 0, 0, 'r'},
{"untiled", 0, 0, 'u'}
}; };
options.scratch_buf_size = 256*4096; options.scratch_buf_size = 256*4096;
@ -566,8 +569,9 @@ static void parse_options(int argc, char **argv)
options.num_buffers = 0; options.num_buffers = 0;
options.trace_tile = -1; options.trace_tile = -1;
options.use_render = 1; options.use_render = 1;
options.no_tiling = 0;
while((c = getopt_long(argc, argv, "ns:g:c:t:r", while((c = getopt_long(argc, argv, "ns:g:c:t:ru",
long_options, &option_index)) != -1) { long_options, &option_index)) != -1) {
switch(c) { switch(c) {
case 'd': case 'd':
@ -606,6 +610,11 @@ static void parse_options(int argc, char **argv)
case 'r': case 'r':
options.use_render = 0; options.use_render = 0;
printf("disabling render copy\n"); printf("disabling render copy\n");
break;
case 'u':
options.no_tiling = 1;
printf("disabling tiling\n");
break;
default: default:
printf("unkown command options\n"); printf("unkown command options\n");
break; break;

View File

@ -31,6 +31,7 @@ struct option_struct {
int no_hw; int no_hw;
int gpu_busy_load; int gpu_busy_load;
int use_render; int use_render;
int no_tiling;
}; };
extern struct option_struct options; extern struct option_struct options;