From ee6a40fd01871b79a391646e15ce76bd9d5c1138 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 3 Feb 2017 21:57:33 +0000 Subject: igt: Skip MI_STORE_DWORD_IMM on gen2 On gen2 MI_STORE_DWORD_IMM operates on a physical, not virtual, address i.e. we can't use it. Signed-off-by: Chris Wilson --- tests/gem_sync.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/gem_sync.c') diff --git a/tests/gem_sync.c b/tests/gem_sync.c index 60ba38cc..a6669a8f 100644 --- a/tests/gem_sync.c +++ b/tests/gem_sync.c @@ -77,7 +77,7 @@ out: static bool can_mi_store_dword(int gen, unsigned engine) { - return !(gen == 6 && (engine & ~(3<<13)) == I915_EXEC_BSD); + return gen > 2 && !(gen == 6 && (engine & ~(3<<13)) == I915_EXEC_BSD); } static void @@ -719,6 +719,11 @@ out: close(dir); } +static bool can_store_dword_imm(int fd) +{ + return intel_gen(intel_gen(intel_get_drm_devid(fd))) > 2; +} + igt_main { const struct intel_execution_engine *e; @@ -729,6 +734,7 @@ igt_main igt_fixture { fd = drm_open_driver(DRIVER_INTEL); + igt_require(can_store_dword_imm(fd)); print_welcome(fd); igt_fork_hang_detector(fd); -- cgit v1.2.3