This updates the checking of disallowed loads to set a distinguishable value before the load and explicitly check the load was a NOOP by reading back the final value. Signed-off-by: Robert Bragg <robert@xxxxxxxxxxxxx> --- tests/gem_exec_parse.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c index d6a2885..f241ab7 100644 --- a/tests/gem_exec_parse.c +++ b/tests/gem_exec_parse.c @@ -305,12 +305,17 @@ static void hsw_load_register_reg(void) }; int fd; uint32_t handle; + int parser_version; + int bad_lrr_errno; /* Open again to get a non-master file descriptor */ fd = drm_open_driver(DRIVER_INTEL); + parser_version = command_parser_version(fd); + bad_lrr_errno = parser_version >= 8 ? 0 : -EINVAL; + igt_require(IS_HASWELL(intel_get_drm_devid(fd))); - igt_require(command_parser_version(fd) >= 7); + igt_require(parser_version >= 7); handle = gem_create(fd, 4096); @@ -335,10 +340,21 @@ static void hsw_load_register_reg(void) } for (int i = 0 ; i < ARRAY_LEN(disallowed_regs); i++) { + exec_batch(fd, handle, init_gpr0, sizeof(init_gpr0), + I915_EXEC_RENDER, + 0); + exec_batch_patched(fd, handle, + store_gpr0, sizeof(store_gpr0), + 2 * sizeof(uint32_t), /* reloc */ + 0xabcdabc0); do_lrr[1] = disallowed_regs[i]; exec_batch(fd, handle, do_lrr, sizeof(do_lrr), I915_EXEC_RENDER, - -EINVAL); + bad_lrr_errno); + exec_batch_patched(fd, handle, + store_gpr0, sizeof(store_gpr0), + 2 * sizeof(uint32_t), /* reloc */ + 0xabcdabc0); } close(fd); -- 2.10.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx