From d7e0cc6ca4174871660ec78a5a063d9b564e120c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 24 Feb 2018 19:10:54 +0000 Subject: igt/gem_busy: Fix extended-bsd aliasing checks Although we want to specify exactly which physical engine to run on, the busy ioctl can only return the I915_EXEC_RING identifier, i.e. the aliased I915_EXEC_BSD for vcs0/vcs1. Horrors. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105248 Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- tests/gem_busy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/gem_busy.c b/tests/gem_busy.c index 831bbab1..fcff51a2 100644 --- a/tests/gem_busy.c +++ b/tests/gem_busy.c @@ -166,6 +166,7 @@ static void one(int fd, unsigned ring, unsigned test_flags) struct drm_i915_gem_relocation_entry store[1024+1]; struct drm_i915_gem_execbuffer2 execbuf; unsigned size = ALIGN(ARRAY_SIZE(store)*16 + 4, 4096); + const unsigned uabi = ring & 63; uint32_t read[2], write[2]; struct timespec tv; uint32_t *batch, *bbe; @@ -267,11 +268,11 @@ static void one(int fd, unsigned ring, unsigned test_flags) timeout = 1; } - igt_assert_eq(write[SCRATCH], ring); - igt_assert_eq_u32(read[SCRATCH], 1 << ring); + igt_assert_eq(write[SCRATCH], uabi); + igt_assert_eq_u32(read[SCRATCH], 1 << uabi); igt_assert_eq(write[BATCH], 0); - igt_assert_eq_u32(read[BATCH], 1 << ring); + igt_assert_eq_u32(read[BATCH], 1 << uabi); /* Calling busy in a loop should be enough to flush the rendering */ memset(&tv, 0, sizeof(tv)); -- cgit v1.2.3