public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH igt] igt/gem_busy: Fix extended-bsd aliasing checks
@ 2018-02-24 19:14 Chris Wilson
  2018-02-24 19:30 ` Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Chris Wilson @ 2018-02-24 19:14 UTC (permalink / raw)
  To: intel-gfx

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.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 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));
-- 
2.16.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-26  9:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-24 19:14 [PATCH igt] igt/gem_busy: Fix extended-bsd aliasing checks Chris Wilson
2018-02-24 19:30 ` Chris Wilson
2018-02-25 13:44 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-02-25 14:45 ` ✗ Fi.CI.IGT: warning " Patchwork
2018-02-26  9:17 ` [PATCH igt] " Tvrtko Ursulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox