diff options
author | Robert Bragg <robert@sixbynine.org> | 2016-11-08 14:07:55 +0000 |
---|---|---|
committer | Robert Bragg <robert@sixbynine.org> | 2016-11-17 13:06:06 +0000 |
commit | 3a43ceb0a14bb09b0813564ad686b9b1ee869726 (patch) | |
tree | 0e83d158d31c2a3b8b2feba1c3b04b1e5f66a1c1 /tests/gem_exec_parse.c | |
parent | 263c46ba1d718523d110a3dbf58bb7dffb3d7f66 (diff) |
igt/gem_exec_parse: update cmd-crossing-page for >= v8
Since an access violation won't return an error to userspace for v >= 8
of the command parser this updates the cmd-crossing-page test to
explicitly read back from SO_WRITE_OFFSET[0] to see that the command
wasn't squashed to a NOOP.
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Diffstat (limited to 'tests/gem_exec_parse.c')
-rw-r--r-- | tests/gem_exec_parse.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c index d5769e42..5c67e12c 100644 --- a/tests/gem_exec_parse.c +++ b/tests/gem_exec_parse.c @@ -531,14 +531,25 @@ igt_main igt_subtest("cmd-crossing-page") { uint32_t lri_ok[] = { MI_LOAD_REGISTER_IMM, - 0x5280, /* allowed register address (SO_WRITE_OFFSET[0]) */ - 0x1, + SO_WRITE_OFFSET_0, /* allowed register address */ + 0xdcbaabc0, /* [1:0] MBZ */ + MI_BATCH_BUFFER_END, + }; + uint32_t store_reg[] = { + MI_STORE_REGISTER_MEM | (3 - 2), + SO_WRITE_OFFSET_0, + 0, /* reloc */ MI_BATCH_BUFFER_END, }; exec_split_batch(fd, lri_ok, sizeof(lri_ok), I915_EXEC_RENDER, 0); + exec_batch_patched(fd, handle, + store_reg, + sizeof(store_reg), + 2 * sizeof(uint32_t), /* reloc */ + 0xdcbaabc0); } igt_subtest("oacontrol-tracking") { |