diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-10-16 21:01:47 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-10-16 21:01:47 +0200 |
commit | dc4ac606a6d89bbe0713ac1a75f8205f1fcaa36d (patch) | |
tree | 26edfac03a1cba87ec3b953d7a126fecc7e123cf | |
parent | 081b0165980f73a5daf23b5bf4b3cd42cd18cbae (diff) |
-rw-r--r-- | tests/gem_hangcheck_forcewake.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/tests/gem_hangcheck_forcewake.c b/tests/gem_hangcheck_forcewake.c index b0aeb530..8e63bba1 100644 --- a/tests/gem_hangcheck_forcewake.c +++ b/tests/gem_hangcheck_forcewake.c @@ -63,9 +63,7 @@ int main(int argc, char **argv) devid = intel_get_drm_devid(fd); batch = intel_batchbuffer_alloc(bufmgr, devid); - srandom(0xdeadbeef); - - act_size = 1024 + random() % 1025; + act_size = 2048; printf("filling ring\n"); drm_intel_bo_unreference(bo); bo = drm_intel_bo_alloc_tiled(bufmgr, "tiled bo", act_size, act_size, @@ -76,16 +74,7 @@ int main(int argc, char **argv) if (IS_965(devid)) pitch /= 4; - for (i = 0; i < 1000000; i++) { - unsigned src_x, src_y, dst_x, dst_y, h, w; - src_x = random()%(act_size - MAX_BLT_SIZE); - src_y = random()%(act_size - MAX_BLT_SIZE); - dst_x = random()%(act_size - MAX_BLT_SIZE); - dst_y = random()%(act_size - MAX_BLT_SIZE); - - w = random()%MAX_BLT_SIZE + 1; - h = random()%MAX_BLT_SIZE + 1; - + for (i = 0; i < 100000; i++) { BEGIN_BATCH(8); OUT_BATCH(XY_SRC_COPY_BLT_CMD | XY_SRC_COPY_BLT_WRITE_ALPHA | @@ -95,18 +84,19 @@ int main(int argc, char **argv) OUT_BATCH((3 << 24) | /* 32 bits */ (0xcc << 16) | /* copy ROP */ pitch); - OUT_BATCH(dst_y << 16 | dst_x); - OUT_BATCH((dst_y+h) << 16 | (dst_x+w)); + OUT_BATCH(0 << 16 | 1024); + OUT_BATCH((2048) << 16 | (2048)); OUT_RELOC_FENCED(bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0); - OUT_BATCH(src_y << 16 | src_x); + OUT_BATCH(0 << 16 | 0); OUT_BATCH(pitch); OUT_RELOC_FENCED(bo, I915_GEM_DOMAIN_RENDER, 0, 0); ADVANCE_BATCH(); } printf("waiting\n"); - sleep(5); + sleep(15); + printf("done waiting\n"); drm_intel_bo_unreference(bo); intel_batchbuffer_free(batch); |